/* * Copyright (c) Hisilicon Technologies Co., Ltd. 2012-2020. All rights reserved. * Description: function define * Author: Hisilicon * Create: 2012-04-10 */ #ifndef UAPI_WIN_H__ #define UAPI_WIN_H__ #include "uapi_disp.h" #include "uapi_video.h" #ifdef __cplusplus #if __cplusplus extern "C" { #endif #endif /* * Define the ROTATION type. * CNcomment: 定义视频旋转角度 */ typedef enum { UAPI_WIN_ROTATION_0, /* 0 degree rotation */ /* CNcomment: 0度旋转 */ UAPI_WIN_ROTATION_90, /* 90 degree rotation */ /* CNcomment: 90度旋转 */ UAPI_WIN_ROTATION_180, /* 180 degree rotation */ /* CNcomment: 180度旋转 */ UAPI_WIN_ROTATION_270, /* 270 degree rotation */ /* CNcomment: 270度旋转 */ UAPI_WIN_ROTATION_MAX } uapi_win_rotation; /* * Conversion mode of aspect effect. * CNcomment: 宽高比转换模式 */ typedef enum { UAPI_WIN_ASPECT_CONVERT_FULL = 0x0, /* display according to output region */ /* CNcomment: 不加黑边,按窗口大小显示 */ UAPI_WIN_ASPECT_CONVERT_LETTERBOX, /* Add black borders */ /* CNcomment: 加黑边 */ UAPI_WIN_ASPECT_CONVERT_PAN_SCAN, /* Clip the picture */ /* CNcomment: 裁减 */ UAPI_WIN_ASPECT_CONVERT_COMBINED, /* Add black borders and clip the picture */ /* CNcomment: 加黑边和裁减混合 */ UAPI_WIN_ASPECT_CONVERT_P2P, /* point to point mode */ /* CNcomment: 点对点模式 */ UAPI_WIN_ASPECT_CONVERT_NONLINEAR, /* scale out using a non-linenar method */ /* CNcomment: 非线性方式缩放 */ UAPI_WIN_ASPECT_CONVERT_CUSTOM, /* user define the output region and video region */ /* CNcomment: 用户指定显示区域和视频区域 */ UAPI_WIN_ASPECT_CONVERT_MAX, } uapi_win_aspect_mode; /* * Enum define about window priority * CNcomment: 定义Window优先级枚举 */ typedef enum { UAPI_WIN_WIN_PRIORITY_AUTO = 0, /* create auto window */ /* CNcomment: 创建自动窗口通道 */ UAPI_WIN_WIN_PRIORITY_MAIN, /* create main window */ /* CNcomment: 创建主窗口通道 */ UAPI_WIN_WIN_PRIORITY_SUB, /* create sub window */ /* CNcomment: 创建次窗口通道 */ UAPI_WIN_WIN_PRIORITY_MAX, } uapi_win_win_priority; /* * Define the window nonlinear ZME enable and width. * CNcomment: 定义窗口非线性缩放的使能和宽度 */ typedef struct { td_u32 src_width; /* source width of linear zone ,it should be in 0~10000 */ /* CNcomment: 非线性缩放中线性缩放区域源的宽度,取值[0~10000] */ td_u32 dst_width; /* dest width of linear zone ,it should be in 0~10000 */ /* CNcomment: 非线性缩放中线性缩放区域目的宽度,取值[0~10000] */ } uapi_win_nonlinear_scale; /* * Define extern buffer management attribute. * CNcomment: 定义外部缓冲区管理属性 */ #define UAPI_WIN_MAX_EXTERN_BUFFER_NUM 16 typedef struct { /* frame buffer info */ /* CNcomment: 帧存信息 */ td_mem_handle frame_fd; /* buffer fd. */ /* CNcomment: 帧存缓存fd */ td_u32 frame_size; /* buffer size. */ /* CNcomment: 帧存缓存大小 */ td_u32 frame_stride_y; /* buffer lumia stride. */ /* CNcomment: 帧存缓存亮度stride */ td_u32 frame_stride_c; /* buffer chroma stride. */ /* CNcomment: 帧存缓存色度stride */ td_u32 frame_offset_y; /* buffer lumia offset. */ /* CNcomment: 帧存缓存亮度偏移 */ td_u32 frame_offset_c; /* buffer chroma offset */ /* CNcomment: 帧存缓存色度偏移 */ /* metadata addr info. */ /* CNcomment: metadata 地址信息 */ td_mem_handle metadata_fd; /* metadata fd. */ /* CNcomment: metadata fd */ td_u32 metadata_size; /* metadata size. */ /* CNcomment: metadata大小 */ td_u32 metadata_offset; /* metadata offset. */ /* CNcomment: metadata偏移 */ } uapi_win_extern_buffer; /* * Define the attribution of window. * CNcomment: 定义WINDOW属性 */ typedef struct { uapi_disp disp_id; /* the display channel where window locate in. can not be modified. */ /* CNcomment: 窗口所在的显示通道, 创建后不可修改 */ uapi_win_win_priority priority; /* specify the window's main/sub property, auto means window will be located on a hw channel automatically. */ /* CNcomment: 指定窗口的主从属性,如果设置为auto,意味着窗口会自动分配到特定的硬件通道上 */ td_bool is_virtual; /* whether is virtual window or not. can not be modified. */ /* CNcomment: 是否为虚拟窗口,创建后不可修改 */ td_bool enable_ai; /* when is_virtual window, enable_ai or not. can not be modified. */ /* CNcomment: 虚拟窗口的使能ai属性,创建后不可修改 */ uapi_win_aspect_mode asp_convert_mode; /* the method to the aspect ratio transfer. */ /* CNcomment: 窗口的宽高转换方式 */ uapi_video_crop_rect src_crop_rect; /* clip window of user define ,clip pix num of top,buttom,left,right. */ /* CNcomment: 用户定义的视频裁剪结构体类型, 上下左右裁剪的像素个数 */ uapi_video_rect video_rect; /* the actual video output window, it should be in output_rect area */ /* CNcomment: 视频内容显示的大小窗口,范围应在output_rect内 */ uapi_video_rect output_rect; /* the window display area on the virtual screen. \n the width and height of display area should not larger than virtual screen,\n and all parameters are zero means to fill whole virtual screen.\n The area could move out of virtual screen, and the outside part will not display. */ /* CNcomment: 窗口在虚拟屏幕上的显示区域。 显示区域的宽度与高度不能大于虚拟屏幕的宽度和高度,全部为0表示填满虚拟屏幕。 显示区域可以移出虚拟屏幕,移出屏幕部分不显示 */ uapi_win_nonlinear_scale nonlinear_range; /* Nonlinear */ /* CNcomment: 非线性缩放 */ uapi_video_pixel_format video_format; /* the data format of virtual window. */ /* CNcomment: 虚拟窗口数据格式 */ } uapi_win_attr; typedef struct { /* secure info can be extracted by fd. */ td_mem_handle buf_fd; /* buffer fd. */ /* CNcomment: 帧存缓冲fd */ td_u32 buf_size; /* buffer size. */ /* CNcomment: 帧存缓存大小 */ td_u32 buf_stride; /* buffer stride. */ /* CNcomment: 帧存缓存stride */ } uapi_win_frame_buf_info; #define MAX_ADDR_INDEX 16 /* * Define user buffer management attribute. * CNcomment: 定义用户缓冲区管理属性 */ typedef struct { td_u32 buff_num; /* the number of the buffer. */ /* CNcomment: 缓冲区个数 */ uapi_win_frame_buf_info frame_buf_array[MAX_ADDR_INDEX]; /* buffer of frame array. */ /* CNcomment: 帧存缓冲区 */ } uapi_win_buff_attr; /* * Define user aspect aspect. * CNcomment: 用户定义宽高比 */ typedef struct { td_u32 width; /* user defind aspect ratio of width */ /* CNcomment: 用户自定义宽高比:宽度 */ td_u32 height; /* user defind aspect ratio of height */ /* CNcomment: 用户自定义宽高比:高度 */ } uapi_win_user_aspect; /* * Define AspectRatio attribute. * CNcomment: 宽高比属性 */ typedef union { uapi_win_nonlinear_scale nonlinear_ratio; /* Nonlinear */ /* CNcomment: 非线性缩放 */ uapi_win_user_aspect user_aspect; /* user_aspect, reserved */ /* CNcomment: 用户自定义宽高比, 功能未实现 */ } uapi_win_aspect_attr; /* * define win video rect ratio. * CNcomment:定义矩形坐标万分比结构体,其中结构体成员表示万分比 */ typedef struct { td_u32 x_offset; /* x offset ratio */ td_u32 y_offset; /* y offset ratio */ td_u32 height; /* width ratio */ td_u32 width; /* height ratio */ } uapi_win_video_rect_ratio; #define UAPI_WIN_MAX_AI_BLOCK_NUM 20 /* * Enum define about AI check type * CNcomment: 定义AI检测类型 */ typedef enum { UAPI_WIN_AI_CHECK_GLOBAL = 0, /* ai check scene global */ /* CNcomment: AI检测场景类型为全局场景 */ UAPI_WIN_AI_CHECK_BLOCK, /* ai check scene block */ /* CNcomment: AI检测场景类型为区域场景 */ UAPI_WIN_AI_CHECK_MAX } uapi_win_ai_check_type; /* * Enum define about AI check global type * CNcomment: 定义AI检测的全局类型 */ typedef enum { UAPI_WIN_AI_GLOBAL_NATURE_LAWN = 0, /* ai check global scene lawn */ /* CNcomment: AI检测场景类型为自然风景的草地 */ UAPI_WIN_AI_GLOBAL_NATURE_BEACH, /* ai check global scene beach */ /* CNcomment: AI检测场景类型为自然风景的沙滩 */ UAPI_WIN_AI_GLOBAL_NATURE_MOUNTAIN, /* ai check global scene mountain */ /* CNcomment: AI检测场景类型为自然风景的高山 */ UAPI_WIN_AI_GLOBAL_CULTURAL_BUILD = 20, /* ai check global scene cultural build */ /* 20 : reverse number */ /* CNcomment: AI检测场景类型为建筑 */ UAPI_WIN_AI_GLOBAL_COMIC = 40, /* ai check global scene comic */ /* 40 : reverse number */ /* CNcomment: AI检测场景类型为动画片 */ UAPI_WIN_AI_GLOBAL_MAX } uapi_win_ai_global_scene; /* * Define ai global check result confidence. * CNcomment: 定义AI检测全局信息的可信度 */ typedef struct { td_u16 confidence; /* ai global check result confidence */ /* CNcomment: 全局检测的可信度 */ } uapi_win_ai_global_result; /* * Enum define about AI check block type * CNcomment: 定义AI检测的区域类型 */ typedef enum { UAPI_WIN_AI_BLOCK_FACE = 0, /* ai check block scene face */ /* CNcomment: AI检测区域类型为人脸区域 */ UAPI_WIN_AI_BLOCK_WORD, /* ai check block scene word */ /* CNcomment: AI检测区域类型为文字区域 */ UAPI_WIN_AI_BLOCK_MAX } uapi_win_ai_block_type; /* * Define ai block check result confidence info. * CNcomment: 定义AI检测区域的可信度信息 */ typedef struct { td_u16 x0; /* ai check block x0 position */ /* CNcomment: ai检测区域X0坐标 */ td_u16 y0; /* ai check block y0 position */ /* CNcomment: ai检测区域Y0坐标 */ td_u16 x1; /* ai check block x1 position */ /* CNcomment: ai检测区域X1坐标 */ td_u16 y1; /* ai check block y1 position */ /* CNcomment: ai检测区域Y1坐标 */ td_u16 confidence; /* ai check block confidence */ /* CNcomment: ai检测区域可信度 */ } uapi_win_ai_block_confidence; /* * Define ai block check result. * CNcomment: 定义AI检测区域信息 */ typedef struct { td_u32 block_num; /* ai check block number */ /* CNcomment: ai检测区域个数 */ uapi_win_ai_block_confidence block_info[UAPI_WIN_MAX_AI_BLOCK_NUM]; /* ai check block info */ /* CNcomment: ai检测区域信息 */ } uapi_win_ai_block_result; /* * Define ai check result. * CNcomment: 定义AI检测结果 */ typedef struct { td_bool global_valid[UAPI_WIN_AI_GLOBAL_MAX]; /* ai check global scene valid */ /* CNcomment: AI检测全局信息是否有效 */ uapi_win_ai_global_result global_result[UAPI_WIN_AI_GLOBAL_MAX]; /* ai check global scene result */ /* CNcomment: AI检测全局信息 */ td_bool block_valid[UAPI_WIN_AI_BLOCK_MAX]; /* ai check block scene valid */ /* CNcomment: AI检测区域信息是否有效 */ uapi_win_ai_block_result block_result[UAPI_WIN_AI_BLOCK_MAX]; /* ai check block scene face */ /* CNcomment: AI检测区域信息 */ } uapi_win_ai_result; /* * Define the freeze mode enumeration. * CNcomment: 定义Freeze模式枚举 */ typedef enum { UAPI_WIN_FREEZE_MODE_DISABLE = 0, /* disable freezing status. */ /* CNcomment: freeze关闭 */ UAPI_WIN_FREEZE_MODE_LAST = 1, /* display the last frame when freeze. */ /* CNcomment: freeze时显示最后一帧 */ UAPI_WIN_FREEZE_MODE_BLACK = 2, /* display a black frame when freeze. */ /* CNcomment: freeze时显示后黑屏 */ UAPI_WIN_FREEZE_MODE_MAX } uapi_win_freeze_mode; /* * Define the reset mode enumeration. * CNcomment: 定义reset模式枚举 */ typedef enum { UAPI_WIN_RESET_MODE_LAST = 1, /* display the last frame when reset. */ /* CNcomment: reset时显示最后一帧 */ UAPI_WIN_RESET_MODE_BLACK = 2, /* display a black frame when reset. */ /* CNcomment: reset时显示后黑屏 */ UAPI_WIN_RESET_MODE_MAX } uapi_win_reset_mode; #define MAX_WINDOW_NUMBER 64 typedef struct { td_u32 win_num; /* window number. */ /* CNcomment: 窗口个数 */ td_handle main_handle; /* handle of main window. */ /* CNcomment: 主窗口句柄 */ td_handle win_handle[MAX_WINDOW_NUMBER]; /* all windows' handle excecpt the virtual ones */ /* CNcomment: 所有窗口句柄(虚拟窗口除外) */ } uapi_win_handle_info; /* * Define the sync mode enumeration. * CNcomment: 定义sync模式枚举 */ typedef enum { UAPI_WIN_SYNC_PLAY = 0, /* normal display. */ /* CNcomment: 正常播放 */ UAPI_WIN_SYNC_DISCARD = 1, /* discard one frame. */ /* CNcomment: 丢掉一帧 */ UAPI_WIN_SYNC_REPEAT = 2, /* repeat one frame. */ /* CNcomment: 重复一帧 */ UAPI_WIN_SYNC_PLAY_LATEST = 3, /* play latest frame. */ /* CNcomment: 播放buffer里面的最新帧 */ UAPI_WIN_SYNC_PLAY_LAST = 4, /* play last frame. */ /* CNcomment: 一直重复上一帧 */ UAPI_WIN_SYNC_MAX } uapi_win_sync; typedef enum { UAPI_WIN_ZORDER_MOVETOP = 0, /* Move to the top */ /* CNcomment: 图层置顶 */ UAPI_WIN_ZORDER_MOVEUP, /* Move up */ /* CNcomment: 图层上移一层 */ UAPI_WIN_ZORDER_MOVEBOTTOM, /* Move to the bottom */ /* CNcomment: 图层下移一层 */ UAPI_WIN_ZORDER_MOVEDOWN, /* Move down */ /* CNcomment: 图层沉底 */ UAPI_WIN_ZORDER_MAX } uapi_win_zorder; /* * Define video display information. * CNcomment: 定义视频显示过程中用于音视频同步的信息 */ typedef struct { td_u32 delay_time_ms; /* delay time in ms */ /* CNcomment: 延时 */ td_u32 disp_rate; /* used by avplay */ /* CNcomment: 播放速率 */ td_u32 frame_num; /* frame number in window buffer */ /* CNcomment: 待显示帧存个数 */ td_s64 current_disp_frame_pts_us; /* current display frame pts in us */ /* CNcomment: 显示帧pts值 */ td_u32 underload_cnt; /* current underload cnt */ /* CNcomment: 欠载次数 */ } uapi_win_play_info; /* * Define the quickout mode enumeration. * CNcomment: 定义快速输出模式枚举 */ typedef enum { UAPI_WIN_QUICKOUT_DISABLE = 0x0, /* disable quickout */ /* CNcomment: 关闭低延时模式 */ UAPI_WIN_QUICKOUT_SUPER_LOW_DELAY, /* super low delay */ /* CNcomment: 快速输出超低延时模式,延时最低,损失部分PQ效果 */ UAPI_WIN_QUICKOUT_NORMAL_LOW_DELAY, /* normal low delay */ /* CNcomment: 快速输出普通低延时模式,延时较低,支持全通路PQ */ UAPI_WIN_QUICKOUT_MAX, } uapi_win_quickout_mode; /* source information. window will get / release frame or send private info to source by function pointer */ typedef struct { td_handle src; } uapi_win_source_info; /* * brief init vo module.CNcomment: 初始化VO模块 CNend * attention \n * call this func before any other vo funcs . * CNcomment: 调用VO模块要求首先调用本接口 CNend * retval ::TD_SUCCESS successs. * CNcomment: 成功 CNend * retval ::SOC_ERR_VO_DEV_OPEN_ERR open vo failed. CNcomment: VO打开失败 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_init(td_void); /* * brief deinit vo module. * CNcomment: 去初始化VO模块 CNend * attention \n * before calling this func ,you should call UAPI_WIN_Close to close all the windows first. * CNcomment: 在调用::UAPI_WIN_Close接口关闭所有打开的VO后调用本接口 CNend * param * CNcomment: 无 CNend * retval ::TD_SUCCESS success. * CNcomment: 成功 CNend * retval ::SOC_ERR_VO_DEV_CLOSE_ERR vo deinited failed. CNcomment: VO关闭失败 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_deinit(td_void); /* * brief create the window. * CNcomment: 创建WINDOW CNend * attention \n * CNcomment: 无 CNend * param[in] win_attr a pointer typeof UAPI_WIN_ATTR_S. CNcomment: WINDO属性结构指针 CNend * param[out] win_handle the window handler to be created. CNcomment: 创建的WINDOW句柄 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_MALLOC_FAILED memory allocations failed. CNcomment: 内存分配失败 CNend * retval ::SOC_ERR_VO_CREATE_ERR ceate window failed CNcomment: 创建窗口失败 CNend * see \n CNcomment: 无 CNend */ td_s32 uapi_win_create(const uapi_win_attr *win_attr, td_handle *win_handle); /* * brief destroy the given window. CNcomment: 销毁WINDOW CNend * attention \n * user should disable window before call this func * CNcomment: 请先调用接口disable窗口, 再调用此接口 CNend * param[in] win_handle the input window handler. CNcomment: WINDOW句柄 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_VO_DESTROY_ERR illegal destruction. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n CNcomment: 无 CNend */ td_s32 uapi_win_destroy(td_handle win_handle); /* * brief to enable or disable the given window. CNcomment: 使能/禁止WINDOW CNend * attention \n * Window can only be disabled after the corresponding avplay is stopped, else data will overflow. * CNcomment: 只有先将AVPLAY的VID通道stop后,才能禁止window,否则将引起数据的溢出 CNend * param[in] win_handle the input window handler. CNcomment: WINDOW句柄 CNend * param[in] enable the flag of enable or disable window. CNcomment: 使能/禁止标志 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n CNcomment: 无 CNend */ td_s32 uapi_win_set_enable(td_handle win_handle, td_bool enable); /* * brief get the status of the given window: enable or not. CNcomment: 获取WINDOW的使能状态 CNend * attention \n CNcomment: 无 CNend * param[in] win_handle the input window handler. CNcomment: WINDOW句柄 CNend * param[in] pbEnable the status of window:enable or disable. CNcomment: 使能/禁止标志. CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_get_enable(td_handle win_handle, td_bool *enable); /* * brief get the attribution of the given window. CNcomment: 获取WINDOW属性 CNend * attention \n * CNcomment: 无 CNend * param[in] win_handle the input window handler. CNcomment: WINDOW句柄 CNend * param[out] win_attr the pointer of windows attr. CNcomment: WINDO属性结构指针 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_get_attr(td_handle win_handle, uapi_win_attr *win_attr); /* * brief set the crop rect of the window. CNcomment: 设置WINDOW的裁剪大小 CNend * attention \n * CNcomment: 无 CNend * param[in] win_handle window handle. CNcomment: 窗口句柄 CNend * param[in] croprect crop rect info. CNcomment: 裁剪范围 CNend * param[in] number window number. CNcomment: 窗口个数 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n CNcomment: 无 CNend */ td_s32 uapi_win_set_crop_rect(const td_handle win_handle[], const uapi_video_crop_rect croprect[], td_u32 number); /* * brief set the crop rect of the window. CNcomment: 获取WINDOW的裁剪大小 CNend * attention \n * CNcomment: 无 CNend * param[in] win_handle window handle. CNcomment: 窗口句柄 CNend * param[out] croprect crop rect info. CNcomment: 裁剪范围 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_get_crop_rect(td_handle win_handle, uapi_video_crop_rect *croprect); /* * brief set the outrect of the window. CNcomment: 设置WINDOW的输出大小 CNend * attention \n * CNcomment: 无 CNend * param[in] win_handle window handle. CNcomment: 窗口的句柄 CNend * param[in] outrect window output rect. CNcomment: Window输出大小CNend * param[in] number The number of members. CNcomment: 成员个数 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_set_outrect(const td_handle win_handle[], const uapi_video_rect outrect[], td_u32 number); /* * brief set the outrect of the window. CNcomment: 获取WINDOW的输出大小 CNend * attention \n * CNcomment: 无 CNend * param[in] win_handle window handle. CNcomment: 窗口的句柄 CNend * param[out] outrect window output rect. CNcomment: Window输出大小 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_get_outrect(td_handle win_handle, uapi_video_rect *outrect); /* * brief set the aspect ratio of the window. CNcomment: 设置WINDOW的宽高比 CNend * attention \n * CNcomment: 无 CNend * param[in] win_handle window handle. CNcomment: 窗口的句柄 CNend * param[in] aspect_mode aspect mode. CNcomment: 宽高比模式 CNend * param[in] aspect_attr window aspect ratio. CNcomment: Window宽高比 CNend * param[in] number The number of members. CNcomment: 成员个数 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_set_aspect_attr(const td_handle win_handle[], uapi_win_aspect_mode aspect_mode[], const uapi_win_aspect_attr aspect_attr[], td_u32 number); /* * brief get the aspect ratio of the window. CNcomment: 获取WINDOW的宽高比 CNend * attention \n * CNcomment: 无 CNend * param[in] win_handle window handle. CNcomment: 窗口的句柄 CNend * param[out] aspect_mode aspect mode. CNcomment: 宽高比模式 CNend * param[out] aspect_attr window aspect ratio. CNcomment: Window宽高比 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_get_aspect_attr(td_handle win_handle, uapi_win_aspect_mode *aspect_mode, uapi_win_aspect_attr *aspect_attr); /** \brief set the video rect ratio attribution of the given window.CNcomment:设置窗口video rect万分比属性指针 CNend \attention \n CNcomment: 无 CNend \param[in] hWindow the input window handler.CNcomment:WINDOW句柄 CNend \param[in] video_rect_ratio the pointer of windows video rect ratio attr. CNcomment:窗口video rect万分比属性结构体 CNend \retval :SOC_SUCCESS CNcomment:成功 CNend \retval :SOC_ERR_VO_NO_INIT VO not inited. CNcomment:VO未初始化 CNend \retval :SOC_ERR_VO_INVALID_PARA illegal params.CNcomment:输入参数非法 CNend \retval :SOC_ERR_VO_NULL_PTR null pointer.CNcomment:输入指针为空 CNend \retval :SOC_ERR_VO_INVALID_OPT illegal operation.CNcomment:操作非法 CNend \retval :SOC_ERR_VO_WIN_NOT_EXIST windows not exist.CNcomment:窗口不存在 CNend \see \n CNcomment:无 CNend */ td_s32 uapi_win_set_video_rect_ratio(const td_handle win_handle[], const uapi_win_video_rect_ratio video_rect_ratio[], td_u32 number); /** \brief get the video rect ratio attribution of the given window.CNcomment:获取窗口video rect万分比属性 CNend \attention \n CNcomment: 无 CNend \param[in] win_handle the input window handler.CNcomment:WINDOW句柄 CNend \param[in] pInputRect the pointer of windows video rect ratio. CNcomment:窗口video rect万分比属性结构指针 CNend \retval :SOC_SUCCESS CNcomment:成功 CNend \retval :SOC_ERR_VO_NO_INIT VO not inited. CNcomment:VO未初始化 CNend \retval :SOC_ERR_VO_INVALID_PARA illegal params.CNcomment:输入参数非法 CNend \retval :SOC_ERR_VO_NULL_PTR null pointer.CNcomment:输入指针为空 CNend \retval :SOC_ERR_VO_INVALID_OPT illegal operation.CNcomment:操作非法 CNend \retval :SOC_ERR_VO_WIN_NOT_EXIST windows not exist.CNcomment:窗口不存在 CNend \see \n CNcomment:无 CNend */ td_s32 uapi_win_get_video_rect_ratio(td_handle win_handle, uapi_win_video_rect_ratio *video_rect_ratio); /* * brief get the frame from given window. CNcomment: 获取WINDOW的Frame信息 CNend * attention \n * CNcomment: 无 CNend * param[in] win_handle the input window handler. CNcomment: WINDOW句柄 CNend * param[out] frame_info frame information. CNcomment: Frame信息 CNend * param[in] timeout_ms wait time in ms. CNcomment: 等待时间,毫秒为单位 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_acquire_frame(td_handle win_handle, uapi_video_frame_info *frame_info, td_u32 timeout_ms); /* * brief return the frame back to the given window, used for 3d graphics testing. CNcomment: 释放用户获取WINDOW的Frame CNend * attention \n * CNcomment: 无 CNend * param[in] win_handle the input window handler. CNcomment: WINDOW句柄 CNend * param[in] frame_info frame to be released. CNcomment: 待还帧存 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_release_frame(td_handle win_handle, uapi_video_frame_info *frame_info); /* * brief set the relative zorder of the given window. CNcomment: 设置WINDOW的相对Z序 CNend * attention \n * CNcomment: 无 CNend * param[in] win_handle the input window handler. CNcomment: WINDOW句柄 CNend * param[in] zorder how to adjust zorder. CNcomment: Z序调节方式 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_set_zorder(td_handle win_handle, uapi_win_zorder zorder); /* * brief get the zorder of the given window. CNcomment: 获取WINDOW的Z序 CNend * attention \n * CNcomment: 无 CNend * param[in] win_handle the input window handler. CNcomment: WINDOW句柄 CNend * param[out] zorder value of zoder, bigger value means higher prioty. CNcomment: Z序数值,数值越大优先级越高 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_get_zorder(td_handle win_handle, td_u32 *zorder); /* * brief set the absolute zorder of the given window. CNcomment: 设置WINDOW的绝对Z序 CNend * attention \n * CNcomment: 无 CNend * param[in] win_handle the input window handler. CNcomment: WINDOW句柄 CNend * param[in] abs_zorder value of zoder, bigger value means higher prioty. screen turns black when zorder is negative. * CNcomment: Z序数值,数值越大优先级越高,当Z序为负值时,显示黑屏 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_set_abs_zorder(td_handle win_handle, td_s32 abs_zorder); /* * brief get the zorder of the given window. CNcomment: 获取WINDOW的Z序 CNend * attention \n * CNcomment: 无 CNend * param[in] win_handle the input window handler. CNcomment: WINDOW句柄 CNend * param[out] abs_zorder value of zoder, bigger value means higher prioty. CNcomment: Z序数值,数值越大优先级越高 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_get_abs_zorder(td_handle win_handle, td_s32 *abs_zorder); /* * brief attach the window with video source such as vi/avplay/aiwin. * CNcomment: 把WINDOW与指定的AVPLAY/VI/AI WINDOW 绑定 CNend * attention \n * it can attach the handler of avplay or vi or ai window to the window. * CNcomment: 可以将AVPLAY或VI或者AI window的句柄绑定到WINDOW上。 CNend * param[in] win_handle the input window handler. CNcomment: WINDOW句柄 CNend * param[in] src_handle the handle of video source. CNcomment: 数据源句柄 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_attach_src(td_handle win_handle, td_handle src_handle); /* * brief detach the window from the video source such as avplay or vi. CNcomment: 把WINDOW与指定的AVPLAY/VI解绑定 CNend * attention \n * CNcomment: 无 CNend * param[in] win_handle the input window handler. CNcomment: WINDOW句柄 CNend * param[in] src_handle the handler of video source. CNcomment: 数据源句柄 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_detach_src(td_handle win_handle, td_handle src_handle); /* * brief to freeze the video content of given window. CNcomment: 冻结WINDOW的显示内容 CNend * attention \n * the display will be freezed after calling this func, but backgrounddly,the data flow is normal from video decoder. * so when freezing is cacelled, the newest video content can be display at once. * CNcomment: 此功能用于在播放过程中冻结屏幕显示内容,此时WINDOW中的数据流继续运行, * 因此取消冻结后,会立刻显示最新的内容。 CNend * param[in] win_handle the input window handler. CNcomment: WINDOW句柄 CNend * param[in] freeze_mode the mode of freeze. CNcomment: 冻结的方式 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_set_freeze_mode(td_handle win_handle, uapi_win_freeze_mode freeze_mode); /* * brief to get freeze status . CNcomment: 获取窗口冻结状态 CNend * attention \n * get the window freeze mode. * CNcomment: 获取窗口冻结的模式。 CNend * param[in] win_handle the input window handler. CNcomment: WINDOW句柄 CNend * param[out] freeze_mode the mode of freeze. CNcomment: 冻结的方式 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_get_freeze_mode(td_handle win_handle, uapi_win_freeze_mode *freeze_mode); /* * brief reset the window. CNcomment: 复位WINDOW CNend * attention \n * this function can reset buffers of the given window, * and black frame or the last frame will be displayed according configuration. * CNcomment: 此功能清空window中的缓冲,根据参数显示黑帧或最后一帧。 CNend * param[in] win_handle the input window handler. CNcomment: WINDOW句柄 CNend * param[in] reset_mode method of freeze the window. CNcomment: 复位的方式 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_reset(td_handle win_handle, uapi_win_reset_mode reset_mode); /* * brief pass the external allocated buffer to this function to test 3d graphics. * CNcomment: 向WINDOW传递用户外部分配的buffer,专门用于3D图形测试 CNend * attention \n * CNcomment: 无 CNend * param[in] hWindow the input window handler. CNcomment: WINDOW句柄 CNend * param[in] buff_attr external buffer. CNcomment: 外部的buffer CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_attach_extern_buffer(td_handle win_handle, const uapi_win_extern_buffer *ext_buffer, td_u32 cnt); /* * brief to set the work mode of window: quick output or not. * Deinterlace alg will be disabled when quick output is enabled. CNcomment: 设置WINDOW是否工作在快速输出模式,快速输出模式默认不做VPSS算法处理 CNend * attention \n CNcomment: 无 CNend * param[in] win_handle the input window handler. CNcomment: WINDOW句柄 CNend * param[in] enable whether determine the output mode of window. CNcomment: 快速输出模式使能/禁止标志 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n CNcomment: 无 CNend */ td_s32 uapi_win_set_quick_output_enable(td_handle win_handle, td_bool enable); /* * brief to set the work mode of window: normal quick output or super quick output. CNcomment: 设置WINDOW处于哪一种快速输出模式 CNend * attention \n CNcomment: 无 CNend * param[in] win_handle the input window handler. CNcomment: WINDOW句柄 CNend * param[in] quickout_mode select the output mode of window. CNcomment: 快速输出模式 CNend CNcomment: 快速输出模式标志 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n CNcomment: 无 CNend */ td_s32 uapi_win_set_quickout_mode(td_handle win_handle, uapi_win_quickout_mode quickout_mode); /* * brief to get the work mode of window: normal quick output or super quick output. CNcomment: 获取WINDOW处于哪一种快速输出模式 CNend * attention \n CNcomment: 无 CNend * param[in] win_handle the input window handler. CNcomment: WINDOW句柄 CNend * param[out] quickout_mode select the output mode of window. CNcomment: 快速输出模式 CNend CNcomment: 快速输出模式标志 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n CNcomment: 无 CNend */ td_s32 uapi_win_get_quickout_mode(td_handle win_handle, uapi_win_quickout_mode *quickout_mode); /* * brief to get the work mode of window: quick output or not. * CNcomment: 获取WINDOW是否工作在快速输出模式 CNend * attention \n * CNcomment: 无 CNend * param[in] hWindow the input window handler. CNcomment: WINDOW句柄 CNend * param[out] quick_enable whether determine the output mode of window. CNcomment: 快速输出模式使能/禁止标志 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_get_quick_output_status(td_handle win_handle, td_bool *quick_enable); /* * brief capture the current frame of given window. CNcomment: 捕获WINDOW的当前帧 CNend * attention \n * param[in] win_handle the input window handler. CNcomment: WINDOW句柄 CNend * param[out] cap_picture * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n CNcomment: 无 CNend */ td_s32 uapi_win_capture_picture(td_handle win_handle, uapi_video_frame_info *cap_picture); /* * brief if you capture picture is finished, release the memory. CNcomment: 捕获完毕,释放捕获的内存区域 CNend * attention \n * this function will release captured picture, so user should call this function * after you used this captured picture. * CNcomment: 由于该函数会释放被捕获的一帧,所以用户需要在用完捕获帧之后再调用此接口 CNend * param[in] win_handle the input window handler. CNcomment: WINDOW句柄 CNend * param[in] cap_picture * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_WIN_NOT_EXIST windows not exist. CNcomment: 窗口不存在 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_capture_picture_release(td_handle win_handle, uapi_video_frame_info *cap_picture); /* * brief set window rotion type. CNcomment: 设置窗口的旋转类型 CNend * attention \n * param[in] win_handle window handle . CNcomment: 窗口句柄 CNend * param[in] rotation rotion type. CNcomment: 旋转类型 CNend * retval ::TD_SUCCESS openned success. CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * see \n * CNcomment: 无 CNend */ td_s32 uapi_win_set_rotation(td_handle win_handle, uapi_win_rotation rotation); /* * brief get window rotion type. CNcomment: 获取窗口的旋转句柄 CNend * attention \n * param[in] win_handle window handle . CNcomment: 窗口句柄 CNend * param[out] rotation rotion type. CNcomment: 旋转类型 CNend * retval ::TD_SUCCESS openned success. CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * see \n CNcomment: 无 CNend */ td_s32 uapi_win_get_rotation(td_handle win_handle, uapi_win_rotation *rotation); /* * brief set video stereo depth for 3D output. CNcomment: 设置3D输出视频景深 CNend * attention \n * param[in] win_handle window handle . CNcomment: 窗口句柄 CNend * param[in] depth_level Depth of filed. the range is [-50,50]. CNcomment: 景深,取值为[-50,50]. CNend * retval ::TD_SUCCESS success. CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO uninitialization. CNcomment: VO 未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA invalid input parameter. CNcomment: 输入参数非法 CNend * see \n * none. CNcomment: 无 CNend */ td_s32 uapi_win_set_stereo_detpth(td_handle win_handle, td_u32 depth_level); /* * brief get video stereo depth for 3D output. CNcomment: 获取3D输出视频景深 CNend * attention \n * param[in] win_handle window handle . CNcomment: 窗口句柄 CNend * param[out] depth_level Depth of filed. the range is [0,20]. CNcomment: 景深,取值为[0,20]. CNend * retval ::TD_SUCCESS success. CNcomment: 成功 CNend * retval ::SOC_ERR_VO_INVALID_PARA invalid input parameter. CNcomment: 输入参数非法 CNend * see \n * none. CNcomment: 无 CNend */ td_s32 uapi_win_get_stereo_detpth(td_handle win_handle, td_u32 *depth_level); /* * brief get video stereo depth range for 3D output. CNcomment: 获取3D输出视频景深范围 CNend * attention \n * param[in] win_handle window handle . CNcomment: 窗口句柄 CNend * param[out] depth_range Depth range of filed. the range is [0,20]. CNcomment: 景深,取值为[0,20]. CNend * retval ::TD_SUCCESS success. CNcomment: 成功 CNend * retval ::SOC_ERR_VO_INVALID_PARA invalid input parameter. CNcomment: 输入参数非法 CNend * see \n * none. CNcomment: 无 CNend */ td_s32 uapi_win_get_stereo_detpth_range(td_handle win_handle, uapi_disp_range *depth_range); /* * brief get video view range for 3D output. CNcomment: 获取3D输出视点范围 CNend * attention \n * param[in] win_handle window handle . CNcomment: 窗口句柄 CNend * param[out] view_range View range. the range is [0,20]. CNcomment: 视点,取值为[0,20]. CNend * retval ::TD_SUCCESS success. CNcomment: 成功 CNend * retval ::SOC_ERR_VO_INVALID_PARA invalid input parameter. CNcomment: 输入参数非法 CNend * see \n * none. CNcomment: 无 CNend */ td_s32 uapi_win_get_3d_view_range(td_handle win_handle, uapi_disp_range *view_range); /* * brief set video view range for 3D output. CNcomment: 设置3D输出视点 CNend * attention \n * param[in] win_handle window handle . CNcomment: 窗口句柄 CNend * param[in] view_level View range. the range is [0,20]. CNcomment: 视点,取值为[0,20]. CNend * retval ::TD_SUCCESS success. CNcomment: 成功 CNend * retval ::SOC_ERR_VO_INVALID_PARA invalid input parameter. CNcomment: 输入参数非法 CNend * see \n * none. CNcomment: 无 CNend */ td_s32 uapi_win_set_3d_view_level(td_handle win_handle, td_u32 view_level); /* * brief get video view for 3D output. CNcomment: 获取3D输出视点值 CNend * attention \n * param[in] win_handle window handle . CNcomment: 窗口句柄 CNend * param[out] view_level View range. the range is [0,20]. CNcomment: 视点,取值为[0,20]. CNend * retval ::TD_SUCCESS success. CNcomment: 成功 CNend * retval ::SOC_ERR_VO_INVALID_PARA invalid input parameter. CNcomment: 输入参数非法 CNend * see \n * none. CNcomment: 无 CNend */ td_s32 uapi_win_get_3d_view_level(td_handle win_handle, td_u32 *view_level); /* * set mute color,the color is configable. CNcomment: 设置mute颜色,mute颜色可配置 CNend * attention \n * param[in] win_handle window handle . CNcomment: 窗口句柄 CNend * param[in] mute_color mute color to set. CNcomment: 要设置的颜色. CNend * retval ::TD_SUCCESS success. CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NULL_PTR NULL pointer. CNcomment: 空指针 CNend * retval ::SOC_ERR_VO_INVALID_PARA Invalid handle. CNcomment: 无效句柄 CNend * see \n * none. CNcomment: 无 CNend */ td_s32 uapi_win_set_mute_color(td_handle win_handle, const uapi_disp_color *mute_color); /* * get all windows' handle except the virtual ones. CNcomment: 获取所有的窗口句柄(虚拟窗口除外) CNend * attention \n * param[in] disp_id display channel select. CNcomment: 显示通道选择 CNend * param[out] handle_info windows' handle info. CNcomment: 窗口句柄信息 * retval ::TD_SUCCESS success. CNcomment: 成功 CNend * retval ::SOC_ERR_VO_INVALID_PARA Invalid display channel. CNcomment: 无效的显示通道 CNend * see \n * none. CNcomment: 无 CNend */ td_s32 uapi_win_get_handle_info(uapi_disp disp_id, uapi_win_handle_info *handle_info); /* * queue vo user frame . CNcomment: 用户态que帧接口 CNend * attention \n * param[in] win_handle window handle. CNcomment: window 句柄 CNend * param[in] pstFrameinfo frame info. CNcomment: 帧信息 CNend * retval ::TD_SUCCESS success. CNcomment: 成功 CNend * retval ::SOC_ERR_VO_INVALID_PARA Invalid para. CNcomment: 无效参数 CNend * see \n * none. CNcomment: 无 CNend */ td_s32 uapi_win_queue_frame(td_handle win_handle, uapi_video_frame_info *frame_info, td_u32 *fence_fd); /* * dequeue vo user frame . CNcomment: 用户态deque帧接口 CNend * attention \n * param[in] win_handle window handle. CNcomment: window 句柄 CNend * param[in] frame_info frame info. CNcomment: 帧信息 CNend * param[in] timeout_ms wait time in ms. CNcomment: 等待时间,毫秒为单位 CNend * retval ::TD_SUCCESS success. CNcomment: 成功 CNend * retval ::SOC_ERR_VO_INVALID_PARA Invalid para. CNcomment: 无效参数 CNend * see \n * none. CNcomment: 无 CNend */ td_s32 uapi_win_dequeue_frame(td_handle win_handle, uapi_video_frame_info *frame_info, td_u32 timeout_ms); /* * get vo latest frame . CNcomment: 用户态接口获取最新帧 CNend * attention \n * param[in] win_handle window handle. CNcomment: window 句柄 CNend * param[out] pstFrameinfo frame info. CNcomment: 帧信息 CNend * retval ::TD_SUCCESS success. CNcomment: 成功 CNend * retval ::SOC_ERR_VO_INVALID_PARA Invalid para. CNcomment: 无效参数 CNend * see \n * none. CNcomment: 无 CNend */ td_s32 uapi_win_get_latest_frame(td_handle win_handle, uapi_video_frame_info *frame_info); /* * set vo sync info . CNcomment: 设置sync信息 CNend * attention \n * param[in] win_handle window handle. CNcomment: window 句柄 CNend * param[in] enSyncMode sync para. CNcomment: 同步信息 CNend * retval ::TD_SUCCESS success. CNcomment: 成功 CNend * retval ::SOC_ERR_VO_INVALID_PARA Invalid para. CNcomment: 无效参数 CNend * see \n * none. CNcomment: 无 CNend */ td_s32 uapi_win_set_sync_info(td_handle win_handle, uapi_win_sync sync_mode); /* * get vo play info . CNcomment: 获取视频播放信息 CNend * attention \n * param[in] win_handle window handle. CNcomment: window 句柄 CNend * param[out] play_info play para. CNcomment: 播放信息 CNend * retval ::TD_SUCCESS success. CNcomment: 成功 CNend * retval ::SOC_ERR_VO_INVALID_PARA Invalid para. CNcomment: 无效参数 CNend * see \n none. CNcomment: 无 CNend */ td_s32 uapi_win_get_play_info(td_handle win_handle, uapi_win_play_info *play_info); /* * get video hdr type .CNcomment:获取视频的HDR类型 CNend * attention \n * param[in] win_handle window handle.CNcomment:window 句柄 CNend * param[out] hdr type.CNcomment: HDR类型 CNend * retval ::TD_SUCCESS success.CNcomment:成功 CNend * retval ::SOC_ERR_VO_INVALID_PARA Invalid para.CNcomment:无效参数 CNend * see \n * none. CNcomment:无 CNend */ td_s32 uapi_win_get_hdr_type(td_handle win_handle, uapi_hdr_type *hdr_type); /* * set window video alpha . CNcomment: 设置窗口的透明度 * attention \n * param[in] win_handle window handle. CNcomment: window 句柄 CNend * param[in] alpha. CNcomment: 0~100,需要设置的窗口透明度值 * retval ::TD_SUCCESS success. CNcomment: 成功 CNend * retval ::SOC_ERR_VO_INVALID_PARA Invalid para. CNcomment: 无效参数 CNend * see \n * none. CNcomment: 无 CNend */ td_s32 uapi_win_set_alpha(td_handle win_handle, td_u32 alpha); /* * get window video alpha . CNcomment: 获取窗口的透明度 * attention \n * param[in] win_handle window handle. CNcomment: window 句柄 CNend * param[out] pstWinAlpha. CNcomment: 0~100,存放获取到的窗口透明度值 * retval ::TD_SUCCESS success. CNcomment: 成功 CNend * retval ::SOC_ERR_VO_INVALID_PARA Invalid para. CNcomment: 无效参数 CNend * see \n * none. CNcomment: 无 CNend */ td_s32 uapi_win_get_alpha(td_handle win_handle, td_u32 *alpha); /* * brief create the AI window. CNcomment: 设置AIWINDOW 结果 CNend * attention \n CNcomment: 无 CNend * param[in] win_main_handle the window handler to be use. CNcomment: WINDOW句柄 CNend * param[in] frame_info a pointer typeof UAPI_WIN_ATTR_S. CNcomment: WINDO属性结构指针 CNend * param[in] ai_result the result fo AI . CNcomment: AI检测结果 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * retval ::SOC_ERR_VO_CREATE_ERR CNcomment: 创建失败 CNend * see \n CNcomment: 无 CNend */ td_s32 uapi_win_set_ai_window_result(td_handle win_main_handle, const uapi_video_frame_info *frame_info, const uapi_win_ai_result *ai_result); /* * brief set video source for window. CNcomment: 设置窗口的视频源 CNend * attention \n * CNcomment: 无 CNend * param[in] win_handle the window handler to be use. CNcomment: WINDOW句柄 CNend * param[in] video_source video source type. CNcomment: 视频源类型 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * see \n CNcomment: 无 CNend */ td_s32 uapi_win_set_video_source(td_handle win_handle, uapi_video_source video_source); /* * brief set video source for window. CNcomment: 获取窗口的视频源 CNend * attention \n * CNcomment: 无 CNend * param[in] win_handle the window handler to be use. CNcomment: WINDOW句柄 CNend * param[out] video_source video source type. CNcomment: 视频源类型 CNend * retval ::TD_SUCCESS CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_INVALID_OPT illegal operation. CNcomment: 操作非法 CNend * see \n CNcomment: 无 CNend */ td_s32 uapi_win_get_video_source(td_handle win_handle, uapi_video_source *video_source); /* * brief Set flip enable.CNcomment:éè??flipê1?ü CNend * attention \n * none . CNcomment: ?T CNend * param[in] win_handle the input window handler. CNcomment: WINDOW??±ú CNend * param[in] hor_flip Horizontal flip enable .CNcomment:ê1?ü????·-×a CNend * param[in] ver_flip Vertical flip enable .CNcomment:ê1?ü′1?±·-×a CNend * retval ::TD_SUCCESS success.CNcomment:3é1| CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO?′3?ê??ˉ CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: ê?è?2?êy·?·¨ CNend * see \n * none.CNcomment:?T CNend */ td_s32 uapi_win_set_flip(td_handle win_handle, td_bool hor_flip, td_bool ver_flip); /* * brief Get flip enable.CNcomment:??è?flipê1?ü CNend * attention \n * none . CNcomment: ?T CNend * param[in] win_handle the input window handler. CNcomment: WINDOW??±ú CNend * param[out] hor_flip Pointer of Horizontal flip enable .CNcomment:ê1?ü????·-×a×′ì????? CNend * param[out] ver_flip Pointer of Vertical flip enable .CNcomment:ê1?ü′1?±·-×a×′ì????? CNend * retval ::TD_SUCCESS success.CNcomment:3é1| CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO?′3?ê??ˉ CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: ê?è?2?êy·?·¨ CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: ê?è??????a?? CNend * see \n * none.CNcomment:?T CNend */ td_s32 uapi_win_get_flip(td_handle win_handle, td_bool *hor_flip, td_bool *ver_flip); /* * brief Set source info.CNcomment:配置数据源信息 CNend * attention \n * none . CNcomment: 无 CNend * param[in] win_handle the input window handler. CNcomment: WINDOW句柄 CNend * param[in] src_info Pointer of source info .CNcomment:数据源信息 CNend * retval ::TD_SUCCESS success.CNcomment:成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * see \n * none.CNcomment:无 CNend */ td_s32 uapi_win_set_source(td_handle win_handle, uapi_win_source_info *src_info); /* * brief Get source info.CNcomment:配置数据源信息 CNend * attention \n * none . CNcomment: 无 CNend * param[in] win_handle the input window handler. CNcomment: WINDOW句柄 CNend * param[out] src_info Pointer of source info .CNcomment:数据源信息 CNend * retval ::TD_SUCCESS success.CNcomment:成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * see \n * none.CNcomment:无 CNend */ td_s32 uapi_win_get_source(td_handle win_handle, uapi_win_source_info *src_info); /* * brief set packing type. CNcomment: 配置帧打包类型匹配模式 CNend * attention \n * param[in] win_handle window handle . CNcomment: 窗口句柄 CNend * param[in] mode. video frame packing type match mode. CNcomment: 帧打包类型 CNend * retval ::TD_SUCCESS success. CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * see \n * none. CNcomment: 无 CNend */ td_s32 uapi_win_set_frame_packing_type(td_handle win_handle, uapi_video_frame_packing_type packing_type); /* * brief get packing type. CNcomment: 获取帧打包类型匹配模式 CNend * attention \n * param[in] win_handle window handle . CNcomment: 窗口句柄 CNend * param[out] mode. video frame packing type match mode. CNcomment: 帧打包类型. CNend * retval ::TD_SUCCESS success. CNcomment: 成功 CNend * retval ::SOC_ERR_VO_NO_INIT VO not inited. CNcomment: VO未初始化 CNend * retval ::SOC_ERR_VO_INVALID_PARA illegal params. CNcomment: 输入参数非法 CNend * retval ::SOC_ERR_VO_NULL_PTR null pointer. CNcomment: 输入指针为空 CNend * see \n * none. CNcomment: 无 CNend */ td_s32 uapi_win_get_frame_packing_type(td_handle win_handle, uapi_video_frame_packing_type *packing_type); #ifdef __cplusplus #if __cplusplus } #endif #endif #endif