source: svn/newcon3bcm2_21bu/dst/dhl/src/DHL_PSI_Priv.h

Last change on this file was 76, checked in by megakiss, 10 years ago

1W 대기전력을 만족시키기 위하여 POWEROFF시 튜너를 Standby 상태로 함

  • Property svn:executable set to *
File size: 4.8 KB
Line 
1/**
2        @file
3                DHL_PSI_Priv.h
4
5        @brief
6                DHL PSI ¸ðµâ Private header
7
8        Copyright 2006~2010 Digital STREAM Technology, Inc.
9        All Rights Reserved
10*/
11
12
13#ifndef __DHL_PSI_PRIV_H__
14#define __DHL_PSI_PRIV_H__
15
16
17#include "DHL_Types.h"
18#include "DHL_PSI.h"
19
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25
26
27#if COMMENT
28____Overview____(){}
29#endif
30
31/**
32        @file DHL_PSI_Priv.h
33       
34        À̰÷¿¡ ÀÌ ¸ðµâ¿¡ ´ëÇØ ¼³¸íÀÌ ÇÊ¿äÇÑ °¢Á¾ ³»¿ë ±â¼ú..
35       
36        module overview
37                -
38                -
39
40        APIs
41       
42        implementations
43       
44        dependencies           
45       
46        nv parameters
47               
48       
49
50*/
51
52
53#if COMMENT
54____Config____(){}
55#endif
56
57
58// section ¼ö½Å½Ã crc¸¦ ´Ù½Ã Çѹø °Ë»çÇÏ°Ô ÇÑ´Ù.
59#define DST_CRC_RECHECK 0       //BKTODO: 1->0
60
61// section ¼ö½Å½Ã filteringÀÌ Á¦´ë·Î µÆ´ÂÁö sw ¹æ½ÄÀ¸·Î È®ÀÎÇÏ°Ô ÇÑ´Ù.
62#define DST_SW_FILTERING 1
63
64
65#if COMMENT
66____Types____(){}
67#endif
68
69
70typedef struct
71{
72        tDHL_PSI_Mode psiMode;
73        tDHL_PSI_Update updateMode;
74        UINT16 maxData;
75        UINT16 maxSections;
76        tDHL_PSI_EventProc eventProc;
77        UINT32 userParam;
78
79} tDHL_PSI_StartParam;
80
81typedef struct
82{
83        int index;      // ÇÊÅÍÄÁÆ®·Ñ array(g_fc in DHL_PSI_Rx.c)ÀÇ index, ÃʱâÈ­ ÇÒ¶§ °ªÀÌ Á¤ÇØÁø´Ù.
84        void*   Filter_ID;      // µå¶óÀ̹ö¿¡¼­ »ç¿ëÇÏ´Â ÇÊÅÍÀÇ ID, event ¹ß»ýÇÑ filter¸¦ ãÀ» ¶§ »ç¿ë. (pointer to smessage_stream_t)
85        tDHL_PSI_ControlHandle handle;  // psi ÇÊÅÍ ÄÁÆ®·Ñ ÇÚµé, »ç¿ëÀÚ´Â ¿ÀÁ÷ ÀÌ ÇÚµéÀ» ÅëÇØ¼­ ÇÊÅÍ ÄÁÆ®·Ñ¿¡ Á¢±Ù ÇÒ ¼ö ÀÖÀ½.
86        BOOL active;
87        BOOL isPaused;
88
89        UINT16 pid;
90       
91        tDHL_PSI_Filter *pFltData;
92
93        tDHL_PSI_StartParam param;
94
95        // operation parameters
96        INT32                   curSection;                                     /* The last section received */
97
98        // crc parameters
99        UINT32                  lastCRC;                                        /* Used for psiCRCChange */
100        UINT32                  runningCRC;                                     /* Used to combine all CRC's for sections in table */
101        BOOLEAN                 lastCRCValid;                           /* TRUE if lastCRC has valid data */
102       
103        // version parameters
104        INT32                   curVersion;                             /* Version number of previous completed section/table */
105        INT32                   nextVersion;                                    /* Version number for table being gathered. no meaning for section */
106
107        tDHL_PSI_DataArray      *curDataArray;          /* A complete descriptor waiting to be taken */
108                // section ¸ðµå¿¡¼­´Â Ç×»ó ¸¶Áö¸·À¸·Î ¼ö½ÅµÈ data array¸¦ °¡Áö°í ÀÖ´Ù.
109                // »¡¸® °¡Á®°¡Áö ¾ÊÀ¸¸é »õ data·Î overwrite µÇ¾î ¹ö¸°´Ù.
110
111        tDHL_PSI_DataArray      *nextDataArray;         /* An incomplete descriptor for data still being gathered */
112                // section mode¿¡¼­´Â nextDataArray´Â »ç¿ëÇÏÁö ¾Ê´Â´Ù.
113
114        // debugging
115        UINT32                  receiveCount;                           /* Accumulated reception count of this section */
116        UINT32                  goodCount;
117        UINT8*                  pRawBuff;
118} tDHL_PSI_FiltCtl;
119
120
121
122
123#if COMMENT
124____Defines____(){}
125#endif
126
127/*
128        defines for flags of dhl_psi_alloc_memory..
129*/
130#define DHL_PSI_MEMORY_SM_POOL  0x1 // alloc from SM POOL
131#define DHL_PSI_MEMORY_CLEAR    0x2
132
133/* for dhl_psi_set_filter_value */
134typedef enum {
135        eFILTERATTR_TID=0x1,
136        eFILTERATTR_CURNEXTINDICATOR=0x2,
137        eFILTERATTR_TIDEXTENSION=0x4,
138        eFILTERATTR_TOPFIELD=0x20, // MSB only of TID extension
139        eFILTERATTR_BOTTOMFIELD=0x40, // LSB only of TID extension
140        eFILTERATTR_ETMID=0x80,
141        eFILTERATTR_FIRSTPAYLOAD=0x100,
142        eFILTERATTR_VERSION=0x200, // do not receive specific version
143} tDHL_FilterAttr;
144
145
146#if COMMENT
147____Functions____(){}
148#endif
149
150void dhl_psi_set_filter_value(tDHL_PSI_Filter *pFilter, tDHL_FilterAttr attrType, UINT32 value);
151
152void *dhl_psi_alloc_memory(UINT32 size, UINT32 flags);
153
154void dhl_psi_free_memory(void *block);
155
156void dhl_psi_free_data_array(tDHL_PSI_DataArray *psi);
157
158void dhl_psi_set_filter_value(tDHL_PSI_Filter *pFilter, tDHL_FilterAttr attrType, UINT32 value);
159
160/**     @brief
161                ÀÔ·ÂÀ¸·Î µé¾î¿Â psi µ¥ÀÌÅÍ·Î ÇÊÅÍ ÄÁÆ®·Ñ ³»ºÎ¿¡ data array¸¦ ¸¸µç´Ù.
162                ¼½¼Ç¿¡ Æ÷ÇÔµÈ ±æÀÌ Á¤º¸¸¸Å­¸¸ ó¸®Çϸç ó¸®µÈ µ¥ÀÌÅÍ Å©±â¸¦ ¸®ÅÏÇÑ´Ù.
163               
164        @param pFltCtl[out] ÇÊÅÍ ÄÁÆ®·Ñ.
165                pFltCtl->curDataArray¿¡ ¼½¼ÇorÅ×ÀÌºí µ¥ÀÌÅ͸¦ ÇÒ´ç.
166        @param pdata[in] ¼ö½ÅµÈ psi µ¥ÀÌÅÍÀÇ ½ÃÀÛÁÖ¼Ò.
167        @param len[in] ¼ö½ÅµÈ psi µ¥ÀÌÅÍÀÇ ÃÑ ±æÀÌ.
168                ¿©·¯°³ÀÇ ¼½¼ÇÀÌ Æ÷Ç﵃ ¼ö ÀÖÀ¸¹Ç·Î ¼½¼Ç³» ±æÀÌ °ªº¸´Ù ´õ Ŭ ¼ö ÀÖÀ½.
169        @param procLen[out] ¼ö½ÅµÈ psi µ¥ÀÌÅÍÀÇ ÃÑ ±æÀÌ.
170                ¿©·¯°³ÀÇ ¼½¼ÇÀÌ Æ÷Ç﵃ ¼ö ÀÖÀ¸¹Ç·Î ¼½¼Ç³» ±æÀÌ °ªº¸´Ù ´õ Ŭ ¼ö ÀÖÀ½.
171
172        @return
173                ó¸®µÈ µ¥ÀÌÅÍÀÇ ±æÀÌ.
174*/
175tDHL_PSI_Event dhl_psi_post_data_received(
176                        tDHL_PSI_FiltCtl *pFltCtl, UINT8 *pdata, 
177                        int len, int *procLen);
178
179void update_psi_filter(tDHL_PSI_FiltCtl *pFltCtl);
180
181// oneshot ¿ëµµ
182void pause_psi_filter(tDHL_PSI_FiltCtl* pFltCtl);
183void resume_psi_filter(tDHL_PSI_FiltCtl* pFltCtl);
184
185
186DHL_RESULT dhl_psi_start(tDHL_TSD tsd, UINT16 pid, 
187                tDHL_PSI_Filter *pref,
188                tDHL_PSI_StartParam *param,
189                tDHL_PSI_ControlHandle *pHandle);
190
191void dhl_psi_stop(tDHL_PSI_ControlHandle handle);
192
193DHL_RESULT dhl_psi_read_data(tDHL_PSI_ControlHandle handle, 
194                tDHL_PSI_DataArray **ppData);
195
196
197void dhl_psi_init(void);
198
199void dhl_psi_uninit(void);
200
201void dhl_psi_show(void);
202
203#ifdef __cplusplus
204} /* extern "C" */
205#endif
206
207
208
209#endif  /* __DHL_PSI_PRIV_H__ */
210
Note: See TracBrowser for help on using the repository browser.