5555555555555555555555555

Widget buildCaptureButton({ required BuildContext context, required BoxConstraints constraints, }) { final showProgressIndicator = isCaptureButtonTapDown || MediaQuery.accessibleNavigationOf(context); if (!showProgressIndicator && isRecordingVideo) { return const SizedBox.shrink(); } const size = Size.square(82.0); return MergeSemantics( child: Semantics( label: isRecordingVideo ? textDelegate.sActionStopRecordingHint : textShootingButtonLabel, button: true, onTap: onTap, onTapHint: onTapHint, onLongPress: onLongPress, onLongPressHint: onLongPressHint, child: Listener( behavior: HitTestBehavior.opaque, onPointerUp: onPointerUp, onPointerMove: onPointerMove(constraints), child: GestureDetector( onTap: onTap, onLongPress: onLongPress, onTapDown: (_) => safeSetState(() { isCaptureButtonTapDown = true; print("lal 111111111111111111 按下"); } ), onTapUp: (_) => safeSetState(() { if (!enableTapRecording) { isCaptureButtonTapDown = false; print("lal 222222222222222222222222抬起"); } }), onTapCancel: () => safeSetState(() { isCaptureButtonTapDown = false; print("lal 33333333333333333333取消点击");}), onLongPressStart: (_) => safeSetState((){ isCaptureButtonTapDown = true; print("lal 444444444444444444444444444444长按开始");}), onLongPressEnd: (_) => safeSetState(() {isCaptureButtonTapDown = false; print("lal 5555555555555555555555555长按结束");}), onLongPressCancel: () => safeSetState(() {isCaptureButtonTapDown = false; print("lal 6666666666666666666666666666666取消长按");}), child: SizedBox.fromSize( size: size, child: Stack( fit: StackFit.expand, children: [ AnimatedContainer( duration: const Duration(microseconds: 100), padding: EdgeInsets.all(isCaptureButtonTapDown ? 16 : 8), decoration: BoxDecoration( border: Border.all( color: Colors.white, strokeAlign: BorderSide.strokeAlignCenter, width: 2, ), shape: BoxShape.circle, ), child: const DecoratedBox( decoration: BoxDecoration( color: Colors.white, shape: BoxShape.circle, ), ), ), if (shouldCaptureButtonDisplay) RotatedBox( quarterTurns: enableScaledPreview ? 0 : cameraQuarterTurns, child: CameraProgressButton( isAnimating: showProgressIndicator && isShootingButtonAnimate, duration: pickerConfig.maximumRecordingDuration!, size: size, // ignore: deprecated_member_use ringsColor: Theme.of(context).indicatorColor, ringsWidth: 3, ), ), ], ), ), ), ), ), ); } 如何可以检测这个按钮是正常显示在ui上的
11-12
int CONFIG_VENC_CHN_ATTR(int VencChn, ENCODERCONFIG *compess) { HI_U8 flag = 0; HI_S32 s32Ret; VENC_CHN_ATTR_S stVencChnAttr; VENC_RECV_PIC_PARAM_S stRecvParam; HI_U32 u32StatTime = 1; //编码类型 PAYLOAD_TYPE_E enType; PAYLOAD_TYPE_E curenType; if(compess->encoderType==1) { enType =PT_H264; } else if(compess->encoderType==8) { enType =PT_H265; } SIZE_S stPicSize; stPicSize.u32Height=compess->height; stPicSize.u32Width=compess->width; //码率类型 unsigned int enRcMode =compess->bitType; HI_FR32 u32FrameRate = compess->videoEncoder.videoFrameRate; HI_U16 u32Gop = compess->videoEncoder.intervalFrameI; HI_U32 u32BitRate = compess->videoEncoder.maxVideoBitrate; MPP_CHN_S stSrcChn; stSrcChn.enModId = HI_ID_VPSS; stSrcChn.s32DevId = 0; stSrcChn.s32ChnId = 0; curenType=stVencChnAttr.stVencAttr.enType; printf("----curenType=%d enType=%d\n",curenType,enType); flag = 1; s32Ret = HI_MPI_VENC_StopRecvFrame(VencChn); if (HI_SUCCESS != s32Ret) { printf("HI_MPI_VENC_StopRecvPic vechn[%d] failed with %#x!\n", \ VencChn, s32Ret); return s32Ret; } printf("HI_MPI_VENC_StopRecvFrame success\n"); bcloseconsock=1; int i= 0; for ( i = 0; i < 8; i++) { s32Ret = HI_MPI_RGN_DetachFromChn(20+(VencChn%3)*10+i, &stSrcChn); if(HI_SUCCESS != s32Ret) { SAMPLE_PRT("HI_MPI_RGN_DetachFromChn failed with region = %d s32Ret: 0x%x.\n", i, s32Ret); return HI_FAILURE; } } VPSS_GRP VpssGrp = 0; VPSS_CHN VpssChn = VPSS_CHN0; memset(&stVencChnAttr,0,sizeof(VENC_CHN_ATTR_S)); stVencChnAttr.stVencAttr.enType = enType; stVencChnAttr.stVencAttr.u32MaxPicWidth = stPicSize.u32Width; stVencChnAttr.stVencAttr.u32MaxPicHeight = stPicSize.u32Height; stVencChnAttr.stVencAttr.u32PicWidth = stPicSize.u32Width;/*the picture width*/ stVencChnAttr.stVencAttr.u32PicHeight = stPicSize.u32Height;/*the picture height*/ stVencChnAttr.stVencAttr.u32BufSize = stPicSize.u32Width * stPicSize.u32Height * 2;/*stream buffer size*/ stVencChnAttr.stVencAttr.u32Profile = 0; stVencChnAttr.stVencAttr.bByFrame = HI_TRUE;/*get stream mode is slice mode or frame mode?*/ #if 1 switch(enType) { case PT_H264: { if (VENC_RC_MODE_H264CBR == enRcMode) { printf("-----h264 VENC_RC_MODE_H264CBR\n"); if(stVencChnAttr.stRcAttr.enRcMode==VENC_RC_MODE_H264CBR) { stVencChnAttr.stRcAttr.stH264Cbr.u32Gop = u32Gop; if(u32FrameRate > stVencChnAttr.stRcAttr.stH264Cbr.u32SrcFrameRate) { stVencChnAttr.stRcAttr.stH264Cbr.u32SrcFrameRate = u32FrameRate; stVencChnAttr.stRcAttr.stH264Cbr.fr32DstFrameRate = u32FrameRate; } else { stVencChnAttr.stRcAttr.stH264Cbr.fr32DstFrameRate = u32FrameRate; } stVencChnAttr.stRcAttr.stH264Cbr.u32BitRate = u32BitRate; } else { stVencChnAttr.stRcAttr.enRcMode = VENC_RC_MODE_H264CBR; stVencChnAttr.stRcAttr.stH264Cbr.u32Gop = u32Gop; if(u32FrameRate > stVencChnAttr.stRcAttr.stH264Cbr.u32SrcFrameRate) { stVencChnAttr.stRcAttr.stH264Cbr.u32SrcFrameRate = u32FrameRate; stVencChnAttr.stRcAttr.stH264Cbr.fr32DstFrameRate = u32FrameRate; } else { stVencChnAttr.stRcAttr.stH264Cbr.fr32DstFrameRate = u32FrameRate; } stVencChnAttr.stRcAttr.stH264Cbr.u32BitRate = u32BitRate; } } else if (VENC_RC_MODE_H264VBR == enRcMode) { printf("-----h264 VENC_RC_MODE_H264VBR\n"); if(stVencChnAttr.stRcAttr.enRcMode==VENC_RC_MODE_H264VBR) { printf("-----1111111111111111111111\n"); stVencChnAttr.stRcAttr.stH264Vbr.u32Gop = u32Gop; if(u32FrameRate > stVencChnAttr.stRcAttr.stH264Vbr.u32SrcFrameRate) { printf("-----22222222222222222222\n"); stVencChnAttr.stRcAttr.stH264Vbr.u32SrcFrameRate = u32FrameRate; stVencChnAttr.stRcAttr.stH264Vbr.fr32DstFrameRate = u32FrameRate; } else { printf("-----333333333333333333333333\n"); stVencChnAttr.stRcAttr.stH264Vbr.fr32DstFrameRate = u32FrameRate; } stVencChnAttr.stRcAttr.stH264Vbr.u32MaxBitRate = u32BitRate; } else { printf("-----4444444444444444444444444444\n"); stVencChnAttr.stRcAttr.enRcMode = VENC_RC_MODE_H264VBR; stVencChnAttr.stRcAttr.stH264Vbr.u32Gop = u32Gop; if(u32FrameRate > stVencChnAttr.stRcAttr.stH264Vbr.u32SrcFrameRate) { printf("-----5555555555555555555555555\n"); stVencChnAttr.stRcAttr.stH264Vbr.u32SrcFrameRate = u32FrameRate; stVencChnAttr.stRcAttr.stH264Vbr.fr32DstFrameRate = u32FrameRate; } else { printf("-----66666666666666666666666666\n"); stVencChnAttr.stRcAttr.stH264Vbr.fr32DstFrameRate = u32FrameRate; } stVencChnAttr.stRcAttr.stH264Vbr.u32MaxBitRate = u32BitRate; } } break; default: SAMPLE_PRT("cann't support this enType (%d) in this version!\n",enType); return HI_ERR_VENC_NOT_SUPPORT; } #endif usleep(10000); s32Ret = HI_MPI_VENC_SetChnAttr(VencChn, &stVencChnAttr); if (HI_SUCCESS != s32Ret) { SAMPLE_PRT("HI_MPI_VENC_SetChn[%d]Attr faild with %#x! ===\n", \ VencChn, s32Ret); return s32Ret; } s32Ret = HI_MPI_VENC_GetChnAttr(VencChn,&stVencChnAttr); if (HI_SUCCESS != s32Ret) { SAMPLE_PRT("HI_MPI_VENC_GetChnATTR[%d] failed with %#x!\n", \ VencChn, s32Ret); return s32Ret; } if(flag == 1) { int i= 0; for ( i = 0; i < 8; i++) { s32Ret = HI_MPI_RGN_AttachToChn(20+(VencChn%3)*10+i, &stSrcChn, &g_stChnAttr[VencChn%3][i]); if (s32Ret != HI_SUCCESS) { SAMPLE_PRT("HI_MPI_RGN_AttachToChn failed! region = %d s32Ret: 0x%x.\n", i, s32Ret); return s32Ret; } } stRecvParam.s32RecvPicNum = -1; s32Ret = HI_MPI_VENC_StartRecvFrame(VencChn, &stRecvParam); if (HI_SUCCESS != s32Ret) { SAMPLE_PRT("HI_MPI_VENC_StartRecvPic faild with%#x! \n", s32Ret); return s32Ret; } } printf("CONFIG_VENC_CHN_ATTR is success!!!\n"); return s32Ret; }
11-19
Delphi 12.3 作为一款面向 Windows 平台的集成开发环境,由 Embarcadero Technologies 负责其持续演进。该环境以 Object Pascal 语言为核心,并依托 Visual Component Library(VCL)框架,广泛应用于各类桌面软件、数据库系统及企业级解决方案的开发。在此生态中,Excel4Delphi 作为一个重要的社区开源项目,致力于搭建 Delphi 与 Microsoft Excel 之间的高效桥梁,使开发者能够在自研程序中直接调用 Excel 的文档处理、工作表管理、单元格操作及宏执行等功能。 该项目以库文件与组件包的形式提供,开发者将其集成至 Delphi 工程后,即可通过封装良好的接口实现对 Excel 的编程控制。具体功能涵盖创建与编辑工作簿、格式化单元格、批量导入导出数据,乃至执行内置公式与宏指令等高级操作。这一机制显著降低了在财务分析、报表自动生成、数据整理等场景中实现 Excel 功能集成的技术门槛,使开发者无需深入掌握 COM 编程或 Excel 底层 API 即可完成复杂任务。 使用 Excel4Delphi 需具备基础的 Delphi 编程知识,并对 Excel 对象模型有一定理解。实践中需注意不同 Excel 版本间的兼容性,并严格遵循项目文档进行环境配置与依赖部署。此外,操作过程中应遵循文件访问的最佳实践,例如确保目标文件未被独占锁定,并实施完整的异常处理机制,以防数据损毁或程序意外中断。 该项目的持续维护依赖于 Delphi 开发者社区的集体贡献,通过定期更新以适配新版开发环境与 Office 套件,并修复已发现的问题。对于需要深度融合 Excel 功能的 Delphi 应用而言,Excel4Delphi 提供了经过充分测试的可靠代码基础,使开发团队能更专注于业务逻辑与用户体验的优化,从而提升整体开发效率与软件质量。 资源来源于网络分享,仅用于学习交流使用,请勿用于商业,如有侵权请联系我删除!
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值