/*************************************************************************** * Copyright (c) 2002-2006, Broadcom Corporation * All Rights Reserved * Confidential Property of Broadcom Corporation * * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE * AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR * EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. * * $brcm_Workfile: bdcc.h $ * $brcm_Revision: 4 $ * $brcm_Date: 9/22/06 1:32p $ * * Module Description: * * Revision History: * * $brcm_Log: /BSEAV/lib/ccgfx/include/bdcc.h $ * * 4 9/22/06 1:32p btosi * PR22275: added support for clearing the screen if the CC data stream * stops for an extended period (30 seconds) * * 3 9/15/06 12:07p btosi * PR22275: added support for font edges * * 2 8/17/06 1:12p btosi * PR22275: consolidated common definitions into this include file * * 1 3/17/05 7:58p shyam * PR 8365 : Add other sub-modules of ccgfx * ***************************************************************************/ #ifndef BDCC_H #define BDCC_H #ifdef __cplusplus extern "C" { #endif typedef enum BDCC_608_Service { BDCC_Min_608_Serivce = 1, BDCC_Max_608_Service = 4 } BDCC_608_Service; typedef enum BDCC_708_Service { BDCC_Min_708_Serivce = 1, BDCC_Max_708_Service = 63 } BDCC_708_Service; /* ** The EIA standard defines the following pen sizes. */ typedef enum BDCC_PenSize { BDCC_PenSize_Small = 0, BDCC_PenSize_Standard = 1, BDCC_PenSize_Large = 2, BDCC_PenSize_Max_Size = 3 } BDCC_PenSize ; /* ** The EIA standard defines the following pen styles. */ typedef enum BDCC_PenStyle { BDCC_PenStyle_Standard = 0, BDCC_PenStyle_Italics = 1, BDCC_PenStyle_Underline = 2, BDCC_PenStyle_Italics_Underline = 3 } BDCC_PenStyle ; /* ** The EIA-708 standard specifies 8 font styles. */ typedef enum BDCC_FontStyle { BDCC_FontStyle_Default = 0, BDCC_FontStyle_MonoSerifs = 1, BDCC_FontStyle_PropSerifs = 2, BDCC_FontStyle_Mono = 3, BDCC_FontStyle_Prop = 4, BDCC_FontStyle_Casual = 5, BDCC_FontStyle_Cursive = 6, BDCC_FontStyle_SmallCaps = 7, BDCC_FontStyle_Max_Value = 8 } BDCC_FontStyle ; /* ** Pen and window colors have an associated opacity, enum'ed here. ** The Translucent opacity is alpha blending with some unspecified alpha value. */ typedef enum BDCC_Opacity { BDCC_Opacity_Solid = 0, BDCC_Opacity_Flash = 1, BDCC_Opacity_Translucent = 2, BDCC_Opacity_Transparent = 3 } BDCC_Opacity ; /* ** The EIA-708 standard defines the following edge (outline) styles. */ typedef enum BDCC_Edge { BDCC_Edge_Style_None = 0, BDCC_Edge_Style_Raised = 1, BDCC_Edge_Style_Depressed = 2, BDCC_Edge_Style_Uniform = 3, BDCC_Edge_Style_LeftDropShadow = 4, BDCC_Edge_Style_RightDropShadow = 5 } BDCC_Edge ; /* * ** The EIA-708 standard specifies 4 text justifications. * */ typedef enum BDCC_Justify { BDCC_Justify_eLeft = 0, BDCC_Justify_eRight = 1, BDCC_Justify_eCenter= 2, BDCC_Justify_eFull = 3 } BDCC_Justify ; /* * ** The EIA-708 standard specifies 4 print directions. * */ typedef enum BDCC_Direction { BDCC_Direction_eLeftToRight = 0, BDCC_Direction_eRightToLeft = 1, BDCC_Direction_eTopToBottom = 2, BDCC_Direction_eBottomToTop = 3 } BDCC_Direction ; /* * ** Display mode constants. * */ typedef enum BDCC_WINLIB_Display_Modes { BDCC_WINLIB_Display_480i, BDCC_WINLIB_Display_480p, BDCC_WINLIB_Display_720p, BDCC_WINLIB_Display_1080i, BDCC_WINLIB_Display_1080p, BDCC_WINLIB_Display_Max_Size }BDCC_WINLIB_Display_Modes; /* ** The default edge width, this be overridden by the "application". */ #define BDCC_Edge_Width 1 /* ** The following attributes can be overriden by the viewer. */ typedef struct BDCC_ENG_OverRides { BDCC_PenSize PenSize ; BDCC_FontStyle FontStyle ; unsigned int FgColor ; BDCC_Opacity FgOpacity ; unsigned int BgColor ; BDCC_Opacity BgOpacity ; unsigned int EdgeColor ; BDCC_Edge EdgeType ; int Italics; int Underline; } BDCC_ENG_OverRides ; /* ** Per the EIA documentation: if CC data is not received for 30 seconds, ** the screen should be cleared. */ #define BDCC_Data_Timeout_MSecs ( 1000 * 30 ) #define BDCC_CS_Timeout_MSecs ( 1000 * 6 ) /* ** The following masks are used to manage attributes specified both ** in the MPEG stream and by the "viewer". */ #define BDCC_ATTR_MASK_NONE 0x00000000 #define BDCC_ATTR_MASK_ANCHOR 0x00000001 #define BDCC_ATTR_MASK_BORDER 0x00000002 #define BDCC_ATTR_MASK_CLEARWINDOW 0x00000004 #define BDCC_ATTR_MASK_DEFINED_CLR 0x00000008 #define BDCC_ATTR_MASK_DEFINED_SET 0x00000010 #define BDCC_ATTR_MASK_EDGECOLOR 0x00000020 #define BDCC_ATTR_MASK_EDGETYPE 0x00000040 #define BDCC_ATTR_MASK_EFFECT 0x00000080 #define BDCC_ATTR_MASK_FILL 0x00000100 #define BDCC_ATTR_MASK_FONTSTYLE 0x00000200 #define BDCC_ATTR_MASK_ITALICS 0x00000400 #define BDCC_ATTR_MASK_JUSTIFY 0x00000800 #define BDCC_ATTR_MASK_LOCK 0x00001000 #define BDCC_ATTR_MASK_PENBG 0x00002000 #define BDCC_ATTR_MASK_PENFG 0x00004000 #define BDCC_ATTR_MASK_PENLOC 0x00008000 #define BDCC_ATTR_MASK_PENSIZE 0x00010000 #define BDCC_ATTR_MASK_PENSTYLEID 0x00020000 #define BDCC_ATTR_MASK_PRINTDIR 0x00040000 #define BDCC_ATTR_MASK_RCCOUNT 0x00080000 #define BDCC_ATTR_MASK_SCROLLDIR 0x00100000 #define BDCC_ATTR_MASK_UNDERLINE 0x00200000 #define BDCC_ATTR_MASK_VISIBLE 0x00400000 #define BDCC_ATTR_MASK_WNDSTYLEID 0x00800000 #define BDCC_ATTR_MASK_WORDWRAP 0x01000000 /******************************************** * * Enum: DCCERR * * Description: * * DCCERR enumerates the error codes returned * by the collection of DCC Libraries. * ********************************************/ typedef enum BDCC_Error { BDCC_Error_eSuccess = 0, BDCC_Error_eObjectNotInitialized, BDCC_Error_eInvalidParameter, BDCC_Error_eOutputBufTooSmall, BDCC_Error_eNullPointer, BDCC_Error_eBadOutputType, BDCC_Error_eBufferOverflow, BDCC_Error_eArgOutOfRange, BDCC_Error_eSequence, BDCC_Error_eWrnPause, BDCC_Error_eNoMemory } BDCC_Error ; /******************************************** * * Structure: BDCC_OutputInfo * * Description: * * The BDCC_OutputInfo structure holds the * information related to an output buffer. * ********************************************/ typedef struct BDCC_OutputInfo { /* * pOutputBuf * * This points to a buffer into which * DccXxx_Process() will copy output bytes. */ unsigned char * pOutputBuf ; /* * OutputBufSize * * The size in bytes of the buffer pointed * to by pOutputBuf. */ unsigned int OutputBufSize ; /* * OutputBytesProduced * * the DccXxx_Process() function will update this * field, indicating how many bytes were copied * to the output buffer. */ unsigned int OutputBytesProduced ; /* * DccError * * Recoverable errors related to processing for * a particular output are reported here. */ BDCC_Error DccError ; } BDCC_OutputInfo ; /*************************************************************************** * Summary: * Winlib rectangle * * Description: * Winlib rectangle * * See Also: * * ****************************************************************************/ typedef struct BDCC_WINLIB_Rect { unsigned int x; /* can be < 0 */ unsigned int y; /* can be < 0 */ unsigned int width; unsigned int height; } BDCC_WINLIB_Rect; #ifdef __cplusplus } #endif #endif /* BDCC_H */