source: svn/newcon3bcm2_21bu/dst/dmw/src/EPG/DMW_EpgInterface.h @ 22

Last change on this file since 22 was 22, checked in by phkim, 11 years ago
  1. phkim
  2. newcon3sk 를 kctv 로 브랜치 함
  • Property svn:executable set to *
File size: 10.2 KB
Line 
1/*
2        DMW_EpgInterface.h
3       
4        New EPG Middleware Interface 1 (EPG1 compatible version)
5        There are one interface supported, which is mostly compatible with
6                old EPG 1.0 MW..
7
8        Copyright 2004 Digital STREAM Technology, Inc.  All Rights Reserved
9
10        $Id: DMW_EpgBase.h  v1.00 2004/07 cafrii Exp $
11
12*/
13
14#ifndef __DMW_EPG_INTERFACE_H__
15#define __DMW_EPG_INTERFACE_H__
16
17
18#include "DMW_EpgBase.h"                        /* Epg 2.0 New Core Header file */
19#include "DMW_ChannelDemux.h"   /* cafrii 050624 add for xvct */
20
21#include "DHL_AVCAP.h"         /* 2010.02.02 foxhunt : add for AudioType */
22
23
24
25
26/*---------- EIA-766 Rating ---------------*/
27
28
29typedef enum
30{
31        RATING766_NONE = 0,             /* Missing RatingÀ» ÀǹÌÇÔ. TV_None, MPAA-NRÀÌ ¾Æ´Ô. */
32       
33        RATING766_US_Entire_Audience,
34        RATING766_US_Children,
35        RATING766_US_MPAA,
36        RATING766_CANADA_English,
37        RATING766_CANADA_French,
38
39} RATING766_T;
40
41
42typedef struct 
43{
44        RATING766_T type;
45        UINT8       value;
46        UINT8       D, L, S, V, FV;
47       
48} DMW_Rating766;
49
50
51/*---------- Region 5 Rating --------------- */
52
53#define MAX_RATING_DIMS_NUM 20
54        /* D-RRT guide line ¹®¼­ */
55       
56#define MAX_RATING_RGNS_NUM 8
57        /* refer ATSC A65B $6.9.4
58                 up to 8 regions allowed per event */
59
60
61typedef struct 
62{
63        UINT8 region_id;
64        UINT8 num_dimensions;
65        struct {
66                UINT8 index;    /* dimension index */
67                UINT8 value;  /* value */
68        } dimension[MAX_RATING_DIMS_NUM];
69       
70        /* »ç¿ëµÇ°í ÀÖÁö ¾Ê¾Æ¼­ »èÁ¦
71                UINT16 rating_description_length;
72                UINT8    *rating_description;
73        */
74
75} DMW_RatingRegion;
76 
77typedef struct 
78{
79        UINT8            region_count;
80        DMW_RatingRegion region[MAX_RATING_RGNS_NUM];
81
82} DMW_Rating5;
83
84
85
86/* Audio Program Information
87         cafrii 060609, add userparam. */
88typedef struct 
89{
90        UINT16  elementaryPid;
91        UINT32  ISO639_LanguageCode;
92        UINT8   serviceType;            /* service type in PMT info. not important now. */
93        tDHL_AudioCodingType audioType; /* probably AC3, but keep it for later use */
94        UINT32  userData;                       /* user (app) can use this variable for free. */
95       
96} DMW_AudioElement, *DMW_AudioElementPtr;
97
98
99
100/* ÇÏÀ§ 16 bit´Â ¹Þ±â¸¦ ¿øÇÏ´Â ÃÖ´ë event °¹¼öÀÌ´Ù.
101         ÀϹÝÀûÀ¸·Î OSD Á¦ÇÑ ¶§¹®¿¡ ÀÏÁ¤ °¹¼ö ÀÌ»óÀº ÇÊ¿äÇÏÁö ¾Ê´Â °æ¿ì°¡ ÀÖÀ» ¼ö ÀÖ´Ù.
102*/
103#define GET_EVENT_BASIC   0x000000
104#define GET_EVENT_RATING  0x010000
105#define GET_EVENT_CAPTION 0x020000
106#define GET_EVENT_TITLE   0x040000
107#define GET_EVENT_TEXT    0x080000
108#define GET_EVENT_STATIC_MEM 0x100000
109        //neverdai 110713 static memory¸¦ »ç¿ëÇÔ.
110        // -ÀÎÀÚ Áß ÇϳªÀÎ aFoundEvents·Î static memory¸¦ Àü´ÞÇÔ
111        // -caller´Â ³Ë³ËÇÑ memory size¸¦ ÇÒ´çÇØ¾ß ÇÒ ÇÊ¿ä ÀÖÀ½.
112        // -¶ÇÇÑ titleText, eventETM°°ÀÌ ¾ò¾î¿Ã µ¥ÀÌÅÍ¿¡ ´ëÇØ¼­µµ ¸Þ¸ð¸® ÇÒ´çÀÌ µÇ¾î ÀÖ¾î¾ß ÇÔ.
113        // -captionÀº µû·Î ¸Þ¸ð¸®°¡ ÇÒ´çµÇÁö ¾ÊÀ½.
114        // -¸Þ¸ð¸® ÃʱâÈ­µµ callerÀÇ ¸ò
115       
116#define GET_EVENT_ALL     0x0FFFFF//0xFFFFFF
117        //neverdai ÇÏÀ§ 16bit´Â °¹¼ö, ¹Ù·Î À§ »óÀ§ 4bit´Â ¾ò¾î¿Ã µ¥ÀÌÅÍ, ±× À§ »óÀÇ 4bit´Â optionÀÓ.
118        //µû¶ó¼­ Get_EVENT_ALLÀ» 0x0FFFFF·Î ÇÏ´Â°Ô ÁÁÀ½.
119
120#define DEFAULT_MAX_EVENT_NUMBER 200
121        /* cafrii 060620 add */
122       
123#define RRT1_MAX_DIM            3
124        /* iskang 0800619 add RRT regionÀÇ ÃÖ´ë dimension number */
125       
126typedef struct
127{
128
129        UINT16  programId;         
130                /* EIT event °¢°¢ÀÇ event ID¸¦ ÀǹÌÇÑ´Ù. */
131       
132        /* EIT³»ÀÇ event Á¤º¸¿¡ ÀÖ´Â ½Ã°£ Á¤º¸ */
133        UINT32  programLength;  /* seconds units */
134        UINT32  startTime;                      /* number of GPS seconds */
135       
136#if 0
137        // 2010.01.29 foxhunt : DMW_Rating5¸¦ »ç¿ëÇÏÀÚ. ratingRegionCount´Â DMW_Rating5ÀÇ region_count ÀÓ
138        UINT8   ratingRegionCount;      /*Content Advisory descriptor*/
139        DMW_Rating *rating;
140                /* event descriptorÀÎ contentAdvisoryDesc ³»¿ëÀ» ºÐ¼®Çؼ­ ¸¸µç °ªµéÀÌ´Ù.
141                   region count°¹¼ö¸¸Å­ ÀÖ°í, dimensionÀº Ç®¾î¼­ ±â·ÏÇϰí ÀÖÀ½. */
142#else
143        DMW_Rating5 rating;
144        /* ÀÌ field´Â pointer°¡ ¾Æ´Ï´Ù. */
145#endif
146
147        /* cafrii 030608 add */
148        captionServiceDescriptorPtr_t caption;
149       
150        /* EIT ³»ÀÇ event ³»ÀÇ title Á¤º¸ÀÌ´Ù. */
151        UINT8   titleTextLength; 
152        UINT8   *titleText;
153       
154        /* ÀÌ event¶û ¿¬°áµÈ ETM Á¤º¸ÀÌ´Ù. ETT·ÎºÎÅÍ ¾ò¾î¿Ô´Ù.  */
155        UINT16  eventETMLength;
156        UINT8   *eventETM;
157       
158} DMW_EpgEvent, *DMW_EpgEventPtr;
159
160
161
162typedef DmcEpgEventType EpgUpdateEventType;
163        /*
164                 ¿ø·¡ enum °ªÀ¸·Î Á¤ÀÇµÈ »ó¼öÀε¥ ´õÀÌ»ó »ç¿ëÇÏÁö ¾ÊÀ» °ÍÀ̹ǷΠenumÀº »èÁ¦ÇÏ¿´°í
165                 ÀÌ typeÀº compatibility¸¦ À§ÇØ ±×³É intÇüÀ¸·Î Á¤ÀÇÇÔ.
166        */
167
168
169typedef STATUS (*EpgUpdateCallbackFn) (EpgUpdateEventType evt, UINT32 param1, UINT32 param2);
170
171
172
173/*----------------------------
174// Porting½ÃÀÇ ÁÖÀÇ »çÇ×:
175//
176// EventProc¿¡¼­ ³Ñ°ÜÁÖ´Â »ç¿ëÀÚ event typeÀÇ Çü½ÄÀÌ
177// ±âÁ¸ÀÇ EpgUpdateEventType ¿¡¼­ ---> DmcEpgEventType ·Î º¯°æµÇ¾úÀ½..
178//
179//    EpgUpdateEventType À̸§µé:  evtEpgUpdateStarted, evtEpgXXX..
180//
181//    DmcEpgEventType À̸§µé:  epgEventStarted,  epgEventXXX..
182//
183//  ÀÌ À̺¥Æ® µéÀº ±× ¼ýÀÚÀÇ Àǹ̰¡ Á¤È®È÷ ÀÏÄ¡ÇÏÁö ¾ÊÀ¸¸ç (´ë·« ºñ½ÁÇϱä ÇÏÁö¸¸)
184//  °°ÀÌ ³Ñ°ÜÁÖ´Â parameterµéµµ Àǹ̰¡ ¿ÏÀüÈ÷ ´Ù¸£´Ù.
185// 
186//  µû¶ó¼­ EpgEventProcÀº ´Ù½Ã ÀÛ¼ºÇÏ´Â°Ô ÁÁÀ» µí..
187*/
188
189
190/*----------------------------
191// Àüü ±¸Á¶
192//
193//
194// ±âº»ÀûÀ¸·Î ¸ðµç EpgInterface µéÀº EpgBase ±â¹Ý À§¿¡¼­ Á¤ÀǵȴÙ.
195// Update¸¦ ½ÃÀÛ/Á¾·á ÇÏ´Â °ÍÀº EpgBase API¸¦ ÀÌ¿ëÇØ¼­ ¼öÇàµÇÁö¸¸,
196// EpgData retrieve´Â ¾Æ·¡ Interface¸¦ ÅëÇØ¼­ ÀÌ·ç¾îÁø´Ù.
197*/
198
199/* compatible APIs */
200
201STATUS DMW_EPG_Init(void);
202        /* ÃʱâÈ­ */
203
204STATUS DMW_EPG_UpdateCurrentRf(int rf, int source_id, EpgUpdateCallbackFn callback);
205        /* RF ä³ÎÀÇ EPG °Ë»ö */
206
207STATUS DMW_EPG_UpdateCurrentChannel(int iUCMId, EpgUpdateCallbackFn func);
208        /* UID ä³ÎÀÇ EPG °Ë»ö */
209
210STATUS DMW_EPG_DeleteAll(void);
211        /* ¸ðµç ä³Î Á¤º¸ »èÁ¦.. */
212
213
214STATUS DMW_EPG_GetEventsInRange(int iUCMId, UINT32 nStartTime, UINT32 nDuration, 
215                                        DMW_EpgEventPtr *aFoundEvents, int *piEventCounts, UINT32 flag);
216        /*
217                 nStartTime GPS ½Ã°£ ºÎÅÍ nDuration ¿µ¿ªÀÇ ½Ã°£ ±¸°£°ú °ãÄ¡´Â event Á¤º¸¸¦ ¸®ÅÏ..
218                 
219                 ºñ·Ï Epg Update´Â RF ´ÜÀ§°¡ ±âº»ÀÌÁö¸¸,
220                 EpgEvent Á¤º¸ µ¥ÀÌÅ͸¦ ÀÐÀ» ¶§¿¡´Â Minor channel (subchannel) ´ÜÀ§·Î °¡Á®¿Â´Ù..
221        */ 
222
223STATUS DMW_EPG_GetEventInTime(int iUCMId, UINT32 nTime, 
224                                        DMW_EpgEventPtr *pFoundEvent, UINT32 flag);
225/* cafrii 060605 add */
226STATUS DMW_EPG_GetEventInTimeByRf(int rf, int source_id, UINT32 nTime, 
227                                                        DMW_EpgEventPtr *pFoundEvent, UINT32 flag);
228
229void DMW_EPG_FreeEpgEvents(DMW_EpgEvent *pEvent, int iCount);
230        /*
231                 GetEventsXX ÇÔ¼ö·Î °¡Á®¿Â event Á¤º¸¸¦ free ½ÃŰ´Â ÇÔ¼ö
232                 ÇϳªÇϳª¾¿ free ÇÒ ¼ö ¾ø°í Åë°·Î free¸¦ ½ÃÄÑ¾ß ÇÔ.. (Áß¿ä!)
233               
234                 pEvent´Â iCount °¹¼ö ¸¸Å­ÀÇ EpgEvent °¡ ÀúÀåµÈ arrayÀÇ ¼±µÎ Æ÷ÀÎÅÍÀÌ´Ù.
235        */ 
236
237/* cafrii 091105 add */
238STATUS DMW_EPG_GetEventByEvid(int iUCMId, UINT16 evid, 
239                                                        DMW_EpgEventPtr *pFoundEvent, UINT32 flag);
240                                                       
241STATUS DMW_EPG_GetEventByEvidAndRf(int rf, int source_id, UINT16 evid, 
242                                                        DMW_EpgEventPtr *ppReturnEvent, UINT32 flag);
243
244/* cafrii 060814 add */
245void DMW_EPG_GetScanStatus(int uid, DmcEpgStatus *pStat);
246
247
248
249/*-------------------
250         utility APIs
251*/
252
253STATUS DMW_GetPsipDescriptor(UINT8 *descriptors, UINT16 len, UINT8 tag, UINT16 instance, UINT8 **descriptor);
254        /*
255                 descriptor list ¿¡¼­ ÁöÁ¤ÇÑ tag¸¦ °®´Â ƯÁ¤ descriptor¸¦ ÃßÃâÇÏ¿© ¸®ÅÏÇÑ´Ù.
256        */
257
258STATUS DMW_ParseRatingDescriptor(UINT8 *descriptors, int descriptor_length, DMW_Rating5 *pRating);
259        /*
260                 descriptor list ¿¡¼­ CA descriptor¸¦ ã°í ºÐ¼®ÇÏ¿© DMW_Rating Á¤º¸¸¦ ¿Ï¼ºÇÏ¿© ¸®ÅÏÇÑ´Ù.
261        */
262
263/* Rating info */
264STATUS DMW_EPG_GetRatingInfo(int iUCMId, UINT32 nTime, DMW_Rating5 *pRating);
265STATUS DMW_EPG_GetRatingInfoByRF(int rf, UINT16 source_id, UINT32 nTime, DMW_Rating5 *pRating);
266STATUS DMW_EPG_GetRatingInfoInPMT(DMW_Rating5 *pRating);
267
268/* Caption Info */
269STATUS DMW_EPG_GetCaptionDescriptor(int iUCMId, UINT32 nTime, 
270                                                                        captionServiceDescriptorPtr_t *pccdesc);
271STATUS DMW_EPG_GetCaptionDescriptorInPMT(captionServiceDescriptorPtr_t *pCC_Service);
272
273
274/* EIA-766 Rating */
275void DMW_EPG_ConvertToRating766Info(DMW_RatingRegion *pRegion, DMW_Rating766 *pR766);
276BOOL DMW_EPG_IsValidRating766Info(DMW_Rating766 *pr766);
277char *DMW_EPG_Rating766String(DMW_Rating766 *pInfo, char *buf);
278
279/* cafrii 060609, support RRT(region 5) API */
280BOOL DMW_EPG_CheckRatingBlockByRRT(DMW_Rating5 *pRating, BOOL *pbNoRating);
281STATUS DMW_EPG_GetRatingStringByRRT(DMW_Rating5 *pRating, UINT16 *str, int nBufSize);
282
283
284/*-------------------
285          EpgUTIL
286*/
287
288#if 0
289UINT16 DMW_Decode_MultipleStringStructure(UINT8 text_length, UINT8 *text_p,
290                                        char *lang, UINT16 max_dec_length, UINT16 *decoded_text);
291#endif
292
293void DMW_EPG_FreeMLInfo(DMW_AudioElementPtr aLingualInfos);
294STATUS DMW_EPG_GetMLInfoInPMT(MPEG_PMT* pmt, DMW_AudioElementPtr *aLingualInfos, int *iLingualCount);
295
296STATUS DMW_EPG_GetMLInfoInVctDescriptors(UINT8 *descriptors, int descriptor_length,
297                                                                                 DMW_AudioElementPtr *aMLInfo, int *piCount);
298        /* cafrii 050725 add */
299       
300STATUS DMW_EPG_GetMLInfoInVct(xvctChannelPtr_t vctch, DMW_AudioElementPtr *aMLInfo, int *piCount);
301        /* cafrii 050627 add */
302
303#if 0
304STATUS DMW_EPG_GetLanguageCodeFromDescriptors(UINT8 *pDesc, int nDescLen, int instance,
305                                                                UINT32 *pLangCode, int *pServiceType);
306        /* cafrii 050617 add
307                 ÁÖ¾îÁø descriptors ¸®½ºÆ®¿¡¼­ Language Á¤º¸¸¦ ÃßÃâÇÏ¿© ¸®ÅÏÇÑ´Ù.
308        */
309#endif
310
311void DMW_EPG_RegisterEpgIntfSymbols(void);
312
313void DMW_EPG_FreeEpgEvent(DMW_EpgEvent *pEvent);        /* iskang */
314/*----------------------------
315// Epg data scan policy
316//
317//
318//  Background scan:
319//     Ã¤³Î Æ©´× ÀÌÈÄ¿¡, ¶Ç´Â DTV sleep time ½Ã¿¡ À¯ÈÞ ½Ã°£À» ÀÌ¿ëÇÏ¿© Epg data¸¦ ¼öÁýÇÏ´Â ¹æ¹ý
320//     DMW_EPG_UpdateCurrentRf ¸¦ »ç¿ëÇÏ¿© timeout ¾øÀÌ RF ´ÜÀ§·Î Scan..
321//     EpgBase API¸¦ Á÷Á¢ »ç¿ëÇÑ´Ù¸é eit_only flag¸¦ ¸ÕÀú »ç¿ëÇÒ ¼öµµ ÀÖÀ» °ÍÀÓ..
322//
323//  Forground scan:
324//     EPG OSD¸¦ ¶ç¿ö¾ß ÇÏ´Â »óȲ¿¡¼­ forground·Î epg data¸¦ ¼öÁýÇϱâ
325//     OSD¿¡¼­ ¸ÕÀú º¸¿©Áà¾ß ÇÏ´Â µ¥ÀÌÅͺÎÅÍ ¿ì¼± ¼öÁýÇÑ´Ù.
326//     Çö½ÇÀûÀ¸·Î ¸ðµç µ¥ÀÌÅͰ¡ ´Ù ¼ö½ÅµÇ±â¸¦ ±â´Ù¸± ¼ö´Â ¾øÀ¸¹Ç·Î timeoutÀ» µÎ°í
327//     º¹¼ö°³ÀÇ Ã¤³ÎÀ» ¼ø¼­´ë·Î µ¹¾Æ°¡¸é¼­ ¼ö½Å..
328//     OSD¸¦ º¸¿©ÁØ µÚ¿¡µµ °è¼Ó background·Î scan ÀÛ¾÷À» Çϵµ·Ï ÇÏ¿©, updateµÉ ¶§¸¶´Ù
329//     OSD¸¦ updateÇÑ´Ù.
330//     TestGetMultiChannelEpg ¿¹Á¦¸¦ Âü°íÇϱ⠹ٶ÷.
331*/
332
333
334#endif  /* __DMW_EPG_INTERFACE_H__ */
335
336
337/********************************************************************
338   $Log: DMW_EpgInterface.h,v $
339
340        1.02 2004/12/23 descriptor parser API ¸î°³ Ãß°¡
341        1.01 2004/11/30 DMW_EPG2_GetRating prototype changed
342        1.00 2004/11/?  History °ü¸® ½ÃÀÛ
343
344*********************************************************************/
345
Note: See TracBrowser for help on using the repository browser.