vbi.c
上传用户:fy98168
上传日期:2015-06-26
资源大小:13771k
文件大小:3k
- /*****************************************************************************
- File name : vbi.c
- Description : VBI support
- COPYRIGHT (C) 2004 STMicroelectronics
- *****************************************************************************/
- /* Includes --------------------------------------------------------------- */
- #include <string.h>
- #include "stddefs.h"
- #include "stlite.h"
- #include "stdevice.h"
- #include "sttbx.h"
- #include "gendef.h"
- #include "section.h" /* memory partitions */
- #include "errors.h"
- #include "denc.h"
- #include "vbi.h"
- /* Private Types ------------------------------------------------------ */
- /* Private Constants -------------------------------------------------- */
- /* Private Variables -------------------------------------------------- */
- /* Private Macros ----------------------------------------------------- */
- /* Private Function prototypes ---------------------------------------- */
- /* Global Variables ------------------------------------------------------- */
- ST_DeviceName_t g_KB_VbiDeviceName = "VBI";
- STVBI_Handle_t g_KB_VbiHandle;
- /* Global Functions ------------------------------------------------------- */
- /*-------------------------------------------------------------------------
- * Function : KB_VbiSetup
- * Initialise VBI
- * Input : nothing
- * Output :
- * Return : Error Code
- * ----------------------------------------------------------------------*/
- ST_ErrorCode_t KB_VbiSetup(void)
- {
- ST_ErrorCode_t ST_ErrorCode;
- STVBI_InitParams_t STVBI_InitParams;
- STVBI_OpenParams_t OpenVBIParam;
-
- /* VBI Init */
- STVBI_InitParams.DeviceType = KB_VBI_DEVICE_TYPE;
- STVBI_InitParams.MaxOpen = 1;
- strcpy(STVBI_InitParams.Target.DencName, g_KB_DENCDeviceName);
- STTBX_Print(("KB_VbiSetup(%s)=", g_KB_VbiDeviceName ));
- ST_ErrorCode = STVBI_Init(g_KB_VbiDeviceName, &STVBI_InitParams);
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- STTBX_Print(("%sn", DBGError(ST_ErrorCode) ));
- return( ST_ErrorCode );
- }
- STTBX_Print(("%sn", STVBI_GetRevision() ));
- #if 0
- OpenVBIParam.Configuration.VbiType = STVBI_VBI_TYPE_CLOSEDCAPTION;
- OpenVBIParam.Configuration.Type.CC.Mode = STVBI_CCMODE_BOTH;
- STTBX_Print(("VMIX_Open="));
- ST_ErrorCode = STVBI_Open( g_KB_VbiDeviceName, &OpenVBIParam, &g_KB_VbiHandle);
- STTBX_Print(("%sn", KB_ErrorGetText(ST_ErrorCode) ));
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- STTBX_Print(("%sn", DBGError(ST_ErrorCode) ));
- return( ST_ErrorCode );
- }
- #endif
-
- return ( ST_ErrorCode );
- }
- /* EOF --------------------------------------------------------------------- */