| 1 | /*************************************************************** |
|---|
| 2 | ** |
|---|
| 3 | ** Broadcom Corp. Confidential |
|---|
| 4 | ** Copyright 2003-2008 Broadcom Corp. All Rights Reserved. |
|---|
| 5 | ** |
|---|
| 6 | ** THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED |
|---|
| 7 | ** SOFTWARE LICENSE AGREEMENT BETWEEN THE USER AND BROADCOM. |
|---|
| 8 | ** YOU HAVE NO RIGHT TO USE OR EXPLOIT THIS MATERIAL EXCEPT |
|---|
| 9 | ** SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. |
|---|
| 10 | ** |
|---|
| 11 | ** File: si_aeit.h |
|---|
| 12 | ** Description: defines for the AEIT table parse function. |
|---|
| 13 | ** |
|---|
| 14 | ** Created: 03/08/2001 |
|---|
| 15 | ** |
|---|
| 16 | ** REVISION: |
|---|
| 17 | ** |
|---|
| 18 | ** $Log: $ |
|---|
| 19 | ** |
|---|
| 20 | ** |
|---|
| 21 | ****************************************************************/ |
|---|
| 22 | #ifndef SI_AEIT_H |
|---|
| 23 | #define SI_AEIT_H |
|---|
| 24 | |
|---|
| 25 | /* this file requires that si_list.h be included before it. */ |
|---|
| 26 | |
|---|
| 27 | /* For the following, refer to table 5.33 of ANSI/SCTE65 2002 (DVS234) */ |
|---|
| 28 | typedef struct _SI_AEIT_EVENTS |
|---|
| 29 | { |
|---|
| 30 | SI_LST_D_ENTRY(_SI_AEIT_EVENTS) event_link; |
|---|
| 31 | unsigned short event_ID; |
|---|
| 32 | unsigned long start_time; |
|---|
| 33 | unsigned long duration; |
|---|
| 34 | unsigned char title_length; |
|---|
| 35 | char * title_text; |
|---|
| 36 | unsigned char ETM_present; |
|---|
| 37 | } SI_AEIT_EVENT; |
|---|
| 38 | |
|---|
| 39 | |
|---|
| 40 | typedef struct _SI_AEIT_SOURCE |
|---|
| 41 | { |
|---|
| 42 | SI_LST_D_ENTRY(_SI_AEIT_SOURCE) source_link; |
|---|
| 43 | unsigned short source_ID; |
|---|
| 44 | SI_LST_D_HEAD(aeit_event_list, _SI_AEIT_EVENTS) aeit_event; |
|---|
| 45 | } SI_AEIT_SOURCE; |
|---|
| 46 | |
|---|
| 47 | typedef struct _SI_AEIT_SLOT{ |
|---|
| 48 | SI_LST_D_ENTRY(_SI_AEIT_SLOT) slot_link; |
|---|
| 49 | unsigned char MGT_tag; |
|---|
| 50 | unsigned char MGT_version_number; |
|---|
| 51 | unsigned short pid; |
|---|
| 52 | unsigned char version_number; |
|---|
| 53 | unsigned long section_mask[8]; |
|---|
| 54 | unsigned long slot_start_time; |
|---|
| 55 | unsigned long slot_end_time; |
|---|
| 56 | SI_LST_D_HEAD(aeit_source_list, _SI_AEIT_SOURCE) aeit_source; |
|---|
| 57 | } SI_AEIT_SLOT; |
|---|
| 58 | |
|---|
| 59 | |
|---|
| 60 | /* For the following, refer to table 5.33 of ANSI/SCTE65 2002 (DVS234) */ |
|---|
| 61 | |
|---|
| 62 | #define AEIT_TABLE_ID_BYTE_INDX 0 |
|---|
| 63 | #define AEIT_TABLE_ID_BYTE_NUM 1 |
|---|
| 64 | #define AEIT_TABLE_ID_SHIFT 0 |
|---|
| 65 | #define AEIT_TABLE_ID_MASK 0xff |
|---|
| 66 | |
|---|
| 67 | #define AEIT_SECTION_LENGTH_BYTE_INDX 1 |
|---|
| 68 | #define AEIT_SECTION_LENGTH_BYTE_NUM 2 |
|---|
| 69 | #define AEIT_SECTION_LENGTH_SHIFT 0 |
|---|
| 70 | #define AEIT_SECTION_LENGTH_MASK 0x0fff |
|---|
| 71 | |
|---|
| 72 | #define AEIT_AEIT_SUBTYPE_BYTE_INDX 3 |
|---|
| 73 | #define AEIT_AEIT_SUBTYPE_BYTE_NUM 1 |
|---|
| 74 | #define AEIT_AEIT_SUBTYPE_SHIFT 0 |
|---|
| 75 | #define AEIT_AEIT_SUBTYPE_MASK 0xff |
|---|
| 76 | |
|---|
| 77 | #define AEIT_MGT_TAG_BYTE_INDX 4 |
|---|
| 78 | #define AEIT_MGT_TAG_BYTE_NUM 1 |
|---|
| 79 | #define AEIT_MGT_TAG_SHIFT 0 |
|---|
| 80 | #define AEIT_MGT_TAG_MASK 0xff |
|---|
| 81 | |
|---|
| 82 | #define AEIT_VERSION_NUMBER_BYTE_INDX 5 |
|---|
| 83 | #define AEIT_VERSION_NUMBER_BYTE_NUM 1 |
|---|
| 84 | #define AEIT_VERSION_NUMBER_SHIFT 1 |
|---|
| 85 | #define AEIT_VERSION_NUMBER_MASK 0x1f |
|---|
| 86 | |
|---|
| 87 | #define AEIT_CURRENT_NEXT_INDICATOR_BYTE_INDX 5 |
|---|
| 88 | #define AEIT_CURRENT_NEXT_INDICATOR_BYTE_NUM 1 |
|---|
| 89 | #define AEIT_CURRENT_NEXT_INDICATOR_SHIFT 0 |
|---|
| 90 | #define AEIT_CURRENT_NEXT_INDICATOR_MASK 0x01 |
|---|
| 91 | |
|---|
| 92 | #define AEIT_SECTION_NUMBER_BYTE_INDX 6 |
|---|
| 93 | #define AEIT_SECTION_NUMBER_BYTE_NUM 1 |
|---|
| 94 | #define AEIT_SECTION_NUMBER_SHIFT 0 |
|---|
| 95 | #define AEIT_SECTION_NUMBER_MASK 0xff |
|---|
| 96 | |
|---|
| 97 | #define AEIT_LAST_SECTION_NUMBER_BYTE_INDX 7 |
|---|
| 98 | #define AEIT_LAST_SECTION_NUMBER_BYTE_NUM 1 |
|---|
| 99 | #define AEIT_LAST_SECTION_NUMBER_SHIFT 0 |
|---|
| 100 | #define AEIT_LAST_SECTION_NUMBER_MASK 0xff |
|---|
| 101 | |
|---|
| 102 | #define AEIT_NUM_SOURCES_IN_SECTION_BYTE_INDX 8 |
|---|
| 103 | #define AEIT_NUM_SOURCES_IN_SECTION_BYTE_NUM 1 |
|---|
| 104 | #define AEIT_NUM_SOURCES_IN_SECTION_SHIFT 0 |
|---|
| 105 | #define AEIT_NUM_SOURCES_IN_SECTION_MASK 0xff |
|---|
| 106 | |
|---|
| 107 | /* defines for items in the source loop relative offset only. */ |
|---|
| 108 | #define AEIT_SOURCE_ID_BYTE_INDX 0 |
|---|
| 109 | #define AEIT_SOURCE_ID_BYTE_NUM 2 |
|---|
| 110 | #define AEIT_SOURCE_ID_SHIFT 0 |
|---|
| 111 | #define AEIT_SOURCE_ID_MASK 0xffff |
|---|
| 112 | |
|---|
| 113 | #define AEIT_NUM_EVENTS_BYTE_INDX 2 |
|---|
| 114 | #define AEIT_NUM_EVENTS_BYTE_NUM 1 |
|---|
| 115 | #define AEIT_NUM_EVENTS_SHIFT 0 |
|---|
| 116 | #define AEIT_NUM_EVENTS_MASK 0xff |
|---|
| 117 | |
|---|
| 118 | /* defines for items in the events loop relative offset only. */ |
|---|
| 119 | #define AEIT_EVENT_ID_BYTE_INDX 0 |
|---|
| 120 | #define AEIT_EVENT_ID_BYTE_NUM 2 |
|---|
| 121 | #define AEIT_EVENT_ID_SHIFT 0 |
|---|
| 122 | #define AEIT_EVENT_ID_MASK 0x3fff |
|---|
| 123 | |
|---|
| 124 | #define AEIT_START_TIME_BYTE_INDX 2 |
|---|
| 125 | #define AEIT_START_TIME_BYTE_NUM 4 |
|---|
| 126 | #define AEIT_START_TIME_SHIFT 0 |
|---|
| 127 | #define AEIT_START_TIME_MASK 0xffffffff |
|---|
| 128 | |
|---|
| 129 | #define AEIT_ETM_PRESENT_BYTE_INDX 6 |
|---|
| 130 | #define AEIT_ETM_PRESENT_BYTE_NUM 1 |
|---|
| 131 | #define AEIT_ETM_PRESENT_SHIFT 4 |
|---|
| 132 | #define AEIT_ETM_PRESENT_MASK 0x3 |
|---|
| 133 | |
|---|
| 134 | #define AEIT_DURATION_BYTE_INDX 6 |
|---|
| 135 | #define AEIT_DURATION_BYTE_NUM 3 |
|---|
| 136 | #define AEIT_DURATION_SHIFT 0 |
|---|
| 137 | #define AEIT_DURATION_MASK 0xfffff |
|---|
| 138 | |
|---|
| 139 | #define AEIT_TITLE_LENGTH_BYTE_INDX 9 |
|---|
| 140 | #define AEIT_TITLE_LENGTH_BYTE_NUM 1 |
|---|
| 141 | #define AEIT_TITLE_LENGTH_SHIFT 0 |
|---|
| 142 | #define AEIT_TITLE_LENGTH_MASK 0xff |
|---|
| 143 | |
|---|
| 144 | |
|---|
| 145 | #define AEIT_DESC_LENGTH_BYTE_INDX 0 |
|---|
| 146 | #define AEIT_DESC_LENGTH_BYTE_NUM 2 |
|---|
| 147 | #define AEIT_DESC_LENGTH_SHIFT 0 |
|---|
| 148 | #define AEIT_DESC_LENGTH_MASK 0x0fff |
|---|
| 149 | |
|---|
| 150 | |
|---|
| 151 | |
|---|
| 152 | #ifdef __cplusplus |
|---|
| 153 | extern "C" { |
|---|
| 154 | #endif |
|---|
| 155 | |
|---|
| 156 | SI_AEIT_SLOT *SI_AEIT_Create_Slot (void); |
|---|
| 157 | SI_RET_CODE SI_AEIT_Clear_Slot (SI_AEIT_SLOT * slot); |
|---|
| 158 | SI_RET_CODE SI_AEIT_Parse (unsigned char *aeit_table); |
|---|
| 159 | |
|---|
| 160 | #ifdef __cplusplus |
|---|
| 161 | } |
|---|
| 162 | #endif |
|---|
| 163 | |
|---|
| 164 | |
|---|
| 165 | |
|---|
| 166 | #endif |
|---|
| 167 | |
|---|
| 168 | |
|---|