source: svn/newcon3bcm2_21bu/dst/dmw/src/psi/DMW_PsiDatabase.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: 3.4 KB
Line 
1/*
2        DMW_PsiDatabase.h
3
4        DST TV MW PSI Scan Module
5
6        PSI Database management implementation
7
8        Copyright 2006~2010 Digital STREAM Technology, Inc.
9        All Rights Reserved
10
11*/
12
13
14#ifndef __DMW_PSI_DATABASE_H__
15#define __DMW_PSI_DATABASE_H__
16
17
18#include "DMW_PsiConfig.h"
19#include "DMW_PsiTypes.h"
20
21#include "DMW_PsiAPI.h"
22
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28
29#if COMMENT
30____Overview____(){}
31#endif
32
33
34/*
35
36        ÀÌ ¸ðµâ¿¡¼­´Â PSI DBÀÇ °¢Á¾ Å×ÀÌºí¿¡ Á¢±ÙÇÒ ¼ö ÀÖ´Â functionÀ» ±¸ÇöÇÑ´Ù.
37
38
39        PSI DB¿¡ Á¢±ÙÇϱâ À§Çؼ­ »ç¿ëÇÏ´Â mutex lock API.
40
41        ------------- Rule -------------
42       
43                PsiTask ¿¡¼­ DB´Â ÀÚÀ¯·Ó°Ô ÀÐÀ» ¼ö ÀÖÀ½.
44                PsiTask ¿¡¼­´Â Lock ÈÄ DB ¼öÁ¤ °¡´É.
45               
46                ÀÓÀÇ task¿¡¼­´Â Lock ÈÄ DB Àб⠰¡´É.
47                ÀÓÀÇ task¿¡¼­ DBÀÇ º¯°æÀº Àý´ë ±ÝÁö.
48               
49        ---------  End of Rule ---------
50
51        ÀÏ¹Ý Caller task¿¡¼­´Â DB ³»¿ëÀ» Àбâ Àü¿¡ ¹Ýµå½Ã
52        DMW_PSI_LockDB() API¸¦ ÀÌ¿ëÇÏ¿© lock µÈ ÈÄ¿¡ Àоî¾ß ÇÑ´Ù.
53
54        ³»ºÎ ¸ðµâ¿¡¼­´Â PSIDB_LockDB() ¸¦ »ç¿ëÇØµµ µÈ´Ù.
55
56        ÀÏ¹Ý caller task¿¡¼­ Á÷Á¢ DB ³»¿ëÀ» ¼öÁ¤ÇÏ´Â °ÍÀº Àý´ë ÇØ¼­´Â ¾ÈµÈ´Ù.
57
58*/
59               
60
61#if COMMENT
62____Get____(){}
63#endif
64
65/*
66        all of these call do unlocked access.
67        so, caller should be careful to race condition.
68*/
69
70MPEG_PAT *PSIDB_GetPAT(int id);
71MPEG_PMT **PSIDB_GetPMTs(int id);
72mgtSectionPtr_t PSIDB_GetMgt(int id);
73xvctPtr_t PSIDB_GetVct(int id);
74sttSectionPtr_t PSIDB_GetStt(int id);
75eitPtr_t *PSIDB_GetEits(int id, int source_id);
76eitPtr_t PSIDB_GetEit(int id, int source_id, int iEit);
77
78S_PSIM_MGT_DIGEST *PSIDB_GetMgtDigest(int id);
79
80
81BOOL PSIDB_IsPmtsCompleted(int id);
82
83BOOL PSIDB_IsSubChScanReadyToStart(int id);
84BOOL PSIDB_IsSubChEitsCompleted(int id, int source_id);
85BOOL PSIDB_IsAllSubChEitsCompleted(int id, int iEit);
86BOOL PSIDB_IsSubChEttVRequired(int id, int source_id);
87BOOL PSIDB_IsSubChEttSlotCompleted(int id, int source_id, int iEit);
88BOOL PSIDB_IsSubChAllEttsCompleted(int id, int source_id);
89
90
91#if COMMENT
92____DB_Op____(){}
93#endif
94
95STATUS PSIDB_AllocateChInfoNode(int id);
96STATUS PSIDB_RemoveChInfoNode(int id);
97
98
99
100#if COMMENT
101____Update____(){}
102#endif
103
104/*
105        all of these update API do mutex lock internally.
106        they change something in database.
107       
108*/
109
110STATUS PSIDB_UpdatePAT(int id, MPEG_PAT *pat);
111STATUS PSIDB_UpdatePMT(int id, MPEG_PMT *pmt);
112STATUS PSIDB_UpdateMgt(int id, mgtSectionPtr_t mgt);
113STATUS PSIDB_UpdateVct(int id, xvctPtr_t vct);
114
115STATUS PSIDB_UpdateStt(int id, sttSectionPtr_t stt, UINT32 tick_stt_get);
116STATUS PSIDB_InvalidateStt(int id);
117
118STATUS PSIDB_UpdateRrt(int id, rrtSectionPtr_t rrt);
119
120STATUS PSIDB_UpdateEit(int id, eitPtr_t eit, int index);
121STATUS PSIDB_UpdateEtt(int id, ettSectionPtr_t ett, int index);
122
123void PSIDB_DeleteTables(int id);
124void PSIDB_DeleteAllTables(void);
125
126void PSIDB_LockDB(BOOL bLock);
127
128S_PSIM_CHINFO *PSIDB_GetPsiChInfo(int id);
129S_PSIM_SUBCHINFO *PSIDB_GetPsiSubChInfo(int id, int source_id);
130
131void PSIDB_PrintAllTables(int id, int source_id, BOOL bDetail);
132
133
134#if COMMENT
135____Private____(){}
136#endif
137
138// do not use these functions if you don't know what it does
139void PSIDB_FreeEtts(S_PSIM_SUBCHINFO *subchInfo, int iEit);
140void PSIDB_FreeEitAndRelatedEtts(S_PSIM_SUBCHINFO *subchInfo, int iEit);
141void PSIDB_FreeSubChInfo(S_PSIM_SUBCHINFO *subchInfo);
142void PSIDB_FreeChInfo(S_PSIM_CHINFO *chInfo);
143
144
145#ifdef __cplusplus
146} /* extern "C" */
147#endif
148
149
150#endif // __DMW_PSI_DATABASE_H__
151
152
153
Note: See TracBrowser for help on using the repository browser.