| 1 | /**************************************************************************** |
|---|
| 2 | * NAME: App_Fnc_EPG.c |
|---|
| 3 | *---------------------------------------------------------------------------- |
|---|
| 4 | * Copyright (c) DIGITAL STREAM Technology Inc. |
|---|
| 5 | *---------------------------------------------------------------------------- |
|---|
| 6 | * CREATED_BY: Do Gon Lee |
|---|
| 7 | * CREATION_DATE: 2009/08/20 |
|---|
| 8 | * $Author: foxhunt $ |
|---|
| 9 | * $Revision: 1.0 $ |
|---|
| 10 | * $Date: 2009/08/20 11:32:07 $ |
|---|
| 11 | *---------------------------------------------------------------------------- |
|---|
| 12 | * PURPOSE: |
|---|
| 13 | * - EPG Init, update start/cancel, delete wrapping. |
|---|
| 14 | * - program change envent procedure implement. |
|---|
| 15 | *****************************************************************************/ |
|---|
| 16 | |
|---|
| 17 | /*_____ I N C L U D E __________________________________________*/ |
|---|
| 18 | |
|---|
| 19 | #include "App_Main.h" |
|---|
| 20 | |
|---|
| 21 | #if SUPPORT_EPG |
|---|
| 22 | |
|---|
| 23 | #include "DMW_CodeConv.h" |
|---|
| 24 | |
|---|
| 25 | #include "App_Fnc_Common.h" |
|---|
| 26 | |
|---|
| 27 | #include "App_Fnc_Time.h" |
|---|
| 28 | #include "App_Fnc_EPG.h" |
|---|
| 29 | #include "App_Fnc_ChTune.h" |
|---|
| 30 | |
|---|
| 31 | #include "App_Fnc_Rating.h" |
|---|
| 32 | #include "App_Fnc_RRT.h" |
|---|
| 33 | #include "App_Fnc_CC.h" |
|---|
| 34 | #include "App_Fnc_Sdds.h" |
|---|
| 35 | |
|---|
| 36 | #include "App_Res_Resources.h" |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | /*_____ D E F I N I T I O N ____________________________________*/ |
|---|
| 44 | |
|---|
| 45 | #if COMMENT |
|---|
| 46 | ____DbgPrint____(){} |
|---|
| 47 | #endif |
|---|
| 48 | |
|---|
| 49 | DHL_MODULE("@f_epg", 0); |
|---|
| 50 | |
|---|
| 51 | |
|---|
| 52 | |
|---|
| 53 | |
|---|
| 54 | |
|---|
| 55 | #if COMMENT |
|---|
| 56 | ____Config____(){} |
|---|
| 57 | #endif |
|---|
| 58 | |
|---|
| 59 | |
|---|
| 60 | |
|---|
| 61 | |
|---|
| 62 | |
|---|
| 63 | #if COMMENT |
|---|
| 64 | ____Types____(){} |
|---|
| 65 | #endif |
|---|
| 66 | |
|---|
| 67 | |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | |
|---|
| 71 | #if COMMENT |
|---|
| 72 | ____Variables____(){} |
|---|
| 73 | #endif |
|---|
| 74 | |
|---|
| 75 | BOOLEAN g_EPG_ScreenUpdate = FALSE; /* iskang */ |
|---|
| 76 | BOOLEAN g_bEPGGet_OneEIT = FALSE; /* iskang */ |
|---|
| 77 | BOOLEAN g_bEPGGet_OneSTT = FALSE; /* kjkam */ |
|---|
| 78 | |
|---|
| 79 | //neverdai. |
|---|
| 80 | static UINT32 p_eit_count=0; |
|---|
| 81 | static UINT32 p_ett_count=0; |
|---|
| 82 | |
|---|
| 83 | |
|---|
| 84 | /*_____ F U N C T I O N ________________________________________*/ |
|---|
| 85 | |
|---|
| 86 | #if COMMENT |
|---|
| 87 | ____Function____(){} |
|---|
| 88 | #endif |
|---|
| 89 | |
|---|
| 90 | /****************************************************************************************** |
|---|
| 91 | FUNCTION: |
|---|
| 92 | - _App_ProgramChangeEventProc |
|---|
| 93 | |
|---|
| 94 | Purpose: |
|---|
| 95 | - |
|---|
| 96 | ******************************************************************************************/ |
|---|
| 97 | void _App_ProgramChangeEventProc(UINT32 nIDTimer, DmcEpgProgramChangeCbParam *param) |
|---|
| 98 | { |
|---|
| 99 | if (nIDTimer != TIMER_ID_PGM_CHANGE) |
|---|
| 100 | return; |
|---|
| 101 | |
|---|
| 102 | dprint(2, "ProgramChangeEventProc:\n"); |
|---|
| 103 | |
|---|
| 104 | /* daylightsaving¿¡ ÀÇÇØ ½Ã°£ÀÌ º¯°æÀÌ µÇ´Â program change event¸é |
|---|
| 105 | daylightsavingÀÌ ¹Ý¿µµÈ stt¸¦ Àû¿ëÇÏÀÚ. */ |
|---|
| 106 | App_SetTimeBySTT(); |
|---|
| 107 | |
|---|
| 108 | /* cafrii 060609 */ |
|---|
| 109 | /* rating check ¼öÇàÇϱâ */ |
|---|
| 110 | AppRating_CheckRatingBlock(3000); /* ¹Ù·Î Áï½Ã ¼öÇà. */ |
|---|
| 111 | |
|---|
| 112 | /* cafrii 070907 add */ |
|---|
| 113 | App_CC_SetScreenRatio(); |
|---|
| 114 | } |
|---|
| 115 | |
|---|
| 116 | |
|---|
| 117 | /****************************************************************************************** |
|---|
| 118 | FUNCTION: |
|---|
| 119 | - App_CancelProgramChangeTimer |
|---|
| 120 | |
|---|
| 121 | Purpose: |
|---|
| 122 | - |
|---|
| 123 | ******************************************************************************************/ |
|---|
| 124 | void App_CancelProgramChangeTimer() |
|---|
| 125 | { |
|---|
| 126 | DMW_SYS_KillTimer(TIMER_ID_PGM_CHANGE); |
|---|
| 127 | } |
|---|
| 128 | |
|---|
| 129 | |
|---|
| 130 | /****************************************************************************************** |
|---|
| 131 | FUNCTION: |
|---|
| 132 | - _AppEpg2EventProc |
|---|
| 133 | |
|---|
| 134 | Purpose: |
|---|
| 135 | - |
|---|
| 136 | ******************************************************************************************/ |
|---|
| 137 | void _AppEpg2EventProc(DmcEpgEventType evt, UINT32 param1, UINT32 param2) |
|---|
| 138 | { |
|---|
| 139 | /* New EPG (v1.5 alpha) ¸¦ »ç¿ëÇϱâ À§ÇÑ EpgEventProc */ |
|---|
| 140 | |
|---|
| 141 | if (evt == epgEventStarted) { |
|---|
| 142 | /* param 1 : update start reason.. |
|---|
| 143 | param 2 : none |
|---|
| 144 | */ |
|---|
| 145 | dprint(2, "******** epgEventStarted: by %s\n", |
|---|
| 146 | param1 == EpgUpdateStartByUserCall ? "Tune" : "MgtChange"); |
|---|
| 147 | } |
|---|
| 148 | |
|---|
| 149 | else if (evt == epgEventChannelStarted) { /* cafrii 041123 add */ |
|---|
| 150 | /* ÇØ´ç ä³ÎÀÇ Epg °Ë»öÀÌ ½ÃÀ۵ǾúÀ½À» ¾Ë¸°´Ù. */ |
|---|
| 151 | /* param 1 : DmcEpgChannelCbParam * |
|---|
| 152 | param 2 : none |
|---|
| 153 | */ |
|---|
| 154 | |
|---|
| 155 | DmcEpgChannelCbParam *cb = (DmcEpgChannelCbParam *) param1; |
|---|
| 156 | dprint(2, "******** epgEventChannelStart: rf %d\n", cb->id); |
|---|
| 157 | |
|---|
| 158 | // trigger checking dynamic channel update.. |
|---|
| 159 | dprint(0, "############## vct rx\n"); |
|---|
| 160 | App_CheckDynamicChUpdate(); |
|---|
| 161 | } |
|---|
| 162 | |
|---|
| 163 | else if (evt == epgEventSubChannelStarted) { /* cafrii 041123 add */ |
|---|
| 164 | |
|---|
| 165 | /* ÇØ´ç subchannelÀÇ epg °Ë»öÀÌ ½ÃÀ۵ǾúÀ½À» ¾Ë¸°´Ù. */ |
|---|
| 166 | /* param 1 : DmcEpgSubChannelCbParam * |
|---|
| 167 | param 2 : none |
|---|
| 168 | */ |
|---|
| 169 | |
|---|
| 170 | DmcEpgSubChannelCbParam *cb = (DmcEpgSubChannelCbParam *) param1; |
|---|
| 171 | dprint(3, "******** epgEventSubChannelStart: [%d] source_id %d, '%s' %d-%d #%d\n", |
|---|
| 172 | cb->index, cb->source_id, |
|---|
| 173 | DMW_Unicode2Ks(cb->vct_info.short_name, 7, 0), |
|---|
| 174 | cb->vct_info.major_channel_number, |
|---|
| 175 | cb->vct_info.minor_channel_number, |
|---|
| 176 | cb->vct_info.program_number); |
|---|
| 177 | } |
|---|
| 178 | |
|---|
| 179 | else if (evt == epgEventEitReceived) { |
|---|
| 180 | /* param 1 : EpgStatus |
|---|
| 181 | param 2 : Eit index |
|---|
| 182 | */ |
|---|
| 183 | DmcEpgStatus *pStat = (DmcEpgStatus *) param1; |
|---|
| 184 | |
|---|
| 185 | g_bEPGGet_OneEIT = TRUE; /* iskang 2006.6.2 */ |
|---|
| 186 | |
|---|
| 187 | p_eit_count++; |
|---|
| 188 | |
|---|
| 189 | dprint(3, "******** epgEventEitReceived, Eit[%d], %d/%d tables\n", |
|---|
| 190 | (int)param2, pStat->nEitReceived, pStat->nEitTotal); |
|---|
| 191 | |
|---|
| 192 | /* cafrii 070907 add. if eit-0 is updated, re-update cc ratio setting */ |
|---|
| 193 | if (param2 == 0) |
|---|
| 194 | App_CC_SetScreenRatio(); |
|---|
| 195 | } |
|---|
| 196 | |
|---|
| 197 | else if (evt == epgEventEttReceived) { |
|---|
| 198 | /* param 1 : EpgStatus |
|---|
| 199 | param 2 : Ett index code (MSB: ett-index, LSB: event-index) |
|---|
| 200 | */ |
|---|
| 201 | DmcEpgStatus *pStat = (DmcEpgStatus *) param1; |
|---|
| 202 | char buf[20]; |
|---|
| 203 | if ((param2 & 0xffff) == 0xffff) |
|---|
| 204 | sprintf(buf, "Ett-V"); |
|---|
| 205 | else |
|---|
| 206 | sprintf(buf, "Ett[%d][%d]", (param2 & 0xffff), (param2 >> 16)); |
|---|
| 207 | dprint(3, "******** epgEventEttReceived, %s, %d/%d tables\n", |
|---|
| 208 | buf, pStat->nEttReceived, pStat->nEttTotal); |
|---|
| 209 | |
|---|
| 210 | p_ett_count++; |
|---|
| 211 | } |
|---|
| 212 | |
|---|
| 213 | /* cafrii 041129 add */ |
|---|
| 214 | else if (evt == epgEventChannelEttUpdated) { |
|---|
| 215 | dprint(2, "******** epgEventChannelEttUpdated\n"); |
|---|
| 216 | } |
|---|
| 217 | |
|---|
| 218 | else if (evt == epgEventCompleteInfo) { |
|---|
| 219 | /* param 1 : epgEventEitComplete/SubchannelComplete/ChannelComplete Áß Çϳª |
|---|
| 220 | param 2 : DmcEpgCompleteCbParam * |
|---|
| 221 | */ |
|---|
| 222 | |
|---|
| 223 | DmcEpgCompleteCbParam *cb = (DmcEpgCompleteCbParam *) param2; |
|---|
| 224 | if (param1 == epgEventEitComplete) |
|---|
| 225 | dprint(3, "******** epgEventEitComplete, rf %d, subch [%d] source id %d\n", |
|---|
| 226 | cb->id, cb->index, cb->source_id); |
|---|
| 227 | else if (param1 == epgEventSubchannelComplete) |
|---|
| 228 | dprint(3, "******** epgEventSubchannelComplete, rf %d, subch [%d] source id %d\n", |
|---|
| 229 | cb->id, cb->index, cb->source_id); |
|---|
| 230 | else { |
|---|
| 231 | dprint(3, "******** epgEventChannelComplete, rf %d\n", cb->id); |
|---|
| 232 | |
|---|
| 233 | /* iskang 071116. add. rating check. */ |
|---|
| 234 | /* rating Á¤º¸¸¦ eit¿¡¼ ¾ò¾î¿À¹Ç·Î eit updateµÇ¸é rating check.. */ |
|---|
| 235 | AppRating_CheckRatingBlock(3000); |
|---|
| 236 | } |
|---|
| 237 | } |
|---|
| 238 | |
|---|
| 239 | else if (evt == epgEventError) { |
|---|
| 240 | /* param 1 : error value |
|---|
| 241 | param 2 : error description if non-null |
|---|
| 242 | */ |
|---|
| 243 | dprint(0, "******** epgEventError: err %d, (%s)\n", param1, param2 ? (char *)param2 : "??"); |
|---|
| 244 | } |
|---|
| 245 | |
|---|
| 246 | else if (evt == epgEventNotifyStt) { |
|---|
| 247 | /* »õ·Î¿î STT°¡ µµÂø, ¶Ç´Â STT °ªÀÇ Jump µî. |
|---|
| 248 | param 1 : sttSection_t |
|---|
| 249 | param 2 : age of system_time recpetion (in seconds) |
|---|
| 250 | */ |
|---|
| 251 | |
|---|
| 252 | sttSection_t *stt = (sttSection_t *) param1; |
|---|
| 253 | int gap = (int) param2; |
|---|
| 254 | |
|---|
| 255 | g_bEPGGet_OneSTT = TRUE; /* kjkam 2011.5.16 */ |
|---|
| 256 | |
|---|
| 257 | dprint(3, "******** epgEventNotifyStt: gps 0x%x, gap %d\n", stt->system_time, gap); |
|---|
| 258 | |
|---|
| 259 | App_SetTimeBySTT(); |
|---|
| 260 | /* cafrii 050721, update to host time if autochron channel */ |
|---|
| 261 | } |
|---|
| 262 | |
|---|
| 263 | else if (evt == epgEventNotifyProgramChange) { |
|---|
| 264 | /* ÇöÀç Program Event°¡ º¯°æµÇ¾úÀ½À» ¾Ë¸². |
|---|
| 265 | param 1 : new event_id |
|---|
| 266 | param 2 : eitEvent_t Á¤º¸¸¦ Æ÷ÇÔÇÏ´Â ¾î¶² µ¥ÀÌÅÍ.. |
|---|
| 267 | */ |
|---|
| 268 | DmcEpgProgramChangeCbParam *param = (DmcEpgProgramChangeCbParam *) param2; |
|---|
| 269 | |
|---|
| 270 | p_eit_count++; //ÀÌ À̺¥Æ®°¡ ¹ß»ýÇØµµ eit_count¸¦ Áõ°¡½ÃÅ´ |
|---|
| 271 | |
|---|
| 272 | dprint(3, "******** epgEventNotifyProgramChange: evid 0x%x, GPS 0x%x\n", |
|---|
| 273 | param1, param->system_time); |
|---|
| 274 | |
|---|
| 275 | /* cafrii 050729 change |
|---|
| 276 | ´Ù¸¥ task¿¡¼ ¼öÇàÇÏ´Â°Ô ±ÇÀåµÊ. ´ë½Å paramÀ» ÂüÁ¶ÇÒ ¼ö ¾øÀ½. |
|---|
| 277 | rating check ÀÚü´Â »ó°ü ¾ø´Âµ¥, CC Á¤º¸ °¡Á®¿À´Â Äڵ尡 ¹®Á¦µÉ ¼ö ÀÖÀ½. */ |
|---|
| 278 | DMW_SYS_SetTimer(TIMER_ID_PGM_CHANGE, 0, |
|---|
| 279 | (DMW_TIMER_PROC)_App_ProgramChangeEventProc, 0, TRUE); |
|---|
| 280 | } |
|---|
| 281 | |
|---|
| 282 | else if (evt == epgEventRrtUpdated) { |
|---|
| 283 | rrtSectionPtr_t rrt; |
|---|
| 284 | dprint(2, "******** epgEventRrtUpdated: \n"); |
|---|
| 285 | |
|---|
| 286 | /* ÇöÀç ÀÌ task´Â epg event taskÀ̰í core DB lockÀÌ °É·Á ÀÖ´Â »óÅÂÀ̹ǷΠ|
|---|
| 287 | dead-lockÀÌ ¹ß»ýÇÏÁö ¾Êµµ·Ï À¯ÀÇÇÏÀÚ. */ |
|---|
| 288 | |
|---|
| 289 | /* ´Ù¸¥ Ãß°¡ÀÇ mutex¸¦ takeÇÏÁö ¾Êµµ·Ï.. (¿¹: channel db mutex) */ |
|---|
| 290 | |
|---|
| 291 | rrt = (rrtSectionPtr_t) param1; |
|---|
| 292 | |
|---|
| 293 | dprint(2, "rrt : 0x%x\n", rrt); |
|---|
| 294 | |
|---|
| 295 | AppRrt_PrintRrt(FALSE); |
|---|
| 296 | AppRrt_SaveRrt(); |
|---|
| 297 | |
|---|
| 298 | AppRating_CheckRatingBlock(3000); |
|---|
| 299 | } |
|---|
| 300 | |
|---|
| 301 | #if SUPPORT_SDDS |
|---|
| 302 | else if (evt == epgEventSddsFound) { |
|---|
| 303 | // À̺¥Æ®¸¦ ±×³É ±×´ë·Î sdds fnc ¸ðµâ·Î pass ÇÔ. |
|---|
| 304 | App_SddsServiceFound((UINT32)param1, (DmcEpgSddsProgramInfo *)param2); |
|---|
| 305 | } |
|---|
| 306 | #endif // SUPPORT_SDDS |
|---|
| 307 | |
|---|
| 308 | |
|---|
| 309 | } |
|---|
| 310 | |
|---|
| 311 | |
|---|
| 312 | /****************************************************************************************** |
|---|
| 313 | FUNCTION: |
|---|
| 314 | - _AppEpg2IdleEventProc |
|---|
| 315 | |
|---|
| 316 | Purpose: |
|---|
| 317 | - |
|---|
| 318 | ******************************************************************************************/ |
|---|
| 319 | void _AppEpg2IdleEventProc(DmcEpgEventType evt, UINT32 param1, UINT32 param2) |
|---|
| 320 | { |
|---|
| 321 | /* Idle »óÅÂ(S2)¿¡¼, ij·¯¼¿ º¯È¸¦ °¨½ÃÇϱâ À§ÇÑ EpgEventProc */ |
|---|
| 322 | |
|---|
| 323 | #if SUPPORT_SDDS |
|---|
| 324 | if (evt == epgEventNotifyStt) { |
|---|
| 325 | /* »õ·Î¿î STT°¡ µµÂø, ¶Ç´Â STT °ªÀÇ Jump µî. |
|---|
| 326 | param 1 : sttSection_t |
|---|
| 327 | param 2 : age of system_time recpetion (in seconds) |
|---|
| 328 | */ |
|---|
| 329 | |
|---|
| 330 | sttSection_t *stt = (sttSection_t *) param1; |
|---|
| 331 | int gap = (int) param2; |
|---|
| 332 | |
|---|
| 333 | g_bEPGGet_OneSTT = TRUE; /* kjkam 2011.5.16 */ |
|---|
| 334 | |
|---|
| 335 | dprint(3, "******** epgEventNotifyStt: gps 0x%x, gap %d\n", stt->system_time, gap); |
|---|
| 336 | |
|---|
| 337 | /* cafrii 050721, update to host time if autochron channel */ |
|---|
| 338 | } |
|---|
| 339 | else if (evt == epgEventSddsFound) { |
|---|
| 340 | // À̺¥Æ®¸¦ ±×³É ±×´ë·Î sdds fnc ¸ðµâ·Î pass ÇÔ. |
|---|
| 341 | App_SddsServiceFound((UINT32)param1, (DmcEpgSddsProgramInfo *)param2); |
|---|
| 342 | } |
|---|
| 343 | #endif // SUPPORT_SDDS |
|---|
| 344 | |
|---|
| 345 | |
|---|
| 346 | } |
|---|
| 347 | |
|---|
| 348 | |
|---|
| 349 | /****************************************************************************************** |
|---|
| 350 | FUNCTION: |
|---|
| 351 | - App_EpgUpdateStart |
|---|
| 352 | |
|---|
| 353 | Purpose: |
|---|
| 354 | - |
|---|
| 355 | ******************************************************************************************/ |
|---|
| 356 | void App_EpgUpdateStart(void) |
|---|
| 357 | { |
|---|
| 358 | UINT32 flag = 0; |
|---|
| 359 | UINT32 source_id; |
|---|
| 360 | DST_CURCHANNEL ChannelInfo; |
|---|
| 361 | App_Ucm_GetCurChInfo(&ChannelInfo); |
|---|
| 362 | |
|---|
| 363 | if(ChannelInfo.nRF > 0) |
|---|
| 364 | { |
|---|
| 365 | dprint(3, "EPG Update start, RF %d, sid %d\n", ChannelInfo.nRF, ChannelInfo.nSourceId); |
|---|
| 366 | |
|---|
| 367 | /* flag |= epgScanFlag_EitFirst; */ |
|---|
| 368 | flag |= epgScanFlag_SkipAnalog; /* cafrii 060711 add */ |
|---|
| 369 | |
|---|
| 370 | source_id = ChannelInfo.nSourceId; /* cafrii 060718 add */ |
|---|
| 371 | |
|---|
| 372 | g_bEPGGet_OneSTT = FALSE; /* kjkam 2011.5.16 */ |
|---|
| 373 | g_bEPGGet_OneEIT = FALSE; /* iskang 2006.6.2 */ |
|---|
| 374 | g_EPG_ScreenUpdate = FALSE; /* iskang 2006.6.2 */ |
|---|
| 375 | |
|---|
| 376 | Dmc_EpgUpdateStart(ChannelInfo.nRF, Dmc_GetCurrentTsd(), _AppEpg2EventProc, source_id, flag); |
|---|
| 377 | /* no preferred source_id, no flag.. */ |
|---|
| 378 | |
|---|
| 379 | /* cafrii 060718 add |
|---|
| 380 | program change notify±â´ÉÀ» »ç¿ëÇÏ·Á¸é source_id ÁöÁ¤ÇØ¾ß ÇÔ. |
|---|
| 381 | */ |
|---|
| 382 | /* cafrii 070801 delete, ±×³É epg start ÇÏ¸é¼ source id ÁöÁ¤ÇÏ¸é µÊ. */ |
|---|
| 383 | /* Dmc_EpgSetMonitorSourceId(source_id); */ |
|---|
| 384 | } |
|---|
| 385 | else |
|---|
| 386 | dprint(1, "!! Cannot start Epg Update, Uid %d/RF %d\n", ChannelInfo.nUid, ChannelInfo.nRF); |
|---|
| 387 | } |
|---|
| 388 | |
|---|
| 389 | |
|---|
| 390 | /****************************************************************************************** |
|---|
| 391 | FUNCTION: |
|---|
| 392 | - App_EpgIdleUpdateStart |
|---|
| 393 | |
|---|
| 394 | Purpose: |
|---|
| 395 | - |
|---|
| 396 | ******************************************************************************************/ |
|---|
| 397 | void App_EpgIdleUpdateStart(int rf) |
|---|
| 398 | { |
|---|
| 399 | UINT32 flag = 0; |
|---|
| 400 | UINT32 source_id; |
|---|
| 401 | DST_CURCHANNEL ChannelInfo; |
|---|
| 402 | |
|---|
| 403 | // idle ½ÃÀÇ sdds¿ëÀ¸·Î epg task¸¦ »ç¿ëÇÒ ¶§¿¡´Â App_Ucm_GetCurChInfo()ÀÇ |
|---|
| 404 | // Á¤º¸°¡ À¯È¿ÇÏÁö ¾ÊÀ¸¹Ç·Î »ç¿ëÇÏÁö ¾Ê´Â´Ù. |
|---|
| 405 | ChannelInfo.nRF = rf; |
|---|
| 406 | ChannelInfo.nSourceId = 0; |
|---|
| 407 | if(ChannelInfo.nRF > 0) |
|---|
| 408 | { |
|---|
| 409 | dprint(3, "EPG Idle Update start, RF %d, sid %d\n", ChannelInfo.nRF, ChannelInfo.nSourceId); |
|---|
| 410 | |
|---|
| 411 | /* flag |= epgScanFlag_EitFirst; */ |
|---|
| 412 | flag |= epgScanFlag_SkipAnalog; /* cafrii 060711 add */ |
|---|
| 413 | |
|---|
| 414 | source_id = ChannelInfo.nSourceId; /* cafrii 060718 add */ |
|---|
| 415 | |
|---|
| 416 | g_bEPGGet_OneSTT = FALSE; /* kjkam 2011.5.16 */ |
|---|
| 417 | g_bEPGGet_OneEIT = FALSE; /* iskang 2006.6.2 */ |
|---|
| 418 | g_EPG_ScreenUpdate = FALSE; /* iskang 2006.6.2 */ |
|---|
| 419 | |
|---|
| 420 | Dmc_EpgUpdateStart(ChannelInfo.nRF, Dmc_GetCurrentTsd(), _AppEpg2IdleEventProc, source_id, flag); |
|---|
| 421 | /* no preferred source_id, no flag.. */ |
|---|
| 422 | |
|---|
| 423 | /* cafrii 060718 add |
|---|
| 424 | program change notify±â´ÉÀ» »ç¿ëÇÏ·Á¸é source_id ÁöÁ¤ÇØ¾ß ÇÔ. |
|---|
| 425 | */ |
|---|
| 426 | /* cafrii 070801 delete, ±×³É epg start ÇÏ¸é¼ source id ÁöÁ¤ÇÏ¸é µÊ. */ |
|---|
| 427 | /* Dmc_EpgSetMonitorSourceId(source_id); */ |
|---|
| 428 | } |
|---|
| 429 | else |
|---|
| 430 | dprint(1, "!! Cannot start Epg Idle Update, Uid %d/RF %d\n", ChannelInfo.nUid, ChannelInfo.nRF); |
|---|
| 431 | } |
|---|
| 432 | |
|---|
| 433 | |
|---|
| 434 | /****************************************************************************************** |
|---|
| 435 | FUNCTION: |
|---|
| 436 | - App_EpgUpdateCancel |
|---|
| 437 | |
|---|
| 438 | Purpose: |
|---|
| 439 | - EPG update cancel function |
|---|
| 440 | ******************************************************************************************/ |
|---|
| 441 | void App_EpgUpdateCancel(void) |
|---|
| 442 | { |
|---|
| 443 | App_CancelProgramChangeTimer(); |
|---|
| 444 | |
|---|
| 445 | Dmc_EpgUpdateCancel(); |
|---|
| 446 | } |
|---|
| 447 | |
|---|
| 448 | |
|---|
| 449 | /****************************************************************************************** |
|---|
| 450 | FUNCTION: |
|---|
| 451 | - App_EpgDeleteAll |
|---|
| 452 | |
|---|
| 453 | Purpose: |
|---|
| 454 | - EPG delete function |
|---|
| 455 | ******************************************************************************************/ |
|---|
| 456 | void App_EpgDeleteAll(void) |
|---|
| 457 | { |
|---|
| 458 | App_CancelProgramChangeTimer(); |
|---|
| 459 | |
|---|
| 460 | Dmc_EpgDeleteAll(); |
|---|
| 461 | } |
|---|
| 462 | |
|---|
| 463 | |
|---|
| 464 | /****************************************************************************************** |
|---|
| 465 | FUNCTION: |
|---|
| 466 | - App_EpgInit |
|---|
| 467 | |
|---|
| 468 | Purpose: |
|---|
| 469 | - EPG initialize function |
|---|
| 470 | ******************************************************************************************/ |
|---|
| 471 | void App_EpgInit(void) |
|---|
| 472 | { |
|---|
| 473 | DMW_EPG_Init(); |
|---|
| 474 | |
|---|
| 475 | DHL_DBG_RegisterFunctionSymbol("epg_start", (void *)App_EpgUpdateStart); |
|---|
| 476 | DHL_DBG_RegisterFunctionSymbol("epg_stop", (void *)App_EpgUpdateCancel); |
|---|
| 477 | DHL_DBG_RegisterFunctionSymbol("epg_delete", (void *)App_EpgDeleteAll); |
|---|
| 478 | DHL_DBG_RegisterFunctionSymbol("epg_list", (void *)Dmc_EpgPrintAllTables); |
|---|
| 479 | |
|---|
| 480 | } |
|---|
| 481 | |
|---|
| 482 | |
|---|
| 483 | UINT32 App_EpgGetEitCount() |
|---|
| 484 | { |
|---|
| 485 | return p_eit_count; |
|---|
| 486 | } |
|---|
| 487 | |
|---|
| 488 | UINT32 App_EpgGetEttCount() |
|---|
| 489 | { |
|---|
| 490 | return p_ett_count; |
|---|
| 491 | } |
|---|
| 492 | |
|---|
| 493 | |
|---|
| 494 | #endif /* SUPPORT_EPG */ |
|---|
| 495 | |
|---|
| 496 | |
|---|
| 497 | /* end of file */ |
|---|