📄 tidtv_cc608xds.h
字号:
/*******************************************************************************
* @ModuleName :: TiDTV_Cc608Xds.h
*
* @Copyright :: Copyright 2003- Texas Instruments, Inc.
*
* @Description:: Definitions for EIA608B XDS Decoder
*
* @History ::
*---------------------------------------
* 11-24-2003 W.Shi Created
* 02-20-2005 W.Shi Porting to TVP9000
*******************************************************************************/
#ifndef _TI_DTV_CC608_XDS_H_
#define _TI_DTV_CC608_XDS_H_
//----------------------------------------------------------
// eXtended Data Packet Control Codes: 0x01 - 0x0F
//
#define TI_DTV_XDS_CTRL_START_CURRENT 0x01
#define TI_DTV_XDS_CTRL_CONTINUE_CURRENT 0x02
#define TI_DTV_XDS_CTRL_START_FUTURE 0x03
#define TI_DTV_XDS_CTRL_CONTINUE_FUTURE 0x04
#define TI_DTV_XDS_CTRL_START_CHANNEL 0x05
#define TI_DTV_XDS_CTRL_CONTINUE_CHANNEL 0x06
#define TI_DTV_XDS_CTRL_START_MISC 0x07
#define TI_DTV_XDS_CTRL_CONTINUE_MISC 0x08
#define TI_DTV_XDS_CTRL_START_PUBLIC 0x09
#define TI_DTV_XDS_CTRL_CONTINUE_PUBLIC 0x0A
#define TI_DTV_XDS_CTRL_START_RESERVED 0x0B
#define TI_DTV_XDS_CTRL_CONTINUE_RESERVED 0x0C
#define TI_DTV_XDS_CTRL_START_PRIVATE 0x0D
#define TI_DTV_XDS_CTRL_CONTINUE_PRIVATE 0x0E
#define TI_DTV_XDS_CTRL_END 0x0F
#define TI_DTV_XDS_CTRL_CODE_MIN 0x01
#define TI_DTV_XDS_CTRL_CODE_MAX 0x0F
#define TI_DTV_MAX_NUM_XDS_CLASS 7 // maximum number of XDS class
#define TI_DTV_XDS_OUT_OF_BAND_FLAG 0x40 // bit-6: 0 = In-Band packet, 1 = Out-of-Band packet
//----------------------------------------------------------
// Type definitions: Current Class
//
#define TI_DTV_XDS_CURRENT_PROG_ID_NO 0x01
#define TI_DTV_XDS_CURRENT_TIME_LENGTH 0x02
#define TI_DTV_XDS_CURRENT_PROG_TITLE 0x03
#define TI_DTV_XDS_CURRENT_PROG_TYPE 0x04
#define TI_DTV_XDS_CURRENT_CONTENT_ADVISORY 0x05
#define TI_DTV_XDS_CURRENT_AUDIO_SERVICES 0x06
#define TI_DTV_XDS_CURRENT_CAPTION_SERVICES 0x07
#define TI_DTV_XDS_CURRENT_CGMS_ANALOG 0x08
#define TI_DTV_XDS_CURRENT_ASPECT_RATIO_INF 0x09
#define TI_DTV_XDS_CURRENT_COMPOSITE_PKT1 0x0C
#define TI_DTV_XDS_CURRENT_COMPOSITE_PKT2 0x0D
#define TI_DTV_XDS_CURRENT_PROG_DESC1 0x10 // Program Description Row 1
#define TI_DTV_XDS_CURRENT_PROG_DESC2 0x11 // Program Description Row 2
#define TI_DTV_XDS_CURRENT_PROG_DESC3 0x12 // Program Description Row 3
#define TI_DTV_XDS_CURRENT_PROG_DESC4 0x13 // Program Description Row 4
#define TI_DTV_XDS_CURRENT_PROG_DESC5 0x14 // Program Description Row 5
#define TI_DTV_XDS_CURRENT_PROG_DESC6 0x15 // Program Description Row 6
#define TI_DTV_XDS_CURRENT_PROG_DESC7 0x16 // Program Description Row 7
#define TI_DTV_XDS_CURRENT_PROG_DESC8 0x17 // Program Description Row 8
#define TI_DTV_XDS_PROG_TYPE_MIN 0x20
#define TI_DTV_XDS_PROG_TYPE_MAX 0x7F
//----------------------------------------------------------
// Type definitions: Public Service Class
//
#define TI_DTV_XDS_PUB_WEATHER_SERVICE_CODE 0x01
#define TI_DTV_XDS_PUB_WEATHER_SERVICE_MSG 0x02
//----------------------------------------------------------
// Type definitions: Future Programming Class
//
#define TI_DTV_XDS_FUTURE_MINOR_CHANNEL_NO 0x50
#define TI_DTV_XDS_FUTURE_EVENT_NO 0x51
#define TI_DTV_XDS_FUTURE_EVENT_START_TIME 0x52
#define TI_DTV_XDS_FUTURE_EVENT_DURATION 0x53
#define TI_DTV_XDS_FUTURE_PROG_TITLE 0x54
#define TI_DTV_XDS_FUTURE_PROGR_TYPE 0x55
#define TI_DTV_XDS_FUTURE_CONTENT_ADVISORY 0x56
#define TI_DTV_XDS_FUTURE_AUDIO_SERVICES 0x57
#define TI_DTV_XDS_FUTURE_CAPTION_SERVICE 0x58
#define TI_DTV_XDS_FUTURE_MULT_STR_STRUCT_CTRL 0x60
#define TI_DTV_XDS_FUTURE_EIT_DESCRIPTOR_INF 0x61
#define TI_DTV_XDS_FUTURE_DATA_CARRIAGE_PKT 0x6F
//---------------------------------------------------------
// Type definitions: Channel Information Class
//
#define TI_DTV_XDS_CHANNEL_NETWORK_NAME 0x01
#define TI_DTV_XDS_CHANNEL_STATION_ID 0x02
#define TI_DTV_XDS_CHANNEL_TAPE_DELAY 0x03
#define TI_DTV_XDS_CHANNEL_TSID 0x04
//---------------------------------------------------------
// Type definitions: Miscellaneous
//
#define TI_DTV_XDS_MISC_TIME_OF_DAY 0x01
#define TI_DTV_XDS_MISC_IMPULSE_CAPTURE_ID 0x02
#define TI_DTV_XDS_MISC_AUX_DATA_LOCATION 0x03
#define TI_DTV_XDS_MISC_LOCAL_TIME_ZONE 0x04
#define TI_DTV_XDS_MISC_OUT_OF_BAND_CHANNEL_NO 0x40
#define TI_DTV_XDS_MISC_CHANNEL_MAP_PTR 0x41
#define TI_DTV_XDS_MISC_CHANNEL_MAP_HEADER_PKT 0x42
#define TI_DTV_XDS_MISC_CHANNEL_MAP_PKT 0x43
//----------------------------------------------------------
// Constants and definitions for eXtended Data Services
//
#define TI_DTV_MAX_XDS_PKT_LENGTH 32 // maximum length of XDS packet
typedef struct _TI_DTV_XDS_PACKET_ {
short Type; // XDS Packet Type including Start code
UCHAR MaxDataLength; // Max Data Length of the Packet
UCHAR ActDataLength; // Actual Data Length of the Packet
char *pDataBuf; // XDS Packet data buffer
} TI_DTV_XDS_PACKET;
//----------------------------------------------------------
// Current Class: 05h = Cotent Advisory (V-Chip)
//
#define TI_DTV_XDS_PACKET_V_CHIP ((TI_DTV_XDS_CTRL_START_CURRENT << 8) | TI_DTV_XDS_CURRENT_CONTENT_ADVISORY)
#define TI_DTV_XDS_PACKET_FUTURE_V_CHIP ((TI_DTV_XDS_CTRL_START_FUTURE << 8) | TI_DTV_XDS_FUTURE_CONTENT_ADVISORY)
typedef union _TI_DTV_XDS_V_CHIP_ {
char Byte[2];
struct {
char RatingSystem; // a3-a0: Rating System
union {
char MpaPicRating; // r2-r0: MPA Picture Rating System
struct {
UINT AgeRating: 3; // g2-g0: Age Rating
UINT FV: 1; // Fantasy Violence
UINT V: 1; // Violence
UINT S: 1; // Sexual Situation
UINT L: 1; // Adult Language
UINT D: 1; // Sexually Suggestive Dialog
} UsTvGuideline; // US TV Parental Guideline Rating System
char CanadianEnglish; // g2-g0: Canadian English Language Rating System
char CanadianFrench; // g2-g0: Canadian French Language Rating System
} VarSystem;
} Bits;
} TI_DTV_XDS_V_CHIP;
#define TI_DTV_V_CHIP_MPA 0x00 // MPA
#define TI_DTV_V_CHIP_US_TV_GUIDELINE 0x01 // US TV Parental Guideline Rating System
#define TI_DTV_V_CHIP_MPA1 0x02 // MPA - for backward compatibility
#define TI_DTV_V_CHIP_CANADIAN_ENGLISH 0x03 // Canadian English Language Rating System
#define TI_DTV_V_CHIP_CANADIAN_FRENCH 0x07 // Canadian French Language Rating System
#define TI_DTV_V_CHIP_RESERVED1 0x0B // Reserved-1
#define TI_DTV_V_CHIP_RESERVED2 0x0F // Reserved-2
#define TI_DTV_V_CHIP_MPA_N_A 0x00
#define TI_DTV_V_CHIP_MPA_G 0x01
#define TI_DTV_V_CHIP_MPA_PG 0x02
#define TI_DTV_V_CHIP_MPA_PG_13 0x03
#define TI_DTV_V_CHIP_MPA_R 0x04
#define TI_DTV_V_CHIP_MPA_NC_17 0x05
#define TI_DTV_V_CHIP_MPA_X 0x06
#define TI_DTV_V_CHIP_MPA_NOT_RATED 0x07
#define TI_DTV_V_CHIP_US_TV_NONE1 0x00
#define TI_DTV_V_CHIP_US_TV_Y 0x01 // All Children
#define TI_DTV_V_CHIP_US_TV_Y7 0x02 // Directed to Older Children (age 7 and above)
#define TI_DTV_V_CHIP_US_TV_G 0x03 // General Audience
#define TI_DTV_V_CHIP_US_TV_PG 0x04 // Parental Guidance Suggested
#define TI_DTV_V_CHIP_US_TV_14 0x05 // Parents Strongly Cautioned (unsuitable for children under 14)
#define TI_DTV_V_CHIP_US_TV_MA 0x06 // Mature Audience Only (unsuitable for children under 17)
#define TI_DTV_V_CHIP_US_TV_NONE2 0x07
#define TI_DTV_V_CHIP_CAN_ENGLISH_E 0x00 // Excempt
#define TI_DTV_V_CHIP_CAN_ENGLISH_C 0x01 // Children - Programming intended for children under age 8
#define TI_DTV_V_CHIP_CAN_ENGLISH_C8 0x02 // Children 8 years and older
#define TI_DTV_V_CHIP_CAN_ENGLISH_G 0x03 // General programming, suitable for all audiences
#define TI_DTV_V_CHIP_CAN_ENGLISH_PG 0x04 // Parental Guidance
#define TI_DTV_V_CHIP_CAN_ENGLISH_14 0x05 // Viewers 14 years and older
#define TI_DTV_V_CHIP_CAN_ENGLISH_18 0x06 // Adult Programming
#define TI_DTV_V_CHIP_CAN_FRE_E 0x00 // Excempt
#define TI_DTV_V_CHIP_CAN_ENG_G 0x01 // General
#define TI_DTV_V_CHIP_CAN_ENG_8 0x02 // Children 8 years and older
#define TI_DTV_V_CHIP_CAN_ENG_13 0x03 // Children 13 years and older
#define TI_DTV_V_CHIP_CAN_ENG_16 0x04 // Children 16 years and older
#define TI_DTV_V_CHIP_CAN_ENG_18 0x05 // Children 18 years and older
//----------------------------------------------------------
// Current Class: 08h = CGMS-A
// Copy Generation Management System (Analog)
//
#define TI_DTV_XDS_PACKET_CGMS_A ((TI_DTV_XDS_CTRL_START_CURRENT << 8) | TI_DTV_XDS_CURRENT_CGMS_ANALOG)
typedef union _TI_DTV_XDS_CGMS_A_ {
char Data;
struct {
UINT ASB: 1; // Analog Source Bit
UINT APS: 2;
UINT CGMS_A: 2;
UINT :3;
} Bits;
} TI_DTV_XDS_CGMS_A;
#define TI_DTV_CGMS_A_NO_RESTRICTION 0x00
#define TI_DTV_CGMS_A_CONDITION_NOT_USED 0x01
#define TI_DTV_CGMS_A_ONE_GENERATION 0x02
#define TI_DTV_CGMS_A_NO_COPYING 0x03
//
// for no copying permitted: CGMS_A_NO_COPYING
//
#define TI_DTV_CGMS_A_NO_APS 0x00 // APS = Analog Protection System (Macrovision)
#define TI_DTV_CGMS_A_PSP_ON_COLOR_STRIPE_OFF 0x01 // PSP = Pseudo Sync Pulse
#define TI_DTV_CGMS_A_PSP_ON_2L_COLOR_STRIPE 0x02 // PSP On, 2 Line Color Stripe
#define TI_DTV_CGMS_A_PSP_ON_4L_COLOR_STRIPE 0x03 // PSP On, 4 Line Color Stripe
//----------------------------------------------------------
// Miscellaneous: 01h = Time of Day
//
#define TI_DTV_XDS_PACKET_TIME_OF_DAY ((TI_DTV_XDS_CTRL_START_MISC << 8) | TI_DTV_XDS_MISC_TIME_OF_DAY)
typedef union _TI_DTV_XDS_TIME_OF_DAY_ {
char Byte[6];
struct {
char Minute; // minute: 0 - 59
char Hour; // hour: 0 - 23, D = Daylight saving time
char Date; // date: 1 - 31, L = Local day is Feb. 28 or Feb. 29
char Month; // month: 1 - 12, Z = Reset second to 0
char Weekday; // day of the week: 1 - 7, 1 = Sunday, 7 = Saturday
char Year; // year: 0 - 63, + 1990
} Bits;
} TI_DTV_XDS_TIME_OF_DAY;
#define TI_DTV_TIME_OF_DAY_HOUR_BIT_D 0x20 // D = Daylight saving time
#define TI_DTV_TIME_OF_DAY_DATE_BIT_L 0x20 // L = Local day is Feb. 28 or Feb. 29
#define TI_DTV_TIME_OF_DAY_MONTH_BIT_Z 0x20 // Z = Reset second to 0
//----------------------------------------------------------
// Miscellaneous: 04h = Local Time Zone & DST Use
//
#define TI_DTV_XDS_PACKET_LOCAL_TIME_ZONE ((TI_DTV_XDS_CTRL_START_MISC << 8) | TI_DTV_XDS_MISC_LOCAL_TIME_ZONE)
#define TI_DTV_LOCAL_TIME_ZONE_BIT_D 0x20 // D = Daylight saving time
//----------------------------------------------------------
typedef union _TI_DTV_XDS_PKT_CTRL_ {
UCHAR Data;
struct {
UINT VChip: 1;
UINT TimeOfDay: 1;
UINT LocalTimeZone: 1;
UINT CgmsA: 1;
UINT NetworkName: 1;
UINT ForPacketCtrl: 1; // Control of for arbitrary packet: 1 = Do extraction
UINT ForPacketStatus: 1; // Status of for arbitrary packet: 1 = Received the packet
UINT :1;
} Bits;
} TI_DTV_XDS_PKT_CTRL;
#endif /* _TI_DTV_CC608_XDS_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -