libdvbpsi  1.2.0
dr_54.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * dr_54.h
3  * Copyright (C) 2013 VideoLAN
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  *****************************************************************************/
20 
30 #ifndef _DVBPSI_DR_54_H_
31 #define _DVBPSI_DR_54_H_
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
42 #define DVBPSI_GetContentCategoryFromType(type) ((type) >> 4)
43 
50 #define L1L2MERGE(L1,L2) ( ( DVBPSI_CONTENT_CAT ## L1<<4) | (L2) )
51 
52 /* Content category */
53 #define DVBPSI_CONTENT_CAT_UNDEFINED 0x0
54 #define DVBPSI_CONTENT_CAT_MOVIE 0x1
55 #define DVBPSI_CONTENT_CAT_NEWS 0x2
56 #define DVBPSI_CONTENT_CAT_SHOW 0x3
57 #define DVBPSI_CONTENT_CAT_SPORTS 0x4
58 #define DVBPSI_CONTENT_CAT_CHILDREN 0x5
59 #define DVBPSI_CONTENT_CAT_MUSIC 0x6
60 #define DVBPSI_CONTENT_CAT_CULTURE 0x7
61 #define DVBPSI_CONTENT_CAT_SOCIAL 0x8
62 #define DVBPSI_CONTENT_CAT_EDUCATION 0x9
63 #define DVBPSI_CONTENT_CAT_LEISURE 0xa
64 #define DVBPSI_CONTENT_CAT_SPECIAL 0xb
65 #define DVBPSI_CONTENT_CAT_USERDEFINED 0xf
67 /* Movie/Drama */
68 #define DVBPSI_CONTENT_MOVIE_GENERAL L1L2MERGE( _MOVIE, 0x0 )
69 #define DVBPSI_CONTENT_MOVIE_DETECTIVE L1L2MERGE( _MOVIE, 0x1 )
70 #define DVBPSI_CONTENT_MOVIE_ADVENTURE L1L2MERGE( _MOVIE, 0x2 )
71 #define DVBPSI_CONTENT_MOVIE_SF L1L2MERGE( _MOVIE, 0x3 )
72 #define DVBPSI_CONTENT_MOVIE_COMEDY L1L2MERGE( _MOVIE, 0x4 )
73 #define DVBPSI_CONTENT_MOVIE_SOAP L1L2MERGE( _MOVIE, 0x5 )
74 #define DVBPSI_CONTENT_MOVIE_ROMANCE L1L2MERGE( _MOVIE, 0x6 )
75 #define DVBPSI_CONTENT_MOVIE_CLASSICAL L1L2MERGE( _MOVIE, 0x7 )
76 #define DVBPSI_CONTENT_MOVIE_ADULT L1L2MERGE( _MOVIE, 0x8 )
77 #define DVBPSI_CONTENT_MOVIE_USERDEFINED L1L2MERGE( _MOVIE, 0xf )
78 /* News/Current affairs */
79 #define DVBPSI_CONTENT_NEWS_GENERAL L1L2MERGE( _NEWS, 0x0 )
80 #define DVBPSI_CONTENT_NEWS_WEATHER L1L2MERGE( _NEWS, 0x1 )
81 #define DVBPSI_CONTENT_NEWS_MAGAZINE L1L2MERGE( _NEWS, 0x2 )
82 #define DVBPSI_CONTENT_NEWS_DOCUMENTARY L1L2MERGE( _NEWS, 0x3 )
83 #define DVBPSI_CONTENT_NEWS_DISCUSSION L1L2MERGE( _NEWS, 0x4 )
84 #define DVBPSI_CONTENT_NEWS_USERDEFINED L1L2MERGE( _NEWS, 0xf )
85 /* Show/Game show */
86 #define DVBPSI_CONTENT_SHOW_GENERAL L1L2MERGE( _SHOW, 0x0 )
87 #define DVBPSI_CONTENT_SHOW_QUIZ L1L2MERGE( _SHOW, 0x1 )
88 #define DVBPSI_CONTENT_SHOW_VARIETY L1L2MERGE( _SHOW, 0x2 )
89 #define DVBPSI_CONTENT_SHOW_TALK L1L2MERGE( _SHOW, 0x3 )
90 #define DVBPSI_CONTENT_SHOW_USERDEFINED L1L2MERGE( _SHOW, 0xf )
91 /* Sports */
92 #define DVBPSI_CONTENT_SPORTS_GENERAL L1L2MERGE( _SPORTS, 0x0 )
93 #define DVBPSI_CONTENT_SPORTS_EVENTS L1L2MERGE( _SPORTS, 0x1 )
94 #define DVBPSI_CONTENT_SPORTS_MAGAZINE L1L2MERGE( _SPORTS, 0x2 )
95 #define DVBPSI_CONTENT_SPORTS_FOOTBALL L1L2MERGE( _SPORTS, 0x3 )
96 #define DVBPSI_CONTENT_SPORTS_TENNIS L1L2MERGE( _SPORTS, 0x4 )
97 #define DVBPSI_CONTENT_SPORTS_TEAM L1L2MERGE( _SPORTS, 0x5 )
98 #define DVBPSI_CONTENT_SPORTS_ATHLETICS L1L2MERGE( _SPORTS, 0x6 )
99 #define DVBPSI_CONTENT_SPORTS_MOTOR L1L2MERGE( _SPORTS, 0x7 )
100 #define DVBPSI_CONTENT_SPORTS_WATER L1L2MERGE( _SPORTS, 0x8 )
101 #define DVBPSI_CONTENT_SPORTS_WINTER L1L2MERGE( _SPORTS, 0x9 )
102 #define DVBPSI_CONTENT_SPORTS_EQUESTRIAN L1L2MERGE( _SPORTS, 0xa )
103 #define DVBPSI_CONTENT_SPORTS_MARTIAL L1L2MERGE( _SPORTS, 0xb )
104 #define DVBPSI_CONTENT_SPORTS_USERDEFINED L1L2MERGE( _SPORTS, 0xf )
105 /* Children's/Youth */
106 #define DVBPSI_CONTENT_CHILDREN_GENERAL L1L2MERGE( _CHILDREN, 0x0 )
107 #define DVBPSI_CONTENT_CHILDREN_PRESCHOOL L1L2MERGE( _CHILDREN, 0x1 )
108 #define DVBPSI_CONTENT_CHILDREN_06TO14ENT L1L2MERGE( _CHILDREN, 0x2 )
109 #define DVBPSI_CONTENT_CHILDREN_10TO16ENT L1L2MERGE( _CHILDREN, 0x3 )
110 #define DVBPSI_CONTENT_CHILDREN_EDUCATIONAL L1L2MERGE( _CHILDREN, 0x4 )
111 #define DVBPSI_CONTENT_CHILDREN_CARTOONS L1L2MERGE( _CHILDREN, 0x5 )
112 #define DVBPSI_CONTENT_CHILDREN_USERDEFINED L1L2MERGE( _CHILDREN, 0xf )
113 /* Music/Ballet/Dance */
114 #define DVBPSI_CONTENT_MUSIC_GENERAL L1L2MERGE( _MUSIC, 0x0 )
115 #define DVBPSI_CONTENT_MUSIC_POPROCK L1L2MERGE( _MUSIC, 0x1 )
116 #define DVBPSI_CONTENT_MUSIC_CLASSICAL L1L2MERGE( _MUSIC, 0x2 )
117 #define DVBPSI_CONTENT_MUSIC_FOLK L1L2MERGE( _MUSIC, 0x3 )
118 #define DVBPSI_CONTENT_MUSIC_JAZZ L1L2MERGE( _MUSIC, 0x4 )
119 #define DVBPSI_CONTENT_MUSIC_OPERA L1L2MERGE( _MUSIC, 0x5 )
120 #define DVBPSI_CONTENT_MUSIC_BALLET L1L2MERGE( _MUSIC, 0x6 )
121 #define DVBPSI_CONTENT_MUSIC_USERDEFINED L1L2MERGE( _MUSIC, 0xf )
122 /* Arts/Culture */
123 #define DVBPSI_CONTENT_CULTURE_GENERAL L1L2MERGE( _CULTURE, 0x0 )
124 #define DVBPSI_CONTENT_CULTURE_PERFORMANCE L1L2MERGE( _CULTURE, 0x1 )
125 #define DVBPSI_CONTENT_CULTURE_FINEARTS L1L2MERGE( _CULTURE, 0x2 )
126 #define DVBPSI_CONTENT_CULTURE_RELIGION L1L2MERGE( _CULTURE, 0x3 )
127 #define DVBPSI_CONTENT_CULTURE_TRADITIONAL L1L2MERGE( _CULTURE, 0x4 )
128 #define DVBPSI_CONTENT_CULTURE_LITERATURE L1L2MERGE( _CULTURE, 0x5 )
129 #define DVBPSI_CONTENT_CULTURE_CINEMA L1L2MERGE( _CULTURE, 0x6 )
130 #define DVBPSI_CONTENT_CULTURE_EXPERIMENTAL L1L2MERGE( _CULTURE, 0x7 )
131 #define DVBPSI_CONTENT_CULTURE_PRESS L1L2MERGE( _CULTURE, 0x8 )
132 #define DVBPSI_CONTENT_CULTURE_NEWMEDIA L1L2MERGE( _CULTURE, 0x9 )
133 #define DVBPSI_CONTENT_CULTURE_MAGAZINE L1L2MERGE( _CULTURE, 0xa )
134 #define DVBPSI_CONTENT_CULTURE_FASHION L1L2MERGE( _CULTURE, 0xb )
135 #define DVBPSI_CONTENT_CULTURE_USERDEFINED L1L2MERGE( _CULTURE, 0xf )
136 /* Socal/Political/Economics */
137 #define DVBPSI_CONTENT_SOCIAL_GENERAL L1L2MERGE( _SOCIAL, 0x0 )
138 #define DVBPSI_CONTENT_SOCIAL_MAGAZINE L1L2MERGE( _SOCIAL, 0x1 )
139 #define DVBPSI_CONTENT_SOCIAL_ADVISORY L1L2MERGE( _SOCIAL, 0x2 )
140 #define DVBPSI_CONTENT_SOCIAL_PEOPLE L1L2MERGE( _SOCIAL, 0x3 )
141 #define DVBPSI_CONTENT_SOCIAL_USERDEFINED L1L2MERGE( _SOCIAL, 0xf )
142 /* Eduction/Science/Factual */
143 #define DVBPSI_CONTENT_EDUCATION_GENERAL L1L2MERGE( _EDUCATION, 0x0 )
144 #define DVBPSI_CONTENT_EDUCATION_NATURE L1L2MERGE( _EDUCATION, 0x1 )
145 #define DVBPSI_CONTENT_EDUCATION_TECHNOLOGY L1L2MERGE( _EDUCATION, 0x2 )
146 #define DVBPSI_CONTENT_EDUCATION_MEDICINE L1L2MERGE( _EDUCATION, 0x3 )
147 #define DVBPSI_CONTENT_EDUCATION_FOREIGN L1L2MERGE( _EDUCATION, 0x4 )
148 #define DVBPSI_CONTENT_EDUCATION_SOCIAL L1L2MERGE( _EDUCATION, 0x5 )
149 #define DVBPSI_CONTENT_EDUCATION_FURTHER L1L2MERGE( _EDUCATION, 0x6 )
150 #define DVBPSI_CONTENT_EDUCATION_LANGUAGE L1L2MERGE( _EDUCATION, 0x7 )
151 #define DVBPSI_CONTENT_EDUCATION_USERDEFINED L1L2MERGE( _EDUCATION, 0xf )
152 /* Leisure/Hobbies */
153 #define DVBPSI_CONTENT_LEISURE_GENERAL L1L2MERGE( _LEISURE, 0x0 )
154 #define DVBPSI_CONTENT_LEISURE_TRAVEL L1L2MERGE( _LEISURE, 0x1 )
155 #define DVBPSI_CONTENT_LEISURE_HANDICRAFT L1L2MERGE( _LEISURE, 0x2 )
156 #define DVBPSI_CONTENT_LEISURE_MOTORING L1L2MERGE( _LEISURE, 0x3 )
157 #define DVBPSI_CONTENT_LEISURE_FITNESS L1L2MERGE( _LEISURE, 0x4 )
158 #define DVBPSI_CONTENT_LEISURE_COOKING L1L2MERGE( _LEISURE, 0x5 )
159 #define DVBPSI_CONTENT_LEISURE_SHOPPING L1L2MERGE( _LEISURE, 0x6 )
160 #define DVBPSI_CONTENT_LEISURE_GARDENING L1L2MERGE( _LEISURE, 0x7 )
161 #define DVBPSI_CONTENT_LEISURE_USERDEFINED L1L2MERGE( _LEISURE, 0xf )
162 /* Special characteristics */
163 #define DVBPSI_CONTENT_SPECIAL_ORIGINALLANGUAGE L1L2MERGE( _SPECIAL, 0x0 )
164 #define DVBPSI_CONTENT_SPECIAL_BLACKANDWHITE L1L2MERGE( _SPECIAL, 0x1 )
165 #define DVBPSI_CONTENT_SPECIAL_UNPUBLISHED L1L2MERGE( _SPECIAL, 0x2 )
166 #define DVBPSI_CONTENT_SPECIAL_LIVE L1L2MERGE( _SPECIAL, 0x3 )
167 #define DVBPSI_CONTENT_SPECIAL_PLANOSTEREOSCOPIC L1L2MERGE( _SPECIAL, 0x4 )
168 #define DVBPSI_CONTENT_SPECIAL_USERDEFINED L1L2MERGE( _SPECIAL, 0xb )
169 #define DVBPSI_CONTENT_SPECIAL_USERDEFINED1 L1L2MERGE( _SPECIAL, 0xc )
170 #define DVBPSI_CONTENT_SPECIAL_USERDEFINED2 L1L2MERGE( _SPECIAL, 0xd )
171 #define DVBPSI_CONTENT_SPECIAL_USERDEFINED3 L1L2MERGE( _SPECIAL, 0xe )
172 #define DVBPSI_CONTENT_SPECIAL_USERDEFINED4 L1L2MERGE( _SPECIAL, 0xf )
174 /*****************************************************************************
175  * dvbpsi_content_t
176  *****************************************************************************/
177 
188 typedef struct dvbpsi_content_s
189 {
190  uint8_t i_type;
191  uint8_t i_user_byte;
194 
199 #define DVBPSI_CONTENT_DR_MAX 64
200 
201 /*****************************************************************************
202  * dvbpsi_content_dr_t
203  *****************************************************************************/
215 typedef struct dvbpsi_content_dr_s
216 {
221 
222 
223 /*****************************************************************************
224  * dvbpsi_DecodeContentDataDr
225  *****************************************************************************/
235  dvbpsi_descriptor_t * p_descriptor);
236 
237 
238 /*****************************************************************************
239  * dvbpsi_GenContentDataDr
240  *****************************************************************************/
252  dvbpsi_content_dr_t * p_decoded,
253  bool b_duplicate);
254 
255 
256 #ifdef __cplusplus
257 };
258 #endif
259 
260 #else
261 #error "Multiple inclusions of dr_54.h"
262 #endif