嵌入式linux相机 摄像头模块
创始人
2025-01-09 12:35:36
0

 video_manager.c

/**********************************************************************  * 函数名称: RegisterVideoOpr  * 功能描述: 注册"字体模块", 所谓字体模块就是取出字符位图的方法  * 输入参数: ptVideoOpr - 一个结构体,内含"取出字符位图"的操作函数  * 输出参数: 无  * 返 回 值: 0 - 成功, 其他值 - 失败  * 修改日期        版本号     修改人	      修改内容  * -----------------------------------------------  * 2013/02/08	     V1.0	  韦东山	      创建  ***********************************************************************/  int RegisterVideoOpr(PT_VideoOpr ptVideoOpr) { 	PT_VideoOpr ptTmp;  	if (!g_ptVideoOprHead) 	{ 		g_ptVideoOprHead   = ptVideoOpr; 		ptVideoOpr->ptNext = NULL; 	} 	else 	{ 		ptTmp = g_ptVideoOprHead; 		while (ptTmp->ptNext) 		{ 			ptTmp = ptTmp->ptNext; 		} 		ptTmp->ptNext     = ptVideoOpr; 		ptVideoOpr->ptNext = NULL; 	}  	return 0; }   /**********************************************************************  * 函数名称: ShowVideoOpr  * 功能描述: 显示本程序能支持的"字体模块"  * 输入参数: 无  * 输出参数: 无  * 返 回 值: 无  * 修改日期        版本号     修改人	      修改内容  * -----------------------------------------------  * 2013/02/08	     V1.0	  韦东山	      创建  ***********************************************************************/  void ShowVideoOpr(void) { 	int i = 0; 	PT_VideoOpr ptTmp = g_ptVideoOprHead;  	while (ptTmp) 	{ 		printf("%02d %s\n", i++, ptTmp->name); 		ptTmp = ptTmp->ptNext; 	} }  /**********************************************************************  * 函数名称: GetVideoOpr  * 功能描述: 根据名字取出指定的"字体模块"  * 输入参数: pcName - 名字  * 输出参数: 无  * 返 回 值: NULL   - 失败,没有指定的模块,   *            非NULL - 字体模块的PT_VideoOpr结构体指针  * 修改日期        版本号     修改人	      修改内容  * -----------------------------------------------  * 2013/02/08	     V1.0	  韦东山	      创建  ***********************************************************************/  PT_VideoOpr GetVideoOpr(char *pcName) { 	PT_VideoOpr ptTmp = g_ptVideoOprHead; 	 	while (ptTmp) 	{ 		if (strcmp(ptTmp->name, pcName) == 0) 		{ 			return ptTmp; 		} 		ptTmp = ptTmp->ptNext; 	} 	return NULL; }   /**********************************************************************  * 函数名称: FontsInit  * 功能描述: 调用各个字体模块的初始化函数  * 输入参数: 无  * 输出参数: 无  * 返 回 值: 0 - 成功, 其他值 - 失败  * 修改日期        版本号     修改人	      修改内容  * -----------------------------------------------  * 2013/02/08	     V1.0	  韦东山	      创建  ***********************************************************************/  int VideoInit(void) { 	int iError;      iError = V4l2Init();  	return iError; } 

video_manager.h

#ifndef _VIDEO_MANAGER_H #define _VIDEO_MANAGER_H  #include  #include   #define NB_BUFFER 4  struct VideoDevice; struct VideoOpr; typedef struct VideoDevice T_VideoDevice, *PT_VideoDevice; typedef struct VideoOpr T_VideoOpr, *PT_VideoOpr;  typedef struct VideoDevice {     int iFd;     int iPixelFormat;     int iWidth;     int iHeight;      int iVideoBufCnt;     int iVideoBufMaxLen;     int iVideoBufCurIndex;     unsigned char *pucVideBuf[NB_BUFFER];      /* ���� */     PT_VideoOpr ptOPr; }T_VideoDevice, *PT_VideoDevice;  typedef struct VideoBuf {     T_PixelDatas tPixelDatas;     int iPixelFormat; }T_VideoBuf, *PT_VideoBuf;  typedef struct VideoOpr {     char *name;     int (*InitDevice)(char *strDevName, PT_VideoDevice ptVideoDevice);     int (*ExitDevice)(PT_VideoDevice ptVideoDevice);     int (*GetFrame)(PT_VideoDevice ptVideoDevice, PT_VideoBuf ptVideoBuf);     int (*PutFrame)(PT_VideoDevice ptVideoDevice, PT_VideoBuf ptVideoBuf);     int (*StartDevice)(PT_VideoDevice ptVideoDevice);     int (*StopDevice)(PT_VideoDevice ptVideoDevice); }T_VideoOpr, *PT_VideoOpr;   int V4l2Init(void);  #endif /* _VIDEO_MANAGER_H */

v4l2.c(链接)

v4l2.c

相关内容

热门资讯

透视最新!wepoker免费透... 透视最新!wepoker免费透视脚本(透视)wepoker私人局辅助(一直真的是有挂)1、wepok...
透视好牌!哈糖大菠萝有挂吗(透... 透视好牌!哈糖大菠萝有挂吗(透视)透明挂教程(2023已更新)(哔哩哔哩)1、该软件可以轻松地帮助玩...
透视透视!aapoker破解侠... 透视透视!aapoker破解侠是真的吗(透视)辅助(本来是有挂)1、aapoker破解侠是真的吗系统...
透视黑科技!拱趴大菠萝怎么开挂... 透视黑科技!拱趴大菠萝怎么开挂(透视)AI教程(2024已更新)(哔哩哔哩);1.拱趴大菠萝怎么开挂...
透视透视!wepoker怎么增... 透视透视!wepoker怎么增加运气(透视)wepoker可以透视码(其实真的有挂)1、构建自己的w...
透视系统!aapoker安装包... 透视系统!aapoker安装包怎么使用(透视)辅助插件工具(其实真的是有挂)1、aapoker安装包...
透视辅助!wepoker怎么获... 透视辅助!wepoker怎么获得好牌(透视)wepoker私人局外卦(一直存在有挂)所有人都在同一条...
透视透视!竞技联盟透视插件(透... 透视透视!竞技联盟透视插件(透视)解密教程(2021已更新)(哔哩哔哩)所有人都在同一条线上,像星星...
透视免费!aa poker辅助... 透视免费!aa poker辅助(透视)辅助(果然真的有挂)1、首先打开aa poker辅助最新版本,...
透视软件!wepoker辅助器... 透视软件!wepoker辅助器最新版本更新内容(透视)wepoker智能辅助插件(竟然真的有挂);1...