You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

372 lines
14 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/*
* Copyright (c) Hisilicon Technologies Co., Ltd. 2020-2020. All rights reserved.
* Description : tvd iapi
*/
#ifndef __UAPI_TVD_H__
#define __UAPI_TVD_H__
/* add include here */
#include "uapi_video.h"
#include "uapi_system.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif /* __cplusplus */
/*
* Defines the TVD working mode enumeration.
* CNcomment: 定义TVD工作模式枚举
*/
typedef enum {
UAPI_TVD_WORK_MODE_NORMAL = 0, /* TVD work mode normal */ /* CNcomment:TVD正常工作模式 */
UAPI_TVD_WORK_MODE_CHAN_SCAN, /* TVD RF channel scan mode */ /* CNcomment:TVD RF搜台模式 */
UAPI_TVD_WORK_MODE_MAX /* Invalid value */ /* CNcomment:非法边界值 */
} uapi_tvd_work_mode;
/*
* Defines the TVD comb filter mode enumeration.
* CNcomment: 定义TVD梳状滤波器模式枚举
*/
typedef enum {
UAPI_TVD_COMB_MODE_ADAP = 0, /* TVD adaptive comb filter */ /* CNcomment:TVD自适应梳状滤波器 */
UAPI_TVD_COMB_MODE_FORCE_3D, /* TVD 3D comb filter */ /* CNcomment:TVD 3D梳状滤波器 */
UAPI_TVD_COMB_MODE_FORCE_2D, /* TVD 2D comb filter */ /* CNcomment:TVD 2D梳状滤波器 */
UAPI_TVD_COMB_MODE_FORCE_1D, /* TVD 1D comb filter */ /* CNcomment:TVD 1D梳状滤波器 */
UAPI_TVD_COMB_MODE_MAX /* Invalid value */ /* CNcomment:非法边界值 */
} uapi_tvd_comb_mode;
/*
* Defines the TVD adjustment position type enumeration.
* CNcomment: 定义TVD 调节位置类型枚举
*/
typedef enum {
UAPI_TVD_POSITION_H = 0, /* TVD adjust H position */ /* CNcomment:调节行起始位置 */
UAPI_TVD_POSITION_V, /* TVD adjust V position */ /* CNcomment:调节场起始位置 */
UAPI_TVD_POSITION_MAX /* Invalid value */ /* CNcomment:非法边界值 */
} uapi_tvd_position;
/*
* Defines the timing information of the TVD signal.
* CNcomment: 定义TVD 信号时序信息结构体
*/
typedef struct {
td_bool interlace; /* Flag of progressive or interlance */ /* CNcomment:逐隔行标志 */
td_u32 width; /* Active width of input standard signal */
/* CNcomment:信号标准有效像素宽度 */
td_u32 height; /* Active height of input standard signal */
/* CNcomment:信号标准有效像素高度 */
td_u32 frame_rate; /* Frame Ratefields per second */
/* CNcomment:场频 单位为每秒场数目60表示60Hz */
uapi_oversample oversample; /* Oversample information */ /* CNcomment:过采样信息 */
uapi_pixel_bit_depth bit_depth; /* Sample bit width */ /* CNcomment:位宽信息 */
uapi_video_pixel_format pixel_fmt; /* Pixel format */ /* CNcomment:像素格式 */
} uapi_tvd_timing_info;
/*
* Defines the attributes of the TVD input signal.
* CNcomment: 定义TVD输入信号属性的结构体
*/
typedef struct {
uapi_video_source type; /* Input source type */ /* CNcomment: 输入源类别 */
td_u32 index; /* Source index */ /* CNcomment: 输入信号源索引 */
} uapi_tvd_src_attr;
/*
* Defines the TVD color system filtering.
* CNcomment: 定义TVD彩色制式过滤定义的结构体
*/
typedef struct {
td_bool dis_palm; /* Disable PAL-M in RF source */ /* CNcomment: 过滤掉PAL-M彩色制式 */
td_bool dis_paln; /* Disable PAL-N in RF source */ /* CNcomment: 过滤掉PAL-N彩色制式 */
td_bool dis_secam; /* Disable SECAM in RF source */ /* CNcomment: 过滤掉SECAM彩色制式 */
td_bool dis_pal60; /* Disable PAL-60 in RF source */ /* CNcomment: 过滤掉PAL-60彩色制式 */
td_bool dis_ntsc443; /* Disable NTSC443 in RF source */ /* CNcomment: 过滤掉NTSC443彩色制式 */
} uapi_tvd_sys_filter;
/*
* Defines the TVD capability level.
* CNcomment: 定义TVD能力级的结构体
*/
typedef struct {
td_u8 atv_max;
td_u8 cvbs_max;
td_u8 scart_max;
} uapi_tvd_capability;
/*
* brief the whole initialization of the TVD device. CNcomment:TVD接口驱动软件初始化 CNend
* attention \n
* param CNcomment:无 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_init(td_void);
/*
* brief deinit the TVD device. CNcomment:TVD接口去初始化 CNend
* attention \n
* param CNcomment:无 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend
* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_deinit(td_void);
/*
* Connect the TVD device if source switch to RF or AV.
* CNcomment:切换TVD信号源RF或AV时连接TVD设备 CNend
* attention \n
* param[in] src_attr Connected source attribute.CNcomment:连接的信号源属性 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend
* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_connect(const uapi_tvd_src_attr *src_attr);
/*
* Disconnect the TVD device if source switch to other source.
* CNcomment:切换到其他信号源时断开连接TVD设备 CNend
* attention \n
* param CNcomment:无 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend
* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_disconnect(td_void);
/*
* Get the signal status like no signal/unstable/support.
* CNcomment:读取信号状态(无信号/不稳定/信号稳定) CNend
* attention \n
* param[out] signal_status signal status.CNcomment:获取的信号状态 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend
* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_get_signal_status(uapi_sig_status *signal_status);
/*
* Get the standard timing information of current signal. CNcomment:读取信号标准时序信息 CNend
* attention \n
* param[out] timing_info signal timing information.CNcomment:获取的信号时序信息 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend
* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_get_timing_info(uapi_tvd_timing_info *timing_info);
/*
* Set the TVD color system. CNcomment:设置TVD彩色制式 CNend
* attention \n
* param[in] color_sys color system.CNcomment:彩色制式 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend
* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_set_color_system(uapi_color_sys color_sys);
/*
* Get the color system of current system. CNcomment:读取彩色制式信息 CNend
* attention \n
* param[out] color_sys color system.CNcomment:彩色制式 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend
* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_get_color_system(uapi_color_sys *color_sys);
/*
* To check the signal is locked or not in autosearch. CNcomment:读取信号锁定信息 CNend
* attention \n
* param[out] lock locked or not.CNcomment:锁定信息 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend
* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_get_signal_lock(td_bool *lock);
/*
* Get the Noise value of signal. CNcomment:读取噪声测量值 CNend
* attention \n
* param[out] noise_value noise level.CNcomment:噪声测量值 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend
* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_get_noise_value(td_u32 *noise_value);
/*
* To check the signal is Macrovision copyright or not. CNcomment:读取Macrovision版权信息 CNend
* attention \n
* param[out] status Macrovision copyright information.CNcomment:Macrovision版权信息 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend
* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_get_macrovision_status(td_bool *status);
/*
* To check the nonstand signal information. CNcomment:读取非标信息 CNend
* attention \n
* param[out] nstd_info nonstand signal information.CNcomment:非标信号信息 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend
* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_get_nonstd_info(uapi_video_nonstd_info *nstd_info);
/*
* Get the range of H/V adjust. CNcomment:读取H/V调整范围 CNend
* attention \n
* param[in] type adjust typeH or V. CNcomment:调节位置类型 CNend
* param[out] range adjust range.CNcomment:调节范围 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend
* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_get_range(uapi_tvd_position type, uapi_sys_range *range);
/*
* Get the current H/V position of tvd output. CNcomment:读取TVD输出的H/V位置信息 CNend
* attention \n
* param[in] type position type. CNcomment:位置信息类型 CNend
* param[out] position position information.CNcomment:位置信息 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend
* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_get_position(uapi_tvd_position type, td_u32 *position);
/*
* Set the H/V position of tvd output. CNcomment:设置TVD输出的H/V位置 CNend
* attention \n
* param[in] type position type. CNcomment:位置信息类型 CNend
* param[in] position position information.CNcomment:位置信息 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend
* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_set_position(uapi_tvd_position type, td_u32 position);
/*
* Check the signal is exist or not with the non-current source.
* CNcomment:读取TVD源离线检测状态 CNend
* attention \n
* param[in] src_attr source information. CNcomment:离线检测信号源信息 CNend
* param[out] status signal exist information.CNcomment:信号是否存在信息 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend
* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_get_offline_status(const uapi_tvd_src_attr *src_attr, td_bool *status);
/*
* Enable/disable the Pedestal setting for NTSC/PAL M.
* CNcomment:设置NTSC/PAL M制式黑电平7.5IRE CNend
* attention \n
* param[in] enable TD_TRUE:enable, TD_FALSE:disable.CNcomment:TD_TRUE:使能, TD_FALSE:关闭 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend
* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_set_pedestal(td_bool enable);
/*
* Set color system filter. CNcomment:设置彩色制式过滤 CNend
* attention \n
* param[in] sys_filter color system filter information.CNcomment:彩色制式过滤信息 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend
* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_set_color_system_filter(const uapi_tvd_sys_filter *sys_filter);
/*
* Get color system filter. CNcomment读取彩色制式过滤 CNend
* attention \n
* param[in] sys_filter color system filter information.CNcomment:彩色制式过滤信息 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend
* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_get_color_system_filter(uapi_tvd_sys_filter *sys_filter);
/*
* Set the comb working mode like 3d/2d. CNcomment:设置梳状滤波器工作模式 CNend
* attention \n
* param[in] mode the comb working mode.CNcomment:梳状滤波器工作模式 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend
* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_set_comb_filter_mode(uapi_tvd_comb_mode mode);
/*
* Get the signal 625 lines information,For ATV Rf scan signal. CNcomment:读取信号是否是625行 CNend
* attention \n
* param[out] is_625mode TD_TRUE:625 lines, TD_FALSE:525 lines.CNcomment:TD_TRUE:625行, TD_FALSE:525行 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend
* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_get_line_status(td_bool *is_625mode);
/*
* Set the TVD working mode. CNcomment:设置TVD工作模式 CNend
* attention \n
* param[in] work_mode the TVD working mode.CNcomment:TVD工作模式 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend
* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_set_work_mode(uapi_tvd_work_mode work_mode);
/*
* Get the TVD capability. CNcomment:读取TVD能力级 CNend
* attention \n
* param[in] capability the TVD capability.CNcomment:TVD能力级 CNend
* retval TD_SUCCESS success CNcomment: 成功 CNend
* retval please refer to the err code definitino of mpi.CNcomment:请参考MPI错误码 CNend
* see \n
* CNcomment:无 CNend
*/
td_s32 uapi_tvd_get_capability(uapi_tvd_capability *capability);
#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif /* __cplusplus */
#endif /* __UAPI_TVD_H__ */