| 1 | /* |
|---|
| 2 | DMW_EpgBase.h |
|---|
| 3 | |
|---|
| 4 | EPG Middleware baseline implementation |
|---|
| 5 | |
|---|
| 6 | Copyright 2004 Digital STREAM Technology, Inc. |
|---|
| 7 | All Rights Reserved |
|---|
| 8 | |
|---|
| 9 | $Id: DMW_EpgBase.h v1.00 2004/07 cafrii Exp $ |
|---|
| 10 | */ |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | #ifndef __DMW_EPG_BASE_H__ |
|---|
| 14 | #define __DMW_EPG_BASE_H__ |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | #define DMW_EPG_SUPPORT_RRT 1 |
|---|
| 18 | |
|---|
| 19 | #define DMW_EPG_SUPPORT_ELAPSED_TIMER 1 |
|---|
| 20 | /* cafrii 060814 add |
|---|
| 21 | 1ÀÌ¸é °¢ ä³Î/¼ºêä³Îº°·Î scan¿¡ ¼Ò¿äµÈ counter¸¦ °¡µ¿ÇÏ¿© |
|---|
| 22 | ÃÑ ´©Àû °Ë»ö ½Ã°£ÀÌ ¾î´ÀÁ¤µµÀÎÁö Åë°è¸¦ ³½´Ù. |
|---|
| 23 | */ |
|---|
| 24 | |
|---|
| 25 | #include "DMW_EpgBasePriv.h" |
|---|
| 26 | /* |
|---|
| 27 | EpgBase private header file.. |
|---|
| 28 | these are not public function and structures.. do not use this.. |
|---|
| 29 | */ |
|---|
| 30 | |
|---|
| 31 | |
|---|
| 32 | /* UpdateStart reason value |
|---|
| 33 | ¾î¶² ÀÌÀ¯·Î epg udpate°¡ ½ÃÀ۵Ǿú´ÂÁö ¾Ë·ÁÁÜ |
|---|
| 34 | */ |
|---|
| 35 | enum { |
|---|
| 36 | EpgUpdateStartByUserCall = 1, |
|---|
| 37 | EpgUpdateStartByMgtChange = 2, |
|---|
| 38 | }; |
|---|
| 39 | |
|---|
| 40 | |
|---|
| 41 | /* |
|---|
| 42 | Callback ÇÔ¼öÀÇ ÀÎÀÚ·Î Àü´ÞµÉ À̺¥Æ® ŸÀÔ°ú µ¿¹ÝµÇ´Â parameter Á¤ÀÇ. |
|---|
| 43 | cafrii 041102, ±âÁ¸ Epg 1.0 °úÀÇ event id °ªÀÌ Ãæµ¹³ªÁö ¾Êµµ·Ï ½ÃÀÛ °ªÀ» Á¶Á¤ÇÔ |
|---|
| 44 | */ |
|---|
| 45 | typedef enum { |
|---|
| 46 | |
|---|
| 47 | epgEventStarted = 101, |
|---|
| 48 | /* param 1 : reason: EpgUpdateStartxxxx °ª Áß Çϳª */ |
|---|
| 49 | /* param 2 : none */ |
|---|
| 50 | |
|---|
| 51 | epgEventChannelStarted, /* cafrii 041123 add */ |
|---|
| 52 | /* ÇØ´ç ä³ÎÀÇ Epg °Ë»öÀÌ ½ÃÀ۵ǾúÀ½À» ¾Ë¸°´Ù. |
|---|
| 53 | param 1 : DmcEpgChannelCbParam * |
|---|
| 54 | param 2 : none |
|---|
| 55 | */ |
|---|
| 56 | |
|---|
| 57 | epgEventSubChannelStarted, /* cafrii 041123 add */ |
|---|
| 58 | /* ÇØ´ç subchannelÀÇ epg °Ë»öÀÌ ½ÃÀ۵ǾúÀ½À» ¾Ë¸°´Ù. |
|---|
| 59 | param 1 : DmcEpgSubChannelCbParam * |
|---|
| 60 | param 2 : none |
|---|
| 61 | */ |
|---|
| 62 | |
|---|
| 63 | epgEventEitReceived, |
|---|
| 64 | /* param 1 : (DmcEpgStatus *) current Epg scan status of this channel |
|---|
| 65 | param 2 : index of Eit table just received |
|---|
| 66 | valid only when param is not (-1)UL |
|---|
| 67 | */ |
|---|
| 68 | epgEventEttReceived, |
|---|
| 69 | /* param 1 : (DmcEpgStatus *) current Epg scan status of this channel |
|---|
| 70 | param 2 : LSB[16]: index of Ett table |
|---|
| 71 | MSB[16]: index of event in Eit |
|---|
| 72 | 0x0000ffff means that this is channel-ETT. |
|---|
| 73 | 0xffffffff means that table is not identified. */ |
|---|
| 74 | |
|---|
| 75 | epgEventEitComplete, |
|---|
| 76 | /* param 1 : channel id |
|---|
| 77 | param 2 : subchannel index */ |
|---|
| 78 | |
|---|
| 79 | epgEventSubchannelComplete, |
|---|
| 80 | /* param 1 : channel id |
|---|
| 81 | param 2 : subchannel index */ |
|---|
| 82 | |
|---|
| 83 | epgEventChannelComplete, |
|---|
| 84 | /* param 1 : id |
|---|
| 85 | param 2 : none */ |
|---|
| 86 | |
|---|
| 87 | epgEventCompleteInfo, /* cafrii 041123 add */ |
|---|
| 88 | /* Á» ´õ ÀÚ¼¼ÇÑ 'complete' Á¤º¸¸¦ Àü´ÞÇÑ´Ù. À§ÀÇ ¼¼°¡Áö complete event ¿¡ Ãß°¡ÇÏ¿© È£ÃâµÈ´Ù. |
|---|
| 89 | param 1 : epgEventEitComplete/SubchannelComplete/ChannelComplete Áß Çϳª |
|---|
| 90 | param 2 : DmcEpgCompleteCbParam * |
|---|
| 91 | */ |
|---|
| 92 | |
|---|
| 93 | /* epgEventCancelled, <-- ÀÌ·± event´Â ´õÀÌ»ó Á¦°øÇÏÁö ¾ÊÀ½.. */ |
|---|
| 94 | /* param 1 : id |
|---|
| 95 | param 2 */ |
|---|
| 96 | |
|---|
| 97 | |
|---|
| 98 | epgEventUpdateChannelEtt, /* cafrii 050203 add */ |
|---|
| 99 | /* |
|---|
| 100 | ¾î¶² ä³ÎÀÇ ett-v °¡ ¼ö½ÅµÇ¾úÀ½. |
|---|
| 101 | epgEventEttReceived ¿Í´Â º°µµ·Î µû·Î ºÒ¸°´Ù. |
|---|
| 102 | ÀÌ¹Ì ¼ö½ÅµÈ ett-v ¿¡ ´ëÇØ¼µµ ¶Ç ´Ù½Ã ºÒ¸± ¼öµµ ÀÖ´Ù. (Áߺ¹ üũ ¾ÈÇÔ) |
|---|
| 103 | µû¶ó¼ application ¿¡¼ Áߺ¹ üũ¸¦ ÇØ¾ß ÇÒ °ÍÀÌ´Ù. |
|---|
| 104 | Application ¿¡¼´Â ä³Î °ü·Ã Á¤º¸¸¦ UCM CSD¿¡ update ÇÒ ¼ö ÀÖ´Ù. |
|---|
| 105 | |
|---|
| 106 | param 1 : DmcEpgChannelEttCbParam * |
|---|
| 107 | param 2 : none |
|---|
| 108 | */ |
|---|
| 109 | |
|---|
| 110 | epgEventChannelEttUpdated, /* cafrii 041129 add */ |
|---|
| 111 | /* |
|---|
| 112 | ¾î¶² ä³ÎÀÇ ett-v °¡ update µÇ¾úÀ¸¸ç ÀÌ Á¤º¸°¡ UCM CSD¿¡ update µÇ¾úÀ½À» ¾Ë¸°´Ù. |
|---|
| 113 | Application ¿¡¼´Â ÇÊ¿äÇϸé UCMÀ» NvRam ¿¡ ÀúÀåÇØ¾ß ÇÑ´Ù. |
|---|
| 114 | ÀÌ event´Â AutoCsdUpdate flag°¡ 1ÀÎ »óÅ·Πcompile ÇØ¾ß¸¸ »ç¿ëµÈ´Ù. |
|---|
| 115 | |
|---|
| 116 | param 1 : none |
|---|
| 117 | param 2 : none |
|---|
| 118 | */ |
|---|
| 119 | |
|---|
| 120 | epgEventError, |
|---|
| 121 | /* EPG °Ë»ö µµÁß¿¡ ¿¡·¯°¡ ¹ß»ýÇßÀ»¶§ error description À» Àü¼Û |
|---|
| 122 | ¿¡·¯°¡ ¹ß»ýÇÏ´õ¶óµµ Ä¡¸íÀûÀÎ ¿¡·¯°¡ ¾Æ´Ñ ÇÑ EPG scan ÀÛ¾÷Àº °è¼Ó ½ÃµµµÈ´Ù. |
|---|
| 123 | param 1 : (int) error value |
|---|
| 124 | param 2 : (const char *) error description |
|---|
| 125 | */ |
|---|
| 126 | |
|---|
| 127 | /*----------------------------------------------------*/ |
|---|
| 128 | |
|---|
| 129 | epgEventNotifyStt, |
|---|
| 130 | /* »õ·Î¿î STT°¡ µµÂø, ¶Ç´Â STT °ªÀÇ Jump µî. |
|---|
| 131 | |
|---|
| 132 | param 1 : sttSection_t pointer, not just system_time |
|---|
| 133 | param 2 : age of system_time recpetion (in seconds) */ |
|---|
| 134 | |
|---|
| 135 | epgEventNotifyProgramChange, |
|---|
| 136 | /* ÇöÀç Program Event°¡ º¯°æµÇ¾úÀ½À» ¾Ë¸². |
|---|
| 137 | |
|---|
| 138 | param 1 : new event_id |
|---|
| 139 | param 2 : eitEvent_t Á¤º¸¸¦ Æ÷ÇÔÇÏ´Â ¾î¶² µ¥ÀÌÅÍ.. |
|---|
| 140 | */ |
|---|
| 141 | |
|---|
| 142 | epgEventRrtUpdated, |
|---|
| 143 | /* param1 : rrt |
|---|
| 144 | param2 : |
|---|
| 145 | */ |
|---|
| 146 | |
|---|
| 147 | /*----------------------------------------------------*/ |
|---|
| 148 | |
|---|
| 149 | epgEventSddsFound, |
|---|
| 150 | /* sdds ¼ºñ½º ä³ÎÀÌ ¹ß°ß µÇ¾úÀ½À» ¾Ë¸². |
|---|
| 151 | |
|---|
| 152 | param 1 : UINT32 num_list; number of sdds program info list (param 2) |
|---|
| 153 | param 2 : DmcEpgSddsProgramInfo *list |
|---|
| 154 | |
|---|
| 155 | 'list' is array of struct sdds_program_info_t. |
|---|
| 156 | |
|---|
| 157 | 'num_list' is number of 'list' which is sdds service. |
|---|
| 158 | this is usually 1, but A/97 allows multiple subchannel scenario. |
|---|
| 159 | |
|---|
| 160 | Note1 |
|---|
| 161 | if list's pid value is zero, application should search matching PMT |
|---|
| 162 | and should find out carousel PID. |
|---|
| 163 | Spec mentions VCT also should have carousel PID in VCT's SLD, |
|---|
| 164 | but Korean DTV SDDS test stream do not have PID info in VCT. |
|---|
| 165 | |
|---|
| 166 | Note2 |
|---|
| 167 | 'list' pointer points to temporary space. (stack) |
|---|
| 168 | Please backup somewhere safe for use later after callback return. |
|---|
| 169 | */ |
|---|
| 170 | |
|---|
| 171 | } DmcEpgEventType; |
|---|
| 172 | |
|---|
| 173 | |
|---|
| 174 | |
|---|
| 175 | #ifdef __DEFINE_EPG_EVENT_TYPE_STR__ |
|---|
| 176 | |
|---|
| 177 | char *DmcEpgEventTypeString(DmcEpgEventType t) |
|---|
| 178 | { |
|---|
| 179 | return ( |
|---|
| 180 | (t) == epgEventStarted ? "EpgStarted" : |
|---|
| 181 | (t) == epgEventChannelStarted ? "EpgChStart" : |
|---|
| 182 | (t) == epgEventSubChannelStarted ? "EpgSubchStart" : |
|---|
| 183 | (t) == epgEventEitReceived ? "EitReceived" : |
|---|
| 184 | (t) == epgEventEttReceived ? "EttReceived" : |
|---|
| 185 | (t) == epgEventEitComplete ? "EitComplete" : |
|---|
| 186 | (t) == epgEventSubchannelComplete ? "SubchComplete" : |
|---|
| 187 | (t) == epgEventChannelComplete ? "ChannelComplete" : |
|---|
| 188 | (t) == epgEventCompleteInfo ? "CompleteInfo" : |
|---|
| 189 | (t) == epgEventUpdateChannelEtt ? "UpdateEttV" : |
|---|
| 190 | (t) == epgEventChannelEttUpdated ? "EttVUpdated" : |
|---|
| 191 | (t) == epgEventNotifyStt ? "Stt" : |
|---|
| 192 | (t) == epgEventNotifyProgramChange ? "ProgramChange" : |
|---|
| 193 | (t) == epgEventRrtUpdated ? "RrtUpdated" : |
|---|
| 194 | (t) == epgEventError ? "EpgError" : |
|---|
| 195 | "??"); |
|---|
| 196 | } |
|---|
| 197 | #else |
|---|
| 198 | char *DmcEpgEventTypeString(DmcEpgEventType t); |
|---|
| 199 | #endif |
|---|
| 200 | |
|---|
| 201 | |
|---|
| 202 | /* EpgScanFlag |
|---|
| 203 | |
|---|
| 204 | Epg Update¸¦ ½ÃÀÛÇÒ ¶§ ƯÁ¤ tableÀ» ¿ì¼±Çؼ ¹Þ°Å³ª scan µ¿ÀÛÀ» Á¦¾îÇÒ ¶§ »ç¿ëµÈ´Ù. |
|---|
| 205 | ÇöÀç eit first flag¸¸ ±¸ÇöÀÌ µÇ¾î ÀÖÀ½.. |
|---|
| 206 | */ |
|---|
| 207 | enum { |
|---|
| 208 | |
|---|
| 209 | epgScanFlag_PartialTable = 0x0080, |
|---|
| 210 | epgScanFlag_PartialTblMask = 0x007F, |
|---|
| 211 | /* table: 0 ~ 128 --> 7bit */ |
|---|
| 212 | |
|---|
| 213 | epgScanFlag_EitFirst = 0x0100, |
|---|
| 214 | /* |
|---|
| 215 | ¸ÕÀú ¸ðµç subchannelÀÇ Eit¸¸ ¿ì¼±Çؼ ¹Þ´Â´Ù. |
|---|
| 216 | Áï ÇöÀç PTC¿¡ 3°³ÀÇ subchannelÀÌ Á¸ÀçÇÑ´Ù¸é, ¸ðµç 3°³ sub channelÀÇ Eit¸¸ |
|---|
| 217 | ¸ÕÀú ¼ö½ÅÀ» Çϰí, Eit°¡ ´Ù ¼ö½ÅµÇ¸é °è¼ÓÇØ¼ ÀÚµ¿À¸·Î Ett ¼ö½Å¿¡ µé¾î°£´Ù. |
|---|
| 218 | |
|---|
| 219 | ¸¸¾à¿¡ ƯÁ¤ subchannelÀ» ÁöÁ¤ÇÏ¿´´Ù¸é ±× ä³ÎÀÇ Eit¸¦ ¸ÕÀú ¹Þ°í, |
|---|
| 220 | ±× ´ÙÀ½¿¡ ±× ä³ÎÀÇ Ett¸¦ ´Ù ¹Þ°í, ±× ´ÙÀ½¿¡ ´Ù¸¥ subchannel ¼ö½Å.. |
|---|
| 221 | */ |
|---|
| 222 | |
|---|
| 223 | epgScanFlag_SkipAnalog = 0x0200, /* cafrii 060320 add */ |
|---|
| 224 | }; |
|---|
| 225 | |
|---|
| 226 | |
|---|
| 227 | |
|---|
| 228 | /* Epg Status Enum |
|---|
| 229 | |
|---|
| 230 | ÇöÀç EpgDBÀÇ scan »óŸ¦ ³ªÅ¸³»´Â °ªµé.. |
|---|
| 231 | Dmc_EpgCheckScanStatus ÇÔ¼öÀÇ °á°ú·Î »ç¿ëµÈ´Ù. |
|---|
| 232 | */ |
|---|
| 233 | typedef enum { |
|---|
| 234 | EPG_STATUS_NOT_FOUND = 1, /* ÁöÁ¤ÇÑ sub ä³Î Á¤º¸°¡ ¾øÀ½.. */ |
|---|
| 235 | EPG_STATUS_INCOMPLETE = 2, /* ÇöÀç ÁøÇàÁßÀÓ.. */ |
|---|
| 236 | EPG_STATUS_EIT_COMPLETE = 3, /* Eit ¸¸ ¿Ï·áµÇ¾úÀ½.. */ |
|---|
| 237 | EPG_STATUS_SUBCH_COMPLETE = 4, /* subchannleÀÌ ´Ù ¿Ï·áµÇ¾úÀ½.. */ |
|---|
| 238 | EPG_STATUS_CH_COMPLETE = 5, /* ÁöÁ¤ÇÑ sub ä³ÎÀ» Æ÷ÇÔÇÏ´Â PTC ä³ÎÀÌ ¸ðµÎ ¿Ï·áµÇ¾úÀ½.. */ |
|---|
| 239 | /* EPG_STATUS_SUBCH_SKIPPED = 6, */ |
|---|
| 240 | } EPG_STATUS; |
|---|
| 241 | |
|---|
| 242 | |
|---|
| 243 | #define EpgStatusString(e) \ |
|---|
| 244 | (e) == EPG_STATUS_NOT_FOUND ? "NotFound" : \ |
|---|
| 245 | (e) == EPG_STATUS_INCOMPLETE ? "Incomplete" : \ |
|---|
| 246 | (e) == EPG_STATUS_EIT_COMPLETE ? "EitOnlyComplete" : \ |
|---|
| 247 | (e) == EPG_STATUS_SUBCH_COMPLETE ? "SubchannelComplete" : \ |
|---|
| 248 | (e) == EPG_STATUS_CH_COMPLETE ? "ChannelComplete" : "??" |
|---|
| 249 | |
|---|
| 250 | |
|---|
| 251 | /* |
|---|
| 252 | DmcEpgStatus |
|---|
| 253 | |
|---|
| 254 | ÀϺΠEpgEventProc¿¡¼ ³Ñ°ÜÁÖ´Â EpgStatus ±¸Á¶Ã¼ |
|---|
| 255 | |
|---|
| 256 | */ |
|---|
| 257 | typedef struct DmcEpgStatus_t |
|---|
| 258 | { |
|---|
| 259 | int id; |
|---|
| 260 | int source_id; |
|---|
| 261 | |
|---|
| 262 | EPG_STATUS cStatus; /* EPG_STATUS_XXX °ª ÁßÀÇ Çϳª.. */ |
|---|
| 263 | |
|---|
| 264 | int nElapsedSec; /* ÀÌ subchannelÀ» scanÇϴµ¥ »ç¿ëµÈ ÃÑ ´©Àû °Ë»ö ½Ã°£. |
|---|
| 265 | compile option¿¡ µû¶ó¼ Áö¿øµÇÁö ¾ÊÀ» ¼öµµ ÀÖÀ½. */ |
|---|
| 266 | |
|---|
| 267 | int nEitReceived; |
|---|
| 268 | int nEitTotal; /* ¹Þ¾Æ¾ß ÇÒ Àüü Eit table */ |
|---|
| 269 | |
|---|
| 270 | int nEttReceived; |
|---|
| 271 | int nEttTotal; /* ¹Þ¾Æ¾ß ÇÒ Àüü Ett table (ÇöÀç±îÁö ¹àÇôÁø °Í±îÁö¸¸.. Eit¸¦ ¹ÞÀ¸¸é¼ °è¼Ó ´Ã¾î³¯°ÍÀÓ) */ |
|---|
| 272 | |
|---|
| 273 | } DmcEpgStatus; |
|---|
| 274 | |
|---|
| 275 | |
|---|
| 276 | |
|---|
| 277 | /* cafrii 041123 add |
|---|
| 278 | |
|---|
| 279 | epgEventChannelStarted À̺¥Æ®ÀÇ ÆÄ¶ó¹ÌÅÍ |
|---|
| 280 | */ |
|---|
| 281 | typedef struct DmcEpgChannelCbParam_t |
|---|
| 282 | { |
|---|
| 283 | int id; /* id of this PTC.. º¸Åë rf ¹øÈ£¸¦ »ç¿ëÇÑ´Ù. */ |
|---|
| 284 | tDHL_TSD *tsd; /* stream source */ |
|---|
| 285 | |
|---|
| 286 | mgtSectionPtr_t mgt; |
|---|
| 287 | |
|---|
| 288 | tvctPtr_t tvct; |
|---|
| 289 | cvctPtr_t cvct; |
|---|
| 290 | /* ÀÌ µÑÁß¿¡ Çϳª´Â ¹Ýµå½Ã non-NULL ÀÌ´Ù. */ |
|---|
| 291 | |
|---|
| 292 | int n_subchannel; |
|---|
| 293 | |
|---|
| 294 | } DmcEpgChannelCbParam; |
|---|
| 295 | |
|---|
| 296 | |
|---|
| 297 | /* cafrii 041123 add |
|---|
| 298 | |
|---|
| 299 | epgEventSubChannelStarted À̺¥Æ®ÀÇ ÆÄ¶ó¹ÌÅÍ |
|---|
| 300 | */ |
|---|
| 301 | typedef struct DmcEpgSubChannelCbParam_t |
|---|
| 302 | { |
|---|
| 303 | int index; /* subchannel index.. 0 ~ n_subchannel-1 */ |
|---|
| 304 | UINT16 source_id; |
|---|
| 305 | |
|---|
| 306 | struct { |
|---|
| 307 | UINT16 short_name[7]; |
|---|
| 308 | UINT16 major_channel_number; |
|---|
| 309 | UINT16 minor_channel_number; |
|---|
| 310 | UINT16 program_number; |
|---|
| 311 | } vct_info; /* ¹Ýµå½Ã subchannel infoÀÇ vct_info ¿Í µ¿ÀÏÇØ¾ß ÇÑ´Ù. */ |
|---|
| 312 | |
|---|
| 313 | } DmcEpgSubChannelCbParam; |
|---|
| 314 | |
|---|
| 315 | |
|---|
| 316 | |
|---|
| 317 | /* cafrii 041123 add |
|---|
| 318 | |
|---|
| 319 | epgEventCompleteInfo À̺¥Æ®ÀÇ parameter |
|---|
| 320 | */ |
|---|
| 321 | typedef struct DmcEpgCompleteCbParam_t |
|---|
| 322 | { |
|---|
| 323 | /* channel id */ |
|---|
| 324 | int id; |
|---|
| 325 | |
|---|
| 326 | /* subchannel id */ |
|---|
| 327 | int index; |
|---|
| 328 | UINT16 source_id; |
|---|
| 329 | |
|---|
| 330 | } DmcEpgCompleteCbParam; |
|---|
| 331 | |
|---|
| 332 | |
|---|
| 333 | |
|---|
| 334 | /* cafrii 050203 add |
|---|
| 335 | |
|---|
| 336 | epgEventUpdateChannelEtt À̺¥Æ®ÀÇ parameter |
|---|
| 337 | */ |
|---|
| 338 | typedef struct DmcEpgChannelEttCbParam_t |
|---|
| 339 | { |
|---|
| 340 | /* channel id */ |
|---|
| 341 | int id; |
|---|
| 342 | |
|---|
| 343 | /* subchannel id */ |
|---|
| 344 | int index; |
|---|
| 345 | UINT16 source_id; |
|---|
| 346 | |
|---|
| 347 | /* channel text */ |
|---|
| 348 | UINT16 extended_text_message_length; |
|---|
| 349 | UINT8 *extended_text_message; /* MSS format */ |
|---|
| 350 | /* |
|---|
| 351 | note! |
|---|
| 352 | caller should not use this pointer and data after function returns. |
|---|
| 353 | caller can use these data inside callback function only. |
|---|
| 354 | */ |
|---|
| 355 | |
|---|
| 356 | } DmcEpgChannelEttCbParam; |
|---|
| 357 | |
|---|
| 358 | |
|---|
| 359 | |
|---|
| 360 | /* cafrii 050404 add |
|---|
| 361 | |
|---|
| 362 | epgEventNotifyProgramChange ÀÇ ÆÄ¶ó¹ÌÅÍ ±¸Á¶Ã¼ |
|---|
| 363 | */ |
|---|
| 364 | typedef struct DmcEpgProgramChangeCbParam_t |
|---|
| 365 | { |
|---|
| 366 | int channel_id; |
|---|
| 367 | int source_id; |
|---|
| 368 | int event_id; |
|---|
| 369 | |
|---|
| 370 | int eit_index; /* ÀÌ event°¡ ¹ß°ßµÈ ù Eit index.. probably 0.. */ |
|---|
| 371 | |
|---|
| 372 | UINT32 system_time; /* cafrii 050729 add */ |
|---|
| 373 | /* ÇöÀç STT GPS time */ |
|---|
| 374 | |
|---|
| 375 | UINT32 start_time; |
|---|
| 376 | UINT32 length_in_seconds; |
|---|
| 377 | |
|---|
| 378 | int descriptor_length; |
|---|
| 379 | UINT8* descriptors; |
|---|
| 380 | /* ÁÖÀÇ!! |
|---|
| 381 | ÀÌ unparsed descriptor´Â Eit¿¡ ÀÖ´Â descriptor¸¦ ±×´ë·Î pointingÇÑ´Ù. |
|---|
| 382 | ÀÌ callbackÀÌ Á¾·áµÇ¸é ¾ðÁ¦ free µÉÁö ¸ð¸£¹Ç·Î |
|---|
| 383 | ÇÊ¿äÇÑ Á¤º¸°¡ ÀÖ´Ù¸é º°µµ·Î º¹»çÇÏ¿© ÀúÀåÀ» ÇØ µÑ Çʿ䰡 ÀÖ´Ù. |
|---|
| 384 | */ |
|---|
| 385 | |
|---|
| 386 | } DmcEpgProgramChangeCbParam; |
|---|
| 387 | |
|---|
| 388 | |
|---|
| 389 | /* cafrii 100727 add |
|---|
| 390 | |
|---|
| 391 | epgEventSddsFound À̺¥Æ®ÀÇ parameter |
|---|
| 392 | */ |
|---|
| 393 | typedef struct DmcEpgSddsProgramInfo_t |
|---|
| 394 | { |
|---|
| 395 | int id; |
|---|
| 396 | /* ÀÌ RF ä³ÎÀ» ½Äº°ÇÏ´Â id ÀÌ´Ù. ÀÌ °ªÀÇ Á¤È®ÇÑ »ç¿ëÀº app ¸¶´Ù ´Ù¸£´Ù. |
|---|
| 397 | º¸ÅëÀº rf ¹øÈ£¸¦ ±×´ë·Î »ç¿ëÇÏÁö¸¸, tuner°¡ ¿©·¯°³ÀÎ °æ¿ì, pvrÀÌ ÀÖ´Â °æ¿ì |
|---|
| 398 | µîÀº Á» ´õ º¹ÀâÇÑ Ã¼°è¸¦ »ç¿ëÇÑ´Ù. |
|---|
| 399 | */ |
|---|
| 400 | UINT16 program_number; |
|---|
| 401 | UINT16 pid; |
|---|
| 402 | /* if pid is zero, it means that VCT does not have valid pid info. |
|---|
| 403 | user should search PMT to find out pid. |
|---|
| 404 | */ |
|---|
| 405 | |
|---|
| 406 | } DmcEpgSddsProgramInfo; |
|---|
| 407 | |
|---|
| 408 | |
|---|
| 409 | |
|---|
| 410 | |
|---|
| 411 | typedef void (*DmcEpgEventProc) (DmcEpgEventType evt, UINT32 param1, UINT32 param2); |
|---|
| 412 | /* |
|---|
| 413 | EpgUpdate ¿¡¼ »ç¿ëµÇ´Â event proc ÇÔ¼öÀÇ prototype. |
|---|
| 414 | evt´Â Àü´ÞµÇ´Â À̺¥Æ® Á¾·ù |
|---|
| 415 | param1/param2 ´Â À̺¥Æ® º°·Î Á¤ÀÇµÈ ÆÄ¶ó¹ÌÅÍ |
|---|
| 416 | */ |
|---|
| 417 | |
|---|
| 418 | |
|---|
| 419 | /* |
|---|
| 420 | APIs.. |
|---|
| 421 | */ |
|---|
| 422 | |
|---|
| 423 | STATUS Dmc_EpgInit(void); |
|---|
| 424 | |
|---|
| 425 | STATUS Dmc_EpgUpdateStart(int id, tDHL_TSD *tsd, DmcEpgEventProc eventproc, UINT32 source_id, UINT32 flag); |
|---|
| 426 | /* cafrii 041019 add 'tsd' argument |
|---|
| 427 | update¸¦ ½ÃÀÛ.. */ |
|---|
| 428 | |
|---|
| 429 | STATUS Dmc_EpgUpdateCancel(void); |
|---|
| 430 | /* ÇöÀç ÁøÇàÁßÀÎ update¸¦ cancelÇÑ´Ù.. ä³Î º¯°æ, autoscan ÀÛ¾÷À» ½ÃÀÛÇÒ ¶§ »ç¿ë. */ |
|---|
| 431 | |
|---|
| 432 | STATUS Dmc_EpgDelete(int id); |
|---|
| 433 | /* ÇØ´ç idÀÇ EpgDB¸¦ »èÁ¦ÇÑ´Ù. */ |
|---|
| 434 | |
|---|
| 435 | STATUS Dmc_EpgDeleteRange(int idStart, int idEnd); |
|---|
| 436 | /* cafrii 041019 add |
|---|
| 437 | idStart ºÎÅÍ idEnd »çÀÌÀÇ ¸ðµç EpgDB¸¦ »èÁ¦ÇÑ´Ù. */ |
|---|
| 438 | |
|---|
| 439 | STATUS Dmc_EpgDeleteAll(void); |
|---|
| 440 | /* ¸ðµç EpgDB¸¦ »èÁ¦.. */ |
|---|
| 441 | |
|---|
| 442 | void Dmc_EpgPrintAllTables(int id, int source_id, BOOL bSimpleDisplay); |
|---|
| 443 | /* EpgDB¸¦ debug consol¿¡ Ãâ·ÂÇÑ´Ù. */ |
|---|
| 444 | |
|---|
| 445 | STATUS Dmc_EpgNotifyMgtVersionChange(void); |
|---|
| 446 | /* Mgt°¡ º¯°æµÇ¾úÀ½À» ¸í½ÃÀûÀ¸·Î ¾Ë·ÁÁÙ ¶§ »ç¿ëÇÏ´Â ÇÔ¼ö.. |
|---|
| 447 | EPG MW ³»¿¡¼ Mgt °ü¸®ÀÚ¸¦ »ç¿ëÇÏ¿© ÀÚµ¿ÀûÀ¸·Î ¾Ë¾Æ¼ ó¸®ÇϹǷΠ|
|---|
| 448 | Application¿¡¼ Ưº°È÷ »ç¿ëÇÒ °æ¿ì´Â ¾øÀ» °ÍÀÌ´Ù. */ |
|---|
| 449 | |
|---|
| 450 | EPG_STATUS Dmc_EpgCheckScanStatus(int id, int source_id, DmcEpgStatus *pStat); |
|---|
| 451 | /* ÁöÁ¤ÇÑ Ã¤³ÎÀÇ Epg download »óŸ¦ ¸®ÅÏÇÑ´Ù. */ |
|---|
| 452 | |
|---|
| 453 | STATUS Dmc_EpgGetEstimatedSttSection(int id, sttSection_t *pFlatStt, UINT32 *pAge); |
|---|
| 454 | /* cafrii 050528 add */ |
|---|
| 455 | |
|---|
| 456 | STATUS Dmc_EpgGetEstimatedStt(int id, UINT32 *pSystemTime, UINT32 *pAge); |
|---|
| 457 | /* obsoleted */ |
|---|
| 458 | |
|---|
| 459 | /* void Dmc_EpgSetMonitorSourceId(int source_id); */ |
|---|
| 460 | /* cafrii 070801 delete */ |
|---|
| 461 | |
|---|
| 462 | int Dmc_EpgGetDescriptor(UINT8 *descriptors, UINT16 len, UINT8 tag, |
|---|
| 463 | UINT16 instance, UINT8 **descriptor); |
|---|
| 464 | |
|---|
| 465 | |
|---|
| 466 | #if DMW_EPG_SUPPORT_RRT |
|---|
| 467 | |
|---|
| 468 | /* cafrii 060822 add */ |
|---|
| 469 | typedef enum |
|---|
| 470 | { |
|---|
| 471 | RRT_OPTION_UNBLOCK = 0, |
|---|
| 472 | RRT_OPTION_BLOCK = 1, |
|---|
| 473 | RRT_OPTION_TOGGLE = 100, |
|---|
| 474 | |
|---|
| 475 | } EPG_RRT_BLOCK_OPTION; |
|---|
| 476 | |
|---|
| 477 | |
|---|
| 478 | rrtSectionPtr_t Dmc_EpgGetCurrentRrt(void); |
|---|
| 479 | void Dmc_EpgSetCurrentRrt(rrtSectionPtr_t rrt); |
|---|
| 480 | |
|---|
| 481 | /* cafrii 060822, change prototype, support toggle function */ |
|---|
| 482 | BOOL Dmc_EpgSetRrtOption(int dim, int value, EPG_RRT_BLOCK_OPTION action); |
|---|
| 483 | |
|---|
| 484 | void Dmc_EpgRrtForceUpdateMode(BOOL bForceUpdateMode); |
|---|
| 485 | UINT32 Dmc_EpgCurrentRrtUpdateCount(void); |
|---|
| 486 | |
|---|
| 487 | #endif |
|---|
| 488 | |
|---|
| 489 | |
|---|
| 490 | |
|---|
| 491 | /* Utilities */ |
|---|
| 492 | BOOL Dmc_IsEquivalentMgt(mgtSectionPtr_t mgt1, mgtSectionPtr_t mgt2); |
|---|
| 493 | |
|---|
| 494 | |
|---|
| 495 | |
|---|
| 496 | /* for debugging |
|---|
| 497 | |
|---|
| 498 | ÀÌ ÇÔ¼öµéÀº DMW_EpgDebug.c ¿¡ Á¤ÀǵǾî ÀÖ´Ù. |
|---|
| 499 | */ |
|---|
| 500 | char *Dmc_ChannelNumberString(int major, int minor, char *buf); |
|---|
| 501 | |
|---|
| 502 | /* cafrii 041126 add two conversion function */ |
|---|
| 503 | UINT8 *Dmc_ConvertKs2Mss(char *str, UINT8 **pMssPtr, int *pMssLen); |
|---|
| 504 | STATUS Dmc_ConvertMss2Ks(UINT8 *mssPtr, UINT16 mssLen, char *buf, int max_buflen, char *lang, int instance); |
|---|
| 505 | |
|---|
| 506 | void Dmc_PrintMultipleString(UINT8 *buffer, UINT16 len, int indent, int detailLevel); |
|---|
| 507 | char *GpsTimeString2(UINT32 gps, char *buf, int level); |
|---|
| 508 | char *GpsTimeString(UINT32 gps, char *buf); |
|---|
| 509 | void Dmc_PrintEit(eitPtr_t eitPtr, int indent, ettSectionPtr_t *ettArray); |
|---|
| 510 | void Dmc_PrintEtt(ettSectionPtr_t ettSectPtr, int indent); |
|---|
| 511 | |
|---|
| 512 | void Dmc_PrintRrt(rrtSectionPtr_t rrt, int indent, BOOL bDetail); |
|---|
| 513 | |
|---|
| 514 | void Dmc_SetGpsTimeSync(sttSection_t *stt); |
|---|
| 515 | |
|---|
| 516 | |
|---|
| 517 | |
|---|
| 518 | void Dmc_EpgRegisterEpgSymbols(void); |
|---|
| 519 | |
|---|
| 520 | |
|---|
| 521 | #endif /* __DMW_EPG_BASE_H__ */ |
|---|
| 522 | |
|---|
| 523 | |
|---|
| 524 | |
|---|
| 525 | /****************************************************************************** |
|---|
| 526 | $Log: DMW_EpgBase.h,v $ |
|---|
| 527 | |
|---|
| 528 | 1.03 2005/2/3 add epgEventUpdateChannelEtt event and the related |
|---|
| 529 | 1.02 2004/11/29 epgEventChannelEttUpdated Ãß°¡ |
|---|
| 530 | 1.01 2004/11/26 Dmc_ConvertKs2Mss / Dmc_ConvertMss2Ks ÇÔ¼ö Ãß°¡ |
|---|
| 531 | 1.00 2004/?/? History °ü¸® ½ÃÀÛ |
|---|
| 532 | |
|---|
| 533 | ******************************************************************************/ |
|---|
| 534 | |
|---|