source: svn/trunk/newcon3bcm2_21bu/BSEAV/lib/scte65/api/si_api_chanmap.h

Last change on this file was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 7.2 KB
Line 
1/***************************************************************
2**
3** Broadcom Corp. Confidential
4** Copyright 2003-2008 Broadcom Corp. All Rights Reserved.
5**
6** THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED
7** SOFTWARE LICENSE AGREEMENT BETWEEN THE USER AND BROADCOM.
8** YOU HAVE NO RIGHT TO USE OR EXPLOIT THIS MATERIAL EXCEPT
9** SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
10**
11** File:                si_api_chanmap.h
12** Description: defines and headers for channel map functions.
13**
14** Created: 03/08/2001
15**
16** REVISION:
17**
18** $Log: $
19**
20**
21****************************************************************/
22
23/*= Module Overview *********************************************************
24<verbatim>
25
26Overview
27In a POD base open cable DTV or STB system, all the channel map information
28comes from either an OOB channel through POD or a DSG tunnel through host to
29POD. The channel map can be parsed from a combination of NIT, NTT and SVCT or
30LVCT as defined in ANSI/SCTE65 (DVS234). Information about the channel number,
31physical channel frequency, modulation mode, symbol rate,program number and etc
32is all included in the channel map defined in this API. The upper level
33application can use this information to acquire the physical channel and lock
34on the transport stream.
35
36
37Design
38Currently the Channel Map API only support one API function call for the upper
39level applications to get the current channel map.
40
41
42Usage
43The usage of Channel Map API involves the upper level application periodically
44calling the get channel map API functions to get complete up to date channel map.
45
46
47Interrupt Requirements
48None.
49
50
51Sample Code
52None.
53
54</verbatim>
55***************************************************************************/
56
57#ifndef SI_API_CHANMAP_H
58#define SI_API_CHANMAP_H
59
60/***************************************************************************
61Summary:
62        Enumeration for channel type, analog or digital
63
64Description:
65        This enumeration defines the valid channel types.
66
67See Also:
68
69****************************************************************************/
70typedef enum SI_API_CHAN_TYPE
71{
72        SI_API_CHAN_MPEG,                               /* Digital channel. */
73        SI_API_CHAN_ANALOG,                     /* Analog channel. */
74        SI_API_CHAN_UNKNOWN                     /* Not Valid. */
75} SI_API_CHAN_TYPE;
76
77/***************************************************************************
78Summary:
79        Enumeration for digital channel transmission standard
80
81Description:
82        This enumeration defines the valid digital transmission standard.
83
84See Also:
85
86****************************************************************************/
87typedef enum SI_API_TRANS_STANDARD
88{
89        SI_API_ANNEX_B,                                 /* North American QAM standard. */
90        SI_API_ATSC,                                    /* North American off air digital TV. */
91        SI_API_TRANS_STANDARD_UNKNOWN  /* Not Valid. */
92} SI_API_TRANS_STANDARD;
93
94/***************************************************************************
95Summary:
96        Enumeration for digital channel modulation format
97
98Description:
99        This enumeration defines the valid digital modulation format.
100
101See Also:
102
103****************************************************************************/
104typedef enum SI_API_DIG_FORMAT
105{
106        SI_API_QAM64,                                   /* QAM 64 */
107        SI_API_QAM256,                                  /* QAM 256 */
108        SI_API_QAM1024,                                 /* QAM 1024 */
109        SI_API_VSB8,                                    /* VSB 8 */
110        SI_API_VSB16,                                   /* VSB 16 */
111        SI_API_DIG_FORMAT_UNKNOWN               /* Not Valid. */
112} SI_API_DIG_FORMAT;
113
114
115/* it is VERY important to keep the following the same as the define in si_nit_mms.h. */
116
117/***************************************************************************
118Summary:
119        Enumeration for analog channel TV format
120
121Description:
122        This enumeration defines the valid analog TV format.
123
124See Also:
125
126****************************************************************************/
127typedef enum SI_API_ANA_STANDARD
128{
129        SI_API_NTSC,
130        SI_API_PAL625,
131        SI_API_PAL525,
132        SI_API_SECAM,
133        SI_API_MAC,
134        SI_API_ANA_STANDARD_UNKNOWN
135} SI_API_ANA_STANDARD;
136
137/***************************************************************************
138Summary:
139        Enumeration for virtual channel number format
140
141Description:
142        This enumeration defines the valid channel number format.
143
144See Also:
145
146****************************************************************************/
147typedef enum SI_API_CHANNUM_MODE
148{
149        SI_API_ONE_PART,                                /* one part format, used mostly in CATV. */
150        SI_API_TWO_PART                         /* two part format, used mostly in off air DTV. */
151} SI_API_CHANNUM_MODE;
152
153/***************************************************************************
154Summary:
155        Structure for digital channel parameters
156
157Description:
158        This structure defines the digital channel parameters.
159
160See Also:
161
162****************************************************************************/
163typedef struct SI_API_DIG_CHAN
164{
165        unsigned short prog_num;                /* program number within transport stream. */
166        SI_API_TRANS_STANDARD mode;             /* transmission standard. */
167        SI_API_DIG_FORMAT format;               /* modulation format. */
168        unsigned long symrate;                  /* symbol rate. */
169} SI_API_DIG_CHAN;
170
171/***************************************************************************
172Summary:
173        Structure for analog channel parameters
174
175Description:
176        This structure defines the analog channel parameters.
177
178See Also:
179
180****************************************************************************/
181typedef struct SI_API_ANA_CHAN
182{
183        SI_API_ANA_STANDARD standard;   /* analog TV standard. */
184} SI_API_ANA_CHAN;
185
186/***************************************************************************
187Summary:
188        Structure for virtual channel descriptor within channel map.
189
190Description:
191        This structure defines the data associated with a channel.
192
193See Also:
194
195****************************************************************************/
196#define SI_API_CHAN_MAP_NAME_LEN        128
197typedef struct SI_API_CHAN_MAP
198{
199        SI_API_CHANNUM_MODE num_mode;   /* virtual channel number scheme. 0 onpart, 1 twopart. */
200        unsigned short channum1;                /* for one part mode, this is the virtual channel number. for two part, this will be the major part. */
201        unsigned short channum2;                /* for one part mode, this is not used. for two part, this is the minor part. */
202        unsigned short source_id;               /* source ID for this channel. */
203        unsigned long freq;                     /* in Hz */
204        SI_API_CHAN_TYPE chan_type;             /* channel type. */
205        union
206        {
207                SI_API_DIG_CHAN dig_parm;
208                SI_API_ANA_CHAN ana_parm;
209        } chan_parm;                                    /* channel parameters. */
210        unsigned char name[SI_API_CHAN_MAP_NAME_LEN];
211} SI_API_CHAN_MAP;
212
213
214#ifdef __cplusplus
215extern "C" {
216#endif
217
218/***************************************************************************
219Summary:
220        This function tries to get the channel map from SI data received from
221        either OOB channel or DSG tunnel.
222
223Description:
224        This function is responsible for trying to get the channel map from POD
225        SW stack. Since per specified by ANSI/SCTE 65, it may take some time before
226        all the channel map information can arrive and it can change without notice
227        the upper level application is responsible for calling this function
228        periodically to keep the channel map complete and up to date.
229
230Returns:
231        0: when the function returns successfully.
232        -1: when the function fails.
233
234See Also:
235
236
237****************************************************************************/
238int SI_Api_Get_Chan_Map(SI_API_CHAN_MAP **chan, /* [out] pointer that points to the channel map array */
239                                                unsigned long *len /* [out] pointer that points the channel map array size */);
240
241#ifdef __cplusplus
242}
243#endif
244
245
246#endif
Note: See TracBrowser for help on using the repository browser.