123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257 |
- /******************************************************************************
- *
- * @file pl_cc.h
- *
- * @brief This file contains some function to surport cc and vchip.\n
- *
- * @note Modified by yong.bai on 2010/04/16. \n
- * All rights reserved.
- *
- * @author
- *
- ******************************************************************************/
- #ifndef _MID_CC_H_
- #define _MID_CC_H_
- /*******************************************************************************
- * Header include
- ******************************************************************************/
- #include "types.h"
- //#include "gsl.h"
- #include "cc708_interface.h"
- #include "cc608_interface.h"
- /*******************************************************************************
- * Constant
- ******************************************************************************/
- #define CC_COLOR_TRANSPARENT (0x00000000)
- #define CC_COLOR_BLACK (0xff000000)
- #define CC_COLOR_WHITE (0xffffffff)
- #define CC_COLOR_RED (0xffff0000)
- #define CC_COLOR_BLUE (0xff0000ff)
- #define CC_COLOR_GREEN (0xff00ff00)
- #define CC_COLOR_YELLOW (0xffffff00)
- #define CC_COLOR_MAGENTA (0xffff00ff)
- #define CC_COLOR_CYAN (0xff00ffff)
- #define CC_COLOR_GREY (0xff808080)
- /*xds event*/
- typedef enum
- {
- XDS_CURRENT_PROG_TITLE = 0,
- XDS_FUTURE_PROG_TITLE,
- XDS_EVENT_MAX
- }XDSEvent_t;
- typedef void (*Vchip_Callback_f)(UINT8 ucData1, UINT8 ucData2);
- typedef void (*Xds_Callback_f)(XDSEvent_t eventtype, void *param);
- typedef struct
- {
- Vchip_Callback_f vchip_callback;
- Xds_Callback_f xds_callback;
- }MID_CC_CallBack_t;
- typedef enum
- {
- MID_CC_SRC_ATV = 0,
- MID_CC_SRC_DTV,
- MID_CC_SRC_MAX
- }MID_CC_Source_Type_t;
- /*cc service type*/
- typedef enum
- {
- SERVICETYPE_CC1 = 1,
- SERVICETYPE_CC2,
- SERVICETYPE_CC3,
- SERVICETYPE_CC4,
- SERVICETYPE_TT1,
- SERVICETYPE_TT2,
- SERVICETYPE_TT3,
- SERVICETYPE_TT4,
- SERVICETYPE_CS1,
- SERVICETYPE_CS2,
- SERVICETYPE_CS3,
- SERVICETYPE_CS4,
- SERVICETYPE_CS5,
- SERVICETYPE_CS6,
- SERVICETYPE_MAX
- } EServicetype_e;
- /* return value types */
- typedef enum
- {
- MID_CC_FAILURE = -1,
- MID_CC_INVALID_PARAM = -2,
- MID_CC_SUCCESS = 0,
- } MID_Ret_e;
- /*CC type definition*/
- typedef enum
- {
- CC_TYPE_CC708,
- CC_TYPE_CC608,
- CC_TYPE_MAX
- } CCType_t;
- enum //Sam081129
- {
- PL_CC_LINE21_RUNNING,
- PL_CC_LINE21_STOP
- };
- /* cc start status */
- typedef enum
- {
- CC_VIEW,
- CC_UNVIEW,
- CC_START,
- CC_STOP,
- CC_INIT,
- CC_TERMINAL
- }MID_CC_STATUS_T;
- /* Aspect ratio */
- typedef enum CCWindowAspectRatio_t {
- CC_WINDOW_ASPECT_RATIO_4_3,
- CC_WINDOW_ASPECT_RATIO_16_9,
- CC_WINDOW_ASPECT_RATIO_OTHERS,
- CC_WINDOW_ASPECT_RATIO_TOTAL
- }CCWindowAspectRatio_t;
- /* Window opacity type */
- typedef enum CCWindowOpacityType_t {
- CCWIN_OPACITY_DEFAULT,
- CCWIN_OPACITY_SOLID,
- CCWIN_OPACITY_FLASHING,
- CCWIN_OPACITY_TRANSLUCENT,
- CCWIN_OPACITY_TRANSPARENT
- }CCWindowOpacityType_t;
- /* Window edge types */
- typedef enum CCWindowEdgeType_t {
- CC_EDGE_DEFAULT,
- CC_EDGE_RAISED ,
- CC_EDGE_DEPRESSED,
- CC_EDGE_UNIFORM ,
- CC_EDGE_LEFT_DROP_SHADOW,
- CC_EDGE_RIGHT_DROP_SHADOW
- }CCWindowEdgeType_t;
- /* Dimension of the video */
- typedef enum CCWindowResolution_t {
- CC_WINDOW_RESOLUTION_640x480,
- CC_WINDOW_RESOLUTION_704x480,
- CC_WINDOW_RESOLUTION_720x480,
- CC_WINDOW_RESOLUTION_1280x720,
- CC_WINDOW_RESOLUTION_1920x1080,
- CC_WINDOW_RESOLUTION_TOTAL
- }CCWindowResolution_t;
- /* FontOpacity type */
- typedef enum CCFontOpacityType_t {
- CCFONT_OPACITY_DEFAULT,
- CCFONT_OPACITY_SOLID,
- CCFONT_OPACITY_FLASHING,
- CCFONT_OPACITY_TRANSLUCENT,
- CCFONT_OPACITY_TRANSPARENT
- }CCFontOpacityType_t;
- /* Different font styles */
- typedef enum CCFontStyle_t {
- CCFONT_STYLE_DEFAULT = 0,
- CCFONT_STYLE_MONO_SERIF,
- CCFONT_STYLE_PROPORTIONAL_SERIF,
- CCFONT_STYLE_MONO_SANS_SERIF,
- CCFONT_STYLE_PROPORTIONAL_SANS_SERIF,
- CCFONT_STYLE_CASUAL,
- CCFONT_STYLE_CURSIVE,
- CCFONT_STYLE_SMALL_CAPTITALS
- }CCFontStyle_t;
- /* Different font sizes */
- typedef enum CCFontSize_t {
- CCFONT_SIZE_DEFAULT,
- CCFONT_SIZE_SMALL ,
- CCFONT_SIZE_MEDIUM,
- CCFONT_SIZE_LARGE
- }CCFontSize_t;
- /* Font edge types */
- typedef enum CCFontEdgeType_t {
- CCFONT_EDGE_DEFAULT,
- CCFONT_EDGE_RAISED,
- CCFONT_EDGE_DEPRESSED,
- CCFONT_EDGE_UNIFORM,
- CCFONT_EDGE_LEFT_DROP_SHADOW,
- CCFONT_EDGE_RIGHT_DROP_SHADOW
- }CCFontEdgeType_t;
- /* CC Display Types */
- typedef enum CCDisaplyType_t {
- CCDISP_TYPE_608,
- CCDISP_TYPE_708,
- CCDISP_TYPE_MAX
- }CCDisplayType_t;
- /*CC Color*/
- typedef enum
- {
- CCCOLOR_TYPE_DEFAULT, /**< default color*/
- CCCOLOR_TYPE_BLACK, /**< black color*/
- CCCOLOR_TYPE_WHITE, /**< white color*/
- CCCOLOR_TYPE_RED, /**< red color*/
- CCCOLOR_TYPE_GREEN, /**< green color*/
- CCCOLOR_TYPE_BLUE, /**< blue color*/
- CCCOLOR_TYPE_YELLOW, /**< yellow color*/
- CCCOLOR_TYPE_MAGENTA, /**< magenta color*/
- CCCOLOR_TYPE_CYAN /**< cyan color*/
- } CCColorType_t;
- /* Font attributes */
- typedef struct CCFontAttrib_t {
- Boolean italic;
- Boolean underline;
- Boolean bold;
- CCColorType_t fgColor;
- CCColorType_t bgColor;
- CCColorType_t EdgeColor;
- CCFontOpacityType_t FgOpacityType;
- CCFontOpacityType_t BgOpacityType;
- CCFontStyle_t FontStyle;
- CCFontSize_t FontSize;
- CCFontEdgeType_t FontEdgeType;
- }CCFontAttrib_t;
- /* CC Init structure */
- typedef struct CCInitAttrib_t {
- UINT32 WindowColor;
- UINT32 EdgeColor;
- CCWindowAspectRatio_t WindowAspectRatio;
- CCWindowOpacityType_t WindowOpacity;
- CCWindowEdgeType_t WindowEdge;
- CCFontAttrib_t CCFontAttrib;
- }CCInitAttrib_t;
- /* cc Initializing */
- MID_Ret_e MID_CC_Initialize(MID_CC_CallBack_t callback);
- /*cc start*/
- MID_Ret_e MID_CC_Start(MID_CC_Source_Type_t srctype);
- MID_Ret_e MID_CC_View(EServicetype_e service_no, CCType_t cc_type, CCInitAttrib_t *stCcInitAttrib);
- /* get current cc status */
- MID_CC_STATUS_T MID_Get_CC_Status(void);
- /*cc stop*/
- MID_Ret_e MID_CC_Stop(void);
- MID_Ret_e MID_CC_Unview(void);
- /*cc reset*/
- void MID_CC_Reset(void);
- /* cc terminating*/
- MID_Ret_e MID_CC_Terminate(void);
- /* get cc vchip version*/
- void MID_Get_CC_Vchip_version(void **cc_vchip_version);
- unsigned char MID_CC_GetSignalStatus(void);
- #endif // _PL_CC_H_
|