Coverage Report

Created: 2026-03-30 07:00

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/wireshark/epan/dissectors/packet-mpeg-descriptor.c
Line
Count
Source
1
/* packet-mpeg-descriptor.c
2
 * Routines for MPEG2 (ISO/ISO 13818-1 and co) descriptors
3
 * Copyright 2012, Guy Martin <gmsoft@tuxicoman.be>
4
 *
5
 * Wireshark - Network traffic analyzer
6
 * By Gerald Combs <gerald@wireshark.org>
7
 * Copyright 1998 Gerald Combs
8
 *
9
 * SPDX-License-Identifier: GPL-2.0-or-later
10
 */
11
12
#include "config.h"
13
14
#include <epan/packet.h>
15
#include <epan/dvb_chartbl.h>
16
#include <epan/tfs.h>
17
#include <epan/unit_strings.h>
18
19
#include <wsutil/array.h>
20
#include "packet-mpeg-sect.h"
21
#include "packet-mpeg-descriptor.h"
22
23
void proto_register_mpeg_descriptor(void);
24
25
static int proto_mpeg_descriptor;
26
static int hf_mpeg_descriptor_tag;
27
static int hf_mpeg_descriptor_length;
28
static int hf_mpeg_descriptor_data;
29
30
static int ett_mpeg_descriptor;
31
32
static dissector_table_t iso_ext_tag_table;
33
34
static const value_string mpeg_descriptor_tag_vals[] = {
35
    /* From ISO/IEC 13818-1 */
36
    { 0x00, "Reserved" },
37
    { 0x01, "Reserved" },
38
    { 0x02, "Video Stream Descriptor" },
39
    { 0x03, "Audio Stream Descriptor" },
40
    { 0x04, "Hierarchy Descriptor" },
41
    { 0x05, "Registration Descriptor" },
42
    { 0x06, "Data Stream Alignment Descriptor" },
43
    { 0x07, "Target Background Grid Descriptor" },
44
    { 0x08, "Video Window Descriptor" },
45
    { 0x09, "CA Descriptor" },
46
    { 0x0A, "ISO 639 Language Descriptor" },
47
    { 0x0B, "System Clock Descriptor" },
48
    { 0x0C, "Multiplex Buffer Utilization Descriptor" },
49
    { 0x0D, "Copyright Descriptor" },
50
    { 0x0E, "Maximum Bitrate Descriptor" },
51
    { 0x0F, "Private Data Indicator Descriptor" },
52
    { 0x10, "Smoothing Buffer Descriptor" },
53
    { 0x11, "STD Descriptor" },
54
    { 0x12, "IBP Descriptor" },
55
56
    /* From ETSI TR 101 202 */
57
    { 0x13, "Carousel Identifier Descriptor" },
58
    { 0x14, "Association Tag Descriptor" },
59
    { 0x15, "Deferred Association Tag Descriptor" },
60
61
    /* From ISO/IEC 13818-1 */
62
    { 0x1B, "MPEG 4 Video Descriptor" },
63
    { 0x1C, "MPEG 4 Audio Descriptor" },
64
    { 0x1D, "IOD Descriptor" },
65
    { 0x1E, "SL Descriptor" },
66
    { 0x1F, "FMC Descriptor" },
67
    { 0x20, "External ES ID Descriptor" },
68
    { 0x21, "MuxCode Descriptor" },
69
    { 0x22, "FmxBufferSize Descriptor" },
70
    { 0x23, "MultiplexBuffer Descriptor" },
71
    { 0x24, "Content Labeling Descriptor" },
72
    { 0x25, "Metadata Pointer Descriptor" },
73
    { 0x26, "Metadata Descriptor" },
74
    { 0x27, "Metadata STD Descriptor" },
75
    { 0x28, "AVC Video Descriptor" },
76
    { 0x29, "IPMP Descriptor" },
77
    { 0x2A, "AVC Timing and HRD Descriptor" },
78
    { 0x2B, "MPEG2 AAC Descriptor" },
79
    { 0x2C, "FlexMuxTiming Descriptor" },
80
    { 0x3F, "Extension Descriptor (ISO)" },
81
82
    /* From ETSI EN 300 468 */
83
    { 0x40, "Network Name Descriptor" },
84
    { 0x41, "Service List Descriptor" },
85
    { 0x42, "Stuffing Descriptor" },
86
    { 0x43, "Satellite Delivery System Descriptor" },
87
    { 0x44, "Cable Delivery System Descriptor" },
88
    { 0x45, "VBI Data Descriptor" },
89
    { 0x46, "VBI Teletext Descriptor" },
90
    { 0x47, "Bouquet Name Descriptor" },
91
    { 0x48, "Service Descriptor" },
92
    { 0x49, "Country Availability Descriptor" },
93
    { 0x4A, "Linkage Descriptor" },
94
    { 0x4B, "NVOD Reference Descriptor" },
95
    { 0x4C, "Time Shifted Service Descriptor" },
96
    { 0x4D, "Short Event Descriptor" },
97
    { 0x4E, "Extended Event Descriptor" },
98
    { 0x4F, "Time Shifted Event Descriptor" },
99
    { 0x50, "Component Descriptor" },
100
    { 0x51, "Mosaic Descriptor" },
101
    { 0x52, "Stream Identifier Descriptor" },
102
    { 0x53, "CA Identifier Descriptor" },
103
    { 0x54, "Content Descriptor" },
104
    { 0x55, "Parent Rating Descriptor" },
105
    { 0x56, "Teletext Descriptor" },
106
    { 0x57, "Telephone Descriptor" },
107
    { 0x58, "Local Time Offset Descriptor" },
108
    { 0x59, "Subtitling Descriptor" },
109
    { 0x5A, "Terrestrial Delivery System Descriptor" },
110
    { 0x5B, "Multilingual Network Name Descriptor" },
111
    { 0x5C, "Multilingual Bouquet Name Descriptor" },
112
    { 0x5D, "Multilingual Service Name Descriptor" },
113
    { 0x5E, "Multilingual Component Descriptor" },
114
    { 0x5F, "Private Data Specifier Descriptor" },
115
    { 0x60, "Service Move Descriptor" },
116
    { 0x61, "Short Smoothing Buffer Descriptor" },
117
    { 0x62, "Frequency List Descriptor" },
118
    { 0x63, "Partial Transport Stream Descriptor" },
119
    { 0x64, "Data Broadcast Descriptor" },
120
    { 0x65, "Scrambling Descriptor" },
121
    { 0x66, "Data Broadcast ID Descriptor" },
122
    { 0x67, "Transport Stream Descriptor" },
123
    { 0x68, "DSNG Descriptor" },
124
    { 0x69, "PDC Descriptor" },
125
    { 0x6A, "AC-3 Descriptor" },
126
    { 0x6B, "Ancillary Data Descriptor" },
127
    { 0x6C, "Cell List Descriptor" },
128
    { 0x6D, "Cell Frequency Link Descriptor" },
129
    { 0x6E, "Announcement Support Descriptor" },
130
    { 0x6F, "Application Signalling Descriptor" },
131
    { 0x70, "Adaptation Field Data Descriptor" },
132
    /* SID (0x71) from ETSI TS 102 812 */
133
    { 0x71, "Service Identifier Descriptor" },
134
    { 0x72, "Service Availability Descriptor" },
135
    /* 0x73...0x76 from ETSI TS 102 323 */
136
    { 0x73, "Default Authority Descriptor" },
137
    { 0x74, "Related Content Descriptor" },
138
    { 0x75, "TVA ID Descriptor" },
139
    { 0x76, "Content Identifier Descriptor" },
140
    { 0x77, "Time Slice FEC Identifier Descriptor" },
141
    { 0x78, "ECM Repetition Rate Descriptor" },
142
    { 0x79, "S2 Satellite Delivery System Descriptor" },
143
    { 0x7A, "Enhanced AC-3 Descriptor" },
144
    { 0x7B, "DTS Descriptor" },
145
    { 0x7C, "AAC Descriptor" },
146
    /* 0x7D from ETSI TS 102 727 */
147
    { 0x7D, "XAIT Content Location Descriptor" },
148
    { 0x7E, "FTA Content Management Descriptor" },
149
    /* 0x7F from ETSI EN 300 468 */
150
    { 0x7F, "Extension Descriptor (ETSI)" },
151
152
    /* From ATSC A/52 */
153
    { 0x81, "ATSC A/52 AC-3 Audio Descriptor" },
154
155
    /* From Nordig Unified Requirements */
156
    { 0x83, "NorDig Logical Channel Descriptor v1" },
157
    { 0x87, "NorDig Logical Channel Descriptor v2" },
158
159
    /* From ETSI EN 301 790 */
160
    { 0xA0, "Network Layer Info Descriptor" },
161
    { 0xA1, "Correction Message Descriptor" },
162
    { 0xA2, "Logon Initialize Descriptor" },
163
    { 0xA3, "ACQ Assign Descriptor" },
164
    { 0xA4, "SYNC Assign Descriptor" },
165
    { 0xA5, "Encrypted Logon ID Descriptor" },
166
    { 0xA6, "Echo Value Descriptor" },
167
    { 0xA7, "RCS Content Descriptor" },
168
    { 0xA8, "Satellite Forward Link Descriptor" },
169
    { 0xA9, "Satellite Return Link Descriptor" },
170
    { 0xAA, "Table Update Descriptor" },
171
    { 0xAB, "Contention Control Descriptor" },
172
    { 0xAC, "Correction Control Descriptor" },
173
    { 0xAD, "Forward Interaction Path Descriptor" },
174
    { 0xAE, "Return Interaction Path Descriptor" },
175
    { 0xAf, "Connection Control Descriptor" },
176
    { 0xB0, "Mobility Control Descriptor" },
177
    { 0xB1, "Correction Message Extension Descriptor" },
178
    { 0xB2, "Return Transmission Modes Descriptor" },
179
    { 0xB3, "Mesh Logon Initialize Descriptor" },
180
    { 0xB5, "Implementation Type Descriptor" },
181
    { 0xB6, "LL FEC Identifier Descriptor" },
182
183
    { 0x00, NULL}
184
};
185
static value_string_ext mpeg_descriptor_tag_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descriptor_tag_vals);
186
187
/* 0x02 Video Stream Descriptor */
188
static int hf_mpeg_descr_video_stream_multiple_frame_rate_flag;
189
static int hf_mpeg_descr_video_stream_frame_rate_code;
190
static int hf_mpeg_descr_video_stream_mpeg1_only_flag;
191
static int hf_mpeg_descr_video_stream_constrained_parameter_flag;
192
static int hf_mpeg_descr_video_stream_still_picture_flag;
193
static int hf_mpeg_descr_video_stream_profile_and_level_indication;
194
static int hf_mpeg_descr_video_stream_chroma_format;
195
static int hf_mpeg_descr_video_stream_frame_rate_extension_flag;
196
static int hf_mpeg_descr_video_stream_reserved;
197
198
14
#define MPEG_DESCR_VIDEO_STREAM_MULTIPLE_FRAME_RATE_FLAG_MASK   0x80
199
14
#define MPEG_DESCR_VIDEO_STREAM_FRAME_RATE_CODE_MASK            0x78
200
95
#define MPEG_DESCR_VIDEO_STREAM_MPEG1_ONLY_FLAG_MASK            0x04
201
14
#define MPEG_DESCR_VIDEO_STREAM_CONSTRAINED_PARAMETER_FLAG_MASK 0x02
202
14
#define MPEG_DESCR_VIDEO_STREAM_STILL_PICTURE_FLAG_MASK         0x01
203
#define MPEG_DESCR_VIDEO_STREAM_CHROMA_FORMAT_MASK              0xC0
204
14
#define MPEG_DESCR_VIDEO_STREAM_FRAME_RATE_EXTENSION_FLAG_MASK  0x20
205
14
#define MPEG_DESCR_VIDEO_STREAM_RESERVED_MASK                   0x1F
206
207
static const value_string mpeg_descr_video_stream_multiple_frame_rate_flag_vals[] = {
208
    { 0x00, "Single frame rate present" },
209
    { 0x01, "Multiple frame rate present" },
210
211
    { 0x00, NULL }
212
};
213
214
static void
215
proto_mpeg_descriptor_dissect_video_stream(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
216
81
{
217
218
81
    uint8_t mpeg1_only_flag;
219
220
81
    mpeg1_only_flag = tvb_get_uint8(tvb, offset) & MPEG_DESCR_VIDEO_STREAM_MPEG1_ONLY_FLAG_MASK;
221
81
    proto_tree_add_item(tree, hf_mpeg_descr_video_stream_multiple_frame_rate_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
222
81
    proto_tree_add_item(tree, hf_mpeg_descr_video_stream_frame_rate_code, tvb, offset, 1, ENC_BIG_ENDIAN);
223
81
    proto_tree_add_item(tree, hf_mpeg_descr_video_stream_mpeg1_only_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
224
81
    proto_tree_add_item(tree, hf_mpeg_descr_video_stream_constrained_parameter_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
225
81
    proto_tree_add_item(tree, hf_mpeg_descr_video_stream_still_picture_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
226
227
81
    offset += 1;
228
229
81
    if (mpeg1_only_flag == 0) {
230
231
80
        proto_tree_add_item(tree, hf_mpeg_descr_video_stream_profile_and_level_indication, tvb, offset, 1, ENC_BIG_ENDIAN);
232
80
        offset += 1;
233
234
80
        proto_tree_add_item(tree, hf_mpeg_descr_video_stream_chroma_format, tvb, offset, 1, ENC_BIG_ENDIAN);
235
80
        proto_tree_add_item(tree, hf_mpeg_descr_video_stream_frame_rate_extension_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
236
80
        proto_tree_add_item(tree, hf_mpeg_descr_video_stream_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
237
80
    }
238
81
}
239
240
/* 0x03 Audio Stream Descriptor */
241
static int hf_mpeg_descr_audio_stream_free_format_flag;
242
static int hf_mpeg_descr_audio_stream_id;
243
static int hf_mpeg_descr_audio_stream_layer;
244
static int hf_mpeg_descr_audio_stream_variable_rate_audio_indicator;
245
static int hf_mpeg_descr_audio_stream_reserved;
246
247
14
#define MPEG_DESCR_AUDIO_STREAM_FREE_FORMAT_FLAG_MASK                   0x80
248
14
#define MPEG_DESCR_AUDIO_STREAM_ID_MASK                                 0x40
249
14
#define MPEG_DESCR_AUDIO_STREAM_LAYER_MASK                              0x30
250
14
#define MPEG_DESCR_AUDIO_STREAM_VARIABLE_RATE_AUDIO_INDICATOR_MASK      0x08
251
14
#define MPEG_DESCR_AUDIO_STREAM_RESERVED_MASK                           0x07
252
253
static const value_string mpeg_descr_audio_stream_free_format_flag_vals[] = {
254
    { 0x00, "bitrate_index is not 0" },
255
    { 0x01, "One or more audio frame has bitrate_index = 0" },
256
257
    { 0x00, NULL }
258
};
259
260
static const value_string mpeg_descr_audio_stream_id_vals[] = {
261
    { 0x00, "ID not set to 1 in all the frames" },
262
    { 0x01, "ID set to 1 in all the frames" },
263
264
    { 0x00, NULL }
265
};
266
267
static const value_string mpeg_descr_audio_stream_variable_rate_audio_indicator_vals[] = {
268
    { 0x00, "Constant bitrate" },
269
    { 0x01, "Variable bitrate" },
270
271
    { 0x00, NULL }
272
273
};
274
275
static void
276
proto_mpeg_descriptor_dissect_audio_stream(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
277
15
{
278
15
    proto_tree_add_item(tree, hf_mpeg_descr_audio_stream_free_format_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
279
15
    proto_tree_add_item(tree, hf_mpeg_descr_audio_stream_id, tvb, offset, 1, ENC_BIG_ENDIAN);
280
15
    proto_tree_add_item(tree, hf_mpeg_descr_audio_stream_layer, tvb, offset, 1, ENC_BIG_ENDIAN);
281
15
    proto_tree_add_item(tree, hf_mpeg_descr_audio_stream_variable_rate_audio_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
282
15
    proto_tree_add_item(tree, hf_mpeg_descr_audio_stream_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
283
15
}
284
285
/* 0x05 Registration Descriptor */
286
287
static const value_string mpeg_descr_registration_reg_form_vals[] = {
288
    { 0x41432D33u, "AC-3 - Advanced Television Systems Committee" },
289
    { 0x41444652u, "ADFR - SNPTV" },
290
    { 0x414d434eu, "AMCN - AMC Networks Inc." },
291
    { 0x41525253u, "ARRS - Arris Group, Inc." },
292
    { 0x41563031u, "AV01 - Alliance for Open Media" },
293
    { 0x41565341u, "AVSA - Audio Video Coding Standard Working Group of China" },
294
    { 0x41565356u, "AVSV - Audio Video Coding Standard Working Group of China" },
295
    { 0x42444330u, "BDC0 - Broadcast Data Corporation" },
296
    { 0x42535344u, "BSSD - Society of Motion Picture and Television Engineers" },
297
    { 0x4341504fu, "CAPO - SMPTE" },
298
    { 0x43554549u, "CUEI - Society of Cable Telecommunications Engineers" },
299
    { 0x44444544u, "DDED - LGEUS" },
300
    { 0x44495343u, "DISC - DISCOVERY COMMUNICATIONS, LLC." },
301
    { 0x44495348u, "DISH - EchoStar Communications Corporation" },
302
    { 0x646d6174u, "dmat - Dolby Laboratories, Inc." },
303
    { 0x44524131u, "DRA1 - Digital Rise" },
304
    { 0x64726163u, "drac - British Broadcasting Corporation" },
305
    { 0x44544731u, "DTG1 - Digital TV Group" },
306
    { 0x44545331u, "DTS1 - DTS Inc." },
307
    { 0x44545332u, "DTS2 - DTS Inc." },
308
    { 0x44545333u, "DTS3 - DTS Inc." },
309
    { 0x44545649u, "DTVI - DTV Innovations" },
310
    { 0x44564446u, "DVDF - DVD Format/Logo Licensing Corporation" },
311
    { 0x45414333u, "EAC3 - Dolby Laboratories, Inc." },
312
    { 0x45425030u, "EBP0 - Cable Television Laboratories, Inc." },
313
    { 0x45425031u, "EBP1 - Cable Television Laboratories, Inc." },
314
    { 0x45425032u, "EBP2 - Cable Television Laboratories, Inc." },
315
    { 0x45425033u, "EBP3 - Cable Television Laboratories, Inc." },
316
    { 0x45425034u, "EBP4 - Cable Television Laboratories, Inc." },
317
    { 0x45425035u, "EBP5 - Cable Television Laboratories, Inc." },
318
    { 0x45425036u, "EBP6 - Cable Television Laboratories, Inc." },
319
    { 0x45425037u, "EBP7 - Cable Television Laboratories, Inc." },
320
    { 0x45425038u, "EBP8 - Cable Television Laboratories, Inc." },
321
    { 0x45425039u, "EBP9 - Cable Television Laboratories, Inc." },
322
    { 0x45545631u, "ETV1 - Cable Television Laboratories, Inc." },
323
    { 0x464f5843u, "FOXC - FOX Corporation" },
324
    { 0x47413934u, "GA94 - Advanced Television Systems Committee" },
325
    { 0x47574b53u, "GWKS - GuideWorks" },
326
    { 0x48444d56u, "HDMV - Sony Corporation" },
327
    { 0x48444d58u, "HDMX - Matsushita Electric Industrial Co. Ltd" },
328
    { 0x48445052u, "HDPR - Network Business Group" },
329
    { 0x484c4954u, "HLIT - Harmonic Inc." },
330
    { 0x49443320u, "ID3  - Organization Apple, Inc." },
331
    { 0x4b4c5641u, "KLVA - Society of Motion Picture and Television Engineers" },
332
    { 0x4c41534cu, "LASL - LaSalle Media LLC" },
333
    { 0x4c495053u, "LIPS - Society of Motion Picture and Television Engineers" },
334
    { 0x4c552d41u, "LU-A - Harris Corporation" },
335
    { 0x6d6c7061u, "mlpa - Dolby Laboratories, Inc." },
336
    { 0x4d54524du, "MTRM - Victor Company of Japan, Limited" },
337
    { 0x4e424355u, "NBCU - NBC Universal" },
338
    { 0x4e4d5231u, "NMR1 - Nielsen Media Research" },
339
    { 0x4e504f31u, "NPO1 - Nederlandse Publieke Omroep (NPO, Dutch Public Broadcasting)" },
340
    { 0x4e575456u, "NWTV - Digital TV Information Research Group" },
341
    { 0x4f4d5643u, "OMVC - Open Mobile Video Coalition (OMVC)" },
342
    { 0x4f707573u, "Opus - Mozilla" },
343
    { 0x50415558u, "PAUX - Philips DVS" },
344
    { 0x504d5346u, "PMSF - Sony Corporation" },
345
    { 0x50524d43u, "PRMC - Philips DVS" },
346
    { 0x50585341u, "PXSA - Proximus" },
347
    { 0x52544c4eu, "RTLN - RTL Nederland" },
348
    { 0x53425342u, "SBSB - SBS Broadcasting" },
349
    { 0x53435445u, "SCTE - Society of Cable Telecommunications Engineers" },
350
    { 0x53454e31u, "SEN1 - Sencore" },
351
    { 0x53455346u, "SESF - Sony Corporation" },
352
    { 0x534f5049u, "SOPI - Sony Corporation" },
353
    { 0x53504c43u, "SPLC - Society of Motion Picture and Television Engineers" },
354
    { 0x53564d44u, "SVMD - Society of Motion Picture and Television Engineers" },
355
    { 0x53594e43u, "SYNC - Syncbak, Inc." },
356
    { 0x535a4d49u, "SZMI - Building B, Inc" },
357
    { 0x54524956u, "TRIV - Triveni Digital" },
358
    { 0x54534256u, "TSBV - Toshiba Corporation Digital Media Network Company" },
359
    { 0x54534856u, "TSHV - Sony Corporation" },
360
    { 0x54534d56u, "TSMV - Sony Corporation" },
361
    { 0x54544130u, "TTA0 - Telecommunication Technology Association(TTA)" },
362
    { 0x54564731u, "TVG1 - Rovi Corporation" },
363
    { 0x54564732u, "TVG2 - Rovi Corporation" },
364
    { 0x54564733u, "TVG3 - Rovi Corporation" },
365
    { 0x554c4531u, "ULE1 - University of Aberdeen (on behalf of the Internet Engineering Task Force, IETF)" },
366
    { 0x554c4930u, "ULI0 - Update Logic, Inc." },
367
    { 0x56432d31u, "VC-1 - Society of Motion Picture and Television Engineers" },
368
    { 0x56432d34u, "VC-4 - Society of Motion Picture and Television Engineers" },
369
    { 0x564d4e55u, "VMNU - Viacom" },
370
    { 0x584d505fu, "XMP_ - Adobe Systems" },
371
372
    { 0x55533030u, "US00 - US Government Registration 00" },
373
    { 0x55533031u, "US01 - US Government Registration 01" },
374
    { 0x55533032u, "US02 - US Government Registration 02" },
375
    { 0x55533033u, "US03 - US Government Registration 03" },
376
    { 0x55533034u, "US04 - US Government Registration 04" },
377
    { 0x55533035u, "US05 - US Government Registration 05" },
378
    { 0x55533036u, "US06 - US Government Registration 06" },
379
    { 0x55533037u, "US07 - US Government Registration 07" },
380
    { 0x55533038u, "US08 - US Government Registration 08" },
381
    { 0x55533039u, "US09 - US Government Registration 09" },
382
383
    { 0x55533130u, "US10 - US Government Registration 10" },
384
    { 0x55533131u, "US11 - US Government Registration 11" },
385
    { 0x55533132u, "US12 - US Government Registration 12" },
386
    { 0x55533133u, "US13 - US Government Registration 13" },
387
    { 0x55533134u, "US14 - US Government Registration 14" },
388
    { 0x55533135u, "US15 - US Government Registration 15" },
389
    { 0x55533136u, "US16 - US Government Registration 16" },
390
    { 0x55533137u, "US17 - US Government Registration 17" },
391
    { 0x55533138u, "US18 - US Government Registration 18" },
392
    { 0x55533139u, "US19 - US Government Registration 19" },
393
394
    { 0x55533230u, "US20 - US Government Registration 20" },
395
    { 0x55533231u, "US21 - US Government Registration 21" },
396
    { 0x55533232u, "US22 - US Government Registration 22" },
397
    { 0x55533233u, "US23 - US Government Registration 23" },
398
    { 0x55533234u, "US24 - US Government Registration 24" },
399
    { 0x55533235u, "US25 - US Government Registration 25" },
400
    { 0x55533236u, "US26 - US Government Registration 26" },
401
    { 0x55533237u, "US27 - US Government Registration 27" },
402
    { 0x55533238u, "US28 - US Government Registration 28" },
403
    { 0x55533239u, "US29 - US Government Registration 29" },
404
405
    { 0x55533330u, "US30 - US Government Registration 30" },
406
    { 0x55533331u, "US31 - US Government Registration 31" },
407
    { 0x55533332u, "US32 - US Government Registration 32" },
408
    { 0x55533333u, "US33 - US Government Registration 33" },
409
    { 0x55533334u, "US34 - US Government Registration 34" },
410
    { 0x55533335u, "US35 - US Government Registration 35" },
411
    { 0x55533336u, "US36 - US Government Registration 36" },
412
    { 0x55533337u, "US37 - US Government Registration 37" },
413
    { 0x55533338u, "US38 - US Government Registration 38" },
414
    { 0x55533339u, "US39 - US Government Registration 39" },
415
416
    { 0x55533430u, "US40 - US Government Registration 40" },
417
    { 0x55533431u, "US41 - US Government Registration 41" },
418
    { 0x55533432u, "US42 - US Government Registration 42" },
419
    { 0x55533433u, "US43 - US Government Registration 43" },
420
    { 0x55533434u, "US44 - US Government Registration 44" },
421
    { 0x55533435u, "US45 - US Government Registration 45" },
422
    { 0x55533436u, "US46 - US Government Registration 46" },
423
    { 0x55533437u, "US47 - US Government Registration 47" },
424
    { 0x55533438u, "US48 - US Government Registration 48" },
425
    { 0x55533439u, "US49 - US Government Registration 49" },
426
427
    { 0x55533530u, "US50 - US Government Registration 50" },
428
    { 0x55533531u, "US51 - US Government Registration 51" },
429
    { 0x55533532u, "US52 - US Government Registration 52" },
430
    { 0x55533533u, "US53 - US Government Registration 53" },
431
    { 0x55533534u, "US54 - US Government Registration 54" },
432
    { 0x55533535u, "US55 - US Government Registration 55" },
433
    { 0x55533536u, "US56 - US Government Registration 56" },
434
    { 0x55533537u, "US57 - US Government Registration 57" },
435
    { 0x55533538u, "US58 - US Government Registration 58" },
436
    { 0x55533539u, "US59 - US Government Registration 59" },
437
438
    { 0x55533630u, "US60 - US Government Registration 60" },
439
    { 0x55533631u, "US61 - US Government Registration 61" },
440
    { 0x55533632u, "US62 - US Government Registration 62" },
441
    { 0x55533633u, "US63 - US Government Registration 63" },
442
    { 0x55533634u, "US64 - US Government Registration 64" },
443
    { 0x55533635u, "US65 - US Government Registration 65" },
444
    { 0x55533636u, "US66 - US Government Registration 66" },
445
    { 0x55533637u, "US67 - US Government Registration 67" },
446
    { 0x55533638u, "US68 - US Government Registration 68" },
447
    { 0x55533639u, "US69 - US Government Registration 69" },
448
449
    { 0x55533730u, "US70 - US Government Registration 70" },
450
    { 0x55533731u, "US71 - US Government Registration 71" },
451
    { 0x55533732u, "US72 - US Government Registration 72" },
452
    { 0x55533733u, "US73 - US Government Registration 73" },
453
    { 0x55533734u, "US74 - US Government Registration 74" },
454
    { 0x55533735u, "US75 - US Government Registration 75" },
455
    { 0x55533736u, "US76 - US Government Registration 76" },
456
    { 0x55533737u, "US77 - US Government Registration 77" },
457
    { 0x55533738u, "US78 - US Government Registration 78" },
458
    { 0x55533739u, "US79 - US Government Registration 79" },
459
460
    { 0x55533830u, "US80 - US Government Registration 80" },
461
    { 0x55533831u, "US81 - US Government Registration 81" },
462
    { 0x55533832u, "US82 - US Government Registration 82" },
463
    { 0x55533833u, "US83 - US Government Registration 83" },
464
    { 0x55533834u, "US84 - US Government Registration 84" },
465
    { 0x55533835u, "US85 - US Government Registration 85" },
466
    { 0x55533836u, "US86 - US Government Registration 86" },
467
    { 0x55533837u, "US87 - US Government Registration 87" },
468
    { 0x55533838u, "US88 - US Government Registration 88" },
469
    { 0x55533839u, "US89 - US Government Registration 89" },
470
471
    { 0x55533930u, "US90 - US Government Registration 90" },
472
    { 0x55533931u, "US91 - US Government Registration 91" },
473
    { 0x55533932u, "US92 - US Government Registration 92" },
474
    { 0x55533933u, "US93 - US Government Registration 93" },
475
    { 0x55533934u, "US94 - US Government Registration 94" },
476
    { 0x55533935u, "US95 - US Government Registration 95" },
477
    { 0x55533936u, "US96 - US Government Registration 96" },
478
    { 0x55533937u, "US97 - US Government Registration 97" },
479
    { 0x55533938u, "US98 - US Government Registration 98" },
480
    { 0x55533939u, "US99 - US Government Registration 99" },
481
482
    { 0x00, NULL }
483
};
484
485
static int hf_mpeg_descr_reg_form_id;
486
static int hf_mpeg_descr_reg_add_id_inf;
487
488
static void
489
proto_mpeg_descriptor_dissect_registration(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
490
3
{
491
3
    unsigned  offset_start;
492
493
3
    offset_start = offset;
494
3
    proto_tree_add_item(tree, hf_mpeg_descr_reg_form_id, tvb, offset, 4, ENC_BIG_ENDIAN);
495
3
    offset += 4;
496
497
100
    while (offset-offset_start<len) {
498
97
        proto_tree_add_item(tree, hf_mpeg_descr_reg_add_id_inf, tvb, offset, 1, ENC_BIG_ENDIAN);
499
97
        offset++;
500
97
    }
501
3
}
502
503
/* 0x06 Data Stream Alignment Descriptor */
504
static int hf_mpeg_descr_data_stream_alignment;
505
506
static const value_string mpeg_descr_data_stream_alignment_vals[] = {
507
    { 0x00, "Reserved" },
508
    { 0x01, "Slice, or video access unit" },
509
    { 0x02, "Video access unit" },
510
    { 0x03, "GOP, or SEQ" },
511
    { 0x04, "SEQ" },
512
513
    { 0x00, NULL }
514
};
515
516
static void
517
proto_mpeg_descriptor_dissect_data_stream_alignment(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
518
0
{
519
0
    proto_tree_add_item(tree, hf_mpeg_descr_data_stream_alignment, tvb, offset, 1, ENC_BIG_ENDIAN);
520
0
}
521
522
/* 0x09 CA Descriptor */
523
static int hf_mpeg_descr_ca_system_id;
524
static int hf_mpeg_descr_ca_reserved;
525
static int hf_mpeg_descr_ca_pid;
526
static int hf_mpeg_descr_ca_private;
527
528
14
#define MPEG_DESCR_CA_RESERVED_MASK 0xE000
529
14
#define MPEG_DESCR_CA_PID_MASK      0x1FFF
530
531
static void
532
proto_mpeg_descriptor_dissect_ca(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
533
2
{
534
2
    proto_tree_add_item(tree, hf_mpeg_descr_ca_system_id, tvb, offset, 2, ENC_BIG_ENDIAN);
535
2
    offset += 2;
536
537
2
    proto_tree_add_item(tree, hf_mpeg_descr_ca_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
538
2
    proto_tree_add_item(tree, hf_mpeg_descr_ca_pid, tvb, offset, 2, ENC_BIG_ENDIAN);
539
2
    offset += 2;
540
541
2
    if (len > 4)
542
1
        proto_tree_add_item(tree, hf_mpeg_descr_ca_private, tvb, offset, len - 4, ENC_NA);
543
2
}
544
545
546
/* 0x0A ISO 639 Language Descriptor */
547
static int hf_mpeg_descr_iso639_lang;
548
static int hf_mpeg_descr_iso639_type;
549
550
static const value_string mpeg_descr_iso639_type_vals[] = {
551
    { 0x00, "Undefined" },
552
    { 0x01, "Clean Effects" },
553
    { 0x02, "Hearing Impaired" },
554
    { 0x03, "Visual Impaired Commentary" },
555
556
    { 0x00, NULL }
557
};
558
559
static void
560
proto_mpeg_descriptor_dissect_iso639(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
561
7
{
562
7
    if (len > 1)
563
7
        proto_tree_add_item(tree, hf_mpeg_descr_iso639_lang, tvb, offset, len - 1, ENC_ASCII);
564
7
    offset += len - 1;
565
7
    proto_tree_add_item(tree, hf_mpeg_descr_iso639_type, tvb, offset, 1, ENC_BIG_ENDIAN);
566
7
}
567
568
/* 0x0B System Clock Descriptor */
569
static int hf_mpeg_descr_system_clock_external_clock_reference_indicator;
570
static int hf_mpeg_descr_system_clock_reserved1;
571
static int hf_mpeg_descr_system_clock_accuracy_integer;
572
static int hf_mpeg_descr_system_clock_accuracy_exponent;
573
static int hf_mpeg_descr_system_clock_reserved2;
574
575
14
#define MPEG_DESCR_SYSTEM_CLOCK_EXTERNAL_CLOCK_REFERENCE_INDICATOR_MASK 0x80
576
14
#define MPEG_DESCR_SYSTEM_CLOCK_RESERVED1_MASK                          0x40
577
14
#define MPEG_DESCR_SYSTEM_CLOCK_ACCURACY_INTEGER_MASK                   0x3F
578
14
#define MPEG_DESCR_SYSTEM_CLOCK_ACCURACY_EXPONENT_MASK                  0xE0
579
14
#define MPEG_DESCR_SYSTEM_CLOCK_RESERVED2_MASK                          0x1F
580
581
static void
582
proto_mpeg_descriptor_dissect_system_clock(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
583
1
{
584
1
    proto_tree_add_item(tree, hf_mpeg_descr_system_clock_external_clock_reference_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
585
1
    proto_tree_add_item(tree, hf_mpeg_descr_system_clock_reserved1, tvb, offset, 1, ENC_BIG_ENDIAN);
586
1
    proto_tree_add_item(tree, hf_mpeg_descr_system_clock_accuracy_integer, tvb, offset, 1, ENC_BIG_ENDIAN);
587
1
    offset += 1;
588
589
1
    proto_tree_add_item(tree, hf_mpeg_descr_system_clock_accuracy_exponent, tvb, offset, 1, ENC_BIG_ENDIAN);
590
1
    proto_tree_add_item(tree, hf_mpeg_descr_system_clock_reserved2, tvb, offset, 1, ENC_BIG_ENDIAN);
591
1
}
592
593
/* 0x0E Maximum Bitrate Descriptor */
594
static int hf_mpeg_descr_max_bitrate_reserved;
595
static int hf_mpeg_descr_max_bitrate;
596
597
14
#define MPEG_DESCR_MAX_BITRATE_RESERVED_MASK    0xC00000
598
16
#define MPEG_DESCR_MAX_BITRATE_MASK     0x3FFFFF
599
600
static void
601
proto_mpeg_descriptor_dissect_max_bitrate(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
602
2
{
603
2
    proto_item *rate_item;
604
605
2
    uint32_t rate;
606
607
2
    proto_tree_add_item(tree, hf_mpeg_descr_max_bitrate_reserved, tvb, offset, 3, ENC_BIG_ENDIAN);
608
2
    rate = tvb_get_ntoh24(tvb, offset) & MPEG_DESCR_MAX_BITRATE_MASK;
609
2
    rate_item = proto_tree_add_item(tree, hf_mpeg_descr_max_bitrate, tvb, offset, 3, ENC_BIG_ENDIAN);
610
2
    proto_item_append_text(rate_item, " (%u bytes/sec)", rate * 50);
611
2
}
612
613
/* 0x10 Smoothing Buffer Descriptor */
614
static int hf_mpeg_descr_smoothing_buffer_reserved1;
615
static int hf_mpeg_descr_smoothing_buffer_leak_rate;
616
static int hf_mpeg_descr_smoothing_buffer_reserved2;
617
static int hf_mpeg_descr_smoothing_buffer_size;
618
619
14
#define MPEG_DESCR_SMOOTHING_BUFFER_RESERVED1_MASK  0xC00000
620
31
#define MPEG_DESCR_SMOOTHING_BUFFER_LEAK_RATE_MASK  0x3FFFFF
621
14
#define MPEG_DESCR_SMOOTHING_BUFFER_RESERVED2_MASK  0xC00000
622
14
#define MPEG_DESCR_SMOOTHING_BUFFER_SIZE_MASK       0x3FFFFF
623
624
static void
625
proto_mpeg_descriptor_dissect_smoothing_buffer(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
626
17
{
627
17
    proto_item *leak_rate_item;
628
629
17
    uint32_t leak_rate;
630
631
17
    proto_tree_add_item(tree, hf_mpeg_descr_smoothing_buffer_reserved1, tvb, offset, 3, ENC_BIG_ENDIAN);
632
17
    leak_rate = tvb_get_ntoh24(tvb, offset) & MPEG_DESCR_SMOOTHING_BUFFER_LEAK_RATE_MASK;
633
17
    leak_rate_item = proto_tree_add_item(tree, hf_mpeg_descr_smoothing_buffer_leak_rate, tvb, offset, 3, ENC_BIG_ENDIAN);
634
17
    proto_item_append_text(leak_rate_item, " (%u bytes/sec)", leak_rate * 400 / 8);
635
17
    offset += 3;
636
637
17
    proto_tree_add_item(tree, hf_mpeg_descr_smoothing_buffer_reserved2, tvb, offset, 3, ENC_BIG_ENDIAN);
638
17
    proto_tree_add_item(tree, hf_mpeg_descr_smoothing_buffer_size, tvb, offset, 3, ENC_BIG_ENDIAN);
639
640
17
}
641
642
/* 0x11 STD Descriptor */
643
static int hf_mpeg_descr_std_reserved;
644
static int hf_mpeg_descr_std_leak_valid;
645
646
14
#define MPEG_DESCR_STD_RESERVED_MASK    0xFE
647
14
#define MPEG_DESCR_STD_LEAK_VALID_MASK  0x01
648
649
static void
650
proto_mpeg_descriptor_dissect_std(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
651
2
{
652
2
    proto_tree_add_item(tree, hf_mpeg_descr_std_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
653
2
    proto_tree_add_item(tree, hf_mpeg_descr_std_leak_valid, tvb, offset, 1, ENC_BIG_ENDIAN);
654
2
}
655
656
/* 0x13 Carousel Identifier Descriptor */
657
static int hf_mpeg_descr_carousel_identifier_id;
658
static int hf_mpeg_descr_carousel_identifier_format_id;
659
static int hf_mpeg_descr_carousel_identifier_module_version;
660
static int hf_mpeg_descr_carousel_identifier_module_id;
661
static int hf_mpeg_descr_carousel_identifier_block_size;
662
static int hf_mpeg_descr_carousel_identifier_module_size;
663
static int hf_mpeg_descr_carousel_identifier_compression_method;
664
static int hf_mpeg_descr_carousel_identifier_original_size;
665
static int hf_mpeg_descr_carousel_identifier_timeout;
666
static int hf_mpeg_descr_carousel_identifier_object_key_len;
667
static int hf_mpeg_descr_carousel_identifier_object_key_data;
668
static int hf_mpeg_descr_carousel_identifier_private;
669
670
static const value_string mpeg_descr_carousel_identifier_format_id_vals[] = {
671
    { 0x00, "No Format Specifier" },
672
    { 0x01, "Format Specifier" },
673
674
    { 0, NULL }
675
};
676
677
static void
678
proto_mpeg_descriptor_dissect_carousel_identifier(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
679
1
{
680
1
    unsigned  key_len;
681
1
    uint8_t format_id;
682
1
    unsigned  private_len = 0;
683
684
1
    proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_id, tvb, offset, 4, ENC_BIG_ENDIAN);
685
1
    offset += 4;
686
687
1
    format_id = tvb_get_uint8(tvb, offset);
688
1
    proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_format_id, tvb, offset, 1, ENC_BIG_ENDIAN);
689
1
    offset += 1;
690
691
1
    if (format_id == 0x01) {
692
0
        proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_module_version, tvb, offset, 1, ENC_BIG_ENDIAN);
693
0
        offset += 1;
694
695
0
        proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_module_id, tvb, offset, 2, ENC_BIG_ENDIAN);
696
0
        offset += 2;
697
698
0
        proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_block_size, tvb, offset, 2, ENC_BIG_ENDIAN);
699
0
        offset += 2;
700
701
0
        proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_module_size, tvb, offset, 4, ENC_BIG_ENDIAN);
702
0
        offset += 4;
703
704
0
        proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_compression_method, tvb, offset, 1, ENC_BIG_ENDIAN);
705
0
        offset += 1;
706
707
0
        proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_original_size, tvb, offset, 4, ENC_BIG_ENDIAN);
708
0
        offset += 4;
709
710
0
        proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_timeout, tvb, offset, 1, ENC_BIG_ENDIAN);
711
0
        offset += 1;
712
713
0
        key_len = tvb_get_uint8(tvb, offset);
714
0
        proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_object_key_len, tvb, offset, 1, ENC_BIG_ENDIAN);
715
0
        offset += 1;
716
717
0
        proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_object_key_data, tvb, offset, key_len, ENC_NA);
718
0
        offset += key_len;
719
720
0
        if (len > (key_len + 20))
721
0
            private_len = len - 20 - key_len;
722
723
1
    } else {
724
1
        if (len > 5)
725
1
            private_len = len - 5;
726
1
    }
727
728
1
    if (private_len)
729
1
        proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_private, tvb, offset, private_len, ENC_NA);
730
731
1
}
732
733
/* 0x14 Association Tag Descriptor */
734
static int hf_mpeg_descr_association_tag;
735
static int hf_mpeg_descr_association_tag_use;
736
static int hf_mpeg_descr_association_tag_selector_len;
737
static int hf_mpeg_descr_association_tag_transaction_id;
738
static int hf_mpeg_descr_association_tag_timeout;
739
static int hf_mpeg_descr_association_tag_selector_bytes;
740
static int hf_mpeg_descr_association_tag_private_bytes;
741
742
static void
743
proto_mpeg_descriptor_dissect_association_tag(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
744
0
{
745
0
    unsigned   end = offset + len;
746
0
    uint16_t use;
747
0
    uint8_t selector_len;
748
749
0
    proto_tree_add_item(tree, hf_mpeg_descr_association_tag, tvb, offset, 2, ENC_BIG_ENDIAN);
750
0
    offset += 2;
751
752
0
    use = tvb_get_ntohs(tvb, offset);
753
0
    proto_tree_add_item(tree, hf_mpeg_descr_association_tag_use, tvb, offset, 2, ENC_BIG_ENDIAN);
754
0
    offset += 2;
755
756
0
    selector_len = tvb_get_uint8(tvb, offset);
757
0
    proto_tree_add_item(tree, hf_mpeg_descr_association_tag_selector_len, tvb, offset, 1, ENC_BIG_ENDIAN);
758
0
    offset ++;
759
760
0
    if (use == 0x00) {
761
0
        if (selector_len != 8)
762
0
            return;
763
0
        proto_tree_add_item(tree, hf_mpeg_descr_association_tag_transaction_id, tvb, offset, 4, ENC_BIG_ENDIAN);
764
0
        offset += 4;
765
766
0
        proto_tree_add_item(tree, hf_mpeg_descr_association_tag_timeout, tvb, offset, 4, ENC_BIG_ENDIAN);
767
0
        offset += 4;
768
769
0
    } else {
770
0
        proto_tree_add_item(tree, hf_mpeg_descr_association_tag_selector_bytes, tvb, offset, selector_len, ENC_NA);
771
0
        offset += selector_len;
772
0
    }
773
774
0
    if (offset < end)
775
0
        proto_tree_add_item(tree, hf_mpeg_descr_association_tag_private_bytes, tvb, offset, end - offset, ENC_NA);
776
0
}
777
778
/* 0x28 AVC Video Descriptor */
779
static int hf_mpeg_descr_avc_vid_profile_idc;
780
static int hf_mpeg_descr_avc_vid_constraint_set0_flag;
781
static int hf_mpeg_descr_avc_vid_constraint_set1_flag;
782
static int hf_mpeg_descr_avc_vid_constraint_set2_flag;
783
static int hf_mpeg_descr_avc_vid_compatible_flags;
784
static int hf_mpeg_descr_avc_vid_level_idc;
785
static int hf_mpeg_descr_avc_vid_still_present;
786
static int hf_mpeg_descr_avc_vid_24h_picture_flag;
787
static int hf_mpeg_descr_avc_vid_reserved;
788
789
14
#define MPEG_DESCR_AVC_VID_CONSTRAINT_SET0_FLAG_MASK    0x80
790
14
#define MPEG_DESCR_AVC_VID_CONSTRAINT_SET1_FLAG_MASK    0x40
791
14
#define MPEG_DESCR_AVC_VID_CONSTRAINT_SET2_FLAG_MASK    0x20
792
14
#define MPEG_DESCR_AVC_VID_COMPATIBLE_FLAGS_MASK        0x1F
793
14
#define MPEG_DESCR_AVC_VID_STILL_PRESENT_MASK           0x80
794
14
#define MPEG_DESCR_AVC_VID_24H_PICTURE_FLAG_MASK        0x40
795
14
#define MPEG_DESCR_AVC_VID_RESERVED_MASK                0x3F
796
797
static void
798
proto_mpeg_descriptor_dissect_avc_vid(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
799
1
{
800
1
    proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_profile_idc, tvb, offset, 1, ENC_BIG_ENDIAN);
801
1
    offset += 1;
802
803
1
    proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_constraint_set0_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
804
1
    proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_constraint_set1_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
805
1
    proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_constraint_set2_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
806
1
    proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_compatible_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
807
1
    offset += 1;
808
809
1
    proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_level_idc, tvb, offset, 1, ENC_BIG_ENDIAN);
810
1
    offset += 1;
811
812
1
    proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_still_present, tvb, offset, 1, ENC_BIG_ENDIAN);
813
1
    proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_24h_picture_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
814
1
    proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
815
1
}
816
817
/* 0x40 Network Name Descriptor */
818
static int hf_mpeg_descr_network_name_encoding;
819
static int hf_mpeg_descr_network_name_descriptor;
820
821
static void
822
proto_mpeg_descriptor_dissect_network_name(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
823
3
{
824
3
    dvb_encoding_e  encoding;
825
3
    unsigned enc_len = dvb_analyze_string_charset(tvb, offset, len, &encoding);
826
3
    dvb_add_chartbl(tree, hf_mpeg_descr_network_name_encoding, tvb, offset, enc_len, encoding);
827
828
3
    proto_tree_add_item(tree, hf_mpeg_descr_network_name_descriptor, tvb, offset+enc_len, len-enc_len, dvb_enc_to_item_enc(encoding));
829
3
}
830
831
832
/* 0x3F Extension Descriptor (as defined in ISO/IEC 13818-1) */
833
static int hf_mpeg_descr_iso_extension_tag_extension;
834
static int hf_mpeg_descr_iso_extension_data;
835
836
#define ISO_EXT_TAG_OBJECT_DESC_UPDATE          0x02
837
#define ISO_EXT_TAG_HEVC_TIMING_AND_HRD         0x03
838
#define ISO_EXT_TAG_AF                          0x04
839
#define ISO_EXT_TAG_HEVC_OPERATION_POINT        0x05
840
#define ISO_EXT_TAG_HEVC_HIERARCHY              0x06
841
#define ISO_EXT_TAG_GREEN                       0x07
842
#define ISO_EXT_TAG_MPEG_H_3DAUDIO              0x08
843
#define ISO_EXT_TAG_MPEG_H_3DAUDIO_CONFIG       0x09
844
#define ISO_EXT_TAG_MPEG_H_3DAUDIO_SCENE        0x0A
845
#define ISO_EXT_TAG_MPEG_H_3DAUDIO_TEXT_LABEL   0x0B
846
#define ISO_EXT_TAG_MPEG_H_3DAUDIO_MULTI_STREAM 0x0C
847
#define ISO_EXT_TAG_MPEG_H_3DAUDIO_DRC_LOUDNESS 0x0D
848
#define ISO_EXT_TAG_MPEG_H_3DAUDIO_COMMAND      0x0E
849
#define ISO_EXT_TAG_QUALITY                     0x0F
850
#define ISO_EXT_TAG_VIRTUAL_SEGMENTATION        0x10
851
#define ISO_EXT_TAG_TIMED_METADATA              0x11
852
#define ISO_EXT_TAG_HEVC_TILE_SUBSTREAM         0x12
853
#define ISO_EXT_TAG_HEVC_SUBREGION              0x13
854
#define ISO_EXT_TAG_JXS_VIDEO                   0x14
855
#define ISO_EXT_TAG_VVC_TIMING_AND_HRD          0x15
856
#define ISO_EXT_TAG_EVC_TIMING_AND_HRD          0x16
857
#define ISO_EXT_TAG_LCEVC_VIDEO                 0x17
858
#define ISO_EXT_TAG_LCEVC_LINKAGE               0x18
859
#define ISO_EXT_TAG_MEDIA_SERVICE_KIND          0x19
860
861
static const value_string mpeg_descr_iso_extension_tag_extension_vals[] = {
862
    { ISO_EXT_TAG_OBJECT_DESC_UPDATE, "Object Descriptor Update" },
863
    { ISO_EXT_TAG_HEVC_TIMING_AND_HRD, "HEVC Timing and HRD Descriptor" },
864
    { ISO_EXT_TAG_AF, "AF Extensions Descriptor" },
865
    { ISO_EXT_TAG_HEVC_OPERATION_POINT, "HEVC Operation Point Descriptor" },
866
    { ISO_EXT_TAG_HEVC_HIERARCHY, "HEVC Hierarchy Extension Descriptor" },
867
    { ISO_EXT_TAG_GREEN, "Green Extension Descriptor" },
868
    { ISO_EXT_TAG_MPEG_H_3DAUDIO, "MPEG-H 3DAudio Descriptor" },
869
    { ISO_EXT_TAG_MPEG_H_3DAUDIO_CONFIG, "MPEG-H 3DAudio Config Descriptor" },
870
    { ISO_EXT_TAG_MPEG_H_3DAUDIO_SCENE, "MPEG-H 3DAudio Scene Descriptor" },
871
    { ISO_EXT_TAG_MPEG_H_3DAUDIO_TEXT_LABEL, "MPEG-H 3DAudio Text Label Descriptor" },
872
    { ISO_EXT_TAG_MPEG_H_3DAUDIO_MULTI_STREAM, "MPEG-H 3DAudio Multi-stream Descriptor" },
873
    { ISO_EXT_TAG_MPEG_H_3DAUDIO_DRC_LOUDNESS, "MPEG-H 3DAudio DRC Loudness Descriptor" },
874
    { ISO_EXT_TAG_MPEG_H_3DAUDIO_COMMAND, "MPEG-H 3DAudio Command Descriptor" },
875
    { ISO_EXT_TAG_QUALITY, "Quality Extension Descriptor" },
876
    { ISO_EXT_TAG_VIRTUAL_SEGMENTATION, "Virtual Segmentation Descriptor" },
877
    { ISO_EXT_TAG_TIMED_METADATA, "Timed Metadata Extension Descriptor" },
878
    { ISO_EXT_TAG_HEVC_TILE_SUBSTREAM, "HEVC Tile Substream Descriptor" },
879
    { ISO_EXT_TAG_HEVC_SUBREGION, "HEVC Subregion Descriptor" },
880
    { ISO_EXT_TAG_JXS_VIDEO, "JXS Video Descriptor" },
881
    { ISO_EXT_TAG_VVC_TIMING_AND_HRD, "VVC Timing and HRD Descriptor" },
882
    { ISO_EXT_TAG_EVC_TIMING_AND_HRD, "EVC Timing and HRD Descriptor" },
883
    { ISO_EXT_TAG_LCEVC_VIDEO, "LCEVC Video Descriptor" },
884
    { ISO_EXT_TAG_LCEVC_LINKAGE, "LCEVC Linkage Descriptor" },
885
    { ISO_EXT_TAG_MEDIA_SERVICE_KIND, "Media Service Kind Descriptor" },
886
    { 0x0, NULL }
887
};
888
static value_string_ext mpeg_descr_iso_extension_tag_extension_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_iso_extension_tag_extension_vals);
889
890
static void
891
proto_mpeg_descriptor_dissect_iso_extension(tvbuff_t *tvb, packet_info* pinfo, unsigned offset, unsigned len, proto_tree *tree)
892
0
{
893
0
    unsigned  offset_start;
894
0
    unsigned  already_dissected;
895
0
    unsigned  tag_ext;
896
0
    tvbuff_t  *descr_ext;
897
898
0
    offset_start = offset;
899
900
0
    proto_tree_add_item_ret_uint(tree, hf_mpeg_descr_iso_extension_tag_extension, tvb, offset, 1, ENC_BIG_ENDIAN, &tag_ext);
901
0
    offset += 1;
902
903
0
    descr_ext = tvb_new_subset_length(tvb, offset_start, len);
904
0
    if (!dissector_try_uint(iso_ext_tag_table, tag_ext, descr_ext, pinfo, tree)) {
905
        /* No dissector available, just add the extended descriptor data. */
906
0
        already_dissected = offset - offset_start;
907
0
        if (already_dissected < len)
908
0
            proto_tree_add_item(tree, hf_mpeg_descr_iso_extension_data, tvb, offset, len - already_dissected, ENC_NA);
909
0
    }
910
0
}
911
912
/* 0x41 Service List Descriptor */
913
static int hf_mpeg_descr_service_list_id;
914
static int hf_mpeg_descr_service_list_type;
915
916
static int ett_mpeg_descriptor_service_list;
917
918
static void
919
proto_mpeg_descriptor_dissect_service_list(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
920
5
{
921
5
    unsigned   end = offset + len;
922
5
    uint16_t svc_id;
923
924
5
    proto_tree *svc_tree;
925
926
927
81
    while (offset < end) {
928
76
        svc_id = tvb_get_ntohs(tvb, offset);
929
930
76
        svc_tree = proto_tree_add_subtree_format(tree, tvb, offset, 3,
931
76
                    ett_mpeg_descriptor_service_list, NULL, "Service 0x%02x", svc_id);
932
933
76
        proto_tree_add_item(svc_tree, hf_mpeg_descr_service_list_id, tvb, offset, 2, ENC_BIG_ENDIAN);
934
76
        offset += 2;
935
936
76
        proto_tree_add_item(svc_tree, hf_mpeg_descr_service_list_type, tvb, offset, 1, ENC_BIG_ENDIAN);
937
76
        offset += 1;
938
76
    }
939
5
}
940
941
/* 0x42 Stuffing Descriptor */
942
static int hf_mpeg_descr_stuffing;
943
944
static void
945
proto_mpeg_descriptor_stuffing(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
946
14
{
947
14
    proto_tree_add_item(tree, hf_mpeg_descr_stuffing, tvb, offset, len, ENC_NA);
948
14
}
949
950
/* 0x43 Satellite Delivery System Descriptor */
951
static int hf_mpeg_descr_satellite_delivery_frequency;
952
static int hf_mpeg_descr_satellite_delivery_orbital_position;
953
static int hf_mpeg_descr_satellite_delivery_west_east_flag;
954
static int hf_mpeg_descr_satellite_delivery_polarization;
955
static int hf_mpeg_descr_satellite_delivery_roll_off;
956
static int hf_mpeg_descr_satellite_delivery_zero;
957
static int hf_mpeg_descr_satellite_delivery_modulation_system;
958
static int hf_mpeg_descr_satellite_delivery_modulation_type;
959
static int hf_mpeg_descr_satellite_delivery_symbol_rate;
960
static int hf_mpeg_descr_satellite_delivery_fec_inner;
961
962
14
#define MPEG_DESCR_SATELLITE_DELIVERY_WEST_EAST_FLAG_MASK       0x80
963
14
#define MPEG_DESCR_SATELLITE_DELIVERY_POLARIZATION_MASK         0x60
964
14
#define MPEG_DESCR_SATELLITE_DELIVERY_ROLL_OFF_MASK             0x18
965
14
#define MPEG_DESCR_SATELLITE_DELIVERY_ZERO_MASK                 0x18
966
16
#define MPEG_DESCR_SATELLITE_DELIVERY_MODULATION_SYSTEM_MASK    0x04
967
14
#define MPEG_DESCR_SATELLITE_DELIVERY_MODULATION_TYPE_MASK      0x03
968
14
#define MPEG_DESCR_SATELLITE_DELIVERY_FEC_INNER_MASK            0x0F
969
970
static const value_string mpeg_descr_satellite_delivery_west_east_flag_vals[] = {
971
    { 0x0, "West" },
972
    { 0x1, "East" },
973
974
    { 0x0, NULL }
975
};
976
977
static const value_string mpeg_descr_satellite_delivery_polarization_vals[] = {
978
    { 0x0, "Linear - Horizontal" },
979
    { 0x1, "Linear - Vertical" },
980
    { 0x2, "Circular - Left" },
981
    { 0x3, "Circular - Right" },
982
983
    { 0x0, NULL }
984
};
985
986
static const value_string mpeg_descr_satellite_delivery_roll_off_vals[] = {
987
    { 0x0, "alpha = 0,35" },
988
    { 0x1, "alpha = 0,25" },
989
    { 0x2, "alpha = 0,20" },
990
991
    { 0x0, NULL }
992
};
993
994
static const value_string mpeg_descr_satellite_delivery_modulation_system_vals[] = {
995
    { 0x0, "DVB-S" },
996
    { 0x1, "DVB-S2" },
997
998
    { 0x0, NULL }
999
};
1000
1001
static const value_string mpeg_descr_satellite_delivery_modulation_type_vals[] = {
1002
    { 0x0, "Auto" },
1003
    { 0x1, "QPSK" },
1004
    { 0x2, "8PSK" },
1005
    { 0x3, "16-QAM (n/a for DVB-S2)" },
1006
1007
    { 0x0, NULL }
1008
};
1009
1010
static const value_string mpeg_descr_satellite_delivery_fec_inner_vals[] = {
1011
    { 0x0, "Not defined" },
1012
    { 0x1, "1/2 convolutional code rate" },
1013
    { 0x2, "2/3 convolutional code rate" },
1014
    { 0x3, "3/4 convolutional code rate" },
1015
    { 0x4, "5/6 convolutional code rate" },
1016
    { 0x5, "7/8 convolutional code rate" },
1017
    { 0x6, "8/9 convolutional code rate" },
1018
    { 0x7, "3/5 convolutional code rate" },
1019
    { 0x8, "4/5 convolutional code rate" },
1020
    { 0x9, "9/10 convolutional code rate" },
1021
    { 0xF, "No convolutional coding" },
1022
1023
    { 0x0, NULL }
1024
};
1025
static value_string_ext mpeg_descr_satellite_delivery_fec_inner_vals_ext =
1026
    VALUE_STRING_EXT_INIT(mpeg_descr_satellite_delivery_fec_inner_vals);
1027
1028
static void
1029
proto_mpeg_descriptor_dissect_satellite_delivery(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
1030
2
{
1031
1032
2
    double frequency, symbol_rate;
1033
2
    float orbital_position;
1034
2
    uint8_t modulation_system;
1035
1036
2
    frequency = MPEG_SECT_BCD44_TO_DEC(tvb_get_uint8(tvb, offset)) * 10.0 +
1037
2
                MPEG_SECT_BCD44_TO_DEC(tvb_get_uint8(tvb, offset+1)) / 10.0 +
1038
2
                MPEG_SECT_BCD44_TO_DEC(tvb_get_uint8(tvb, offset+2)) / 1000.0 +
1039
2
                MPEG_SECT_BCD44_TO_DEC(tvb_get_uint8(tvb, offset+3)) / 100000.0;
1040
2
    proto_tree_add_double(tree, hf_mpeg_descr_satellite_delivery_frequency,
1041
2
            tvb, offset, 4, frequency);
1042
2
    offset += 4;
1043
1044
2
    orbital_position = MPEG_SECT_BCD44_TO_DEC(tvb_get_uint8(tvb, offset)) * 10.0f +
1045
2
                       MPEG_SECT_BCD44_TO_DEC(tvb_get_uint8(tvb, offset+1)) / 10.0f;
1046
2
    proto_tree_add_float(tree, hf_mpeg_descr_satellite_delivery_orbital_position,
1047
2
            tvb, offset, 2, orbital_position);
1048
2
    offset += 2;
1049
1050
2
    modulation_system = tvb_get_uint8(tvb, offset) & MPEG_DESCR_SATELLITE_DELIVERY_MODULATION_SYSTEM_MASK;
1051
1052
2
    proto_tree_add_item(tree, hf_mpeg_descr_satellite_delivery_west_east_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
1053
2
    proto_tree_add_item(tree, hf_mpeg_descr_satellite_delivery_polarization, tvb, offset, 1, ENC_BIG_ENDIAN);
1054
2
    if (modulation_system)
1055
0
        proto_tree_add_item(tree, hf_mpeg_descr_satellite_delivery_roll_off, tvb, offset, 1, ENC_BIG_ENDIAN);
1056
2
    else
1057
2
        proto_tree_add_item(tree, hf_mpeg_descr_satellite_delivery_zero, tvb, offset, 1, ENC_BIG_ENDIAN);
1058
2
    proto_tree_add_item(tree, hf_mpeg_descr_satellite_delivery_modulation_system, tvb, offset, 1, ENC_BIG_ENDIAN);
1059
2
    proto_tree_add_item(tree, hf_mpeg_descr_satellite_delivery_modulation_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1060
2
    offset += 1;
1061
1062
2
    symbol_rate = MPEG_SECT_BCD44_TO_DEC(tvb_get_uint8(tvb, offset)) * 10.0 +
1063
2
                  MPEG_SECT_BCD44_TO_DEC(tvb_get_uint8(tvb, offset+1)) / 10.0 +
1064
2
                  MPEG_SECT_BCD44_TO_DEC(tvb_get_uint8(tvb, offset+2)) / 1000.0 +
1065
                  /* symbol rate is 28 bits, only the upper 4 bits of this byte are used */
1066
2
                  MPEG_SECT_BCD44_TO_DEC(tvb_get_uint8(tvb, offset+3)>>4) / 10000.0;
1067
2
    proto_tree_add_double_format_value(tree, hf_mpeg_descr_satellite_delivery_symbol_rate,
1068
2
            tvb, offset, 4, symbol_rate, "%3.4f MSym/s", symbol_rate);
1069
2
    offset += 3;
1070
1071
2
    proto_tree_add_item(tree, hf_mpeg_descr_satellite_delivery_fec_inner, tvb, offset, 1, ENC_BIG_ENDIAN);
1072
1073
2
}
1074
1075
/* 0x44 Cable Delivery System Descriptor */
1076
static int hf_mpeg_descr_cable_delivery_frequency;
1077
static int hf_mpeg_descr_cable_delivery_reserved;
1078
static int hf_mpeg_descr_cable_delivery_fec_outer;
1079
static int hf_mpeg_descr_cable_delivery_modulation;
1080
static int hf_mpeg_descr_cable_delivery_symbol_rate;
1081
static int hf_mpeg_descr_cable_delivery_fec_inner;
1082
1083
14
#define MPEG_DESCR_CABLE_DELIVERY_RESERVED_MASK     0xFFF0
1084
14
#define MPEG_DESCR_CABLE_DELIVERY_FEC_OUTER_MASK    0x000F
1085
14
#define MPEG_DESCR_CABLE_DELIVERY_FEC_INNER_MASK    0x0F
1086
1087
static const value_string mpeg_descr_cable_delivery_fec_outer_vals[] = {
1088
    { 0x0, "Not defined" },
1089
    { 0x1, "No outer FEC coding" },
1090
    { 0x2, "RS(204/188)" },
1091
1092
    { 0x0, NULL }
1093
};
1094
1095
static const value_string mpeg_descr_cable_delivery_modulation_vals[] = {
1096
    { 0x00, "Not defined" },
1097
    { 0x01, "16-QAM" },
1098
    { 0x02, "32-QAM" },
1099
    { 0x03, "64-QAM" },
1100
    { 0x04, "128-QAM" },
1101
    { 0x05, "256-QAM" },
1102
1103
    { 0x0, NULL }
1104
};
1105
1106
static const value_string mpeg_descr_cable_delivery_fec_inner_vals[] = {
1107
    { 0x0, "Not defined" },
1108
    { 0x1, "1/2 convolutional code rate" },
1109
    { 0x2, "2/3 convolutional code rate" },
1110
    { 0x3, "3/4 convolutional code rate" },
1111
    { 0x4, "5/6 convolutional code rate" },
1112
    { 0x5, "7/8 convolutional code rate" },
1113
    { 0x6, "8/9 convolutional code rate" },
1114
    { 0x7, "3/5 convolutional code rate" },
1115
    { 0x8, "4/5 convolutional code rate" },
1116
    { 0x9, "9/10 convolutional code rate" },
1117
    { 0xF, "No convolutional coding" },
1118
1119
    { 0x0, NULL }
1120
};
1121
static value_string_ext mpeg_descr_cable_delivery_fec_inner_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_cable_delivery_fec_inner_vals);
1122
1123
static void
1124
4
proto_mpeg_descriptor_dissect_cable_delivery(tvbuff_t *tvb, unsigned offset, proto_tree *tree) {
1125
1126
4
    double frequency, symbol_rate;
1127
1128
4
    frequency = MPEG_SECT_BCD44_TO_DEC(tvb_get_uint8(tvb, offset)) * 100.0 +
1129
4
                MPEG_SECT_BCD44_TO_DEC(tvb_get_uint8(tvb, offset+1)) +
1130
4
                MPEG_SECT_BCD44_TO_DEC(tvb_get_uint8(tvb, offset+2)) / 100.0 +
1131
4
                MPEG_SECT_BCD44_TO_DEC(tvb_get_uint8(tvb, offset+3)) / 10000.0;
1132
4
    proto_tree_add_double_format_value(tree, hf_mpeg_descr_cable_delivery_frequency,
1133
4
            tvb, offset, 4, frequency, "%4.4f MHz", frequency);
1134
4
    offset += 4;
1135
1136
4
    proto_tree_add_item(tree, hf_mpeg_descr_cable_delivery_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
1137
4
    proto_tree_add_item(tree, hf_mpeg_descr_cable_delivery_fec_outer, tvb, offset, 2, ENC_BIG_ENDIAN);
1138
4
    offset += 2;
1139
1140
4
    proto_tree_add_item(tree, hf_mpeg_descr_cable_delivery_modulation, tvb, offset, 1, ENC_BIG_ENDIAN);
1141
4
    offset += 1;
1142
1143
4
    symbol_rate = MPEG_SECT_BCD44_TO_DEC(tvb_get_uint8(tvb, offset)) * 10.0 +
1144
4
                  MPEG_SECT_BCD44_TO_DEC(tvb_get_uint8(tvb, offset+1)) / 10.0 +
1145
4
                  MPEG_SECT_BCD44_TO_DEC(tvb_get_uint8(tvb, offset+2)) / 1000.0 +
1146
                  /* symbol rate is 28 bits, only the upper 4 bits of this byte are used */
1147
4
                  MPEG_SECT_BCD44_TO_DEC(tvb_get_uint8(tvb, offset+3)>>4) / 10000.0;
1148
4
    proto_tree_add_double_format_value(tree, hf_mpeg_descr_cable_delivery_symbol_rate,
1149
4
            tvb, offset, 4, symbol_rate, "%3.4f MSymbol/s", symbol_rate);
1150
4
    offset += 3;
1151
4
    proto_tree_add_item(tree, hf_mpeg_descr_cable_delivery_fec_inner, tvb, offset, 1, ENC_BIG_ENDIAN);
1152
1153
1154
4
}
1155
1156
/* 0x45 VBI Data Descriptor */
1157
static int hf_mpeg_descr_vbi_data_service_id;
1158
static int hf_mpeg_descr_vbi_data_descr_len;
1159
static int hf_mpeg_descr_vbi_data_reserved1;
1160
static int hf_mpeg_descr_vbi_data_field_parity;
1161
static int hf_mpeg_descr_vbi_data_line_offset;
1162
static int hf_mpeg_descr_vbi_data_reserved2;
1163
1164
14
#define MPEG_DESCR_VBI_DATA_RESERVED1_MASK  0xC0
1165
14
#define MPEG_DESCR_VBI_DATA_FIELD_PARITY_MASK   0x20
1166
#define MPEG_DESCR_VBI_DATA_LINE_OFFSET_MASK    0x1F
1167
1168
static int ett_mpeg_descriptor_vbi_data_service;
1169
1170
static const value_string mpeg_descr_vbi_data_service_id_vals[] = {
1171
1172
    { 0x00, "Reserved" },
1173
    { 0x01, "EBU Teletext" },
1174
    { 0x02, "Inverted Teletext" },
1175
    { 0x03, "Reserved" },
1176
    { 0x04, "VPS" },
1177
    { 0x05, "WSS" },
1178
    { 0x06, "Closed Captioning" },
1179
    { 0x07, "Monochrome 4:2:2 samples" },
1180
1181
    { 0, NULL }
1182
};
1183
1184
static const value_string mpeg_descr_vbi_data_field_parity_vals[] = {
1185
    { 0x00, "Second (even) field of frame" },
1186
    { 0x01, "First (odd) field of frame" },
1187
1188
    { 0, NULL }
1189
};
1190
1191
static void
1192
proto_mpeg_descriptor_dissect_vbi_data(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
1193
2
{
1194
1195
2
    uint8_t svc_id, svc_len;
1196
2
    unsigned  end = offset + len, svc_end;
1197
1198
2
    proto_tree *svc_tree;
1199
1200
5
    while (offset < end) {
1201
4
        svc_id  = tvb_get_uint8(tvb, offset);
1202
4
        svc_len = tvb_get_uint8(tvb, offset + 1);
1203
4
        svc_tree = proto_tree_add_subtree_format(tree, tvb, offset, svc_len + 2,
1204
4
                    ett_mpeg_descriptor_vbi_data_service, NULL, "Service 0x%02x", svc_id);
1205
1206
4
        proto_tree_add_item(svc_tree, hf_mpeg_descr_vbi_data_service_id, tvb, offset, 1, ENC_BIG_ENDIAN);
1207
4
        offset += 1;
1208
1209
4
        proto_tree_add_item(svc_tree, hf_mpeg_descr_vbi_data_descr_len, tvb, offset, 1, ENC_BIG_ENDIAN);
1210
4
        offset += 1;
1211
1212
4
        switch (svc_id) {
1213
1
            case 0x01:
1214
1
            case 0x02:
1215
1
            case 0x04:
1216
2
            case 0x05:
1217
2
            case 0x06:
1218
2
            case 0x07:
1219
2
                svc_end = offset + svc_len;
1220
4
                while (offset < svc_end) {
1221
2
                    proto_tree_add_item(svc_tree, hf_mpeg_descr_vbi_data_reserved1, tvb, offset, 1, ENC_BIG_ENDIAN);
1222
2
                    proto_tree_add_item(svc_tree, hf_mpeg_descr_vbi_data_field_parity, tvb, offset, 1, ENC_BIG_ENDIAN);
1223
2
                    proto_tree_add_item(svc_tree, hf_mpeg_descr_vbi_data_line_offset, tvb, offset, 1, ENC_BIG_ENDIAN);
1224
2
                    offset += 1;
1225
2
                }
1226
2
                break;
1227
2
            default:
1228
2
                proto_tree_add_item(svc_tree, hf_mpeg_descr_vbi_data_reserved2, tvb, offset, svc_len, ENC_NA);
1229
2
                offset += svc_len;
1230
2
                break;
1231
4
        }
1232
1233
4
    }
1234
2
}
1235
1236
/* 0x47 Bouquet Name Descriptor */
1237
static int hf_mpeg_descr_bouquet_name_encoding;
1238
static int hf_mpeg_descr_bouquet_name;
1239
1240
static void
1241
proto_mpeg_descriptor_dissect_bouquet_name(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
1242
3
{
1243
3
    dvb_encoding_e  encoding;
1244
3
    unsigned enc_len = dvb_analyze_string_charset(tvb, offset, len, &encoding);
1245
3
    dvb_add_chartbl(tree, hf_mpeg_descr_bouquet_name_encoding, tvb, offset, enc_len, encoding);
1246
1247
3
    proto_tree_add_item(tree, hf_mpeg_descr_bouquet_name, tvb, offset+enc_len, len-enc_len, dvb_enc_to_item_enc(encoding));
1248
3
}
1249
1250
/* 0x48 Service Descriptor */
1251
static int hf_mpeg_descr_service_type;
1252
static int hf_mpeg_descr_service_provider_name_length;
1253
static int hf_mpeg_descr_service_provider_name_encoding;
1254
static int hf_mpeg_descr_service_provider;
1255
static int hf_mpeg_descr_service_name_length;
1256
static int hf_mpeg_descr_service_name_encoding;
1257
static int hf_mpeg_descr_service_name;
1258
1259
static const value_string mpeg_descr_service_type_vals[] = {
1260
1261
    { 0x00, "reserved" },
1262
    { 0x01, "digital television service" },
1263
    { 0x02, "digital radio sound service" },
1264
    { 0x03, "Teletext service" },
1265
    { 0x04, "NVOD reference service" },
1266
    { 0x05, "NVOD time-shifted service" },
1267
    { 0x06, "mosaic service" },
1268
    { 0x07, "FM radio service" },
1269
    { 0x08, "DVB SRM service" },
1270
    { 0x09, "reserved" },
1271
    { 0x0A, "advanced codec digital radio sound service" },
1272
    { 0x0B, "advanced codec mosaic service" },
1273
    { 0x0C, "data broadcast service" },
1274
    { 0x0D, "reserved for Common Interface Usage (EN 50221)" },
1275
    { 0x0E, "RCS Map (see EN 301 790)" },
1276
    { 0x0F, "RCS FLS (see EN 301 790)" },
1277
    { 0x10, "DVB MHP service" },
1278
    { 0x11, "MPEG-2 HD digital television service" },
1279
    { 0x16, "H.264/AVC SD digital television service" },
1280
    { 0x17, "H.264/AVC SD NVOD time-shifted service" },
1281
    { 0x18, "H.264/AVC SD NVOD reference service" },
1282
    { 0x19, "H.264/AVC HD digital television service" },
1283
    { 0x1A, "H.264/AVC HD NVOD time-shifted service" },
1284
    { 0x1B, "H.264/AVC NVOD reference service" },
1285
    { 0x1C, "H.264/AVC frame compatible plano-stereoscopic HD digital television service" },
1286
    { 0x1D, "H.264/AVC rame compatible plano-stereoscopic HD NVOD time-shifted service" },
1287
    { 0x1E, "H.264/AVC frame compatible plano-stereoscopic HD NVOD reference service" },
1288
    { 0x1F, "HEVC digital television service" },
1289
    { 0x20, "HEVC UHD DTV service with either: a resolution up to 3840x2160, HDR and/or a frame rate of 100 Hz, \
1290
120000/1001Hz, or 120 Hz; or a resolution greater than 3840x2160, SDR or HDR, up to 60Hz." },
1291
1292
    { 0x00, NULL }
1293
};
1294
/* global variable that's shared e.g. with DVB-CI */
1295
value_string_ext mpeg_descr_service_type_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_service_type_vals);
1296
1297
static void
1298
proto_mpeg_descriptor_dissect_service(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
1299
5
{
1300
5
    uint8_t         prov_len, name_len;
1301
5
    unsigned        enc_len;
1302
5
    dvb_encoding_e  encoding;
1303
1304
5
    proto_tree_add_item(tree, hf_mpeg_descr_service_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1305
5
    offset += 1;
1306
1307
5
    prov_len = tvb_get_uint8(tvb, offset);
1308
5
    proto_tree_add_item(tree, hf_mpeg_descr_service_provider_name_length, tvb, offset, 1, ENC_BIG_ENDIAN);
1309
5
    offset += 1;
1310
1311
5
    if (prov_len>0) {
1312
5
        enc_len = dvb_analyze_string_charset(tvb, offset, prov_len, &encoding);
1313
5
        dvb_add_chartbl(tree, hf_mpeg_descr_service_provider_name_encoding, tvb, offset, enc_len, encoding);
1314
1315
5
        proto_tree_add_item(tree, hf_mpeg_descr_service_provider,
1316
5
                tvb, offset+enc_len, prov_len-enc_len, dvb_enc_to_item_enc(encoding));
1317
5
    }
1318
5
    offset += prov_len;
1319
1320
5
    name_len = tvb_get_uint8(tvb, offset);
1321
5
    proto_tree_add_item(tree, hf_mpeg_descr_service_name_length, tvb, offset, 1, ENC_BIG_ENDIAN);
1322
5
    offset += 1;
1323
1324
5
    if (name_len>0) {
1325
2
        enc_len = dvb_analyze_string_charset(tvb, offset, name_len, &encoding);
1326
2
        dvb_add_chartbl(tree, hf_mpeg_descr_service_name_encoding, tvb, offset, enc_len, encoding);
1327
1328
2
        proto_tree_add_item(tree, hf_mpeg_descr_service_name,
1329
2
                tvb, offset+enc_len, name_len-enc_len, dvb_enc_to_item_enc(encoding));
1330
2
    }
1331
1332
5
}
1333
1334
/* 0x49 Country Availability Descriptor */
1335
static int hf_mpeg_descr_country_availability_flag;
1336
static int hf_mpeg_descr_country_availability_reserved_future_use;
1337
static int hf_mpeg_descr_country_availability_country_code;
1338
1339
static int ett_mpeg_descriptor_country_availability_countries;
1340
1341
14
#define MPEG_DESCR_COUNTRY_AVAILABILITY_FLAG_MASK           0x80
1342
14
#define MPEG_DESCR_COUNTRY_AVAILABILITY_RESERVED_MASK       0x7F
1343
1344
static const value_string mpeg_descr_country_availability_flag_vals[] = {
1345
    { 0x0, "Reception of the service is not intended" },
1346
    { 0x1, "Reception of the service is intended" },
1347
1348
    { 0x0, NULL }
1349
};
1350
1351
static void
1352
proto_mpeg_descriptor_dissect_country_availability_descriptor(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
1353
3
{
1354
3
    unsigned end = offset+len;
1355
1356
3
    proto_tree *countries_tree;
1357
1358
3
    proto_tree_add_item(tree, hf_mpeg_descr_country_availability_flag , tvb, offset, 1, ENC_BIG_ENDIAN);
1359
3
    proto_tree_add_item(tree, hf_mpeg_descr_country_availability_reserved_future_use , tvb, offset, 1, ENC_BIG_ENDIAN);
1360
3
    offset += 1;
1361
1362
3
    countries_tree = proto_tree_add_subtree_format(tree, tvb, offset, end - offset, ett_mpeg_descriptor_country_availability_countries, NULL, "Countries");
1363
1364
73
    while (offset < end) {
1365
70
        proto_tree_add_item(countries_tree, hf_mpeg_descr_country_availability_country_code, tvb, offset, 3, ENC_ASCII);
1366
70
        offset += 3;
1367
70
    }
1368
3
}
1369
1370
/* 0x4A Linkage Descriptor */
1371
static int hf_mpeg_descr_linkage_transport_stream_id;
1372
static int hf_mpeg_descr_linkage_original_network_id;
1373
static int hf_mpeg_descr_linkage_service_id;
1374
static int hf_mpeg_descr_linkage_linkage_type;
1375
1376
static int hf_mpeg_descr_linkage_hand_over_type;
1377
static int hf_mpeg_descr_linkage_reserved1;
1378
static int hf_mpeg_descr_linkage_origin_type;
1379
static int hf_mpeg_descr_linkage_network_id;
1380
static int hf_mpeg_descr_linkage_initial_service_id;
1381
1382
static int hf_mpeg_descr_linkage_target_event_id;
1383
static int hf_mpeg_descr_linkage_target_listed;
1384
static int hf_mpeg_descr_linkage_event_simulcast;
1385
static int hf_mpeg_descr_linkage_reserved2;
1386
1387
static int hf_mpeg_descr_linkage_interactive_network_id;
1388
static int hf_mpeg_descr_linkage_population_id_loop_count;
1389
static int hf_mpeg_descr_linkage_population_id;
1390
static int hf_mpeg_descr_linkage_population_id_base;
1391
static int hf_mpeg_descr_linkage_population_id_mask;
1392
1393
static int hf_mpeg_descr_linkage_private_data_byte;
1394
1395
static int ett_mpeg_descriptor_linkage_population_id;
1396
1397
14
#define MPEG_DESCR_LINKAGE_HAND_OVER_TYPE_MASK  0xF0
1398
0
#define MPEG_DESCR_LINKAGE_HAND_OVER_TYPE_SHIFT 0x04
1399
14
#define MPEG_DESCR_LINKAGE_RESERVED1_MASK   0x0E
1400
0
#define MPEG_DESCR_LINKAGE_ORIGIN_TYPE_MASK 0x01
1401
1402
14
#define MPEG_DESCR_LINKAGE_TARGET_LISTED_MASK   0x80
1403
14
#define MPEG_DESCR_LINKAGE_EVENT_SIMULCAST_MASK 0x40
1404
14
#define MPEG_DESCR_LINKAGE_RESERVED2_MASK   0x3F
1405
1406
static const value_string mpeg_descr_linkage_linkage_type_vals[] = {
1407
    { 0x01, "Information service" },
1408
    { 0x02, "EPG service" },
1409
    { 0x03, "CA replacement service" },
1410
    { 0x04, "TS containing complete Network/Bouquet SI" },
1411
    { 0x05, "Service replacement service" },
1412
    { 0x06, "Data broadcast service" },
1413
    { 0x07, "RCS Map" },
1414
    { 0x08, "Mobile hand-over" },
1415
    { 0x09, "System Software Update Service" },
1416
    { 0x0A, "TS containing SSU BAT or NIT" },
1417
    { 0x0B, "IP/MAC Notification Service" },
1418
    { 0x0C, "TS containing INT BAT or NIT" },
1419
    { 0x0D, "Event linkage" },
1420
    { 0x81, "RCS FLS" },
1421
1422
    { 0x00, NULL }
1423
};
1424
static value_string_ext mpeg_descr_linkage_linkage_type_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_linkage_linkage_type_vals);
1425
1426
#if 0
1427
static const value_string mpeg_descr_linkage_hand_over_type_vals[] = {
1428
    { 0x01, "DVB hand-over to an identical service in a neighbouring country" },
1429
    { 0x02, "DVB hand-over to a local variation of the same service" },
1430
    { 0x03, "DVB hand-over to an associated service" },
1431
1432
    { 0x00, NULL }
1433
};
1434
#endif
1435
1436
static const value_string mpeg_descr_linkage_origin_type_vals[] = {
1437
    { 0x0, "NIT" },
1438
    { 0x1, "SDT" },
1439
1440
    { 0x0, NULL }
1441
};
1442
1443
static const value_string mpeg_descr_linkage_target_listed_vals[] = {
1444
    { 0x0, "Service may not be included in SDT" },
1445
    { 0x1, "Service should be included in SDT" },
1446
1447
    { 0x0, NULL}
1448
};
1449
1450
static const value_string mpeg_descr_linkage_event_simulcast_vals[] = {
1451
    { 0x0, "Events are offset in time" },
1452
    { 0x1, "Target and source events are being simulcast" },
1453
1454
    { 0x0, NULL }
1455
};
1456
1457
static void
1458
proto_mpeg_descriptor_dissect_linkage(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
1459
1
{
1460
1461
1
    uint8_t linkage_type, hand_over_type, origin_type;
1462
1
    unsigned   end = offset + len;
1463
1
    unsigned   population_id_loop_count;
1464
1
    uint16_t population_id_base, population_id_mask;
1465
1466
1
    proto_item *pi;
1467
1
    proto_tree *population_tree;
1468
1469
1
    proto_tree_add_item(tree, hf_mpeg_descr_linkage_transport_stream_id, tvb, offset, 2, ENC_BIG_ENDIAN);
1470
1
    offset += 2;
1471
1472
1
    proto_tree_add_item(tree, hf_mpeg_descr_linkage_original_network_id, tvb, offset, 2, ENC_BIG_ENDIAN);
1473
1
    offset += 2;
1474
1475
1
    proto_tree_add_item(tree, hf_mpeg_descr_linkage_service_id, tvb, offset, 2, ENC_BIG_ENDIAN);
1476
1
    offset += 2;
1477
1478
1
    proto_tree_add_item(tree, hf_mpeg_descr_linkage_linkage_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1479
1
    linkage_type = tvb_get_uint8(tvb, offset);
1480
1
    offset += 1;
1481
1482
1
    if (linkage_type == 0x08) {
1483
0
        proto_tree_add_item(tree, hf_mpeg_descr_linkage_hand_over_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1484
0
        proto_tree_add_item(tree, hf_mpeg_descr_linkage_reserved1, tvb, offset, 1, ENC_BIG_ENDIAN);
1485
0
        proto_tree_add_item(tree, hf_mpeg_descr_linkage_origin_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1486
0
        hand_over_type = (tvb_get_uint8(tvb, offset) & MPEG_DESCR_LINKAGE_HAND_OVER_TYPE_MASK) >> MPEG_DESCR_LINKAGE_HAND_OVER_TYPE_SHIFT;
1487
0
        origin_type = tvb_get_uint8(tvb, offset) & MPEG_DESCR_LINKAGE_ORIGIN_TYPE_MASK;
1488
0
        offset += 1;
1489
1490
0
        if ((hand_over_type == 1) || (hand_over_type == 2) || (hand_over_type == 3)) {
1491
0
            proto_tree_add_item(tree, hf_mpeg_descr_linkage_network_id, tvb, offset, 2, ENC_BIG_ENDIAN);
1492
0
            offset += 2;
1493
0
        }
1494
1495
0
        if (origin_type) {
1496
0
            proto_tree_add_item(tree, hf_mpeg_descr_linkage_initial_service_id, tvb, offset, 2, ENC_BIG_ENDIAN);
1497
0
            offset += 2;
1498
0
        }
1499
1500
1
    } else if (linkage_type == 0x0D) {
1501
0
        proto_tree_add_item(tree, hf_mpeg_descr_linkage_target_event_id, tvb, offset, 2, ENC_BIG_ENDIAN);
1502
0
        offset += 2;
1503
1504
0
        proto_tree_add_item(tree, hf_mpeg_descr_linkage_target_listed, tvb, offset, 1, ENC_BIG_ENDIAN);
1505
0
        proto_tree_add_item(tree, hf_mpeg_descr_linkage_event_simulcast, tvb, offset, 1, ENC_BIG_ENDIAN);
1506
0
        proto_tree_add_item(tree, hf_mpeg_descr_linkage_reserved2, tvb, offset, 1, ENC_BIG_ENDIAN);
1507
1
    } else if (linkage_type == 0x81) {
1508
        /* linkage type 0x81 is "user defined" in the DVB-SI spec (EN 300468)
1509
           it is defined in the interaction channel spec (EN 301790)
1510
           it seems that in practice, 0x81 is also used for other purposes than interaction channel
1511
           if the following data really belongs to interaction channel, we need at least another 7 bytes */
1512
0
        if (offset+7>end)
1513
0
            return;
1514
1515
0
        proto_tree_add_item(tree, hf_mpeg_descr_linkage_interactive_network_id, tvb, offset, 2, ENC_BIG_ENDIAN);
1516
0
        offset += 2;
1517
1518
0
        population_id_loop_count = tvb_get_uint8(tvb, offset) + 1;
1519
0
        proto_tree_add_item(tree, hf_mpeg_descr_linkage_population_id_loop_count, tvb, offset, 1, ENC_BIG_ENDIAN);
1520
0
        offset += 1;
1521
1522
0
        while (population_id_loop_count--) {
1523
0
            population_id_base = tvb_get_ntohs(tvb, offset);
1524
0
            population_id_mask = tvb_get_ntohs(tvb, offset + 2);
1525
0
            pi = proto_tree_add_uint_format_value(tree, hf_mpeg_descr_linkage_population_id, tvb, offset, 4,
1526
0
                    population_id_base<<16|population_id_mask,
1527
0
                    "0x%04x / 0x%04x", population_id_base, population_id_mask);
1528
0
            population_tree = proto_item_add_subtree(pi, ett_mpeg_descriptor_linkage_population_id);
1529
1530
0
            proto_tree_add_item(population_tree, hf_mpeg_descr_linkage_population_id_base, tvb, offset, 2, ENC_BIG_ENDIAN);
1531
0
            offset += 2;
1532
1533
0
            proto_tree_add_item(population_tree, hf_mpeg_descr_linkage_population_id_mask, tvb, offset, 2, ENC_BIG_ENDIAN);
1534
0
            offset += 2;
1535
0
        }
1536
1537
0
    }
1538
1539
1
    if (end - offset > 0)
1540
1
        proto_tree_add_item(tree, hf_mpeg_descr_linkage_private_data_byte, tvb, offset, end - offset, ENC_NA);
1541
1
}
1542
1543
/* 0x4B NVOD Reference Descriptor */
1544
static int hf_mpeg_descr_nvod_reference_tsid;
1545
static int hf_mpeg_descr_nvod_reference_onid;
1546
static int hf_mpeg_descr_nvod_reference_sid;
1547
1548
static int ett_mpeg_descriptor_nvod_reference_triplet;
1549
1550
static void
1551
proto_mpeg_descriptor_dissect_nvod_reference(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
1552
4
{
1553
4
    unsigned end = offset + len;
1554
1555
4
    proto_tree * triplet_tree;
1556
1557
52
    while (offset < end) {
1558
48
        unsigned tsid = tvb_get_uint16(tvb, offset + 0, ENC_BIG_ENDIAN);
1559
48
        unsigned onid = tvb_get_uint16(tvb, offset + 2, ENC_BIG_ENDIAN);
1560
48
        unsigned sid  = tvb_get_uint16(tvb, offset + 4, ENC_BIG_ENDIAN);
1561
1562
48
        triplet_tree = proto_tree_add_subtree_format(tree, tvb, offset, 6, ett_mpeg_descriptor_nvod_reference_triplet, NULL, "NVOD Service Triplet (0x%04X:0x%04X:0x%04X)", tsid, onid, sid);
1563
1564
48
        proto_tree_add_item(triplet_tree, hf_mpeg_descr_nvod_reference_tsid, tvb, offset, 2, ENC_BIG_ENDIAN);
1565
48
        offset += 2;
1566
1567
48
        proto_tree_add_item(triplet_tree, hf_mpeg_descr_nvod_reference_onid, tvb, offset, 2, ENC_BIG_ENDIAN);
1568
48
        offset += 2;
1569
1570
48
        proto_tree_add_item(triplet_tree, hf_mpeg_descr_nvod_reference_sid,  tvb, offset, 2, ENC_BIG_ENDIAN);
1571
48
        offset += 2;
1572
48
    }
1573
4
}
1574
1575
/* 0x4C Time Shifted Service Descriptor */
1576
static int hf_mpeg_descr_time_shifted_service_id;
1577
1578
static void
1579
proto_mpeg_descriptor_dissect_time_shifted_service(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
1580
0
{
1581
0
    proto_tree_add_item(tree, hf_mpeg_descr_time_shifted_service_id, tvb, offset, 2, ENC_BIG_ENDIAN);
1582
0
}
1583
1584
/* 0x4D Short Event Descriptor */
1585
static int hf_mpeg_descr_short_event_lang_code;
1586
static int hf_mpeg_descr_short_event_name_length;
1587
static int hf_mpeg_descr_short_event_name_encoding;
1588
static int hf_mpeg_descr_short_event_name;
1589
static int hf_mpeg_descr_short_event_text_length;
1590
static int hf_mpeg_descr_short_event_text_encoding;
1591
static int hf_mpeg_descr_short_event_text;
1592
1593
static void
1594
proto_mpeg_descriptor_dissect_short_event(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
1595
3
{
1596
3
    uint8_t         name_len, text_len;
1597
3
    unsigned        enc_len;
1598
3
    dvb_encoding_e  encoding;
1599
1600
3
    proto_tree_add_item(tree, hf_mpeg_descr_short_event_lang_code, tvb, offset, 3, ENC_ASCII);
1601
3
    offset += 3;
1602
1603
3
    name_len = tvb_get_uint8(tvb, offset);
1604
3
    proto_tree_add_item(tree, hf_mpeg_descr_short_event_name_length, tvb, offset, 1, ENC_BIG_ENDIAN);
1605
3
    offset += 1;
1606
1607
3
    if (name_len>0) {
1608
2
        enc_len = dvb_analyze_string_charset(tvb, offset, name_len, &encoding);
1609
2
        dvb_add_chartbl(tree, hf_mpeg_descr_short_event_name_encoding, tvb, offset, enc_len, encoding);
1610
2
        proto_tree_add_item(tree, hf_mpeg_descr_short_event_name,
1611
2
                tvb, offset+enc_len, name_len-enc_len, dvb_enc_to_item_enc(encoding));
1612
2
    }
1613
3
    offset += name_len;
1614
1615
3
    text_len = tvb_get_uint8(tvb, offset);
1616
3
    proto_tree_add_item(tree, hf_mpeg_descr_short_event_text_length, tvb, offset, 1, ENC_BIG_ENDIAN);
1617
3
    offset += 1;
1618
1619
3
    if (text_len>0) {
1620
2
        enc_len = dvb_analyze_string_charset(tvb, offset, text_len, &encoding);
1621
2
        dvb_add_chartbl(tree, hf_mpeg_descr_short_event_text_encoding, tvb, offset, enc_len, encoding);
1622
2
        proto_tree_add_item(tree, hf_mpeg_descr_short_event_text,
1623
2
                tvb, offset+enc_len, text_len-enc_len, dvb_enc_to_item_enc(encoding));
1624
2
    }
1625
3
}
1626
1627
/* 0x4E Extended Event Descriptor */
1628
static int hf_mpeg_descr_extended_event_descriptor_number;
1629
static int hf_mpeg_descr_extended_event_last_descriptor_number;
1630
static int hf_mpeg_descr_extended_event_lang_code;
1631
static int hf_mpeg_descr_extended_event_length_of_items;
1632
static int hf_mpeg_descr_extended_event_item_description_length;
1633
static int hf_mpeg_descr_extended_event_item_description_char;
1634
static int hf_mpeg_descr_extended_event_item_length;
1635
static int hf_mpeg_descr_extended_event_item_char;
1636
static int hf_mpeg_descr_extended_event_text_length;
1637
static int hf_mpeg_descr_extended_event_text_encoding;
1638
static int hf_mpeg_descr_extended_event_text;
1639
1640
14
#define MPEG_DESCR_EXTENDED_EVENT_DESCRIPTOR_NUMBER_MASK    0xF0
1641
14
#define MPEG_DESCR_EXTENDED_EVENT_LAST_DESCRIPTOR_NUMBER_MASK   0x0F
1642
1643
static int ett_mpeg_descriptor_extended_event_item;
1644
1645
static void
1646
proto_mpeg_descriptor_dissect_extended_event(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
1647
3
{
1648
1649
3
    uint8_t         items_len, item_descr_len, item_len, text_len;
1650
3
    unsigned        items_end;
1651
3
    proto_tree     *item_tree;
1652
3
    unsigned        enc_len;
1653
3
    dvb_encoding_e  encoding;
1654
1655
3
    proto_tree_add_item(tree, hf_mpeg_descr_extended_event_descriptor_number, tvb, offset, 1, ENC_BIG_ENDIAN);
1656
3
    proto_tree_add_item(tree, hf_mpeg_descr_extended_event_last_descriptor_number, tvb, offset, 1, ENC_BIG_ENDIAN);
1657
3
    offset += 1;
1658
1659
3
    proto_tree_add_item(tree, hf_mpeg_descr_extended_event_lang_code, tvb, offset, 3, ENC_ASCII);
1660
3
    offset += 3;
1661
1662
3
    items_len = tvb_get_uint8(tvb, offset);
1663
3
    proto_tree_add_item(tree, hf_mpeg_descr_extended_event_length_of_items, tvb, offset, 1, ENC_BIG_ENDIAN);
1664
3
    offset += 1;
1665
1666
3
    items_end = offset + items_len;
1667
1668
5
    while (offset < items_end) {
1669
2
        item_tree = proto_tree_add_subtree(tree, tvb, offset, 0, ett_mpeg_descriptor_extended_event_item, NULL, "Item");
1670
1671
2
        item_descr_len = tvb_get_uint8(tvb, offset);
1672
2
        proto_tree_add_item(item_tree, hf_mpeg_descr_extended_event_item_description_length, tvb, offset, 1, ENC_BIG_ENDIAN);
1673
2
        offset += 1;
1674
1675
2
        proto_tree_add_item(item_tree, hf_mpeg_descr_extended_event_item_description_char, tvb, offset, item_descr_len, ENC_ASCII);
1676
2
        offset += item_descr_len;
1677
1678
2
        item_len = tvb_get_uint8(tvb, offset);
1679
2
        proto_tree_add_item(item_tree, hf_mpeg_descr_extended_event_item_length, tvb, offset, 1, ENC_BIG_ENDIAN);
1680
2
        offset += 1;
1681
1682
2
        proto_tree_add_item(item_tree, hf_mpeg_descr_extended_event_item_char, tvb, offset, item_len, ENC_ASCII);
1683
2
        offset += item_len;
1684
2
    }
1685
1686
3
    text_len = tvb_get_uint8(tvb, offset);
1687
3
    proto_tree_add_item(tree, hf_mpeg_descr_extended_event_text_length, tvb, offset, 1, ENC_BIG_ENDIAN);
1688
3
    offset += 1;
1689
1690
3
    if (text_len>0) {
1691
0
        enc_len = dvb_analyze_string_charset(tvb, offset, text_len, &encoding);
1692
0
        dvb_add_chartbl(tree, hf_mpeg_descr_extended_event_text_encoding, tvb, offset, enc_len, encoding);
1693
0
        proto_tree_add_item(tree, hf_mpeg_descr_extended_event_text,
1694
0
                tvb, offset+enc_len, text_len-enc_len, dvb_enc_to_item_enc(encoding));
1695
0
    }
1696
1697
3
}
1698
1699
/* 0x4F Time Shifted Event Descriptor */
1700
static int hf_mpeg_descr_time_shifted_event_reference_service_id;
1701
static int hf_mpeg_descr_time_shifted_event_reference_event_id;
1702
1703
static void
1704
proto_mpeg_descriptor_dissect_time_shifted_event(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
1705
0
{
1706
0
    proto_tree_add_item(tree, hf_mpeg_descr_time_shifted_event_reference_service_id, tvb, offset, 2, ENC_BIG_ENDIAN);
1707
0
    offset += 2;
1708
1709
0
    proto_tree_add_item(tree, hf_mpeg_descr_time_shifted_event_reference_event_id, tvb, offset, 2, ENC_BIG_ENDIAN);
1710
0
}
1711
1712
/* 0x50 Component Descriptor */
1713
static int hf_mpeg_descr_component_stream_content_ext;
1714
static int hf_mpeg_descr_component_stream_content;
1715
static int hf_mpeg_descr_component_type;
1716
static int hf_mpeg_descr_component_content_type;
1717
static int hf_mpeg_descr_component_tag;
1718
static int hf_mpeg_descr_component_lang_code;
1719
static int hf_mpeg_descr_component_text_encoding;
1720
static int hf_mpeg_descr_component_text;
1721
1722
static int hf_mpeg_descr_component_high_stream_content_ext;
1723
static int hf_mpeg_descr_component_high_stream_content;
1724
static int hf_mpeg_descr_component_high_stream_content_both;
1725
static int hf_mpeg_descr_component_high_component_type;
1726
static int hf_mpeg_descr_component_high_stream_content_n_component_type;
1727
1728
static int hf_mpeg_descr_component_nga_bits_b7_reserved;
1729
static int hf_mpeg_descr_component_nga_bits_b6_headphones;
1730
static int hf_mpeg_descr_component_nga_bits_b5_interactivity;
1731
static int hf_mpeg_descr_component_nga_bits_b4_dialogue_enhancement;
1732
static int hf_mpeg_descr_component_nga_bits_b3_spoken_subtitles;
1733
static int hf_mpeg_descr_component_nga_bits_b2_audio_description;
1734
static int hf_mpeg_descr_component_nga_bits_b10_channel_layout;
1735
1736
14
#define MPEG_DESCR_COMPONENT_STREAM_CONTENT_EXT_MASK      0xF0
1737
14
#define MPEG_DESCR_COMPONENT_STREAM_CONTENT_MASK    0x0F
1738
14
#define MPEG_DESCR_COMPONENT_CONTENT_TYPE_MASK      0x0FFF
1739
1740
14
#define MPEG_DESCR_COMPONENT_HIGH_STREAM_CONTENT_EXT_MASK       0xF000
1741
14
#define MPEG_DESCR_COMPONENT_HIGH_STREAM_CONTENT_MASK           0x0F00
1742
14
#define MPEG_DESCR_COMPONENT_HIGH_STREAM_CONTENT_BOTH_MASK      0xFF00
1743
14
#define MPEG_DESCR_COMPONENT_HIGH_COMPONENT_TYPE_MASK           0x00FF
1744
14
#define MPEG_DESCR_COMPONENT_HIGH_STREAM_CONTENT_N_COMPONENT_TYPE_MASK      0xFFFF
1745
1746
14
#define MPEG_DESCR_COMPONENT_NGA_BITS_B7_MASK    0x0080
1747
14
#define MPEG_DESCR_COMPONENT_NGA_BITS_B6_MASK    0x0040
1748
14
#define MPEG_DESCR_COMPONENT_NGA_BITS_B5_MASK    0x0020
1749
14
#define MPEG_DESCR_COMPONENT_NGA_BITS_B4_MASK    0x0010
1750
14
#define MPEG_DESCR_COMPONENT_NGA_BITS_B3_MASK    0x0008
1751
14
#define MPEG_DESCR_COMPONENT_NGA_BITS_B2_MASK    0x0004
1752
14
#define MPEG_DESCR_COMPONENT_NGA_BITS_B10_MASK   0x0003
1753
1754
static int ett_mpeg_descriptor_component_content_type;
1755
1756
static const value_string mpeg_descr_component_stream_content_vals[] = {
1757
1758
    { 0x01, "Video (MPEG-2)" },
1759
    { 0x02, "Audio (MPEG-1 Layer 2)" },
1760
    { 0x03, "EBU Data (Teletext, Subtitle, ...)" },
1761
    { 0x04, "Audio (AC-3)" },
1762
    { 0x05, "Video (H.264/AVC)" },
1763
    { 0x06, "Audio (HE-AAC)" },
1764
    { 0x07, "Audio (DTS)" },
1765
1766
    { 0x0, NULL }
1767
};
1768
1769
static const value_string mpeg_descr_component_high_stream_content_vals[] = {
1770
    { 0x09, "Video (HEVC)"},
1771
    { 0x19, "Audio (AC-4/DTS-UHD)"},
1772
    { 0x29, "TTML subtitles"},
1773
    { 0xEB, "NGA flags"},
1774
    { 0xFB, "Component tag based combination"},
1775
1776
    { 0x0, NULL }
1777
};
1778
1779
static const value_string mpeg_descr_component_preferred_reproduction_channel_layout_vals[] = {
1780
    { 0x00, "no preference" },
1781
    { 0x01, "stereo" },
1782
    { 0x02, "two-dimensional" },
1783
    { 0x03, "three-dimensional" },
1784
1785
    { 0x0, NULL }
1786
};
1787
1788
static const value_string mpeg_descr_component_content_type_vals[] = {
1789
1790
    { 0x0101, "MPEG-2 video, 4:3 aspect ratio, 25 Hz" },
1791
    { 0x0102, "MPEG-2 video, 16:9 aspect ratio with pan vectors, 25 Hz" },
1792
    { 0x0103, "MPEG-2 video, 16:9 aspect ratio without pan vectors, 25 Hz" },
1793
    { 0x0104, "MPEG-2 video, > 16:9 aspect ratio, 25 Hz" },
1794
    { 0x0105, "MPEG-2 video, 4:3 aspect ratio, 30 Hz" },
1795
    { 0x0106, "MPEG-2 video, 16:9 aspect ratio with pan vectors, 30 Hz" },
1796
    { 0x0107, "MPEG-2 video, 16:9 aspect ratio without pan vectors, 30 Hz" },
1797
    { 0x0108, "MPEG-2 video, > 16:9 aspect ratio, 30 Hz" },
1798
    { 0x0109, "MPEG-2 high definition video, 4:3 aspect ratio, 25 Hz" },
1799
    { 0x010A, "MPEG-2 high definition video, 16:9 aspect ratio with pan vectors, 25 Hz" },
1800
    { 0x010B, "MPEG-2 high definition video, 16:9 aspect ratio without pan vectors, 25 Hz" },
1801
    { 0x010C, "MPEG-2 high definition video, > 16:9 aspect ratio, 25 Hz" },
1802
    { 0x010D, "MPEG-2 high definition video, 4:3 aspect ratio, 30 Hz" },
1803
    { 0x010E, "MPEG-2 high definition video, 16:9 aspect ratio with pan vectors, 30 Hz" },
1804
    { 0x010F, "MPEG-2 high definition video, 16:9 aspect ratio without pan vectors, 30 Hz" },
1805
    { 0x0110, "MPEG-2 high definition video, > 16:9 aspect ratio, 30 Hz" },
1806
    { 0x0201, "MPEG-1 Layer 2 audio, single mono channel" },
1807
    { 0x0202, "MPEG-1 Layer 2 audio, dual mono channel" },
1808
    { 0x0203, "MPEG-1 Layer 2 audio, stereo" },
1809
    { 0x0204, "MPEG-1 Layer 2 audio, multi-lingual, multi-channel" },
1810
    { 0x0205, "MPEG-1 Layer 2 audio, surround sound" },
1811
    { 0x0240, "MPEG-1 Layer 2 audio description for the visually impaired" },
1812
    { 0x0241, "MPEG-1 Layer 2 audio for the hard of hearing" },
1813
    { 0x0242, "Receiver-mixed supplementary audio as per annex E of TS 101 154 [9]" },
1814
    { 0x0247, "MPEG-1 Layer 2 audio, receiver mix audio description as per annex E of TS 101 154 [9]" },
1815
    { 0x0248, "MPEG-1 Layer 2 audio, broadcaster mix audio description" },
1816
    { 0x0301, "EBU Teletext subtitles" },
1817
    { 0x0302, "Associated EBU Teletext" },
1818
    { 0x0303, "VBI data" },
1819
    { 0x0310, "DVB subtitles (normal) with no monitor aspect ratio criticality" },
1820
    { 0x0311, "DVB subtitles (normal) for display on 4:3 aspect ratio monitor" },
1821
    { 0x0312, "DVB subtitles (normal) for display on 16:9 aspect ratio monitor" },
1822
    { 0x0313, "DVB subtitles (normal) for display on 2.21:1 aspect ratio monitor" },
1823
    { 0x0314, "DVB subtitles (normal) for display on a high definition monitor" },
1824
    { 0x0315, "DVB subtitles (normal) with plano-stereoscopic disparity for display on a high definition monitor" },
1825
    { 0x0316, "DVB subtitles (normal) for display on an ultra high definition monitor" },
1826
    { 0x0320, "DVB subtitles (for the hard of hearing) with no monitor aspect ratio criticality" },
1827
    { 0x0321, "DVB subtitles (for the hard of hearing) for display on 4:3 aspect ratio monitor" },
1828
    { 0x0322, "DVB subtitles (for the hard of hearing) for display on 16:9 aspect ratio monitor" },
1829
    { 0x0323, "DVB subtitles (for the hard of hearing) for display on 2.21:1 aspect ratio monitor" },
1830
    { 0x0324, "DVB subtitles (for the hard of hearing) for display on a high definition monitor" },
1831
    { 0x0325, "DVB subtitles (for the hard of hearing) with plano-stereoscopic disparity for display on a high definition monitor" },
1832
    { 0x0326, "DVB subtitles (for the hard of hearing) for display on an ultra high definition monitor" },
1833
    { 0x0330, "Open (in-vision) sign language interpretation for the deaf" },
1834
    { 0x0331, "Closed sign language interpretation for the deaf" },
1835
    { 0x0340, "video up-sampled from standard definition source material" },
1836
    { 0x0341, "Video is standard dynamic range (SDR)" },
1837
    { 0x0342, "Video is high dynamic range (HDR) remapped from standard dynamic range (SDR) source material" },
1838
    { 0x0343, "Video is high dynamic range (HDR) up-converted from standard dynamic range (SDR) source material" },
1839
    { 0x0344, "Video is standard frame rate, less than or equal to 60 Hz" },
1840
    { 0x0345, "High frame rate video generated from lower frame rate source material" },
1841
    { 0x0380, "dependent SAOC-DE data stream" },
1842
    { 0x0501, "H.264/AVC standard definition video, 4:3 aspect ratio, 25 Hz" },
1843
    { 0x0503, "H.264/AVC standard definition video, 16:9 aspect ratio, 25 Hz" },
1844
    { 0x0504, "H.264/AVC standard definition video, > 16:9 aspect ratio, 25 Hz" },
1845
    { 0x0505, "H.264/AVC standard definition video, 4:3 aspect ratio, 30 Hz" },
1846
    { 0x0507, "H.264/AVC standard definition video, 16:9 aspect ratio, 30 Hz" },
1847
    { 0x0508, "H.264/AVC standard definition video, > 16:9 aspect ratio, 30 Hz" },
1848
    { 0x050B, "H.264/AVC high definition video, 16:9 aspect ratio, 25 Hz" },
1849
    { 0x050C, "H.264/AVC high definition video, > 16:9 aspect ratio, 25 Hz" },
1850
    { 0x050F, "H.264/AVC high definition video, 16:9 aspect ratio, 30 Hz" },
1851
    { 0x0510, "H.264/AVC high definition video, > 16:9 aspect ratio, 30 Hz" },
1852
    { 0x0580, "H.264/AVC plano-stereoscopic frame compatible high definition video, 16:9 aspect ratio, 25 Hz, Side-by-Side" },
1853
    { 0x0581, "H.264/AVC plano-stereoscopic frame compatible high definition video, 16:9 aspect ratio, 25 Hz, Top-and-Bottom" },
1854
    { 0x0582, "H.264/AVC plano-stereoscopic frame compatible high definition video, 16:9 aspect ratio, 30 Hz, Side-by-Side" },
1855
    { 0x0583, "H.264/AVC stereoscopic frame compatible high definition video, 16:9 aspect ratio, 30 Hz, Top-and-Bottom" },
1856
    { 0x0584, "H.264/MVC dependent view, plano-stereoscopic service compatible video" },
1857
    { 0x0601, "HE-AAC audio, single mono channel" },
1858
    { 0x0603, "HE-AAC audio, stereo" },
1859
    { 0x0605, "HE-AAC audio, surround sound" },
1860
    { 0x0640, "HE-AAC audio description for the visually impaired" },
1861
    { 0x0641, "HE-AAC audio for the hard of hearing" },
1862
    { 0x0642, "HE-AAC receiver-mixed supplementary audio as per annex E of TS 101 154 [9]" },
1863
    { 0x0643, "HE-AAC v2 audio, stereo" },
1864
    { 0x0644, "HE-AAC v2 audio description for the visually impaired" },
1865
    { 0x0645, "HE-AAC v2 audio for the hard of hearing" },
1866
    { 0x0646, "HE-AAC v2 receiver-mixed supplementary audio as per annex E of TS 101 154 [9]" },
1867
    { 0x0647, "HE-AAC receiver mix audio description for the visually impaired" },
1868
    { 0x0648, "HE-AAC broadcaster mix audio description for the visually impaired" },
1869
    { 0x0649, "HE-AAC v2 receiver mix audio description for the visually impaired" },
1870
    { 0x064A, "HE-AAC v2 broadcaster mix audio description for the visually impaired" },
1871
    { 0x06A0, "HE-AAC, or HE-AAC v2 with SAOC-DE ancillary data" },
1872
    { 0x0801, "DVB SRM data" },
1873
1874
    { 0x0, NULL }
1875
};
1876
static value_string_ext mpeg_descr_component_content_type_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_component_content_type_vals);
1877
1878
static const value_string mpeg_descr_component_high_content_type_vals[] = {
1879
1880
    { 0x0900, "HEVC Main Profile high definition video, 50 Hz" },
1881
    { 0x0901, "HEVC Main 10 Profile high definition video, 50 Hz" },
1882
    { 0x0902, "HEVC Main Profile high definition video, 60 Hz" },
1883
    { 0x0903, "HEVC Main 10 Profile high definition video, 60 Hz" },
1884
    { 0x0904, "HEVC UHD up to 3840x2160 (SDR up to 3840x2160@60Hz, SDR HFR dual PID with tmp. scal-ty \
1885
up to 3840x2160, HDR with HLG10 up to 3840x2160@60Hz, HDR with HLG10 HFR dual PID and tmp. scal-ty \
1886
up to 3840x2160)" },
1887
    { 0x0905, "HEVC UHD PQ10 HDR up to 60Hz (HDR PQ10 up to 3840x2160@60Hz) or HEVC UHD PQ10 HDR 100Hz/\
1888
(120000/1001)Hz/120Hz with a half frame rate HEVC tmp. video sub-bit-stream (HDR PQ10 HFR dual PID \
1889
and tmp. scal-ty up to 3840x2160)" },
1890
    { 0x0906, "HEVC UHD video up to 3840x2160@100Hz/(120000/1001)Hz/120Hz w/o a half frame rate HEVC tmp. \
1891
video sub-bit-stream (SDR HFR single PID up to 3840x2160, HDR with HLG10 HFR single PID up to 3840x2160)" },
1892
    { 0x0907, "HEVC UHD PQ10 HDR, 100Hz/(120000/1001)Hz/120Hz without a half frame rate HEVC tmp. \
1893
video sub-bit-stream (HDR with PQ10 HFR single PID resolution up to 3840x2160)" },
1894
    { 0x0908, "HEVC UHD video up to 7680x4320 (SDR up to 7680x4320@60Hz, HDR with PQ10 up to 7680x4320@60Hz, \
1895
HDR with HLG10 up to 7680x4320@60Hz)" },
1896
    { 0x1900, "AC-4 main audio, mono" },
1897
    { 0x1901, "AC-4 main audio, mono, dialogue enhancement enabled" },
1898
    { 0x1902, "AC-4 main audio, stereo" },
1899
    { 0x1903, "AC-4 main audio, stereo, dialogue enhancement enabled" },
1900
    { 0x1904, "AC-4 main audio, multichannel" },
1901
    { 0x1905, "AC-4 main audio, multichannel, dialogue enhancement enabled" },
1902
    { 0x1906, "AC-4 broadcast-mix audio description, mono, for the visually impaired" },
1903
    { 0x1907, "AC-4 broadcast-mix audio description, mono, for the visually impaired, dialogue enhancement enabled" },
1904
    { 0x1908, "AC-4 broadcast-mix audio description, stereo, for the visually impaired" },
1905
    { 0x1909, "AC-4 broadcast-mix audio description, stereo, for the visually impaired, dialogue enhancement enabled" },
1906
    { 0x190A, "AC-4 broadcast-mix audio description, multichannel, for the visually impaired" },
1907
    { 0x190B, "AC-4 broadcast-mix audio description, multichannel, for the visually impaired, dialogue enhancement enabled" },
1908
    { 0x190C, "AC-4 receiver-mix audio description, mono, for the visually impaired" },
1909
    { 0x190D, "AC-4 receiver-mix audio description, stereo, for the visually impaired" },
1910
    { 0x190E, "AC-4 Part-2" },
1911
    { 0x190F, "MPEG-H Audio LC Profile" },
1912
    { 0x1910, "DTS-UHD main audio, mono" },
1913
    { 0x1911, "DTS-UHD main audio, mono, dialogue enhancement enabled" },
1914
    { 0x1912, "DTS-UHD main audio, stereo" },
1915
    { 0x1913, "DTS-UHD main audio, stereo, dialogue enhancement enabled" },
1916
    { 0x1914, "DTS-UHD main audio, multichannel" },
1917
    { 0x1915, "DTS-UHD main audio, multichannel, dialogue enhancement enabled" },
1918
    { 0x1916, "DTS-UHD broadcast-mix audio description, mono, for the visually impaired" },
1919
    { 0x1917, "DTS-UHD broadcast-mix audio description, mono, for the visually impaired, dialogue enhancement enabled" },
1920
    { 0x1918, "DTS-UHD broadcast-mix audio description, stereo, for the visually impaired" },
1921
    { 0x1919, "DTS-UHD broadcast-mix audio description, stereo, for the visually impaired, dialogue enhancement enabled" },
1922
    { 0x191A, "DTS-UHD broadcast-mix audio description, multichannel, for the visually impaired" },
1923
    { 0x191B, "DTS-UHD broadcast-mix audio description, multichannel, for the visually impaired, dialogue enhancement enabled" },
1924
    { 0x191C, "DTS-UHD receiver-mix audio description, mono, for the visually impaired" },
1925
    { 0x191D, "DTS-UHD receiver-mix audio description, stereo, for the visually impaired" },
1926
    { 0x191E, "DTS-UHD NGA Audio" },
1927
    { 0xFB00, "less than 16:9 aspect ratio" },
1928
    { 0xFB01, "16:9 aspect ratio" },
1929
    { 0xFB02, "greater than 16:9 aspect ratio" },
1930
    { 0xFB03, "plano-stereoscopic top and bottom (TaB) framepacking" },
1931
    { 0xFB04, "HLG10 HDR" },
1932
    { 0xFB05, "HEVC temporal video subset for a frame rate of 100 Hz, 120 000/1 001 Hz, or 120 Hz" },
1933
    { 0xFB06, "SMPTE ST 2094-10 DMI format as defined in clause 5.14.4.4.3.4.3 of ETSI TS 101 154" },
1934
    { 0xFB07, "SL-HDR2 DMI format as defined in clause 5.14.4.4.3.4.4 of ETSI TS 101 154" },
1935
    { 0xFB08, "SMPTE ST 2094-40 DMI format as defined in clause 5.14.4.4.3.4.5 of ETSI TS 101 154" },
1936
1937
    { 0x0, NULL }
1938
};
1939
static value_string_ext mpeg_descr_component_high_content_type_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_component_high_content_type_vals);
1940
1941
static void
1942
proto_mpeg_descriptor_dissect_component(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
1943
2
{
1944
1945
2
    proto_item *cti;
1946
2
    proto_tree *content_type_tree;
1947
2
    unsigned end = offset + len;
1948
1949
2
    if (len < 6) {
1950
0
        return;
1951
0
    }
1952
1953
2
    unsigned stream_content     = tvb_get_bits8(tvb, offset * 8 + 4, 4);
1954
1955
2
    if (stream_content >= 0x09) {
1956
0
        unsigned stream_content_ext = tvb_get_bits8(tvb, offset * 8, 4);
1957
1958
0
        cti = proto_tree_add_item(tree, hf_mpeg_descr_component_high_stream_content_n_component_type, tvb, offset, 2, ENC_BIG_ENDIAN);
1959
0
        content_type_tree = proto_item_add_subtree(cti, ett_mpeg_descriptor_component_content_type);
1960
1961
0
        proto_tree_add_item(content_type_tree, hf_mpeg_descr_component_high_stream_content_both, tvb, offset, 2, ENC_BIG_ENDIAN);
1962
0
        proto_tree_add_item(content_type_tree, hf_mpeg_descr_component_high_stream_content_ext, tvb, offset, 2, ENC_BIG_ENDIAN);
1963
0
        proto_tree_add_item(content_type_tree, hf_mpeg_descr_component_high_stream_content, tvb, offset, 2, ENC_BIG_ENDIAN);
1964
1965
0
        if (stream_content_ext == 0x0E && stream_content == 0x0B) {
1966
0
            proto_tree_add_item(content_type_tree, hf_mpeg_descr_component_nga_bits_b7_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
1967
0
            proto_tree_add_item(content_type_tree, hf_mpeg_descr_component_nga_bits_b6_headphones, tvb, offset, 2, ENC_BIG_ENDIAN);
1968
0
            proto_tree_add_item(content_type_tree, hf_mpeg_descr_component_nga_bits_b5_interactivity, tvb, offset, 2, ENC_BIG_ENDIAN);
1969
0
            proto_tree_add_item(content_type_tree, hf_mpeg_descr_component_nga_bits_b4_dialogue_enhancement, tvb, offset, 2, ENC_BIG_ENDIAN);
1970
0
            proto_tree_add_item(content_type_tree, hf_mpeg_descr_component_nga_bits_b3_spoken_subtitles, tvb, offset, 2, ENC_BIG_ENDIAN);
1971
0
            proto_tree_add_item(content_type_tree, hf_mpeg_descr_component_nga_bits_b2_audio_description, tvb, offset, 2, ENC_BIG_ENDIAN);
1972
0
            proto_tree_add_item(content_type_tree, hf_mpeg_descr_component_nga_bits_b10_channel_layout, tvb, offset, 2, ENC_BIG_ENDIAN);
1973
0
        } else {
1974
0
            proto_tree_add_item(content_type_tree, hf_mpeg_descr_component_high_component_type, tvb, offset, 2, ENC_BIG_ENDIAN);
1975
0
        }
1976
0
        offset += 2;
1977
0
        goto mpeg_descr_component_tail;
1978
0
    }
1979
1980
2
    proto_tree_add_item(tree, hf_mpeg_descr_component_stream_content_ext, tvb, offset, 1, ENC_BIG_ENDIAN);
1981
1982
2
    cti = proto_tree_add_item(tree, hf_mpeg_descr_component_content_type, tvb, offset, 2, ENC_BIG_ENDIAN);
1983
2
    content_type_tree = proto_item_add_subtree(cti, ett_mpeg_descriptor_component_content_type);
1984
1985
2
    proto_tree_add_item(content_type_tree, hf_mpeg_descr_component_stream_content, tvb, offset, 1, ENC_BIG_ENDIAN);
1986
2
    offset += 1;
1987
1988
2
    proto_tree_add_item(content_type_tree, hf_mpeg_descr_component_type, tvb, offset, 1, ENC_BIG_ENDIAN);
1989
2
    offset += 1;
1990
1991
2
mpeg_descr_component_tail:
1992
1993
2
    proto_tree_add_item(tree, hf_mpeg_descr_component_tag, tvb, offset, 1, ENC_BIG_ENDIAN);
1994
2
    offset += 1;
1995
1996
2
    proto_tree_add_item(tree, hf_mpeg_descr_component_lang_code, tvb, offset, 3, ENC_ASCII);
1997
2
    offset += 3;
1998
1999
2
    if (offset < end)
2000
2
    {
2001
2
        dvb_encoding_e  encoding;
2002
2
        unsigned enc_len = dvb_analyze_string_charset(tvb, offset, end - offset, &encoding);
2003
2
        dvb_add_chartbl(tree, hf_mpeg_descr_component_text_encoding, tvb, offset, enc_len, encoding);
2004
2005
2
        proto_tree_add_item(tree, hf_mpeg_descr_component_text, tvb, offset+enc_len, end-offset-enc_len, dvb_enc_to_item_enc(encoding));
2006
2
    }
2007
2
}
2008
2009
/* 0x51 Mosaic Descriptor */
2010
static int hf_mpeg_descr_mosaic_mosaic_entry_point;
2011
static int hf_mpeg_descr_mosaic_number_of_horizontal_elementary_cells;
2012
static int hf_mpeg_descr_mosaic_reserved_future_use1;
2013
static int hf_mpeg_descr_mosaic_number_of_vertical_elementary_cells;
2014
static int hf_mpeg_descr_mosaic_logical_cell_id;
2015
static int hf_mpeg_descr_mosaic_reserved_future_use2;
2016
static int hf_mpeg_descr_mosaic_logical_cell_presentation_info;
2017
static int hf_mpeg_descr_mosaic_elementary_cell_field_length;
2018
static int hf_mpeg_descr_mosaic_reserved_future_use3;
2019
static int hf_mpeg_descr_mosaic_elementary_cell_id;
2020
static int hf_mpeg_descr_mosaic_cell_linkage_info;
2021
static int hf_mpeg_descr_mosaic_bouquet_id;
2022
static int hf_mpeg_descr_mosaic_original_network_id;
2023
static int hf_mpeg_descr_mosaic_transport_stream_id;
2024
static int hf_mpeg_descr_mosaic_service_id;
2025
static int hf_mpeg_descr_mosaic_event_id;
2026
2027
14
#define MPEG_DESCR_MOSAIC_ENTRY_POINT_MASK              0x80
2028
14
#define MPEG_DESCR_MOSAIC_NUM_OF_H_CELLS_MASK           0x70
2029
14
#define MPEG_DESCR_MOSAIC_RESERVED1_MASK                0x08
2030
14
#define MPEG_DESCR_MOSAIC_NUM_OF_V_CELLS_MASK           0x07
2031
14
#define MPEG_DESCR_MOSAIC_LOGICAL_CELL_ID_MASK          0xFC00
2032
14
#define MPEG_DESCR_MOSAIC_RESERVED2_MASK                0x03F8
2033
14
#define MPEG_DESCR_MOSAIC_CELL_PRESENTATION_INFO_MASK   0x0007
2034
14
#define MPEG_DESCR_MOSAIC_RESERVED3_MASK                0xC0
2035
14
#define MPEG_DESCR_MOSAIC_ELEMENTARY_CELL_ID_MASK       0x3F
2036
2037
static int ett_mpeg_descriptor_mosaic_logical_cell;
2038
static int ett_mpeg_descriptor_mosaic_elementary_cells;
2039
2040
static const value_string mpeg_descr_mosaic_number_of_e_cells_vals[] = {
2041
    { 0x00, "One cell" },
2042
    { 0x01, "Two cells" },
2043
    { 0x02, "Three cells" },
2044
    { 0x03, "Four cells" },
2045
    { 0x04, "Five cells" },
2046
    { 0x05, "Six cells" },
2047
    { 0x06, "Seven cells" },
2048
    { 0x07, "Eight cells" },
2049
2050
    { 0, NULL }
2051
};
2052
2053
static const range_string mpeg_descr_mosaic_logical_cell_presentation_info_vals[] = {
2054
    { 0x00, 0x00, "Undefined" },
2055
    { 0x01, 0x01, "Video" },
2056
    { 0x02, 0x02, "Still picture" },
2057
    { 0x03, 0x03, "Graphics/Text" },
2058
    { 0x04, 0x07, "Reserved for future use" },
2059
2060
    { 0x00, 0x00, NULL }
2061
};
2062
2063
static const range_string mpeg_descr_mosaic_cell_linkage_info_vals[] = {
2064
    { 0x00, 0x00, "Underfined" },
2065
    { 0x01, 0x01, "Bouquet related" },
2066
    { 0x02, 0x02, "Service related" },
2067
    { 0x03, 0x03, "Other mosaic related" },
2068
    { 0x04, 0x04, "Event related" },
2069
    { 0x05, 0xFF, "Reserved for future use" },
2070
2071
    { 0x00, 0x00, NULL }
2072
};
2073
2074
static unsigned
2075
proto_mpeg_descriptor_dissect_mosaic_measure_l_cell_len(tvbuff_t *tvb, unsigned offset)
2076
3
{
2077
3
    unsigned l_offset = offset;
2078
2079
3
    l_offset += 2;
2080
3
    uint8_t elementary_cell_field_length = tvb_get_uint8(tvb, l_offset);
2081
3
    l_offset += 1;
2082
3
    l_offset += elementary_cell_field_length;
2083
2084
3
    uint8_t cell_linkage_info = tvb_get_uint8(tvb, l_offset);
2085
3
    l_offset += 1;
2086
2087
3
    switch (cell_linkage_info) {
2088
0
        case 0x01 :
2089
0
            l_offset += 2;
2090
0
            break;
2091
1
        case 0x02 :
2092
1
        case 0x03 :
2093
1
            l_offset += 6;
2094
1
            break;
2095
0
        case 0x04 :
2096
0
            l_offset += 8;
2097
0
            break;
2098
3
    }
2099
2100
3
    return l_offset - offset;
2101
3
}
2102
2103
static void
2104
proto_mpeg_descriptor_dissect_mosaic(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
2105
2
{
2106
2
    unsigned end = offset + len;
2107
2108
2
    proto_tree_add_item(tree, hf_mpeg_descr_mosaic_mosaic_entry_point, tvb, offset, 1, ENC_BIG_ENDIAN);
2109
2
    proto_tree_add_item(tree, hf_mpeg_descr_mosaic_number_of_horizontal_elementary_cells, tvb, offset, 1, ENC_BIG_ENDIAN);
2110
2
    proto_tree_add_item(tree, hf_mpeg_descr_mosaic_reserved_future_use1, tvb, offset, 1, ENC_BIG_ENDIAN);
2111
2
    proto_tree_add_item(tree, hf_mpeg_descr_mosaic_number_of_vertical_elementary_cells, tvb, offset, 1, ENC_BIG_ENDIAN);
2112
2
    offset += 1;
2113
2114
5
    while (offset < end) {
2115
3
        unsigned l_cell_len = proto_mpeg_descriptor_dissect_mosaic_measure_l_cell_len(tvb, offset);
2116
2117
3
        uint8_t logical_cell_id = tvb_get_bits8(tvb, offset*8, 6);
2118
3
        proto_tree *cell_tree = proto_tree_add_subtree_format(tree, tvb, offset, l_cell_len, ett_mpeg_descriptor_mosaic_logical_cell, NULL, "Logical Cell 0x%02x", logical_cell_id);
2119
3
        proto_tree_add_item(cell_tree, hf_mpeg_descr_mosaic_logical_cell_id, tvb, offset, 2, ENC_BIG_ENDIAN);
2120
3
        proto_tree_add_item(cell_tree, hf_mpeg_descr_mosaic_reserved_future_use2, tvb, offset, 2, ENC_BIG_ENDIAN);
2121
3
        proto_tree_add_item(cell_tree, hf_mpeg_descr_mosaic_logical_cell_presentation_info, tvb, offset, 2, ENC_BIG_ENDIAN);
2122
3
        offset += 2;
2123
2124
3
        uint8_t elementary_cell_field_length = tvb_get_uint8(tvb, offset);
2125
3
        proto_tree_add_item(cell_tree, hf_mpeg_descr_mosaic_elementary_cell_field_length, tvb, offset, 1, ENC_BIG_ENDIAN);
2126
3
        offset += 1;
2127
2128
3
        proto_tree *field_tree = NULL;
2129
3
        if (elementary_cell_field_length > 0) {
2130
3
            field_tree = proto_tree_add_subtree(cell_tree, tvb, offset, elementary_cell_field_length, ett_mpeg_descriptor_mosaic_elementary_cells, NULL, "Elementary Cells");
2131
3
        }
2132
102
        while (elementary_cell_field_length > 0) {
2133
99
            proto_tree_add_item(field_tree, hf_mpeg_descr_mosaic_reserved_future_use3, tvb, offset, 1, ENC_BIG_ENDIAN);
2134
99
            proto_tree_add_item(field_tree, hf_mpeg_descr_mosaic_elementary_cell_id, tvb, offset, 1, ENC_BIG_ENDIAN);
2135
99
            offset += 1;
2136
99
            elementary_cell_field_length -= 1;
2137
99
        }
2138
2139
3
        uint8_t cell_linkage_info = tvb_get_uint8(tvb, offset);
2140
3
        proto_tree_add_item(cell_tree, hf_mpeg_descr_mosaic_cell_linkage_info, tvb, offset, 1, ENC_BIG_ENDIAN);
2141
3
        offset += 1;
2142
2143
3
        switch (cell_linkage_info) {
2144
0
            case 0x01 :
2145
0
                proto_tree_add_item(cell_tree, hf_mpeg_descr_mosaic_bouquet_id, tvb, offset, 2, ENC_BIG_ENDIAN);
2146
0
                offset += 2;
2147
0
                break;
2148
1
            case 0x02 :
2149
1
            case 0x03 :
2150
1
            case 0x04 :
2151
1
                proto_tree_add_item(cell_tree, hf_mpeg_descr_mosaic_original_network_id, tvb, offset, 2, ENC_BIG_ENDIAN);
2152
1
                offset += 2;
2153
2154
1
                proto_tree_add_item(cell_tree, hf_mpeg_descr_mosaic_transport_stream_id, tvb, offset, 2, ENC_BIG_ENDIAN);
2155
1
                offset += 2;
2156
2157
1
                proto_tree_add_item(cell_tree, hf_mpeg_descr_mosaic_service_id, tvb, offset, 2, ENC_BIG_ENDIAN);
2158
1
                offset += 2;
2159
1
                break;
2160
3
        }
2161
2162
3
        if (cell_linkage_info == 0x04) {
2163
0
            proto_tree_add_item(cell_tree, hf_mpeg_descr_mosaic_event_id, tvb, offset, 2, ENC_BIG_ENDIAN);
2164
0
            offset += 2;
2165
0
        }
2166
3
    }
2167
2
}
2168
2169
/* 0x52 Stream Identifier Descriptor */
2170
static int hf_mpeg_descr_stream_identifier_component_tag;
2171
2172
static void
2173
proto_mpeg_descriptor_dissect_stream_identifier(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
2174
1
{
2175
1
    proto_tree_add_item(tree, hf_mpeg_descr_stream_identifier_component_tag, tvb, offset, 1, ENC_BIG_ENDIAN);
2176
1
}
2177
2178
/* 0x53 CA Identifier Descriptor */
2179
static int hf_mpeg_descr_ca_identifier_system_id;
2180
2181
static void
2182
proto_mpeg_descriptor_dissect_ca_identifier(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
2183
8
{
2184
8
    unsigned end = offset + len;
2185
2186
206
    while (offset < end) {
2187
198
        proto_tree_add_item(tree, hf_mpeg_descr_ca_identifier_system_id, tvb, offset, 2, ENC_BIG_ENDIAN);
2188
198
        offset += 2;
2189
198
    }
2190
2191
8
}
2192
2193
/* 0x54 Content Descriptor */
2194
static int hf_mpeg_descr_content_nibble;
2195
static int hf_mpeg_descr_content_nibble_level_1;
2196
static int hf_mpeg_descr_content_nibble_level_2;
2197
static int hf_mpeg_descr_content_user_byte;
2198
2199
14
#define MPEG_DESCR_CONTENT_NIBBLE_LEVEL_1_MASK  0xF0
2200
14
#define MPEG_DESCR_CONTENT_NIBBLE_LEVEL_2_MASK  0x0F
2201
2202
static int ett_mpeg_descriptor_content_nibble;
2203
2204
static const value_string mpeg_descr_content_nibble_vals[] = {
2205
2206
    { 0x10, "movie/drama (general)" },
2207
    { 0x11, "detective/thriller" },
2208
    { 0x12, "adventure/western/war" },
2209
    { 0x13, "science fiction/fantasy/horror" },
2210
    { 0x14, "comedy" },
2211
    { 0x15, "soap/melodrama/folkloric" },
2212
    { 0x16, "romance" },
2213
    { 0x17, "serious/classical/religious/historical movie/drama" },
2214
    { 0x18, "adult movie/drama" },
2215
    { 0x1F, "user defined (movie/drama)" },
2216
2217
    { 0x20, "news/current affairs (general)" },
2218
    { 0x21, "news/weather report" },
2219
    { 0x22, "news magazine" },
2220
    { 0x23, "documentary" },
2221
    { 0x24, "discussion/interview/debate" },
2222
    { 0x2F, "user defined (news/current affairs)" },
2223
2224
    { 0x30, "show/game show (general)" },
2225
    { 0x31, "game show/quiz/contest" },
2226
    { 0x32, "variety show" },
2227
    { 0x33, "talk show" },
2228
    { 0x3F, "user defined (show/game show)" },
2229
2230
    { 0x40, "sports (general)" },
2231
    { 0x41, "special events (Olympic Games, World Cup, etc.)" },
2232
    { 0x42, "sports magazines" },
2233
    { 0x43, "football/soccer" },
2234
    { 0x44, "tennis/squash" },
2235
    { 0x45, "team sports (excluding football)" },
2236
    { 0x46, "athletics" },
2237
    { 0x47, "motor sport" },
2238
    { 0x48, "water sport" },
2239
    { 0x49, "winter sports" },
2240
    { 0x4A, "equestrian" },
2241
    { 0x4B, "martial sports" },
2242
    { 0x4F, "user defined (sports)" },
2243
2244
    { 0x50, "children's/youth programmes (general)" },
2245
    { 0x51, "pre-school children's programmes" },
2246
    { 0x52, "entertainment programmes for 6 to14" },
2247
    { 0x53, "entertainment programmes for 10 to 16" },
2248
    { 0x54, "informational/educational/school programmes" },
2249
    { 0x55, "cartoons/puppets" },
2250
    { 0x5F, "user defined (children's/youth programmes)" },
2251
2252
    { 0x60, "music/ballet/dance (general)" },
2253
    { 0x61, "rock/pop" },
2254
    { 0x62, "serious music/classical music" },
2255
    { 0x63, "folk/traditional music" },
2256
    { 0x64, "jazz" },
2257
    { 0x65, "musical/opera" },
2258
    { 0x66, "ballet" },
2259
    { 0x6F, "user defined (music/ballet/dance)" },
2260
2261
    { 0x70, "arts/culture (without music, general)" },
2262
    { 0x71, "performing arts" },
2263
    { 0x72, "fine arts" },
2264
    { 0x73, "religion" },
2265
    { 0x74, "popular culture/traditional arts" },
2266
    { 0x75, "literature" },
2267
    { 0x76, "film/cinema" },
2268
    { 0x77, "experimental film/video" },
2269
    { 0x78, "broadcasting/press" },
2270
    { 0x79, "new media" },
2271
    { 0x7A, "arts/culture magazines" },
2272
    { 0x7B, "fashion" },
2273
    { 0x7F, "user defined (arts/culture)" },
2274
2275
    { 0x80, "social/political issues/economics (general)" },
2276
    { 0x81, "magazines/reports/documentary" },
2277
    { 0x82, "economics/social advisory" },
2278
    { 0x83, "remarkable people" },
2279
    { 0x8F, "user defined (social/political issues/economics)" },
2280
2281
    { 0x90, "education/science/factual topics (general)" },
2282
    { 0x91, "nature/animals/environment" },
2283
    { 0x92, "technology/natural sciences" },
2284
    { 0x93, "medicine/physiology/psychology" },
2285
    { 0x94, "foreign countries/expeditions" },
2286
    { 0x95, "social/spiritual sciences" },
2287
    { 0x96, "further education" },
2288
    { 0x97, "languages" },
2289
    { 0x9F, "user defined (education/science/factual topics)" },
2290
2291
    { 0xA0, "leisure hobbies (general)" },
2292
    { 0xA1, "tourism/travel" },
2293
    { 0xA2, "handicraft" },
2294
    { 0xA3, "motoring" },
2295
    { 0xA4, "fitness and health" },
2296
    { 0xA5, "cooking" },
2297
    { 0xA6, "advertisement/shopping" },
2298
    { 0xA7, "gardening" },
2299
    { 0xAF, "user defined (leisure hobbies)" },
2300
2301
    { 0xB0, "original language" },
2302
    { 0xB1, "black and white" },
2303
    { 0xB2, "unpublished" },
2304
    { 0xB3, "live broadcast" },
2305
    { 0xBF, "user defined (special characteristics)" },
2306
2307
    { 0x00, NULL }
2308
};
2309
static value_string_ext mpeg_descr_content_nibble_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_content_nibble_vals);
2310
2311
static const value_string mpeg_descr_content_nibble_level_1_vals[] = {
2312
2313
    { 0x1, "Movie/Drama" },
2314
    { 0x2, "News/Current affairs" },
2315
    { 0x3, "Show/Game show" },
2316
    { 0x4, "Sports" },
2317
    { 0x5, "Children's/Youth programmes" },
2318
    { 0x6, "Music/Ballet/Dance" },
2319
    { 0x7, "Arts/Culture (without music)" },
2320
    { 0x8, "Social/Political issues/Economics" },
2321
    { 0x9, "Education/Science/Factual topics" },
2322
    { 0xA, "Leisure hobbies" },
2323
    { 0xB, "Special characteristics" },
2324
2325
    { 0x00, NULL }
2326
};
2327
static value_string_ext mpeg_descr_content_nibble_level_1_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_content_nibble_level_1_vals);
2328
2329
static void
2330
proto_mpeg_descriptor_dissect_content(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
2331
2
{
2332
2
    proto_item *ni;
2333
2
    proto_tree *nibble_tree;
2334
2335
2
    unsigned end = offset + len;
2336
2337
77
    while (offset < end) {
2338
75
        ni = proto_tree_add_item(tree, hf_mpeg_descr_content_nibble, tvb, offset, 1, ENC_BIG_ENDIAN);
2339
75
        nibble_tree = proto_item_add_subtree(ni, ett_mpeg_descriptor_content_nibble);
2340
2341
75
        proto_tree_add_item(nibble_tree, hf_mpeg_descr_content_nibble_level_1, tvb, offset, 1, ENC_BIG_ENDIAN);
2342
75
        proto_tree_add_item(nibble_tree, hf_mpeg_descr_content_nibble_level_2, tvb, offset, 1, ENC_BIG_ENDIAN);
2343
75
        offset += 1;
2344
2345
75
        proto_tree_add_item(tree, hf_mpeg_descr_content_user_byte, tvb, offset, 1, ENC_BIG_ENDIAN);
2346
75
        offset += 1;
2347
75
    }
2348
2349
2
}
2350
2351
/* 0x55 Parental Rating Descriptor */
2352
static int hf_mpeg_descr_parental_rating_country_code;
2353
static int hf_mpeg_descr_parental_rating_rating;
2354
2355
static const value_string mpeg_descr_parental_rating_vals[] = {
2356
    { 0x00, "Undefined" },
2357
    { 0x01, "Minimum 4 year old" },
2358
    { 0x02, "Minimum 5 year old" },
2359
    { 0x03, "Minimum 6 year old" },
2360
    { 0x04, "Minimum 7 year old" },
2361
    { 0x05, "Minimum 8 year old" },
2362
    { 0x06, "Minimum 9 year old" },
2363
    { 0x07, "Minimum 10 year old" },
2364
    { 0x08, "Minimum 11 year old" },
2365
    { 0x09, "Minimum 12 year old" },
2366
    { 0x0A, "Minimum 13 year old" },
2367
    { 0x0B, "Minimum 14 year old" },
2368
    { 0x0C, "Minimum 15 year old" },
2369
    { 0x0D, "Minimum 16 year old" },
2370
    { 0x0E, "Minimum 17 year old" },
2371
    { 0x0F, "Minimum 18 year old" },
2372
2373
    { 0x00, NULL }
2374
};
2375
static value_string_ext mpeg_descr_parental_rating_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_parental_rating_vals);
2376
2377
2378
static void
2379
proto_mpeg_descriptor_dissect_parental_rating(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
2380
0
{
2381
0
    proto_tree_add_item(tree, hf_mpeg_descr_parental_rating_country_code, tvb, offset, 3, ENC_ASCII);
2382
0
    offset += 3;
2383
2384
0
    proto_tree_add_item(tree, hf_mpeg_descr_parental_rating_rating, tvb, offset, 1, ENC_BIG_ENDIAN);
2385
0
}
2386
2387
/* 0x56 Teletext Descriptor */
2388
static int hf_mpeg_descr_teletext_lang_code;
2389
static int hf_mpeg_descr_teletext_type;
2390
static int hf_mpeg_descr_teletext_magazine_number;
2391
static int hf_mpeg_descr_teletext_page_number;
2392
2393
14
#define MPEG_DESCR_TELETEXT_TYPE_MASK           0xF8
2394
14
#define MPEG_DESCR_TELETEXT_MAGAZINE_NUMBER_MASK    0x07
2395
2396
static const value_string mpeg_descr_teletext_type_vals[] = {
2397
    { 0x00, "Reserved" },
2398
    { 0x01, "Initial Teletext Page" },
2399
    { 0x02, "Teletext Subtitle Page" },
2400
    { 0x03, "Additional Information Page" },
2401
    { 0x04, "Programme Schedule Page" },
2402
    { 0x05, "Teletext Subtitle Page for hearing impaired people" },
2403
2404
    { 0, NULL }
2405
2406
};
2407
2408
static void
2409
proto_mpeg_descriptor_dissect_teletext(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
2410
0
{
2411
0
    unsigned end = offset + len;
2412
2413
0
    while (offset < end) {
2414
0
        proto_tree_add_item(tree, hf_mpeg_descr_teletext_lang_code, tvb, offset, 3, ENC_ASCII);
2415
0
        offset += 3;
2416
2417
0
        proto_tree_add_item(tree, hf_mpeg_descr_teletext_type, tvb, offset, 1, ENC_BIG_ENDIAN);
2418
0
        proto_tree_add_item(tree, hf_mpeg_descr_teletext_magazine_number, tvb, offset, 1, ENC_BIG_ENDIAN);
2419
0
        offset += 1;
2420
2421
0
        proto_tree_add_item(tree, hf_mpeg_descr_teletext_page_number, tvb, offset, 1, ENC_BIG_ENDIAN);
2422
0
        offset += 1;
2423
0
    }
2424
0
}
2425
2426
/* 0x57 Telephone Descriptor */
2427
static int hf_mpeg_descr_telephone_reserved_future_use1;
2428
static int hf_mpeg_descr_telephone_foreign_availability;
2429
static int hf_mpeg_descr_telephone_connection_type;
2430
static int hf_mpeg_descr_telephone_reserved_future_use2;
2431
static int hf_mpeg_descr_telephone_country_prefix_length;
2432
static int hf_mpeg_descr_telephone_international_area_code_length;
2433
static int hf_mpeg_descr_telephone_operator_code_length;
2434
static int hf_mpeg_descr_telephone_reserved_future_use3;
2435
static int hf_mpeg_descr_telephone_national_area_code_length;
2436
static int hf_mpeg_descr_telephone_core_number_length;
2437
static int hf_mpeg_descr_telephone_number;
2438
static int hf_mpeg_descr_telephone_country_prefix;
2439
static int hf_mpeg_descr_telephone_international_area_code;
2440
static int hf_mpeg_descr_telephone_operator_code;
2441
static int hf_mpeg_descr_telephone_national_area_code;
2442
static int hf_mpeg_descr_telephone_core_number;
2443
2444
14
#define MPEG_DESCR_TELEPHONE_RESERVED1_MASK                 0xC0
2445
14
#define MPEG_DESCR_TELEPHONE_FOREIGN_AVAILABILITY_MASK      0x20
2446
14
#define MPEG_DESCR_TELEPHONE_CONNECTION_TYPE_MASK           0x1F
2447
14
#define MPEG_DESCR_TELEPHONE_RESERVED2_MASK                 0x80
2448
14
#define MPEG_DESCR_TELEPHONE_COUNTRY_PREFIX_LEN_MASK        0x60
2449
14
#define MPEG_DESCR_TELEPHONE_INTERNATIONAL_CODE_LEN_MASK    0x1C
2450
14
#define MPEG_DESCR_TELEPHONE_OPERATOR_CODE_LEN_MASK         0x03
2451
14
#define MPEG_DESCR_TELEPHONE_RESERVED3_MASK                 0x80
2452
14
#define MPEG_DESCR_TELEPHONE_NATIONAL_CODE_LEN_MASK         0x70
2453
14
#define MPEG_DESCR_TELEPHONE_CORE_NUMBER_LEN_MASK           0x0F
2454
2455
static const value_string mpeg_descr_telephone_foreign_availability_vals[] = {
2456
    { 0x0, "Inside country only" },
2457
    { 0x1, "Foreign call available" },
2458
2459
    { 0x0, NULL }
2460
};
2461
2462
static const range_string mpeg_descr_telephone_connection_type_vals[] = {
2463
    { 0x00, 0x1F, "Unknown" },
2464
2465
    { 0, 0, NULL }
2466
};
2467
2468
static int ett_mpeg_descriptor_telephone_number;
2469
2470
static void
2471
proto_mpeg_descriptor_dissect_telephone(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
2472
9
{
2473
9
    uint32_t country_prefix_length;
2474
9
    uint32_t international_area_code_length;
2475
9
    uint32_t operator_code_length;
2476
9
    uint32_t national_area_code_length;
2477
9
    uint32_t core_number_length;
2478
2479
9
    proto_item * ni;
2480
9
    proto_tree * number_tree;
2481
2482
9
    proto_tree_add_item(tree, hf_mpeg_descr_telephone_reserved_future_use1, tvb, offset, 1, ENC_BIG_ENDIAN);
2483
9
    proto_tree_add_item(tree, hf_mpeg_descr_telephone_foreign_availability, tvb, offset, 1, ENC_BIG_ENDIAN);
2484
9
    proto_tree_add_item(tree, hf_mpeg_descr_telephone_connection_type, tvb, offset, 1, ENC_BIG_ENDIAN);
2485
9
    offset += 1;
2486
2487
9
    proto_tree_add_item(tree, hf_mpeg_descr_telephone_reserved_future_use2, tvb, offset, 1, ENC_BIG_ENDIAN);
2488
9
    proto_tree_add_item_ret_uint(tree, hf_mpeg_descr_telephone_country_prefix_length, tvb, offset, 1, ENC_BIG_ENDIAN, &country_prefix_length);
2489
9
    proto_tree_add_item_ret_uint(tree, hf_mpeg_descr_telephone_international_area_code_length, tvb, offset, 1, ENC_BIG_ENDIAN, &international_area_code_length);
2490
9
    proto_tree_add_item_ret_uint(tree, hf_mpeg_descr_telephone_operator_code_length, tvb, offset, 1, ENC_BIG_ENDIAN, &operator_code_length);
2491
9
    offset += 1;
2492
2493
9
    proto_tree_add_item(tree, hf_mpeg_descr_telephone_reserved_future_use3, tvb, offset, 1, ENC_BIG_ENDIAN);
2494
9
    proto_tree_add_item_ret_uint(tree, hf_mpeg_descr_telephone_national_area_code_length, tvb, offset, 1, ENC_BIG_ENDIAN, &national_area_code_length);
2495
9
    proto_tree_add_item_ret_uint(tree, hf_mpeg_descr_telephone_core_number_length, tvb, offset, 1, ENC_BIG_ENDIAN, &core_number_length);
2496
9
    offset += 1;
2497
2498
9
    uint32_t number_l = country_prefix_length + international_area_code_length + operator_code_length + national_area_code_length + core_number_length;
2499
2500
9
    if (number_l == 0) return;
2501
9
    ni = proto_tree_add_item(tree, hf_mpeg_descr_telephone_number, tvb, offset, number_l, ENC_ISO_8859_1);
2502
9
    number_tree = proto_item_add_subtree(ni, ett_mpeg_descriptor_telephone_number);
2503
2504
9
    if (country_prefix_length != 0) {
2505
8
        proto_tree_add_item(number_tree, hf_mpeg_descr_telephone_country_prefix, tvb, offset, country_prefix_length, ENC_ISO_8859_1);
2506
8
        offset += country_prefix_length;
2507
8
    }
2508
2509
9
    if (international_area_code_length != 0) {
2510
8
        proto_tree_add_item(number_tree, hf_mpeg_descr_telephone_international_area_code, tvb, offset, international_area_code_length, ENC_ISO_8859_1);
2511
8
        offset += international_area_code_length;
2512
8
    }
2513
2514
9
    if (operator_code_length != 0) {
2515
9
        proto_tree_add_item(number_tree, hf_mpeg_descr_telephone_operator_code, tvb, offset, operator_code_length, ENC_ISO_8859_1);
2516
9
        offset += operator_code_length;
2517
9
    }
2518
2519
9
    if (national_area_code_length != 0) {
2520
8
        proto_tree_add_item(number_tree, hf_mpeg_descr_telephone_national_area_code, tvb, offset, national_area_code_length, ENC_ISO_8859_1);
2521
8
        offset += national_area_code_length;
2522
8
    }
2523
2524
9
    if (core_number_length == 0) return;
2525
9
    proto_tree_add_item(number_tree, hf_mpeg_descr_telephone_core_number, tvb, offset, core_number_length, ENC_ISO_8859_1);
2526
9
}
2527
2528
/* 0x58 Local Time Offset Descriptor */
2529
static int hf_mpeg_descr_local_time_offset_country_code;
2530
static int hf_mpeg_descr_local_time_offset_region_id;
2531
static int hf_mpeg_descr_local_time_offset_reserved;
2532
static int hf_mpeg_descr_local_time_offset_polarity;
2533
static int hf_mpeg_descr_local_time_offset_offset;
2534
static int hf_mpeg_descr_local_time_offset_time_of_change;
2535
static int hf_mpeg_descr_local_time_offset_next_time_offset;
2536
2537
14
#define MPEG_DESCR_LOCAL_TIME_OFFSET_COUNTRY_REGION_ID_MASK 0xFC
2538
14
#define MPEG_DESCR_LOCAL_TIME_OFFSET_RESERVED_MASK      0x02
2539
14
#define MPEG_DESCR_LOCAL_TIME_OFFSET_POLARITY           0x01
2540
2541
static const value_string mpeg_descr_local_time_offset_polarity_vals[] = {
2542
    { 0x0, "Positive (local time ahead of UTC)" },
2543
    { 0x1, "Negative (local time behind UTC)" },
2544
2545
    { 0x0, NULL }
2546
};
2547
2548
static void
2549
proto_mpeg_descriptor_dissect_local_time_offset(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
2550
1
{
2551
1
    unsigned end = offset + len;
2552
1
    uint8_t  hour, min;
2553
1
    nstime_t local_time_offset, time_of_change, next_time_offset;
2554
2555
8
    while (offset < end) {
2556
7
        proto_tree_add_item(tree, hf_mpeg_descr_local_time_offset_country_code, tvb, offset, 3, ENC_ASCII);
2557
7
        offset += 3;
2558
2559
7
        proto_tree_add_item(tree, hf_mpeg_descr_local_time_offset_region_id, tvb, offset, 1, ENC_BIG_ENDIAN);
2560
7
        proto_tree_add_item(tree, hf_mpeg_descr_local_time_offset_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
2561
7
        proto_tree_add_item(tree, hf_mpeg_descr_local_time_offset_polarity, tvb, offset, 1, ENC_BIG_ENDIAN);
2562
7
        offset += 1;
2563
2564
7
        hour = MPEG_SECT_BCD44_TO_DEC(tvb_get_uint8(tvb, offset));
2565
7
        min = MPEG_SECT_BCD44_TO_DEC(tvb_get_uint8(tvb, offset+1));
2566
7
        nstime_set_zero(&local_time_offset);
2567
7
        local_time_offset.secs = hour*60*60 + min*60;
2568
7
        proto_tree_add_time_format_value(tree, hf_mpeg_descr_local_time_offset_offset,
2569
7
                tvb, offset, 2, &local_time_offset, "%02d:%02d", hour, min);
2570
7
        offset += 2;
2571
2572
2573
7
        if (packet_mpeg_sect_mjd_to_utc_time(tvb, offset, &time_of_change) < 0) {
2574
5
            proto_tree_add_time_format_value(tree, hf_mpeg_descr_local_time_offset_time_of_change, tvb, offset, 5, &time_of_change, "Unparseable time");
2575
5
        } else {
2576
2
            proto_tree_add_time(tree, hf_mpeg_descr_local_time_offset_time_of_change, tvb, offset, 5, &time_of_change);
2577
2
        }
2578
7
        offset += 5;
2579
2580
7
        hour = MPEG_SECT_BCD44_TO_DEC(tvb_get_uint8(tvb, offset));
2581
7
        min = MPEG_SECT_BCD44_TO_DEC(tvb_get_uint8(tvb, offset+1));
2582
7
        nstime_set_zero(&next_time_offset);
2583
7
        next_time_offset.secs = hour*60*60 + min*60;
2584
7
        proto_tree_add_time_format_value(tree, hf_mpeg_descr_local_time_offset_next_time_offset,
2585
7
                tvb, offset, 2, &next_time_offset, "%02d:%02d", hour, min);
2586
7
        offset += 2;
2587
7
    }
2588
1
}
2589
2590
/* 0x59 Subtitling Descriptor */
2591
static int hf_mpeg_descr_subtitling_lang_code;
2592
static int hf_mpeg_descr_subtitling_type;
2593
static int hf_mpeg_descr_subtitling_composition_page_id;
2594
static int hf_mpeg_descr_subtitling_ancillary_page_id;
2595
2596
2597
static const value_string mpeg_descr_subtitling_type_vals[] = {
2598
    { 0x01, "EBU Teletext subtitles" },
2599
    { 0x02, "associated EBU Teletext" },
2600
    { 0x03, "VBI data" },
2601
    { 0x10, "DVB subtitles (normal) with no monitor aspect ratio criticality" },
2602
    { 0x11, "DVB subtitles (normal) for display on 4:3 aspect ratio monitor" },
2603
    { 0x12, "DVB subtitles (normal) for display on 16:9 aspect ratio monitor" },
2604
    { 0x13, "DVB subtitles (normal) for display on 2.21:1 aspect ratio monitor" },
2605
    { 0x14, "DVB subtitles (normal) for display on a high definition monitor" },
2606
    { 0x20, "DVB subtitles (for the hard of hearing) with no monitor aspect ratio criticality" },
2607
    { 0x21, "DVB subtitles (for the hard of hearing) for display on 4:3 aspect ratio monitor" },
2608
    { 0x22, "DVB subtitles (for the hard of hearing) for display on 16:9 aspect ratio monitor" },
2609
    { 0x23, "DVB subtitles (for the hard of hearing) for display on 2.21:1 aspect ratio monitor" },
2610
    { 0x24, "DVB subtitles (for the hard of hearing) for display on a high definition monitor" },
2611
    { 0x30, "Open (in-vision) sign language interpretation for the deaf" },
2612
    { 0x31, "Closed sign language interpretation for the deaf" },
2613
    { 0x40, "video up-sampled from standard definition source material" },
2614
2615
    { 0, NULL }
2616
};
2617
static value_string_ext mpeg_descr_subtitling_type_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_subtitling_type_vals);
2618
2619
static void
2620
proto_mpeg_descriptor_dissect_subtitling(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
2621
3
{
2622
3
    unsigned end = offset + len;
2623
2624
29
    while (offset < end) {
2625
26
        proto_tree_add_item(tree, hf_mpeg_descr_subtitling_lang_code, tvb, offset, 3, ENC_ASCII);
2626
26
        offset += 3;
2627
2628
26
        proto_tree_add_item(tree, hf_mpeg_descr_subtitling_type, tvb, offset, 1, ENC_BIG_ENDIAN);
2629
26
        offset += 1;
2630
2631
26
        proto_tree_add_item(tree, hf_mpeg_descr_subtitling_composition_page_id, tvb, offset, 2, ENC_BIG_ENDIAN);
2632
26
        offset += 2;
2633
2634
26
        proto_tree_add_item(tree, hf_mpeg_descr_subtitling_ancillary_page_id, tvb, offset, 2, ENC_BIG_ENDIAN);
2635
26
        offset += 2;
2636
2637
26
    }
2638
3
}
2639
2640
/* 0x5A Terrestrial Delivery System Descriptor */
2641
static int hf_mpeg_descr_terrestrial_delivery_centre_frequency;
2642
static int hf_mpeg_descr_terrestrial_delivery_bandwidth;
2643
static int hf_mpeg_descr_terrestrial_delivery_priority;
2644
static int hf_mpeg_descr_terrestrial_delivery_time_slicing_indicator;
2645
static int hf_mpeg_descr_terrestrial_delivery_mpe_fec_indicator;
2646
static int hf_mpeg_descr_terrestrial_delivery_reserved1;
2647
static int hf_mpeg_descr_terrestrial_delivery_constellation;
2648
static int hf_mpeg_descr_terrestrial_delivery_hierarchy_information;
2649
static int hf_mpeg_descr_terrestrial_delivery_code_rate_hp_stream;
2650
static int hf_mpeg_descr_terrestrial_delivery_code_rate_lp_stream;
2651
static int hf_mpeg_descr_terrestrial_delivery_guard_interval;
2652
static int hf_mpeg_descr_terrestrial_delivery_transmission_mode;
2653
static int hf_mpeg_descr_terrestrial_delivery_other_frequency_flag;
2654
static int hf_mpeg_descr_terrestrial_delivery_reserved2;
2655
2656
14
#define MPEG_DESCR_TERRESTRIAL_DELIVERY_BANDWIDTH_MASK          0xE0
2657
14
#define MPEG_DESCR_TERRESTRIAL_DELIVERY_PRIORITY_MASK           0x10
2658
14
#define MPEG_DESCR_TERRESTRIAL_DELIVERY_TIME_SLICING_INDICATOR_MASK 0x08
2659
14
#define MPEG_DESCR_TERRESTRIAL_DELIVERY_MPE_FEC_INDICATOR_MASK      0x04
2660
14
#define MPEG_DESCR_TERRESTRIAL_DELIVERY_RESERVED1_MASK          0x03
2661
14
#define MPEG_DESCR_TERRESTRIAL_DELIVERY_CONSTELLATION_MASK      0xC0
2662
14
#define MPEG_DESCR_TERRESTRIAL_DELIVERY_HIERARCHY_INFORMATION_MASK  0x38
2663
14
#define MPEG_DESCR_TERRESTRIAL_DELIVERY_CODE_RATE_HP_STREAM_MASK    0x07
2664
14
#define MPEG_DESCR_TERRESTRIAL_DELIVERY_CODE_RATE_LP_STREAM_MASK    0xE0
2665
14
#define MPEG_DESCR_TERRESTRIAL_DELIVERY_GUARD_INTERVAL_MASK     0x18
2666
14
#define MPEG_DESCR_TERRESTRIAL_DELIVERY_TRANSMISSION_MODE_MASK      0x06
2667
14
#define MPEG_DESCR_TERRESTRIAL_DELIVERY_OTHER_FREQUENCY_FLAG_MASK   0x01
2668
2669
static const value_string mpeg_descr_terrestrial_delivery_bandwidth_vals[] = {
2670
    { 0x0, "8 MHz" },
2671
    { 0x1, "7 MHz" },
2672
    { 0x2, "6 MHz" },
2673
    { 0x3, "5 Mhz" },
2674
2675
    { 0x0, NULL }
2676
};
2677
2678
static const value_string mpeg_descr_terrestrial_delivery_priority_vals[] = {
2679
    { 0x0, "Low Priority" },
2680
    { 0x1, "High Priority (or N/A if not hierarchical stream)" },
2681
2682
    { 0x0, NULL }
2683
};
2684
2685
static const value_string mpeg_descr_terrestrial_delivery_time_slicing_indicator_vals[] = {
2686
    { 0x0, "At least one elementary stream uses Time Slicing" },
2687
    { 0x1, "Time Slicing not used" },
2688
2689
    { 0x0, NULL }
2690
};
2691
2692
static const value_string mpeg_descr_terrestrial_delivery_mpe_fec_indicator_vals[] = {
2693
    { 0x0, "At least one elementary stream uses MPE-FEC" },
2694
    { 0x1, "MPE-FEC not used" },
2695
2696
    { 0x0, NULL }
2697
};
2698
2699
static const value_string mpeg_descr_terrestrial_delivery_constellation_vals[] = {
2700
    { 0x0, "QPSK" },
2701
    { 0x1, "16-QAM" },
2702
    { 0x2, "64-QAM" },
2703
2704
    { 0x0, NULL }
2705
};
2706
2707
static const value_string mpeg_descr_terrestrial_delivery_hierarchy_information_vals[] = {
2708
    { 0x0, "Non-hierarchical, native interleaver" },
2709
    { 0x1, "alpha = 1, native interleaver" },
2710
    { 0x2, "alpha = 2, native interleaver" },
2711
    { 0x3, "alpha = 4, native interleaver" },
2712
    { 0x4, "Non-hierarchical, in-depth interleaver" },
2713
    { 0x5, "alpha = 1, in-depth interleaver" },
2714
    { 0x6, "alpha = 2, in-depth interleaver" },
2715
    { 0x7, "alpha = 4, in-depth interleaver" },
2716
2717
    { 0x0, NULL }
2718
};
2719
2720
static const value_string mpeg_descr_terrestrial_delivery_code_rate_vals[] = {
2721
    { 0x0, "1/2 convolutional code rate" },
2722
    { 0x1, "2/3 convolutional code rate" },
2723
    { 0x2, "3/4 convolutional code rate" },
2724
    { 0x3, "5/6 convolutional code rate" },
2725
    { 0x4, "7/8 convolutional code rate" },
2726
2727
    { 0x0, NULL }
2728
};
2729
2730
static const value_string mpeg_descr_terrestrial_delivery_guard_interval_vals[] = {
2731
    { 0x0, "1/32" },
2732
    { 0x1, "1/16" },
2733
    { 0x2, "1/8" },
2734
    { 0x3, "1/4" },
2735
2736
    { 0x0, NULL }
2737
};
2738
2739
static const value_string mpeg_descr_terrestrial_delivery_other_frequency_flag_vals[] = {
2740
    { 0x0, "No other frequency is in use" },
2741
    { 0x1, "One or more frequencies are in use" },
2742
2743
    { 0x0, NULL }
2744
};
2745
2746
static const value_string mpeg_descr_terrestrial_delivery_transmission_mode_vals[] = {
2747
    { 0x0, "2k mode" },
2748
    { 0x1, "8k mode" },
2749
    { 0x2, "4k mode" },
2750
2751
    { 0x0, NULL }
2752
};
2753
2754
static void
2755
proto_mpeg_descriptor_dissect_terrestrial_delivery(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
2756
1
{
2757
1
    uint64_t centre_freq;
2758
2759
    /* the descriptor stores the centre frequency in units of 10Hz (so
2760
       that they can get away with 32bits), we're using Hz here */
2761
1
    centre_freq = tvb_get_ntohl(tvb, offset) * 10;
2762
2763
1
    proto_tree_add_uint64_format_value(tree, hf_mpeg_descr_terrestrial_delivery_centre_frequency, tvb, offset, 4,
2764
1
        centre_freq, "%d.%06d MHz", (unsigned)centre_freq/(1000*1000), (unsigned)centre_freq%(1000*1000));
2765
1
    offset += 4;
2766
2767
1
    proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_bandwidth, tvb, offset, 1, ENC_BIG_ENDIAN);
2768
1
    proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_priority, tvb, offset, 1, ENC_BIG_ENDIAN);
2769
1
    proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_time_slicing_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
2770
1
    proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_mpe_fec_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
2771
1
    proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_reserved1, tvb, offset, 1, ENC_BIG_ENDIAN);
2772
1
    offset += 1;
2773
2774
1
    proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_constellation, tvb, offset, 1, ENC_BIG_ENDIAN);
2775
1
    proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_hierarchy_information, tvb, offset, 1, ENC_BIG_ENDIAN);
2776
1
    proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_code_rate_hp_stream, tvb, offset, 1, ENC_BIG_ENDIAN);
2777
1
    offset += 1;
2778
2779
1
    proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_code_rate_lp_stream, tvb, offset, 1, ENC_BIG_ENDIAN);
2780
1
    proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_guard_interval, tvb, offset, 1, ENC_BIG_ENDIAN);
2781
1
    proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_transmission_mode, tvb, offset, 1, ENC_BIG_ENDIAN);
2782
1
    proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_other_frequency_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
2783
1
    offset += 1;
2784
2785
1
    proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_reserved2, tvb, offset, 4, ENC_BIG_ENDIAN);
2786
2787
1
}
2788
2789
/* 0x5B Multilingual Network Name Descriptor */
2790
static int hf_mpeg_descr_multilng_network_name_desc_iso639_language_code;
2791
static int hf_mpeg_descr_multilng_network_name_desc_name_length;
2792
static int hf_mpeg_descr_multilng_network_name_desc_name_encoding;
2793
static int hf_mpeg_descr_multilng_network_name_desc_name;
2794
2795
static int ett_mpeg_descriptor_multilng_network_name_desc_lng;
2796
2797
static unsigned
2798
proto_mpeg_descriptor_dissect_multilng_name_len(tvbuff_t *tvb, unsigned offset, unsigned len)
2799
55
{
2800
55
    unsigned l_offset = offset;
2801
55
    unsigned cnt = len;
2802
2803
55
    if (cnt < 3) return l_offset - offset;
2804
55
    cnt      -= 3;
2805
55
    l_offset += 3;
2806
2807
55
    if (cnt < 1) return l_offset - offset;
2808
48
    unsigned name_length = tvb_get_uint8(tvb, l_offset);
2809
48
    cnt      -= 1;
2810
48
    l_offset += 1;
2811
2812
48
    name_length = MIN(name_length, cnt);
2813
48
    l_offset += name_length;
2814
2815
48
    return l_offset - offset;
2816
55
}
2817
2818
static void
2819
proto_mpeg_descriptor_dissect_multilng_desc(tvbuff_t *tvb, packet_info* pinfo, unsigned offset, unsigned len, proto_tree *tree,
2820
                                            int ett_desc_lng, int hf_lang_code, int hf_name_length, int hf_name_encoding, int hf_name)
2821
24
{
2822
24
    unsigned cnt = len;
2823
2824
59
    while (cnt > 0)
2825
41
    {
2826
41
        char *lng_str;
2827
41
        proto_tree * lng_tree;
2828
41
        proto_item * lng_item;
2829
2830
41
        if (cnt < 3) return;
2831
41
        unsigned lng_len = proto_mpeg_descriptor_dissect_multilng_name_len(tvb, offset, cnt);
2832
41
        lng_tree = proto_tree_add_subtree(tree, tvb, offset, lng_len,
2833
41
                    ett_desc_lng, &lng_item, NULL);
2834
2835
41
        proto_tree_add_item_ret_display_string(lng_tree, hf_lang_code, tvb, offset, 3, ENC_ASCII, pinfo->pool, &lng_str);
2836
41
        proto_item_set_text(lng_item, "Language \"%s\"", lng_str);
2837
41
        offset += 3;
2838
41
        cnt    -= 3;
2839
2840
41
        if (cnt < 1) return;
2841
35
        unsigned network_name_length = tvb_get_uint8(tvb, offset);
2842
35
        proto_tree_add_item(lng_tree, hf_name_length, tvb, offset, 1, ENC_BIG_ENDIAN);
2843
35
        offset += 1;
2844
35
        cnt    -= 1;
2845
2846
35
        network_name_length = MIN(network_name_length, cnt);
2847
35
        if (cnt < network_name_length) return;
2848
35
        dvb_encoding_e  encoding;
2849
35
        unsigned enc_len = dvb_analyze_string_charset(tvb, offset, network_name_length, &encoding);
2850
35
        dvb_add_chartbl(lng_tree, hf_name_encoding, tvb, offset, enc_len, encoding);
2851
2852
35
        proto_tree_add_item(lng_tree, hf_name, tvb, offset+enc_len, network_name_length-enc_len, dvb_enc_to_item_enc(encoding));
2853
35
        offset += network_name_length;
2854
35
        cnt    -= network_name_length;
2855
35
    }
2856
24
}
2857
2858
/* 0x5C Multilingual Bouquet Name Descriptor */
2859
static int hf_mpeg_descr_multilng_bouquet_name_desc_iso639_language_code;
2860
static int hf_mpeg_descr_multilng_bouquet_name_desc_name_length;
2861
static int hf_mpeg_descr_multilng_bouquet_name_desc_name_encoding;
2862
static int hf_mpeg_descr_multilng_bouquet_name_desc_name;
2863
2864
static int ett_mpeg_descriptor_multilng_bouquet_name_desc_lng;
2865
2866
/* 0x5D Multilingual Service Name Descriptor */
2867
static int hf_mpeg_descr_multilng_srv_name_desc_iso639_language_code;
2868
static int hf_mpeg_descr_multilng_srv_name_desc_service_provider_name_length;
2869
static int hf_mpeg_descr_multilng_srv_name_desc_service_provider_name_encoding;
2870
static int hf_mpeg_descr_multilng_srv_name_desc_service_provider_name;
2871
static int hf_mpeg_descr_multilng_srv_name_desc_service_name_length;
2872
static int hf_mpeg_descr_multilng_srv_name_desc_service_name_encoding;
2873
static int hf_mpeg_descr_multilng_srv_name_desc_service_name;
2874
2875
static int ett_mpeg_descriptor_multilng_srv_name_desc_lng;
2876
2877
static unsigned
2878
proto_mpeg_descriptor_dissect_multilng_srv_name_desc_measure_lng_len(tvbuff_t *tvb, unsigned offset, unsigned len)
2879
11
{
2880
11
    unsigned l_offset = offset;
2881
11
    unsigned cnt = len;
2882
2883
11
    if (cnt < 3) return l_offset - offset;
2884
11
    cnt      -= 3;
2885
11
    l_offset += 3;
2886
2887
11
    if (cnt < 1) return l_offset - offset;
2888
11
    unsigned service_provider_name_length = tvb_get_uint8(tvb, l_offset);
2889
11
    cnt      -= 1;
2890
11
    l_offset += 1;
2891
2892
11
    service_provider_name_length = MIN(service_provider_name_length, cnt);
2893
11
    cnt      -= service_provider_name_length;
2894
11
    l_offset += service_provider_name_length;
2895
2896
11
    if (cnt < 1) return l_offset - offset;
2897
5
    unsigned service_name_length = tvb_get_uint8(tvb, l_offset);
2898
5
    cnt      -= 1;
2899
5
    l_offset += 1;
2900
2901
5
    service_name_length = MIN(service_name_length, cnt);
2902
5
    l_offset += service_name_length;
2903
2904
5
    return l_offset - offset;
2905
11
}
2906
2907
static void
2908
proto_mpeg_descriptor_dissect_multilng_srv_name_desc(tvbuff_t *tvb, packet_info* pinfo, unsigned offset, unsigned len, proto_tree *tree)
2909
6
{
2910
6
    unsigned cnt = len;
2911
2912
11
    while (cnt > 0)
2913
11
    {
2914
11
        char *lng_str;
2915
11
        proto_tree * lng_tree;
2916
11
        proto_item * lng_item;
2917
2918
11
        if (cnt < 3) return;
2919
11
        unsigned lng_len = proto_mpeg_descriptor_dissect_multilng_srv_name_desc_measure_lng_len(tvb, offset, cnt);
2920
11
        lng_tree = proto_tree_add_subtree(tree, tvb, offset, lng_len,
2921
11
                    ett_mpeg_descriptor_multilng_srv_name_desc_lng, &lng_item, NULL);
2922
2923
11
        proto_tree_add_item_ret_display_string(lng_tree, hf_mpeg_descr_multilng_srv_name_desc_iso639_language_code, tvb, offset, 3, ENC_ASCII,
2924
11
                                                pinfo->pool, &lng_str);
2925
11
        proto_item_set_text(lng_item, "Language \"%s\"", lng_str);
2926
11
        offset += 3;
2927
11
        cnt    -= 3;
2928
2929
11
        if (cnt < 1) return;
2930
11
        unsigned service_provider_name_length = tvb_get_uint8(tvb, offset);
2931
11
        proto_tree_add_item(lng_tree, hf_mpeg_descr_multilng_srv_name_desc_service_provider_name_length, tvb, offset, 1, ENC_BIG_ENDIAN);
2932
11
        offset += 1;
2933
11
        cnt    -= 1;
2934
2935
11
        service_provider_name_length = MIN(service_provider_name_length, cnt);
2936
11
        if (cnt < service_provider_name_length) return;
2937
11
        dvb_encoding_e  encoding;
2938
11
        unsigned enc_len = dvb_analyze_string_charset(tvb, offset, service_provider_name_length, &encoding);
2939
11
        dvb_add_chartbl(lng_tree, hf_mpeg_descr_multilng_srv_name_desc_service_provider_name_encoding, tvb, offset, enc_len, encoding);
2940
2941
11
        proto_tree_add_item(lng_tree, hf_mpeg_descr_multilng_srv_name_desc_service_provider_name, tvb, offset+enc_len, service_provider_name_length-enc_len, dvb_enc_to_item_enc(encoding));
2942
11
        offset += service_provider_name_length;
2943
11
        cnt    -= service_provider_name_length;
2944
2945
11
        if (cnt < 1) return;
2946
5
        unsigned service_name_length = tvb_get_uint8(tvb, offset);
2947
5
        proto_tree_add_item(lng_tree, hf_mpeg_descr_multilng_srv_name_desc_service_name_length, tvb, offset, 1, ENC_BIG_ENDIAN);
2948
5
        offset += 1;
2949
5
        cnt    -= 1;
2950
2951
5
        service_name_length = MIN(service_name_length, cnt);
2952
5
        if (cnt < service_name_length) return;
2953
5
        enc_len = dvb_analyze_string_charset(tvb, offset, service_name_length, &encoding);
2954
5
        dvb_add_chartbl(lng_tree, hf_mpeg_descr_multilng_srv_name_desc_service_name_encoding, tvb, offset, enc_len, encoding);
2955
2956
5
        proto_tree_add_item(lng_tree, hf_mpeg_descr_multilng_srv_name_desc_service_name, tvb, offset+enc_len, service_name_length-enc_len, dvb_enc_to_item_enc(encoding));
2957
5
        offset += service_name_length;
2958
5
        cnt    -= service_name_length;
2959
5
    }
2960
6
}
2961
2962
/* 0x5E Multilingual Component Descriptor */
2963
static int hf_mpeg_descr_multilng_component_desc_iso639_language_code;
2964
static int hf_mpeg_descr_multilng_component_desc_tag;
2965
static int hf_mpeg_descr_multilng_component_desc_text_length;
2966
static int hf_mpeg_descr_multilng_component_desc_text_encoding;
2967
static int hf_mpeg_descr_multilng_component_desc_text;
2968
2969
static int ett_mpeg_descriptor_multilng_component_desc_lng;
2970
2971
2972
static void
2973
proto_mpeg_descriptor_dissect_multilng_component_desc(tvbuff_t *tvb, packet_info* pinfo, unsigned offset, unsigned len, proto_tree *tree)
2974
9
{
2975
9
    unsigned cnt = len;
2976
2977
9
    if (cnt < 1) return;
2978
9
    proto_tree_add_item(tree, hf_mpeg_descr_multilng_component_desc_tag, tvb, offset, 1, ENC_BIG_ENDIAN);
2979
9
    offset += 1;
2980
9
    cnt    -= 1;
2981
2982
22
    while (cnt > 0)
2983
14
    {
2984
14
        char *lng_str;
2985
14
        proto_tree * lng_tree;
2986
14
        proto_item * lng_item;
2987
2988
14
        if (cnt < 3) return;
2989
14
        unsigned lng_len = proto_mpeg_descriptor_dissect_multilng_name_len(tvb, offset, cnt);
2990
14
        lng_tree = proto_tree_add_subtree(tree, tvb, offset, lng_len,
2991
14
                    ett_mpeg_descriptor_multilng_component_desc_lng, &lng_item, NULL);
2992
2993
14
        proto_tree_add_item_ret_display_string(lng_tree, hf_mpeg_descr_multilng_component_desc_iso639_language_code, tvb, offset, 3, ENC_ASCII,
2994
14
                                                pinfo->pool, &lng_str);
2995
14
        proto_item_set_text(lng_item, "Language \"%s\"", lng_str);
2996
14
        offset += 3;
2997
14
        cnt    -= 3;
2998
2999
14
        if (cnt < 1) return;
3000
13
        unsigned text_length = tvb_get_uint8(tvb, offset);
3001
13
        proto_tree_add_item(lng_tree, hf_mpeg_descr_multilng_component_desc_text_length, tvb, offset, 1, ENC_BIG_ENDIAN);
3002
13
        offset += 1;
3003
13
        cnt    -= 1;
3004
3005
13
        text_length = MIN(text_length, cnt);
3006
13
        if (cnt < text_length) return;
3007
13
        dvb_encoding_e  encoding;
3008
13
        unsigned enc_len = dvb_analyze_string_charset(tvb, offset, text_length, &encoding);
3009
13
        dvb_add_chartbl(lng_tree, hf_mpeg_descr_multilng_component_desc_text_encoding, tvb, offset, enc_len, encoding);
3010
3011
13
        proto_tree_add_item(lng_tree, hf_mpeg_descr_multilng_component_desc_text, tvb, offset+enc_len, text_length-enc_len, dvb_enc_to_item_enc(encoding));
3012
13
        offset += text_length;
3013
13
        cnt    -= text_length;
3014
13
    }
3015
9
}
3016
3017
/* 0x5F Private Data Specifier */
3018
static int hf_mpeg_descr_private_data_specifier_id;
3019
3020
205
#define PRIVATE_DATA_SPECIFIER_RESERVED    0x00000000
3021
#define PRIVATE_DATA_SPECIFIER_NORDIG      0x00000029
3022
0
#define PRIVATE_DATA_SPECIFIER_CIPLUS_LLP  0x00000040
3023
#define PRIVATE_DATA_SPECIFIER_EUTELSAT_SA 0x0000055F
3024
3025
static const value_string mpeg_descr_data_specifier_id_vals[] = {
3026
    { PRIVATE_DATA_SPECIFIER_RESERVED,   "reserved" },
3027
    { PRIVATE_DATA_SPECIFIER_NORDIG,     "NorDig" },
3028
    { PRIVATE_DATA_SPECIFIER_CIPLUS_LLP, "CI+ LLP" },
3029
    { PRIVATE_DATA_SPECIFIER_EUTELSAT_SA, "Eutelsat S.A." },
3030
    /* See dvbservices.com for complete and current list */
3031
3032
    { 0, NULL }
3033
};
3034
3035
static void
3036
proto_mpeg_descriptor_dissect_private_data_specifier(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
3037
0
{
3038
0
    proto_tree_add_item(tree, hf_mpeg_descr_private_data_specifier_id, tvb, offset, 4, ENC_BIG_ENDIAN);
3039
0
}
3040
3041
/* 0x61 Short Smoothing Buffer Descriptor */
3042
static int hf_mpeg_descr_short_smoothing_buffer_sb_size;
3043
static int hf_mpeg_descr_short_smoothing_buffer_sb_leak_rate;
3044
static int hf_mpeg_descr_short_smoothing_buffer_dvb_reserved;
3045
3046
14
#define MPEG_DESCR_SHORT_SMOOTHING_BUFFER_SB_SIZE_MASK      0xC0
3047
14
#define MPEG_DESCR_SHORT_SMOOTHING_BUFFER_SB_LEAK_RATE_MASK 0x3F
3048
3049
static const value_string mpeg_descr_ssb_sb_size_vals[] = {
3050
    { 0, "DVB_reserved" },
3051
    { 1, "1 536" },
3052
    { 2, "DVB_reserved" },
3053
    { 3, "DVB_reserved" },
3054
    { 0, NULL }
3055
};
3056
3057
static const value_string mpeg_descr_ssb_sb_leak_rate_vals[] = {
3058
    { 0, "DVB_reserved" },
3059
    { 1, "0,0009 Mbit/s" },
3060
    { 2, "0,0018 Mbit/s" },
3061
    { 3, "0,0036 Mbit/s" },
3062
    { 4, "0,0072 Mbit/s" },
3063
    { 5, "0,0108 Mbit/s" },
3064
    { 6, "0,0144 Mbit/s" },
3065
    { 7, "0,0216 Mbit/s" },
3066
    { 8, "0,0288 Mbit/s" },
3067
    { 9, "0,075 Mbit/s" },
3068
    { 10, "0,5 Mbit/s" },
3069
    { 11, "0,5625 Mbit/s" },
3070
    { 12, "0,8437 Mbit/s" },
3071
    { 13, "1,0 Mbit/s" },
3072
    { 14, "1,1250 Mbit/s" },
3073
    { 15, "1,5 Mbit/s" },
3074
    { 16, "1,6875 Mbit/s" },
3075
    { 17, "2,0 Mbit/s" },
3076
    { 18, "2,2500 Mbit/s" },
3077
    { 19, "2,5 Mbit/s" },
3078
    { 20, "3,0 Mbit/s" },
3079
    { 21, "3,3750 Mbit/s" },
3080
    { 22, "3,5 Mbit/s" },
3081
    { 23, "4,0 Mbit/s" },
3082
    { 24, "4,5 Mbit/s" },
3083
    { 25, "5,0 Mbit/s" },
3084
    { 26, "5,5 Mbit/s" },
3085
    { 27, "6,0 Mbit/s" },
3086
    { 28, "6,5 Mbit/s" },
3087
    { 29, "6,7500 Mbit/s" },
3088
    { 30, "7,0 Mbit/s" },
3089
    { 31, "7,5 Mbit/s" },
3090
    { 32, "8,0 Mbit/s" },
3091
    { 33, "9,0 Mbit/s" },
3092
    { 34, "10,0 Mbit/s" },
3093
    { 35, "11,0 Mbit/s" },
3094
    { 36, "12,0 Mbit/s" },
3095
    { 37, "13,0 Mbit/s" },
3096
    { 38, "13,5 Mbit/s" },
3097
    { 39, "14,0 Mbit/s" },
3098
    { 40, "15,0 Mbit/s" },
3099
    { 41, "16,0 Mbit/s" },
3100
    { 42, "17,0 Mbit/s" },
3101
    { 43, "18,0 Mbit/s" },
3102
    { 44, "20,0 Mbit/s" },
3103
    { 45, "22,0 Mbit/s" },
3104
    { 46, "24,0 Mbit/s" },
3105
    { 47, "26,0 Mbit/s" },
3106
    { 48, "27,0 Mbit/s" },
3107
    { 49, "28,0 Mbit/s" },
3108
    { 50, "30,0 Mbit/s" },
3109
    { 51, "32,0 Mbit/s" },
3110
    { 52, "34,0 Mbit/s" },
3111
    { 53, "36,0 Mbit/s" },
3112
    { 54, "38,0 Mbit/s" },
3113
    { 55, "40,0 Mbit/s" },
3114
    { 56, "44,0 Mbit/s" },
3115
    { 57, "48,0 Mbit/s" },
3116
    { 58, "54,0 Mbit/s" },
3117
    { 59, "72,0 Mbit/s" },
3118
    { 60, "108,0 Mbit/s" },
3119
    { 61, "DVB_reserved" },
3120
    { 62, "DVB_reserved" },
3121
    { 63, "DVB_reserved" },
3122
    { 0, NULL }
3123
};
3124
static value_string_ext mpeg_descr_ssb_sb_leak_rate_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_ssb_sb_leak_rate_vals);
3125
3126
3127
static void
3128
proto_mpeg_descriptor_dissect_short_smoothing_buffer(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
3129
3
{
3130
3
    proto_tree_add_item(tree, hf_mpeg_descr_short_smoothing_buffer_sb_size, tvb, offset, 1, ENC_BIG_ENDIAN);
3131
3
    proto_tree_add_item(tree, hf_mpeg_descr_short_smoothing_buffer_sb_leak_rate, tvb, offset, 1, ENC_BIG_ENDIAN);
3132
3
    offset += 1;
3133
3134
3
    if (len == 1) return;
3135
3136
3
    proto_tree_add_item(tree, hf_mpeg_descr_short_smoothing_buffer_dvb_reserved, tvb, offset, len-1, ENC_NA);
3137
3
}
3138
3139
/* 0x63 Partial Transport Stream Descriptor */
3140
static int hf_mpeg_descr_partial_transport_stream_reserved_future_use1;
3141
static int hf_mpeg_descr_partial_transport_stream_peak_rate;
3142
static int hf_mpeg_descr_partial_transport_stream_reserved_future_use2;
3143
static int hf_mpeg_descr_partial_transport_stream_minimum_overall_smoothing_rate;
3144
static int hf_mpeg_descr_partial_transport_stream_reserved_future_use3;
3145
static int hf_mpeg_descr_partial_transport_stream_maximum_overall_smoothing_buffer;
3146
3147
14
#define PARTIAL_TRANSPORT_STREAM_DESCR_RESERVED_FUTURE_USE1_MASK   0xC00000
3148
12
#define PARTIAL_TRANSPORT_STREAM_DESCR_PEAK_RATE_MASK              0x3FFFFF
3149
14
#define PARTIAL_TRANSPORT_STREAM_DESCR_RESERVED_FUTURE_USE2_MASK   0xC00000
3150
12
#define PARTIAL_TRANSPORT_STREAM_DESCR_MINIMUM_SMOOTHING_RATE_MASK 0x3FFFFF
3151
14
#define PARTIAL_TRANSPORT_STREAM_DESCR_RESERVED_FUTURE_USE3_MASK     0xC000
3152
12
#define PARTIAL_TRANSPORT_STREAM_DESCR_MAXIMUM_SMOOTHING_BUFF_MASK   0x3FFF
3153
3154
static void
3155
proto_mpeg_descriptor_dissect_partial_transport_stream(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
3156
12
{
3157
12
    unsigned cnt = len;
3158
3159
12
    if (cnt < 3) return;
3160
12
    proto_tree_add_item(tree, hf_mpeg_descr_partial_transport_stream_reserved_future_use1, tvb, offset, 3, ENC_BIG_ENDIAN);
3161
12
    unsigned rate = tvb_get_uint24(tvb, offset, ENC_NA) & PARTIAL_TRANSPORT_STREAM_DESCR_PEAK_RATE_MASK;
3162
12
    proto_tree_add_uint_bits_format_value(tree, hf_mpeg_descr_partial_transport_stream_peak_rate, tvb, (offset*8)+2,
3163
12
    22, rate, ENC_BIG_ENDIAN, "%u bits/s", rate*400);
3164
12
    offset += 3;
3165
12
    cnt    -= 3;
3166
3167
12
    if (cnt < 3) return;
3168
12
    proto_tree_add_item(tree, hf_mpeg_descr_partial_transport_stream_reserved_future_use2, tvb, offset, 3, ENC_BIG_ENDIAN);
3169
12
    rate = tvb_get_uint24(tvb, offset, ENC_BIG_ENDIAN) & PARTIAL_TRANSPORT_STREAM_DESCR_MINIMUM_SMOOTHING_RATE_MASK;
3170
12
    proto_tree_add_uint_bits_format_value(tree, hf_mpeg_descr_partial_transport_stream_minimum_overall_smoothing_rate, tvb,
3171
12
    (offset*8)+2, 22, rate, ENC_BIG_ENDIAN, (rate==0x3FFFFFu)?"Underfined (0x3FFFFF)":"%u bits/s", rate*400u);
3172
12
    offset += 3;
3173
12
    cnt    -= 3;
3174
3175
12
    if (cnt < 2) return;
3176
12
    proto_tree_add_item(tree, hf_mpeg_descr_partial_transport_stream_reserved_future_use3, tvb, offset, 2, ENC_BIG_ENDIAN);
3177
12
    unsigned buffer = tvb_get_uint16(tvb, offset, ENC_BIG_ENDIAN) & PARTIAL_TRANSPORT_STREAM_DESCR_MAXIMUM_SMOOTHING_BUFF_MASK;
3178
12
    proto_tree_add_uint_bits_format_value(tree, hf_mpeg_descr_partial_transport_stream_maximum_overall_smoothing_buffer, tvb,
3179
12
    (offset*8)+2, 14, buffer, ENC_BIG_ENDIAN, (buffer==0x3FFFu)?"Underfined (0x3FFF)":"%u bytes", buffer);
3180
12
}
3181
3182
/* 0x64 Data Broadcast Descriptor */
3183
static int hf_mpeg_descr_data_bcast_bcast_id;
3184
static int hf_mpeg_descr_data_bcast_component_tag;
3185
static int hf_mpeg_descr_data_bcast_selector_len;
3186
static int hf_mpeg_descr_data_bcast_selector_bytes;
3187
static int hf_mpeg_descr_data_bcast_lang_code;
3188
static int hf_mpeg_descr_data_bcast_text_len;
3189
static int hf_mpeg_descr_data_bcast_text;
3190
3191
static const value_string mpeg_descr_data_bcast_id_vals[] = {
3192
3193
    { 0x0001, "Data pipe" },
3194
    { 0x0002, "Asynchronous data stream" },
3195
    { 0x0003, "Synchronous data stream" },
3196
    { 0x0004, "Synchronised data stream" },
3197
    { 0x0005, "Multi protocol encapsulation" },
3198
    { 0x0006, "Data Carousel" },
3199
    { 0x0007, "Object Carousel" },
3200
    { 0x0008, "DVB ATM streams" },
3201
    { 0x0009, "Higher Protocols based on asynchronous data streams" },
3202
    { 0x000A, "System Software Update service" },
3203
    { 0x000B, "IP/MAC Notification service" },
3204
    { 0x00F0, "MHP Object Carousel" },
3205
    { 0x00F1, "MHP Multiprotocol Encapsulation" },
3206
    { 0x0122, "CI+ Data Carousel" },
3207
    { 0x0123, "HbbTV Carousel" },
3208
    /* See dvbservices.com for complete and current list */
3209
3210
    { 0, NULL }
3211
};
3212
/* global variable that's shared e.g. with DVB-CI */
3213
value_string_ext mpeg_descr_data_bcast_id_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_data_bcast_id_vals);
3214
3215
static void
3216
proto_mpeg_descriptor_dissect_data_bcast(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
3217
3
{
3218
3219
3
    uint8_t selector_len, text_len;
3220
3221
3
    proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_bcast_id, tvb, offset, 2, ENC_BIG_ENDIAN);
3222
3
    offset += 2;
3223
3224
3
    proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_component_tag, tvb, offset, 1, ENC_BIG_ENDIAN);
3225
3
    offset += 1;
3226
3227
3
    selector_len = tvb_get_uint8(tvb, offset);
3228
3
    proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_selector_len, tvb, offset, 1, ENC_BIG_ENDIAN);
3229
3
    offset += 1;
3230
3231
3
    if (selector_len > 0) {
3232
1
        proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_selector_bytes, tvb, offset, selector_len, ENC_NA);
3233
1
        offset += selector_len;
3234
1
    }
3235
3236
3
    proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_lang_code, tvb, offset, 3, ENC_ASCII);
3237
3
    offset += 3;
3238
3239
3
    text_len = tvb_get_uint8(tvb, offset);
3240
3
    proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_text_len, tvb, offset, 1, ENC_BIG_ENDIAN);
3241
3
    offset += 1;
3242
3243
3
    if (text_len > 0)
3244
1
        proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_text, tvb, offset, text_len, ENC_ASCII);
3245
3
}
3246
3247
/* 0x66 Data Broadcast ID Descriptor */
3248
static int hf_mpeg_descr_data_bcast_id_bcast_id;
3249
static int hf_mpeg_descr_data_bcast_id_id_selector_bytes;
3250
3251
static void
3252
proto_mpeg_descriptor_dissect_data_bcast_id(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
3253
1
{
3254
1
    proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_id_bcast_id, tvb, offset, 2, ENC_BIG_ENDIAN);
3255
1
    offset += 2;
3256
3257
1
    if (len > 2)
3258
1
        proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_id_id_selector_bytes, tvb, offset, len - 2, ENC_NA);
3259
1
}
3260
3261
/* 0x69 PDC Descriptor */
3262
static int hf_mpeg_descr_pdc_reserved;
3263
static int hf_mpeg_descr_pdc_pil;
3264
static int hf_mpeg_descr_pdc_day;
3265
static int hf_mpeg_descr_pdc_month;
3266
static int hf_mpeg_descr_pdc_hour;
3267
static int hf_mpeg_descr_pdc_minute;
3268
3269
14
#define MPEG_DESCR_PDC_RESERVED_MASK    0xF00000
3270
14
#define MPEG_DESCR_PDC_PIL_MASK         0x0FFFFF
3271
14
#define MPEG_DESCR_PDC_DAY_MASK         0x0F8000
3272
14
#define MPEG_DESCR_PDC_MONTH_MASK       0x007800
3273
14
#define MPEG_DESCR_PDC_HOUR_MASK        0x0007C0
3274
14
#define MPEG_DESCR_PDC_MINUTE_MASK      0x00003F
3275
3276
static int ett_mpeg_descriptor_pdc_pil;
3277
3278
static void
3279
proto_mpeg_descriptor_dissect_pdc(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
3280
1
{
3281
1
    proto_item * pi;
3282
1
    proto_tree * pil_tree;
3283
3284
1
    proto_tree_add_item(tree, hf_mpeg_descr_pdc_reserved, tvb, offset, 3, ENC_BIG_ENDIAN);
3285
1
    pi = proto_tree_add_item(tree, hf_mpeg_descr_pdc_pil, tvb, offset, 3, ENC_BIG_ENDIAN);
3286
1
    pil_tree = proto_item_add_subtree(pi, ett_mpeg_descriptor_pdc_pil);
3287
1
    proto_tree_add_item(pil_tree, hf_mpeg_descr_pdc_day, tvb, offset, 3, ENC_BIG_ENDIAN);
3288
1
    proto_tree_add_item(pil_tree, hf_mpeg_descr_pdc_month, tvb, offset, 3, ENC_BIG_ENDIAN);
3289
1
    proto_tree_add_item(pil_tree, hf_mpeg_descr_pdc_hour, tvb, offset, 3, ENC_BIG_ENDIAN);
3290
1
    proto_tree_add_item(pil_tree, hf_mpeg_descr_pdc_minute, tvb, offset, 3, ENC_BIG_ENDIAN);
3291
1
}
3292
3293
/* 0x6A AC-3 Descriptor */
3294
static int hf_mpeg_descr_ac3_component_type_flag;
3295
static int hf_mpeg_descr_ac3_bsid_flag;
3296
static int hf_mpeg_descr_ac3_mainid_flag;
3297
static int hf_mpeg_descr_ac3_asvc_flag;
3298
static int hf_mpeg_descr_ac3_reserved;
3299
static int hf_mpeg_descr_ac3_component_type_reserved_flag;
3300
static int hf_mpeg_descr_ac3_component_type_full_service_flag;
3301
static int hf_mpeg_descr_ac3_component_type_service_type_flags;
3302
static int hf_mpeg_descr_ac3_component_type_number_of_channels_flags;
3303
static int hf_mpeg_descr_ac3_bsid;
3304
static int hf_mpeg_descr_ac3_mainid;
3305
static int hf_mpeg_descr_ac3_asvc;
3306
static int hf_mpeg_descr_ac3_additional_info;
3307
3308
static int ett_mpeg_descriptor_ac3_component_type;
3309
3310
19
#define MPEG_DESCR_AC3_COMPONENT_TYPE_FLAG_MASK 0x80
3311
19
#define MPEG_DESCR_AC3_BSID_FLAG_MASK           0x40
3312
19
#define MPEG_DESCR_AC3_MAINID_FLAG_MASK         0x20
3313
19
#define MPEG_DESCR_AC3_ASVC_FLAG_MASK           0x10
3314
14
#define MPEG_DESCR_AC3_RESERVED_MASK            0x0F
3315
3316
14
#define MPEG_DESCR_AC3_COMPONENT_TYPE_RESERVED_FLAG_MASK        0x80
3317
14
#define MPEG_DESCR_AC3_COMPONENT_TYPE_FULL_SERVICE_FLAG_MASK    0x40
3318
14
#define MPEG_DESCR_AC3_COMPONENT_TYPE_SERVICE_TYPE_FLAGS_MASK   0x38
3319
14
#define MPEG_DESCR_AC3_COMPONENT_TYPE_NUMBER_OF_CHANNELS_FLAGS  0x07
3320
3321
static const value_string mpeg_descr_ac3_component_type_flag_vals[] = {
3322
    { 0x0, "Component type field not included" },
3323
    { 0x1, "Component type field included" },
3324
3325
    { 0x0, NULL }
3326
};
3327
3328
static const value_string mpeg_descr_ac3_bsid_flag_vals[] = {
3329
    { 0x0, "BSID field not included" },
3330
    { 0x1, "BSID field included" },
3331
3332
    { 0x0, NULL }
3333
};
3334
3335
static const value_string mpeg_descr_ac3_mainid_flag_vals[] = {
3336
    { 0x0, "Main ID field not included" },
3337
    { 0x1, "Main ID field included" },
3338
3339
    { 0x0, NULL }
3340
};
3341
3342
static const value_string mpeg_descr_ac3_asvc_flag_vals[] = {
3343
    { 0x0, "ASVC field not included" },
3344
    { 0x1, "ASVC field included" },
3345
3346
    { 0x0, NULL }
3347
};
3348
3349
static const value_string mpeg_descr_ac3_component_type_full_service_flag_vals[] = {
3350
    { 0x0, "Decoded audio stream is intended to be combined with another decoded audio stream" },
3351
    { 0x1, "Decoded audio stream is a full service" },
3352
3353
    { 0x0, NULL}
3354
};
3355
3356
static const value_string mpeg_descr_ac3_component_type_service_type_flags_vals[] = {
3357
    { 0x0, "Complete Main (CM)" },
3358
    { 0x1, "Music and effects (ME)" },
3359
    { 0x2, "Visually impaired (VI)" },
3360
    { 0x3, "Hearing impaired (HI)" },
3361
    { 0x4, "Dialogue (D)" },
3362
    { 0x5, "Commentary (C)" },
3363
    { 0x6, "Emergency (E)" },
3364
    { 0x7, "Voiceover (VO) if Full Service Flag is 0, else Karaoke" },
3365
3366
    { 0x0, NULL }
3367
};
3368
3369
static const value_string mpeg_descr_ac3_component_type_number_of_channels_flags_vals[] = {
3370
    { 0x0, "Mono" },
3371
    { 0x1, "1+1 Mode" },
3372
    { 0x2, "2 Channel (stereo)" },
3373
    { 0x3, "2 Channel Dolby surround encoded (stereo)" },
3374
    { 0x4, "Multichannel audio (> 2 channels)" },
3375
3376
    { 0x0, NULL }
3377
};
3378
3379
static void
3380
proto_mpeg_descriptor_dissect_ac3(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
3381
5
{
3382
5
    unsigned  end = offset + len;
3383
5
    uint8_t flags, component_type;
3384
3385
5
    proto_tree *component_type_tree;
3386
3387
5
    flags = tvb_get_uint8(tvb, offset);
3388
5
    proto_tree_add_item(tree, hf_mpeg_descr_ac3_component_type_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
3389
5
    proto_tree_add_item(tree, hf_mpeg_descr_ac3_bsid_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
3390
5
    proto_tree_add_item(tree, hf_mpeg_descr_ac3_mainid_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
3391
5
    proto_tree_add_item(tree, hf_mpeg_descr_ac3_asvc_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
3392
5
    proto_tree_add_item(tree, hf_mpeg_descr_ac3_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
3393
5
    offset += 1;
3394
3395
5
    if (flags & MPEG_DESCR_AC3_COMPONENT_TYPE_FLAG_MASK) {
3396
0
        component_type = tvb_get_uint8(tvb, offset);
3397
0
        component_type_tree = proto_tree_add_subtree_format(tree, tvb, offset, 3,
3398
0
                    ett_mpeg_descriptor_ac3_component_type, NULL, "Component Type 0x%02x", component_type);
3399
0
        proto_tree_add_item(component_type_tree, hf_mpeg_descr_ac3_component_type_reserved_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
3400
0
        proto_tree_add_item(component_type_tree, hf_mpeg_descr_ac3_component_type_full_service_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
3401
0
        proto_tree_add_item(component_type_tree, hf_mpeg_descr_ac3_component_type_service_type_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
3402
0
        proto_tree_add_item(component_type_tree, hf_mpeg_descr_ac3_component_type_number_of_channels_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
3403
0
        offset += 1;
3404
0
    }
3405
3406
5
    if (flags & MPEG_DESCR_AC3_BSID_FLAG_MASK) {
3407
0
        proto_tree_add_item(tree, hf_mpeg_descr_ac3_bsid, tvb, offset, 1, ENC_BIG_ENDIAN);
3408
0
        offset += 1;
3409
0
    }
3410
3411
5
    if (flags & MPEG_DESCR_AC3_MAINID_FLAG_MASK) {
3412
0
        proto_tree_add_item(tree, hf_mpeg_descr_ac3_mainid, tvb, offset, 1, ENC_BIG_ENDIAN);
3413
0
        offset += 1;
3414
0
    }
3415
3416
5
    if (flags & MPEG_DESCR_AC3_ASVC_FLAG_MASK) {
3417
0
        proto_tree_add_item(tree, hf_mpeg_descr_ac3_asvc, tvb, offset, 1, ENC_BIG_ENDIAN);
3418
0
        offset += 1;
3419
0
    }
3420
3421
5
    if (offset < end)
3422
5
        proto_tree_add_item(tree, hf_mpeg_descr_ac3_additional_info, tvb, offset, end - offset, ENC_NA);
3423
5
}
3424
3425
/* 0x6F Application Signalling Descriptor */
3426
static int hf_mpeg_descr_app_sig_app_type;
3427
static int hf_mpeg_descr_app_sig_ait_ver;
3428
3429
static void
3430
proto_mpeg_descriptor_dissect_app_sig(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
3431
2
{
3432
2
    unsigned  offset_start;
3433
3434
2
    offset_start = offset;
3435
38
    while ((offset - offset_start) < len) {
3436
36
        proto_tree_add_item(tree, hf_mpeg_descr_app_sig_app_type, tvb, offset, 2, ENC_BIG_ENDIAN);
3437
36
        offset += 2;
3438
36
        proto_tree_add_item(tree, hf_mpeg_descr_app_sig_ait_ver, tvb, offset, 1, ENC_BIG_ENDIAN);
3439
36
        offset += 1;
3440
36
    }
3441
2
}
3442
3443
/* 0x71 Service Identifier Descriptor */
3444
static int hf_mpeg_descr_service_identifier;
3445
3446
static void
3447
proto_mpeg_descriptor_dissect_service_identifier(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
3448
6
{
3449
6
    proto_tree_add_item(tree, hf_mpeg_descr_service_identifier, tvb, offset, len, ENC_ASCII);
3450
6
}
3451
3452
/* 0x72 Service Availability Descriptor */
3453
static int hf_mpeg_descr_service_availability_flag;
3454
static int hf_mpeg_descr_service_availability_reserved;
3455
static int hf_mpeg_descr_service_availability_cell_id;
3456
3457
14
#define MPEG_DESCR_SRV_AVAIL_FLAG_MASK      0x80
3458
14
#define MPEG_DESCR_SRV_AVAIL_RESERVED_MASK  0x7F
3459
3460
static int ett_mpeg_descriptor_srv_avail_cells;
3461
3462
static const value_string mpeg_descr_srv_avail_flag_vals[] = {
3463
    { 0x0, "Service is unavailable on the cells" },
3464
    { 0x1, "Service is available on the cells" },
3465
3466
    { 0x0, NULL }
3467
};
3468
3469
static void
3470
proto_mpeg_descriptor_dissect_service_availability(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
3471
2
{
3472
2
    unsigned end = offset + len;
3473
3474
2
    proto_tree * cells_tree;
3475
3476
2
    proto_tree_add_item(tree, hf_mpeg_descr_service_availability_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
3477
2
    proto_tree_add_item(tree, hf_mpeg_descr_service_availability_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
3478
2
    offset += 1;
3479
3480
2
    cells_tree = proto_tree_add_subtree(tree, tvb, offset, end - offset, ett_mpeg_descriptor_srv_avail_cells, NULL, "Cells");
3481
3482
68
    while (offset < end) {
3483
66
        proto_tree_add_item(cells_tree, hf_mpeg_descr_service_availability_cell_id, tvb, offset, 2, ENC_BIG_ENDIAN);
3484
66
        offset += 2;
3485
66
    }
3486
2
}
3487
3488
/* 0x73 Default Authority Descriptor */
3489
static int hf_mpeg_descr_default_authority_name;
3490
3491
static void
3492
proto_mpeg_descriptor_dissect_default_authority(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
3493
0
{
3494
0
    proto_tree_add_item(tree, hf_mpeg_descr_default_authority_name, tvb, offset, len, ENC_ASCII);
3495
0
}
3496
3497
/* 0x75 TVA ID Descriptor */
3498
static int hf_mpeg_descr_tva_id;
3499
static int hf_mpeg_descr_tva_reserved;
3500
static int hf_mpeg_descr_tva_running_status;
3501
3502
static int ett_mpeg_descriptor_tva;
3503
3504
14
#define MPEG_DESCR_TVA_RESREVED_MASK        0xF8
3505
14
#define MPEG_DESCR_TVA_RUNNING_STATUS_MASK  0x07
3506
3507
static const value_string mpeg_descr_tva_running_status_vals[] = {
3508
    { 0, "Reserved" },
3509
    { 1, "Not yet running" },
3510
    { 2, "Starts (or restarts) shortly" },
3511
    { 3, "Paused" },
3512
    { 4, "Running" },
3513
    { 5, "Cancelled" },
3514
    { 6, "Completed" },
3515
    { 7, "Reserved" },
3516
    { 0, NULL }
3517
};
3518
3519
static void
3520
proto_mpeg_descriptor_dissect_tva_id(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
3521
0
{
3522
0
    unsigned end = offset + len;
3523
0
    unsigned tva_cnt = 0;
3524
3525
0
    proto_tree * tva_tree;
3526
3527
0
    while (offset < end) {
3528
0
        unsigned id = tvb_get_uint16(tvb, offset, ENC_BIG_ENDIAN);
3529
0
        tva_tree = proto_tree_add_subtree_format(tree, tvb, offset, 3, ett_mpeg_descriptor_tva, NULL, "TVA %u (0x%04X)", tva_cnt, id);
3530
0
        proto_tree_add_item(tva_tree, hf_mpeg_descr_tva_id, tvb, offset, 2, ENC_BIG_ENDIAN);
3531
0
        offset += 2;
3532
0
        tva_cnt += 1;
3533
3534
0
        proto_tree_add_item(tva_tree, hf_mpeg_descr_tva_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
3535
0
        proto_tree_add_item(tva_tree, hf_mpeg_descr_tva_running_status, tvb, offset, 1, ENC_BIG_ENDIAN);
3536
0
        offset += 1;
3537
0
    }
3538
0
}
3539
3540
/* 0x76 Content Identifier Descriptor */
3541
static int hf_mpeg_descr_content_identifier_crid_type;
3542
static int hf_mpeg_descr_content_identifier_crid_location;
3543
static int hf_mpeg_descr_content_identifier_crid_length;
3544
static int hf_mpeg_descr_content_identifier_crid_bytes;
3545
static int hf_mpeg_descr_content_identifier_cird_ref;
3546
3547
14
#define MPEG_DESCR_CONTENT_IDENTIFIER_CRID_TYPE_MASK        0xFC
3548
14
#define MPEG_DESCR_CONTENT_IDENTIFIER_CRID_LOCATION_MASK    0x03
3549
3550
static int ett_mpeg_descriptor_content_identifier_crid;
3551
3552
static const value_string mpeg_descr_content_identifier_crid_type_vals[] = {
3553
    { 0x00, "No type defined" },
3554
    { 0x01, "CRID references the item of content that this event is an instance of" },
3555
    { 0x02, "CRID references a series that this event belongs to" },
3556
    { 0x03, "CRID references a recommendation" },
3557
3558
    { 0, NULL }
3559
};
3560
3561
static const value_string mpeg_descr_content_identifier_crid_location_vals[] = {
3562
    { 0x00, "Carried explicitly within descriptor" },
3563
    { 0x01, "Carried in Content Identifier Table (CIT)" },
3564
3565
    { 0, NULL }
3566
};
3567
3568
static void
3569
proto_mpeg_descriptor_dissect_content_identifier(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
3570
0
{
3571
0
    unsigned  end = offset + len, crid_len;
3572
0
    uint8_t crid, crid_location, crid_type;
3573
3574
0
    proto_tree *crid_tree;
3575
3576
0
    while (offset < end) {
3577
0
        crid = tvb_get_uint8(tvb, offset);
3578
0
        crid_type = (crid & MPEG_DESCR_CONTENT_IDENTIFIER_CRID_TYPE_MASK) >> 2;
3579
0
        crid_location = crid & MPEG_DESCR_CONTENT_IDENTIFIER_CRID_LOCATION_MASK;
3580
3581
0
        if (crid_location == 0) {
3582
0
            crid_len = 2 + tvb_get_uint8(tvb, offset + 1);
3583
0
        } else if (crid_location == 1) {
3584
0
            crid_len = 3;
3585
0
        } else {
3586
0
            crid_len = 1;
3587
0
        }
3588
3589
0
        crid_tree = proto_tree_add_subtree_format(tree, tvb, offset, crid_len,
3590
0
                ett_mpeg_descriptor_content_identifier_crid, NULL, "CRID type=0%02x", crid_type);
3591
3592
0
        proto_tree_add_item(crid_tree, hf_mpeg_descr_content_identifier_crid_type, tvb, offset, 1, ENC_BIG_ENDIAN);
3593
0
        proto_tree_add_item(crid_tree, hf_mpeg_descr_content_identifier_crid_location, tvb, offset, 1, ENC_BIG_ENDIAN);
3594
0
        offset += 1;
3595
3596
0
        if (crid_location == 0x00) {
3597
0
            crid_len = tvb_get_uint8(tvb, offset);
3598
0
            proto_tree_add_item(crid_tree, hf_mpeg_descr_content_identifier_crid_length, tvb, offset, 1, ENC_BIG_ENDIAN);
3599
0
            offset += 1;
3600
3601
0
            proto_tree_add_item(crid_tree, hf_mpeg_descr_content_identifier_crid_bytes, tvb, offset, crid_len, ENC_NA);
3602
0
            offset += crid_len;
3603
0
        } else if (crid_location == 0x01) {
3604
0
            proto_tree_add_item(crid_tree, hf_mpeg_descr_content_identifier_cird_ref, tvb, offset, 2, ENC_BIG_ENDIAN);
3605
0
        }
3606
3607
0
    }
3608
3609
3610
0
}
3611
3612
/* 0x7D XAIT Content Location Descriptor */
3613
static int hf_mpeg_descr_xait_onid;
3614
static int hf_mpeg_descr_xait_sid;
3615
static int hf_mpeg_descr_xait_version_number;
3616
static int hf_mpeg_descr_xait_update_policy;
3617
3618
14
#define MPEG_DESCR_XAIT_VERSION_NUM_MASK    0xF8
3619
14
#define MPEG_DESCR_XAIT_UPDATE_POLICY_MASK  0x07
3620
3621
static const range_string mpeg_descr_xait_update_policy_vals[] = {
3622
    { 0, 0, "When the XAIT version changes, immediately re-load the XAIT" },
3623
    { 1, 1, "Ignore XAIT version changes until a reset or reinitialize" },
3624
    { 2, 7, "Reserved for future use" },
3625
    { 0, 0, NULL }
3626
};
3627
3628
static void
3629
1
proto_mpeg_descriptor_dissect_xait(tvbuff_t *tvb, unsigned offset, proto_tree *tree) {
3630
1
    proto_tree_add_item(tree, hf_mpeg_descr_xait_onid, tvb, offset, 2, ENC_BIG_ENDIAN);
3631
1
    offset += 2;
3632
3633
1
    proto_tree_add_item(tree, hf_mpeg_descr_xait_sid, tvb, offset, 2, ENC_BIG_ENDIAN);
3634
1
    offset += 2;
3635
3636
1
    proto_tree_add_item(tree, hf_mpeg_descr_xait_version_number, tvb, offset, 1, ENC_BIG_ENDIAN);
3637
1
    proto_tree_add_item(tree, hf_mpeg_descr_xait_update_policy, tvb, offset, 1, ENC_BIG_ENDIAN);
3638
1
}
3639
3640
/* 0x7E FTA Content Management Descriptor */
3641
static int hf_mpeg_descr_fta_user_defined;
3642
static int hf_mpeg_descr_fta_reserved_future_use;
3643
static int hf_mpeg_descr_fta_do_not_scramble;
3644
static int hf_mpeg_descr_fta_control_remote_access_over_internet;
3645
static int hf_mpeg_descr_fta_do_not_apply_revocation;
3646
3647
14
#define MPEG_DESCR_FTA_USER_DEFINED_MASK 0x80
3648
14
#define MPEG_DESCR_FTA_RESERVED_MASK 0x70
3649
14
#define MPEG_DESCR_FTA_DO_NOT_SCRAMBLE_MASK 0x08
3650
14
#define MPEG_DESCR_FTA_REMOTE_MASK 0x06
3651
14
#define MPEG_DESCR_FTA_REVOCATION_MASK 0x01
3652
3653
static const value_string fta_control_remote_access_over_internet_vals[] = {
3654
    { 0, "Redistribution over the Internet is enabled." },
3655
    { 1, "Redistribution over the Internet is enabled but only within a managed domain." },
3656
    { 2, "Redistribution over the Internet is enabled but only within a managed domain and after a certain short period of time (e.g. 24 hours)." },
3657
    { 3, "Redistribution over the Internet is not allowed with the following exception: Redistribution over the Internet within a managed domain is enabled after a specified long (possibly indefinite) period of time." },
3658
    { 0, NULL }
3659
};
3660
3661
static const true_false_string tfs_fta_do_not_scramble = { "Scrambling shall not be applied for the purposes of content protection", "Scrambling shall be applied where applicable for content protection" };
3662
static const true_false_string tfs_fta_do_not_apply_revocation = { "Content revocation process shall not be applied", "Content revocation process shall be applied" };
3663
3664
static void
3665
3
proto_mpeg_descriptor_dissect_fta(tvbuff_t *tvb, unsigned offset, proto_tree *tree) {
3666
3
    proto_tree_add_item(tree, hf_mpeg_descr_fta_user_defined, tvb, offset, 1, ENC_BIG_ENDIAN);
3667
3
    proto_tree_add_item(tree, hf_mpeg_descr_fta_reserved_future_use, tvb, offset, 1, ENC_BIG_ENDIAN);
3668
3
    proto_tree_add_item(tree, hf_mpeg_descr_fta_do_not_scramble, tvb, offset, 1, ENC_BIG_ENDIAN);
3669
3
    proto_tree_add_item(tree, hf_mpeg_descr_fta_control_remote_access_over_internet, tvb, offset, 1, ENC_BIG_ENDIAN);
3670
3
    proto_tree_add_item(tree, hf_mpeg_descr_fta_do_not_apply_revocation, tvb, offset, 1, ENC_BIG_ENDIAN);
3671
3
}
3672
3673
/* 0x7F Extension Descriptor */
3674
static int hf_mpeg_descr_etsi_extension_tag_extension;
3675
static int hf_mpeg_descr_etsi_extension_data;
3676
/* Supplementary Audio (Sub-)Descriptor */
3677
static int hf_mpeg_descr_etsi_extension_supp_audio_mix_type;
3678
static int hf_mpeg_descr_etsi_extension_supp_audio_ed_cla;
3679
static int hf_mpeg_descr_etsi_extension_supp_audio_lang_code_present;
3680
static int hf_mpeg_descr_etsi_extension_supp_audio_lang_code;
3681
3682
static int hf_mpeg_descr_etsi_private_data;
3683
3684
#define EXT_TAG_IMG_ICON      0x00
3685
#define EXT_TAG_CPCM_DLV      0x01
3686
#define EXT_TAG_CP            0x02
3687
#define EXT_TAG_CP_ID         0x03
3688
#define EXT_TAG_T2            0x04
3689
#define EXT_TAG_SH            0x05
3690
0
#define EXT_TAG_SUPP_AUDIO    0x06
3691
#define EXT_TAG_NW_CHANGE     0x07
3692
#define EXT_TAG_MSG           0x08
3693
#define EXT_TAG_TRGT_REG      0x09
3694
#define EXT_TAG_TRGT_REG_NAME 0x0A
3695
#define EXT_TAG_SVC_RELOC     0x0B
3696
3697
static const value_string mpeg_descr_etsi_extension_tag_extension_vals[] = {
3698
    { EXT_TAG_IMG_ICON,      "Image Icon Descriptor" },
3699
    { EXT_TAG_CPCM_DLV,      "CPCM Delivery Signalling Descriptor" },
3700
    { EXT_TAG_CP,            "CP Descriptor" },
3701
    { EXT_TAG_CP_ID,         "CP Identifier Descriptor" },
3702
    { EXT_TAG_T2,            "T2 Delivery System Descriptor" },
3703
    { EXT_TAG_SH,            "SH Delivery System Descriptor" },
3704
    { EXT_TAG_SUPP_AUDIO,    "Supplementary Audio Descriptor" },
3705
    { EXT_TAG_NW_CHANGE,     "Network Change Notify Descriptor" },
3706
    { EXT_TAG_MSG,           "Message Descriptor" },
3707
    { EXT_TAG_TRGT_REG,      "Target Region Descriptor" },
3708
    { EXT_TAG_TRGT_REG_NAME, "Target Region Name Descriptor" },
3709
    { EXT_TAG_SVC_RELOC,     "Service Relocated Descriptor" },
3710
    { 0x0, NULL }
3711
};
3712
static value_string_ext mpeg_descr_etsi_extension_tag_extension_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_etsi_extension_tag_extension_vals);
3713
3714
static const value_string supp_audio_mix_type_vals[] = {
3715
    { 0x00, "Audio stream is a supplementary stream" },
3716
    { 0x01, "Audio stream is a complete and independent stream" },
3717
    { 0x0, NULL }
3718
};
3719
3720
/* if we wanted to distinguish between reserved and user defined,
3721
   we'd have to convert this into a range string */
3722
static const value_string supp_audio_ed_cla[] = {
3723
    { 0x00, "Main audio" },
3724
    { 0x01, "Audio description for the visually impaired" },
3725
    { 0x02, "Clean audio for the hearing impaired" },
3726
    { 0x03, "Spoken subtitles for the visually impaired" },
3727
    { 0x0, NULL }
3728
};
3729
3730
static void
3731
proto_mpeg_descriptor_dissect_etsi_extension(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
3732
6
{
3733
6
    unsigned  offset_start;
3734
6
    uint8_t   tag_ext;
3735
6
    bool      lang_code_present;
3736
6
    unsigned  already_dissected;
3737
3738
6
    offset_start = offset;
3739
3740
6
    tag_ext = tvb_get_uint8(tvb, offset);
3741
6
    proto_tree_add_item(tree, hf_mpeg_descr_etsi_extension_tag_extension, tvb, offset, 1, ENC_BIG_ENDIAN);
3742
6
    offset += 1;
3743
3744
6
    switch (tag_ext) {
3745
0
        case EXT_TAG_SUPP_AUDIO:
3746
0
            proto_tree_add_item(tree, hf_mpeg_descr_etsi_extension_supp_audio_mix_type, tvb, offset, 1, ENC_BIG_ENDIAN);
3747
0
            proto_tree_add_item(tree, hf_mpeg_descr_etsi_extension_supp_audio_ed_cla, tvb, offset, 1, ENC_BIG_ENDIAN);
3748
0
            lang_code_present = ((tvb_get_uint8(tvb, offset) & 0x01) == 0x01);
3749
0
            proto_tree_add_item(tree, hf_mpeg_descr_etsi_extension_supp_audio_lang_code_present, tvb, offset, 1, ENC_BIG_ENDIAN);
3750
0
            offset += 1;
3751
0
            if (lang_code_present) {
3752
0
                proto_tree_add_item(tree, hf_mpeg_descr_etsi_extension_supp_audio_lang_code, tvb, offset, 3, ENC_ASCII);
3753
0
                offset += 3;
3754
0
            }
3755
0
            already_dissected = offset-offset_start;
3756
0
            if (already_dissected<len)
3757
0
                proto_tree_add_item(tree, hf_mpeg_descr_etsi_private_data, tvb, offset, len-already_dissected, ENC_NA);
3758
0
            break;
3759
6
        default:
3760
6
            already_dissected = offset-offset_start;
3761
6
            if (already_dissected<len)
3762
6
                proto_tree_add_item(tree, hf_mpeg_descr_etsi_extension_data, tvb, offset, len-already_dissected, ENC_NA);
3763
6
            break;
3764
6
    }
3765
6
}
3766
3767
14
#define MPEG_DESCR_AC3_SYSA_SRATE_MASK 0xe0
3768
14
#define MPEG_DESCR_AC3_SYSA_BSID_MASK 0x1f
3769
14
#define MPEG_DESCR_AC3_SYSA_BITRATE_CODE_LIMIT_MASK 0x80
3770
14
#define MPEG_DESCR_AC3_SYSA_BITRATE_CODE_MASK 0x7c
3771
14
#define MPEG_DESCR_AC3_SYSA_SURROUND_MODE_MASK 0x03
3772
14
#define MPEG_DESCR_AC3_SYSA_BSMOD_MASK 0xe0
3773
14
#define MPEG_DESCR_AC3_SYSA_NUM_CHANNELS_MASK 0x1e
3774
14
#define MPEG_DESCR_AC3_SYSA_FULL_SVC_MASK 0x01
3775
14
#define MPEG_DESCR_AC3_SYSA_MAINID_MASK 0xe0
3776
14
#define MPEG_DESCR_AC3_SYSA_PRIORITY_MASK 0x18
3777
14
#define MPEG_DESCR_AC3_SYSA_RESERVED_MASK 0x07
3778
14
#define MPEG_DESCR_AC3_SYSA_TEXTLEN_MASK 0xfe
3779
14
#define MPEG_DESCR_AC3_SYSA_TEXTCODE_MASK 0x01
3780
14
#define MPEG_DESCR_AC3_SYSA_LANG1_MASK 0x80
3781
14
#define MPEG_DESCR_AC3_SYSA_LANG2_MASK 0x40
3782
3783
static int hf_mpeg_descr_ac3_sysa_srate;
3784
static int hf_mpeg_descr_ac3_sysa_bsid;
3785
static int hf_mpeg_descr_ac3_sysa_bitrate;
3786
static int hf_mpeg_descr_ac3_sysa_bitrate_limit;
3787
static int hf_mpeg_descr_ac3_sysa_surround;
3788
static int hf_mpeg_descr_ac3_sysa_bsmod;
3789
static int hf_mpeg_descr_ac3_sysa_num_channels;
3790
static int hf_mpeg_descr_ac3_sysa_full_svc;
3791
static int hf_mpeg_descr_ac3_sysa_langcode;
3792
static int hf_mpeg_descr_ac3_sysa_langcode2;
3793
static int hf_mpeg_descr_ac3_sysa_mainid;
3794
static int hf_mpeg_descr_ac3_sysa_priority;
3795
static int hf_mpeg_descr_ac3_sysa_reserved;
3796
static int hf_mpeg_descr_ac3_sysa_asvcflags;
3797
static int hf_mpeg_descr_ac3_sysa_textlen;
3798
static int hf_mpeg_descr_ac3_sysa_textcode;
3799
static int hf_mpeg_descr_ac3_sysa_lang1;
3800
static int hf_mpeg_descr_ac3_sysa_lang2;
3801
static int hf_mpeg_descr_ac3_sysa_lang1_bytes;
3802
static int hf_mpeg_descr_ac3_sysa_lang2_bytes;
3803
3804
/* ATSC A/52 Annex A Table A4.2*/
3805
static const value_string mpeg_descr_ac3_sysa_srate_flag_vals[] = {
3806
    { 0x0, "48 KHz" },
3807
    { 0x1, "44.1 KHz" },
3808
    { 0x2, "32 KHz" },
3809
    { 0x3, "Reserved" },
3810
    { 0x4, "48 or 44.1 KHz" },
3811
    { 0x5, "48 or 32 KHz" },
3812
    { 0x6, "44.1 or 32 KHz" },
3813
    { 0x7, "48, 44.1 or 32 KHz" },
3814
    { 0x0, NULL }
3815
};
3816
3817
/* ATSC A/52 Annex A Table A4.3 */
3818
static const value_string mpeg_descr_ac3_sysa_bitrate_code_limit_vals[] = {
3819
    { 0, "Exact bitrate" },
3820
    { 1, "Upper limit bitrate" },
3821
    { 0x0, NULL }
3822
};
3823
3824
static const value_string mpeg_descr_ac3_sysa_bitrate_code_vals[] = {
3825
    { 0, "32 KHz" },
3826
    { 1, "40 KHz" },
3827
    { 2, "48 KHz" },
3828
    { 3, "56 KHz" },
3829
    { 4, "64 KHz" },
3830
    { 5, "80 KHz" },
3831
    { 6, "96 KHz" },
3832
    { 7, "112 KHz" },
3833
    { 8, "128 KHz" },
3834
    { 9, "160 KHz" },
3835
    { 10, "192 KHz" },
3836
    { 11, "224 KHz" },
3837
    { 12, "256 KHz" },
3838
    { 13, "320 KHz" },
3839
    { 14, "384 KHz" },
3840
    { 15, "448 KHz" },
3841
    { 16, "512 KHz" },
3842
    { 17, "576 KHz" },
3843
    { 18, "640 KHz" },
3844
    { 0x0, NULL }
3845
};
3846
3847
/* ATSC A/52 Annex A Table A4.4 */
3848
static const value_string mpeg_descr_ac3_sysa_surround_mode_vals[] = {
3849
    { 0x0, "Not indicated" },
3850
    { 0x1, "NOT Dolby Surround Sound" },
3851
    { 0x2, "Dolby Surround Sound" },
3852
    { 0x3, "Reserved" },
3853
    { 0x0, NULL }
3854
};
3855
3856
/* ATSC A/52 Annex A Table A4.5*/
3857
static const value_string mpeg_descr_ac3_sysa_num_channels_vals[] = {
3858
    { 0x0, "1 + 1 channels" },
3859
    { 0x1, "1/0 channels" },
3860
    { 0x2, "2/0 channels" },
3861
    { 0x3, "3/0 channels" },
3862
    { 0x4, "2/1 channels" },
3863
    { 0x5, "3/1 channels" },
3864
    { 0x6, "2/2 channels" },
3865
    { 0x7, "3/2 channels" },
3866
    { 0x8, "1 channel" },
3867
    { 0x9, "<= 2 channels" },
3868
    { 0xa, "<= 3 channels" },
3869
    { 0xb, "<= 4 channels" },
3870
    { 0xc, "<= 5 channels" },
3871
    { 0xd, "<= 6 channels" },
3872
    { 0xe, "Reserved" },
3873
    { 0xf, "Reserved" },
3874
    { 0x0, NULL }
3875
};
3876
3877
/* ATSC A/52 Annex A Table A4.6 */
3878
static const value_string mpeg_descr_ac3_sysa_priority_vals[] = {
3879
    { 0x0, "Reserved" },
3880
    { 0x1, "Primary Audio" },
3881
    { 0x2, "Other Audio" },
3882
    { 0x3, "Not specified" },
3883
    { 0x0, NULL }
3884
};
3885
3886
/* According to ATSC A/52, Annex A, there are two separate ATSC descriptors.  "System A" is used
3887
   by ATSC, and "System B" is used by DVB.  See A/52 Sec A.4.1 for the System A definition */
3888
static void
3889
proto_mpeg_descriptor_dissect_ac3_system_a(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
3890
2
{
3891
2
    unsigned  end = offset + len;
3892
2
    uint8_t bsmod_chans_fullsvc, bsmod, num_channels, textlen, lang;
3893
3894
2
    proto_tree_add_item(tree, hf_mpeg_descr_ac3_sysa_srate, tvb, offset, 1, ENC_BIG_ENDIAN);
3895
2
    proto_tree_add_item(tree, hf_mpeg_descr_ac3_sysa_bsid, tvb, offset, 1, ENC_BIG_ENDIAN);
3896
2
    offset += 1;
3897
3898
2
    proto_tree_add_item(tree, hf_mpeg_descr_ac3_sysa_bitrate_limit, tvb, offset, 1, ENC_BIG_ENDIAN);
3899
2
    proto_tree_add_item(tree, hf_mpeg_descr_ac3_sysa_bitrate, tvb, offset, 1, ENC_BIG_ENDIAN);
3900
2
    proto_tree_add_item(tree, hf_mpeg_descr_ac3_sysa_surround, tvb, offset, 1, ENC_BIG_ENDIAN);
3901
2
    offset += 1;
3902
3903
2
    bsmod_chans_fullsvc = tvb_get_uint8(tvb, offset);
3904
2
    bsmod = (bsmod_chans_fullsvc & 0xe0) >> 5;
3905
2
    num_channels = (bsmod_chans_fullsvc & 0x1e) >> 1;
3906
2
    proto_tree_add_item(tree, hf_mpeg_descr_ac3_sysa_bsmod, tvb, offset, 1, ENC_BIG_ENDIAN);
3907
2
    proto_tree_add_item(tree, hf_mpeg_descr_ac3_sysa_num_channels, tvb, offset, 1, ENC_BIG_ENDIAN);
3908
2
    proto_tree_add_item(tree, hf_mpeg_descr_ac3_sysa_full_svc, tvb, offset, 1, ENC_BIG_ENDIAN);
3909
2
    offset += 1;
3910
3911
2
    if (offset >= end) return;
3912
3913
2
    proto_tree_add_item(tree, hf_mpeg_descr_ac3_sysa_langcode, tvb, offset, 1, ENC_BIG_ENDIAN);
3914
2
    offset += 1;
3915
3916
2
    if (offset >= end) return;
3917
3918
2
    if (num_channels == 0) {
3919
        /* 1+1 mode, so there is the possibility the second mono is in a different language */
3920
1
        proto_tree_add_item(tree, hf_mpeg_descr_ac3_sysa_langcode2, tvb, offset, 1, ENC_BIG_ENDIAN);
3921
1
        offset += 1;
3922
1
    }
3923
3924
2
    if (offset >= end) return;
3925
3926
2
    if (bsmod < 2) {
3927
0
        proto_tree_add_item(tree, hf_mpeg_descr_ac3_sysa_mainid, tvb, offset, 1, ENC_BIG_ENDIAN);
3928
0
        proto_tree_add_item(tree, hf_mpeg_descr_ac3_sysa_priority, tvb, offset, 1, ENC_BIG_ENDIAN);
3929
0
        proto_tree_add_item(tree, hf_mpeg_descr_ac3_sysa_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
3930
2
    } else {
3931
2
        proto_tree_add_item(tree, hf_mpeg_descr_ac3_sysa_asvcflags, tvb, offset, 1, ENC_BIG_ENDIAN);
3932
2
    }
3933
2
    offset += 1;
3934
3935
2
    if (offset >= end) return;
3936
3937
2
    textlen = tvb_get_uint8(tvb, offset) >> 1;
3938
2
    proto_tree_add_item(tree, hf_mpeg_descr_ac3_sysa_textlen, tvb, offset, 1, ENC_BIG_ENDIAN);
3939
2
    proto_tree_add_item(tree, hf_mpeg_descr_ac3_sysa_textcode, tvb, offset, 1, ENC_BIG_ENDIAN);
3940
2
    offset += 1;
3941
2
    offset += textlen;
3942
3943
2
    if (offset >= end) return;
3944
3945
2
    lang = tvb_get_uint8(tvb, offset);
3946
2
    proto_tree_add_item(tree, hf_mpeg_descr_ac3_sysa_lang1, tvb, offset, 1, ENC_BIG_ENDIAN);
3947
2
    proto_tree_add_item(tree, hf_mpeg_descr_ac3_sysa_lang2, tvb, offset, 1, ENC_BIG_ENDIAN);
3948
2
    offset += 1;
3949
3950
2
    if (offset >= end) return;
3951
3952
2
    if (lang & 0x80) {
3953
0
        proto_tree_add_item(tree, hf_mpeg_descr_ac3_sysa_lang1_bytes, tvb, offset, 3, ENC_ASCII);
3954
0
        offset += 3;
3955
0
    }
3956
3957
2
    if (offset >= end) return;
3958
3959
2
    if (lang & 0x40) {
3960
1
        proto_tree_add_item(tree, hf_mpeg_descr_ac3_sysa_lang2_bytes, tvb, offset, 3, ENC_ASCII);
3961
1
        offset += 3;
3962
1
    }
3963
3964
2
    if (offset < end)
3965
2
        proto_tree_add_item(tree, hf_mpeg_descr_ac3_additional_info, tvb, offset, end - offset, ENC_NA);
3966
2
}
3967
3968
/* 0x83 NorDig Logical Channel Descriptor (version 1) */
3969
static int hf_mpeg_descr_nordig_lcd_v1_service_list_id;
3970
static int hf_mpeg_descr_nordig_lcd_v1_service_list_visible_service_flag;
3971
static int hf_mpeg_descr_nordig_lcd_v1_service_list_reserved;
3972
static int hf_mpeg_descr_nordig_lcd_v1_service_list_logical_channel_number;
3973
3974
static int ett_mpeg_descriptor_nordig_lcd_v1_service_list;
3975
3976
14
#define MPEG_DESCR_NORDIG_LCD_V1_VISIBLE_SERVICE_FLAG_MASK 0x8000
3977
14
#define MPEG_DESCR_NORDIG_LCD_V1_RESERVED_MASK             0x4000
3978
14
#define MPEG_DESCR_NORDIG_LCD_V1_LCN_MASK                  0x3fff
3979
3980
static void
3981
proto_mpeg_descriptor_dissect_nordig_lcd_v1(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
3982
1
{
3983
1
    unsigned   end    = offset + len;
3984
3985
1
    if (len%4 != 0) {
3986
0
        return;
3987
0
    }
3988
3989
1
    uint16_t svc_id;
3990
1
    proto_tree * svc_tree;
3991
3992
60
    while (offset < end) {
3993
59
        svc_id = tvb_get_ntohs(tvb, offset);
3994
3995
59
        svc_tree = proto_tree_add_subtree_format(tree, tvb, offset, 3,
3996
59
                    ett_mpeg_descriptor_nordig_lcd_v1_service_list, NULL, "Service 0x%04x", svc_id);
3997
3998
59
        proto_tree_add_item(svc_tree, hf_mpeg_descr_nordig_lcd_v1_service_list_id, tvb, offset, 2, ENC_BIG_ENDIAN);
3999
59
        offset += 2;
4000
4001
59
        proto_tree_add_item(svc_tree, hf_mpeg_descr_nordig_lcd_v1_service_list_visible_service_flag, tvb, offset, 2, ENC_BIG_ENDIAN);
4002
59
        proto_tree_add_item(svc_tree, hf_mpeg_descr_nordig_lcd_v1_service_list_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
4003
59
        proto_tree_add_item(svc_tree, hf_mpeg_descr_nordig_lcd_v1_service_list_logical_channel_number, tvb, offset, 2, ENC_BIG_ENDIAN);
4004
59
        offset += 2;
4005
59
    }
4006
4007
1
}
4008
4009
/* 0x87 NorDig Logical Channel Descriptor (version 2) */
4010
static int hf_mpeg_descr_nordig_lcd_v2_channel_list_id;
4011
static int hf_mpeg_descr_nordig_lcd_v2_channel_list_name_length;
4012
static int hf_mpeg_descr_nordig_lcd_v2_channel_list_name_encoding;
4013
static int hf_mpeg_descr_nordig_lcd_v2_channel_list_name;
4014
static int hf_mpeg_descr_nordig_lcd_v2_country_code;
4015
static int hf_mpeg_descr_nordig_lcd_v2_descriptor_length;
4016
static int hf_mpeg_descr_nordig_lcd_v2_service_id;
4017
static int hf_mpeg_descr_nordig_lcd_v2_visible_service_flag;
4018
static int hf_mpeg_descr_nordig_lcd_v2_reserved;
4019
static int hf_mpeg_descr_nordig_lcd_v2_logical_channel_number;
4020
4021
static int ett_mpeg_descriptor_nordig_lcd_v2_channel_list_list;
4022
static int ett_mpeg_descriptor_nordig_lcd_v2_service_list;
4023
4024
14
#define MPEG_DESCR_NORDIG_LCD_V2_VISIBLE_SERVICE_FLAG_MASK 0x8000
4025
14
#define MPEG_DESCR_NORDIG_LCD_V2_RESERVED_MASK             0x7c00
4026
14
#define MPEG_DESCR_NORDIG_LCD_V2_LCN_MASK                  0x03ff
4027
4028
static int
4029
proto_mpeg_descriptor_dissect_nordig_lcd_v2_measure_ch_list(tvbuff_t *tvb, unsigned offset, unsigned len)
4030
3
{
4031
3
    unsigned l_offset = offset;
4032
3
    if (len < 2) {
4033
0
        return len;
4034
0
    }
4035
3
    uint8_t channel_list_name_length = tvb_get_uint8(tvb, l_offset + 1);
4036
3
    l_offset += 2 + channel_list_name_length + 4;
4037
3
    if (l_offset > offset + len) {
4038
2
        return len;
4039
2
    }
4040
1
    uint8_t descriptor_len = tvb_get_uint8(tvb, l_offset - 1);
4041
1
    l_offset += descriptor_len;
4042
1
    if (l_offset > offset + len) {
4043
0
        return len;
4044
1
    } else {
4045
1
        return l_offset - offset;
4046
1
    }
4047
1
}
4048
4049
static void
4050
proto_mpeg_descriptor_dissect_nordig_lcd_v2(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
4051
2
{
4052
2
    unsigned   cnt    = len;
4053
2
    unsigned   end    = offset + len;
4054
4055
2
    proto_tree * channel_list_tree;
4056
4057
4
    while (cnt > 0) {
4058
3
        int ch_list_len = proto_mpeg_descriptor_dissect_nordig_lcd_v2_measure_ch_list(tvb, offset, end - offset);
4059
3
        uint8_t channel_list_id;
4060
3
        uint8_t channel_list_name_length;
4061
3
        uint8_t descriptor_length;
4062
4063
3
        channel_list_id = tvb_get_uint8(tvb, offset);
4064
3
        channel_list_tree = proto_tree_add_subtree_format(tree, tvb, offset, ch_list_len,
4065
3
                    ett_mpeg_descriptor_nordig_lcd_v2_channel_list_list, NULL, "Channel list 0x%02x", channel_list_id);
4066
3
        proto_tree_add_item(channel_list_tree, hf_mpeg_descr_nordig_lcd_v2_channel_list_id, tvb, offset, 1, ENC_BIG_ENDIAN);
4067
3
        offset += 1;
4068
3
        cnt    -= 1;
4069
4070
3
        if (cnt < 1) return;
4071
3
        channel_list_name_length = tvb_get_uint8(tvb, offset);
4072
3
        proto_tree_add_item(channel_list_tree, hf_mpeg_descr_nordig_lcd_v2_channel_list_name_length, tvb, offset, 1, ENC_BIG_ENDIAN);
4073
3
        offset += 1;
4074
3
        cnt    -= 1;
4075
4076
3
        channel_list_name_length = MIN(cnt, channel_list_name_length);
4077
3
        dvb_encoding_e  encoding;
4078
3
        unsigned enc_len = dvb_analyze_string_charset(tvb, offset, channel_list_name_length, &encoding);
4079
3
        dvb_add_chartbl(channel_list_tree, hf_mpeg_descr_nordig_lcd_v2_channel_list_name_encoding, tvb, offset, enc_len, encoding);
4080
4081
3
        proto_tree_add_item(channel_list_tree, hf_mpeg_descr_nordig_lcd_v2_channel_list_name, tvb, offset+enc_len, channel_list_name_length-enc_len, dvb_enc_to_item_enc(encoding));
4082
3
        offset += channel_list_name_length;
4083
3
        cnt    -= channel_list_name_length;
4084
4085
3
        if (cnt < 3) return;
4086
2
        proto_tree_add_item(channel_list_tree, hf_mpeg_descr_nordig_lcd_v2_country_code, tvb, offset, 3, ENC_ASCII);
4087
2
        offset += 3;
4088
2
        cnt    -= 3;
4089
4090
2
        if (cnt < 1) return;
4091
2
        descriptor_length = tvb_get_uint8(tvb, offset);
4092
2
        proto_tree_add_item(channel_list_tree, hf_mpeg_descr_nordig_lcd_v2_descriptor_length, tvb, offset, 1, ENC_BIG_ENDIAN);
4093
2
        offset += 1;
4094
2
        cnt    -= 1;
4095
4096
2
        descriptor_length = MIN(descriptor_length, cnt);
4097
2
        while (descriptor_length > 0) {
4098
0
            uint16_t svc_id;
4099
0
            proto_tree * svc_tree;
4100
4101
0
            if (cnt < 2) return;
4102
0
            svc_id = tvb_get_ntohs(tvb, offset);
4103
4104
0
            svc_tree = proto_tree_add_subtree_format(channel_list_tree, tvb, offset, 4,
4105
0
                        ett_mpeg_descriptor_nordig_lcd_v2_service_list, NULL, "Service 0x%04x", svc_id);
4106
4107
0
            proto_tree_add_item(svc_tree, hf_mpeg_descr_nordig_lcd_v2_service_id, tvb, offset, 2, ENC_BIG_ENDIAN);
4108
0
            offset += 2;
4109
0
            cnt    -= 2;
4110
0
            descriptor_length -= 2;
4111
4112
0
            if (cnt < 2) return;
4113
0
            proto_tree_add_item(svc_tree, hf_mpeg_descr_nordig_lcd_v2_visible_service_flag, tvb, offset, 2, ENC_BIG_ENDIAN);
4114
0
            proto_tree_add_item(svc_tree, hf_mpeg_descr_nordig_lcd_v2_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
4115
0
            proto_tree_add_item(svc_tree, hf_mpeg_descr_nordig_lcd_v2_logical_channel_number, tvb, offset, 2, ENC_BIG_ENDIAN);
4116
0
            offset += 2;
4117
0
            cnt    -= 2;
4118
0
            descriptor_length -= 2;
4119
0
        }
4120
4121
2
    }
4122
2
}
4123
4124
/* 0xA2 Logon Initialize Descriptor */
4125
static int hf_mpeg_descr_logon_initialize_group_id;
4126
static int hf_mpeg_descr_logon_initialize_logon_id;
4127
static int hf_mpeg_descr_logon_initialize_continuous_carrier_reserved;
4128
static int hf_mpeg_descr_logon_initialize_continuous_carrier;
4129
static int hf_mpeg_descr_logon_initialize_security_handshake_required;
4130
static int hf_mpeg_descr_logon_initialize_prefix_flag;
4131
static int hf_mpeg_descr_logon_initialize_data_unit_labelling_flag;
4132
static int hf_mpeg_descr_logon_initialize_mini_slot_flag;
4133
static int hf_mpeg_descr_logon_initialize_contention_based_mini_slot_flag;
4134
static int hf_mpeg_descr_logon_initialize_capacity_type_flag_reserved;
4135
static int hf_mpeg_descr_logon_initialize_capacity_type_flag;
4136
static int hf_mpeg_descr_logon_initialize_traffic_burst_type;
4137
static int hf_mpeg_descr_logon_initialize_connectivity;
4138
static int hf_mpeg_descr_logon_initialize_return_vpi_reserved;
4139
static int hf_mpeg_descr_logon_initialize_return_vpi;
4140
static int hf_mpeg_descr_logon_initialize_return_vci;
4141
static int hf_mpeg_descr_logon_initialize_return_signalling_vpi_reserved;
4142
static int hf_mpeg_descr_logon_initialize_return_signalling_vpi;
4143
static int hf_mpeg_descr_logon_initialize_return_signalling_vci;
4144
static int hf_mpeg_descr_logon_initialize_forward_signalling_vpi_reserved;
4145
static int hf_mpeg_descr_logon_initialize_forward_signalling_vpi;
4146
static int hf_mpeg_descr_logon_initialize_forward_signalling_vci;
4147
4148
static int hf_mpeg_descr_logon_initialize_return_trf_pid;
4149
static int hf_mpeg_descr_logon_initialize_return_ctrl_mngm_pid_reserved;
4150
static int hf_mpeg_descr_logon_initialize_return_ctrl_mngm_pid;
4151
4152
static int hf_mpeg_descr_logon_initialize_cra_level;
4153
static int hf_mpeg_descr_logon_initialize_vbdc_max_reserved;
4154
static int hf_mpeg_descr_logon_initialize_vbdc_max;
4155
static int hf_mpeg_descr_logon_initialize_rbdc_max;
4156
static int hf_mpeg_descr_logon_initialize_rbdc_timeout;
4157
4158
4159
14
#define MPEG_DESCR_LOGON_INITIALIZE_CONTINUOUS_CARRIER_RESERVED_MASK              0xC0
4160
14
#define MPEG_DESCR_LOGON_INITIALIZE_CONTINUOUS_CARRIER_MASK                       0x20
4161
14
#define MPEG_DESCR_LOGON_INITIALIZE_SECURITY_HANDSHAKE_REQUIRED_MASK              0x10
4162
14
#define MPEG_DESCR_LOGON_INITIALIZE_PREFIX_FLAG_MASK                              0x08
4163
14
#define MPEG_DESCR_LOGON_INITIALIZE_DATA_UNIT_LABELLING_FLAG_MASK                 0x04
4164
14
#define MPEG_DESCR_LOGON_INITIALIZE_MINI_SLOT_FLAG_MASK                           0x02
4165
14
#define MPEG_DESCR_LOGON_INITIALIZE_CONTENTION_BASED_MINI_SLOT_FLAG_MASK          0x01
4166
4167
14
#define MPEG_DESCR_LOGON_INITIALIZE_CAPACITY_TYPE_FLAG_RESERVED_MASK              0x80
4168
14
#define MPEG_DESCR_LOGON_INITIALIZE_CAPACITY_TYPE_FLAG_MASK                       0x40
4169
14
#define MPEG_DESCR_LOGON_INITIALIZE_TRAFFIC_BURST_TYPE_MASK                       0x20
4170
4171
14
#define MPEG_DESCR_LOGON_INITIALIZE_RETURN_TRF_PID_MASK                         0x1FFF
4172
14
#define MPEG_DESCR_LOGON_INITIALIZE_RETURN_CTRL_MNGM_PID_RESERVED_MASK          0xE000
4173
14
#define MPEG_DESCR_LOGON_INITIALIZE_RETURN_CTRL_MNGM_PID_MASK                   0x1FFF
4174
4175
14
#define MPEG_DESCR_LOGON_INITIALIZE_CONNECTIVITY_MASK                           0x1000
4176
14
#define MPEG_DESCR_LOGON_INITIALIZE_RETURN_VPI_RESERVED_MASK                    0xF0
4177
14
#define MPEG_DESCR_LOGON_INITIALIZE_RETURN_VPI_MASK                             0x0F
4178
4179
28
#define MPEG_DESCR_LOGON_INITIALIZE_RETURN_SIGNALLING_VPI_RESERVED_MASK         0xF0
4180
28
#define MPEG_DESCR_LOGON_INITIALIZE_RETURN_SIGNALLING_VPI_MASK                  0x0F
4181
#define MPEG_DESCR_LOGON_INITIALIZE_FORWARD_SIGNALLING_VPI_RESERVED_MASK        0xFF00
4182
#define MPEG_DESCR_LOGON_INITIALIZE_FORWARD_SIGNALLING_VPI_MASK                 0x00FF
4183
4184
14
#define MPEG_DESCR_LOGON_INITIALIZE_VDBC_MAX_RESERVED_MASK                      0xF800
4185
14
#define MPEG_DESCR_LOGON_INITIALIZE_VDBC_MAX_MASK                               0x07FF
4186
4187
/* ETSI EN 301 790 - 8.5.5.10.4 Logon Initialize descriptor */
4188
static void
4189
proto_mpeg_descriptor_dissect_logon_initialize(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
4190
0
{
4191
4192
0
    unsigned   end    = offset + len;
4193
0
    uint8_t flags;
4194
0
    uint16_t flags2;
4195
4196
0
    if (len >= 1)
4197
0
    {
4198
0
        proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_group_id,                        tvb, offset, 1, ENC_BIG_ENDIAN);
4199
0
        offset += 1;
4200
0
    }
4201
4202
0
    if (len >= 3)
4203
0
    {
4204
0
        proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_logon_id,                        tvb, offset, 2, ENC_BIG_ENDIAN);
4205
0
        offset += 2;
4206
0
    }
4207
4208
0
    if (len >= 4)
4209
0
    {
4210
0
        proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_continuous_carrier_reserved,     tvb, offset, 1, ENC_BIG_ENDIAN);
4211
0
        proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_continuous_carrier,              tvb, offset, 1, ENC_BIG_ENDIAN);
4212
0
        proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_security_handshake_required,     tvb, offset, 1, ENC_BIG_ENDIAN);
4213
0
        proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_prefix_flag,                     tvb, offset, 1, ENC_BIG_ENDIAN);
4214
0
        proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_data_unit_labelling_flag,        tvb, offset, 1, ENC_BIG_ENDIAN);
4215
0
        proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_mini_slot_flag,                  tvb, offset, 1, ENC_BIG_ENDIAN);
4216
0
        proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_contention_based_mini_slot_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
4217
0
        offset += 1;
4218
0
    }
4219
4220
0
    if (len >= 5)
4221
0
    {
4222
0
        flags = tvb_get_uint8(tvb, offset);
4223
4224
0
        proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_capacity_type_flag_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
4225
0
        proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_capacity_type_flag,          tvb, offset, 1, ENC_BIG_ENDIAN);
4226
0
        proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_traffic_burst_type,          tvb, offset, 1, ENC_BIG_ENDIAN);
4227
        /* If (Traffic_burst_type == 0) { */
4228
0
        if (flags & MPEG_DESCR_LOGON_INITIALIZE_TRAFFIC_BURST_TYPE_MASK) {
4229
            /* Connectivity */
4230
0
            proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_connectivity, tvb, offset, 2, ENC_BIG_ENDIAN);
4231
0
            flags2 = tvb_get_ntohs(tvb, offset);
4232
0
            if (flags2 & MPEG_DESCR_LOGON_INITIALIZE_CONNECTIVITY_MASK) {
4233
                /* Else    { (out of order) */
4234
4235
                /* Return_signalling_VPI (4 bits reserved, 4 bits) */
4236
0
                proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_signalling_vpi_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
4237
0
                proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_signalling_vpi, tvb, offset, 1, ENC_BIG_ENDIAN);
4238
0
                offset += 1;
4239
4240
                /* Return_signalling_VCI (16 bits) */
4241
0
                proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_signalling_vci, tvb, offset, 2, ENC_BIG_ENDIAN);
4242
0
                offset += 2;
4243
4244
                /* Forward_signalling_VPI (4 bits reserved, then 4 bits) */
4245
0
                proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_forward_signalling_vpi_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
4246
0
                proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_forward_signalling_vpi, tvb, offset, 1, ENC_BIG_ENDIAN);
4247
0
                offset += 1;
4248
4249
                /* Forward_signalling_VCI (16 bits) */
4250
0
                proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_forward_signalling_vci, tvb, offset, 2, ENC_BIG_ENDIAN);
4251
0
                offset += 2;
4252
0
            } else {
4253
                /* If (Connectivity == 0) {  */
4254
4255
                /* Return_signalling_VPI (4 bits reserved, then 4 bits) */
4256
0
                proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_vpi_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
4257
0
                proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_vpi, tvb, offset, 1, ENC_BIG_ENDIAN);
4258
0
                offset += 1;
4259
4260
                /* Return_signalling_VCI (16 bits) */
4261
0
                proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_vci, tvb, offset, 2, ENC_BIG_ENDIAN);
4262
0
                offset += 2;
4263
4264
0
            }
4265
0
        } else {
4266
0
            proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_trf_pid, tvb, offset, 2, ENC_BIG_ENDIAN);
4267
0
            offset += 2;
4268
4269
0
            proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_ctrl_mngm_pid_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
4270
0
            proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_ctrl_mngm_pid, tvb, offset, 2, ENC_BIG_ENDIAN);
4271
0
            offset += 2;
4272
0
        }
4273
4274
0
        if ((offset < end) && (flags & MPEG_DESCR_LOGON_INITIALIZE_CAPACITY_TYPE_FLAG_MASK)) {
4275
4276
            /* CRA_level (3 bytes) */
4277
0
            proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_cra_level,         tvb, offset, 3, ENC_BIG_ENDIAN);
4278
0
            offset += 3;
4279
4280
            /* VBDC_max (5 bits reserved, 11 bits) */
4281
0
            proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_vbdc_max_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
4282
0
            proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_vbdc_max,          tvb, offset, 2, ENC_BIG_ENDIAN);
4283
0
            offset += 2;
4284
4285
            /* RBDC_max (3 bytes) */
4286
0
            proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_rbdc_max,          tvb, offset, 3, ENC_BIG_ENDIAN);
4287
0
            offset += 3;
4288
4289
            /* RBDC timeout (2 bytes) */
4290
0
            proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_rbdc_timeout,      tvb, offset, 2, ENC_BIG_ENDIAN);
4291
            /*offset += 2;*/
4292
0
        }
4293
0
    }
4294
0
}
4295
4296
/* 0xA7 RCS Content Descriptor */
4297
static int hf_mpeg_descr_rcs_content_table_id;
4298
4299
static void
4300
proto_mpeg_descriptor_dissect_rcs_content(tvbuff_t *tvb, unsigned offset, unsigned len, proto_tree *tree)
4301
0
{
4302
0
    unsigned end = offset + len;
4303
4304
0
    while (offset < end) {
4305
0
        proto_tree_add_item(tree, hf_mpeg_descr_rcs_content_table_id, tvb, offset, 1, ENC_BIG_ENDIAN);
4306
0
        offset += 1;
4307
0
    }
4308
0
}
4309
4310
/* Private descriptors
4311
   these functions replace proto_mpeg_descriptor_dissect(), they get to see the whole descriptor */
4312
4313
0
#define CIPLUS_DESC_TAG_CNT_LBL 0xCB
4314
0
#define CIPLUS_DESC_TAG_SVC     0xCC
4315
0
#define CIPLUS_DESC_TAG_PROT    0xCE
4316
4317
static const value_string mpeg_descriptor_ciplus_tag_vals[] = {
4318
    /* From CI+ 1.3.1 */
4319
    { CIPLUS_DESC_TAG_CNT_LBL, "CI+ Content Label Descriptor" },
4320
    { CIPLUS_DESC_TAG_SVC,     "CI+ Service Descriptor" },
4321
    { CIPLUS_DESC_TAG_PROT,    "CI+ Protection Descriptor" },
4322
    { 0x00, NULL}
4323
};
4324
4325
/* 0xCB CI+ Content Label Descriptor */
4326
static int hf_mpeg_descr_ciplus_cl_cb_min;
4327
static int hf_mpeg_descr_ciplus_cl_cb_max;
4328
static int hf_mpeg_descr_ciplus_cl_lang;
4329
static int hf_mpeg_descr_ciplus_cl_label;
4330
4331
/* 0xCC CI+ Service Descriptor */
4332
static int hf_mpeg_descr_ciplus_svc_id;
4333
static int hf_mpeg_descr_ciplus_svc_type;
4334
static int hf_mpeg_descr_ciplus_svc_visible;
4335
static int hf_mpeg_descr_ciplus_svc_selectable;
4336
static int hf_mpeg_descr_ciplus_svc_lcn;
4337
static int hf_mpeg_descr_ciplus_svc_prov_name;
4338
static int hf_mpeg_descr_ciplus_svc_name;
4339
4340
/* 0xCE CI+ Protection Descriptor */
4341
static int hf_mpeg_descr_ciplus_prot_free_ci_mode;
4342
static int hf_mpeg_descr_ciplus_prot_match_brand_flag;
4343
static int hf_mpeg_descr_ciplus_prot_num_entries;
4344
static int hf_mpeg_descr_ciplus_prot_brand_id;
4345
4346
static const true_false_string tfs_prot_noprot = { "CI+ protection required", "CI+ protection not required" };
4347
4348
4349
static unsigned
4350
proto_mpeg_descriptor_dissect_private_ciplus(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
4351
0
{
4352
0
    unsigned     offset_start;
4353
0
    uint8_t      tag, len;
4354
0
    const char *tag_str;
4355
0
    proto_item  *di;
4356
0
    proto_tree  *descriptor_tree;
4357
4358
0
    offset_start=offset;
4359
4360
0
    tag = tvb_get_uint8(tvb, offset);
4361
0
    tag_str = try_val_to_str(tag, mpeg_descriptor_ciplus_tag_vals);
4362
0
    if (!tag_str)
4363
0
        return 0;
4364
4365
0
    descriptor_tree = proto_tree_add_subtree_format(tree, tvb, offset_start, -1,
4366
0
                ett_mpeg_descriptor, &di, "CI+ private descriptor Tag=0x%02x", tag);
4367
4368
0
    proto_tree_add_uint_format(descriptor_tree, hf_mpeg_descriptor_tag,
4369
0
            tvb, offset, 1, tag, "Descriptor Tag: %s (0x%02x)", tag_str, tag);
4370
0
    offset += 1;
4371
4372
0
    len = tvb_get_uint8(tvb, offset);
4373
0
    proto_tree_add_item(descriptor_tree, hf_mpeg_descriptor_length, tvb, offset, 1, ENC_BIG_ENDIAN);
4374
0
    offset += 1;
4375
4376
0
    if (tag==CIPLUS_DESC_TAG_CNT_LBL) {
4377
0
        proto_tree_add_item(tree, hf_mpeg_descr_ciplus_cl_cb_min, tvb, offset, 1, ENC_BIG_ENDIAN);
4378
0
        offset += 1;
4379
4380
0
        proto_tree_add_item(tree, hf_mpeg_descr_ciplus_cl_cb_max, tvb, offset, 1, ENC_BIG_ENDIAN);
4381
0
        offset += 1;
4382
4383
0
        proto_tree_add_item(tree, hf_mpeg_descr_ciplus_cl_lang, tvb, offset, 3, ENC_ASCII);
4384
0
        offset += 3;
4385
4386
0
        proto_tree_add_item(tree, hf_mpeg_descr_ciplus_cl_label, tvb, offset, len-offset, ENC_ASCII);
4387
0
        offset += len-offset;
4388
0
    }
4389
0
    else if (tag==CIPLUS_DESC_TAG_SVC) {
4390
0
        uint8_t str_len_byte;
4391
4392
0
        proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_svc_id, tvb, offset, 2, ENC_BIG_ENDIAN);
4393
0
        offset += 2;
4394
4395
0
        proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_svc_type, tvb, offset, 1, ENC_BIG_ENDIAN);
4396
0
        offset += 1;
4397
4398
0
        proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_svc_visible, tvb, offset, 2, ENC_BIG_ENDIAN);
4399
0
        proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_svc_selectable, tvb, offset, 2, ENC_BIG_ENDIAN);
4400
0
        proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_svc_lcn, tvb, offset, 2, ENC_BIG_ENDIAN);
4401
0
        offset += 2;
4402
4403
0
        str_len_byte = tvb_get_uint8(tvb, offset);
4404
0
        proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_svc_prov_name, tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN);
4405
0
        offset += 1+str_len_byte;
4406
4407
0
        str_len_byte = tvb_get_uint8(tvb, offset);
4408
0
        proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_svc_name, tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN);
4409
0
        offset += 1+str_len_byte;
4410
0
    }
4411
0
    else if (tag==CIPLUS_DESC_TAG_PROT) {
4412
0
        bool      match_brand_flag;
4413
0
        uint8_t   num_brands, i;
4414
0
        unsigned  remaining;
4415
4416
0
        proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_prot_free_ci_mode, tvb, offset, 1, ENC_BIG_ENDIAN);
4417
0
        match_brand_flag = ((tvb_get_uint8(tvb, offset) & 0x40) == 0x40);
4418
0
        proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_prot_match_brand_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
4419
0
        offset++;
4420
4421
0
        if (match_brand_flag) {
4422
0
            num_brands = tvb_get_uint8(tvb, offset);
4423
0
            proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_prot_num_entries, tvb, offset, 1, ENC_BIG_ENDIAN);
4424
0
            offset++;
4425
0
            for (i=0; i<num_brands; i++) {
4426
0
                proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_prot_brand_id, tvb, offset, 2, ENC_BIG_ENDIAN);
4427
0
                offset += 2;
4428
0
            }
4429
0
        }
4430
4431
0
        remaining = offset_start+2+len - offset;
4432
0
        if (remaining > 0) {
4433
0
            proto_tree_add_item(descriptor_tree, hf_mpeg_descr_etsi_private_data, tvb, offset, remaining, ENC_NA);
4434
0
            offset += remaining;
4435
0
        }
4436
0
    }
4437
4438
0
    proto_item_set_len(di, offset-offset_start);
4439
0
    return offset-offset_start;
4440
0
}
4441
4442
4443
/* Common dissector */
4444
4445
unsigned
4446
proto_mpeg_descriptor_dissect(tvbuff_t *tvb, packet_info* pinfo, unsigned offset, proto_tree *tree)
4447
831
{
4448
831
    unsigned    tag, len;
4449
4450
831
    proto_tree *descriptor_tree;
4451
4452
831
    tag = tvb_get_uint8(tvb, offset);
4453
831
    len = tvb_get_uint8(tvb, offset + 1);
4454
4455
831
    descriptor_tree = proto_tree_add_subtree_format(tree, tvb, offset, len + 2,
4456
831
                        ett_mpeg_descriptor, NULL, "Descriptor Tag=0x%02x", tag);
4457
4458
831
    proto_tree_add_item(descriptor_tree, hf_mpeg_descriptor_tag,    tvb, offset, 1, ENC_BIG_ENDIAN);
4459
831
    offset += 1;
4460
4461
831
    proto_tree_add_item(descriptor_tree, hf_mpeg_descriptor_length, tvb, offset, 1, ENC_BIG_ENDIAN);
4462
831
    offset += 1;
4463
4464
831
    if (len == 0)
4465
237
        return 2;
4466
4467
594
    switch (tag) {
4468
81
        case 0x02: /* Video Stream Descriptor */
4469
81
            proto_mpeg_descriptor_dissect_video_stream(tvb, offset, descriptor_tree);
4470
81
            break;
4471
15
        case 0x03: /* Audio Stream Descriptor */
4472
15
            proto_mpeg_descriptor_dissect_audio_stream(tvb, offset, descriptor_tree);
4473
15
            break;
4474
3
        case 0x05: /* Registration Descriptor */
4475
3
            proto_mpeg_descriptor_dissect_registration(tvb, offset, len, descriptor_tree);
4476
3
            break;
4477
0
        case 0x06: /* Data Stream Alignment Descriptor */
4478
0
            proto_mpeg_descriptor_dissect_data_stream_alignment(tvb, offset, descriptor_tree);
4479
0
            break;
4480
2
        case 0x09: /* CA Descriptor */
4481
2
            proto_mpeg_descriptor_dissect_ca(tvb, offset, len, descriptor_tree);
4482
2
            break;
4483
7
        case 0x0A: /* ISO 639 Language Descriptor */
4484
7
            proto_mpeg_descriptor_dissect_iso639(tvb, offset, len, descriptor_tree);
4485
7
            break;
4486
1
        case 0x0B: /* System Clock Descriptor */
4487
1
            proto_mpeg_descriptor_dissect_system_clock(tvb, offset, descriptor_tree);
4488
1
            break;
4489
2
        case 0x0E: /* Maximum Bitrate Descriptor */
4490
2
            proto_mpeg_descriptor_dissect_max_bitrate(tvb, offset, descriptor_tree);
4491
2
            break;
4492
17
        case 0x10: /* Smoothing Buffer Descriptor */
4493
17
            proto_mpeg_descriptor_dissect_smoothing_buffer(tvb, offset, descriptor_tree);
4494
17
            break;
4495
2
        case 0x11: /* STD Descriptor */
4496
2
            proto_mpeg_descriptor_dissect_std(tvb, offset, descriptor_tree);
4497
2
            break;
4498
1
        case 0x13: /* Carousel Identifier Descriptor */
4499
1
            proto_mpeg_descriptor_dissect_carousel_identifier(tvb, offset, len, descriptor_tree);
4500
1
            break;
4501
0
        case 0x14: /* Association Tag Descriptor */
4502
0
            proto_mpeg_descriptor_dissect_association_tag(tvb, offset, len, descriptor_tree);
4503
0
            break;
4504
1
        case 0x28: /* AVC Video Descriptor */
4505
1
            proto_mpeg_descriptor_dissect_avc_vid(tvb, offset, descriptor_tree);
4506
1
            break;
4507
0
        case 0x3F: /* MPEG2 Extension Descriptor */
4508
0
            proto_mpeg_descriptor_dissect_iso_extension(tvb, pinfo, offset, len, descriptor_tree);
4509
0
            break;
4510
3
        case 0x40: /* Network Name Descriptor */
4511
3
            proto_mpeg_descriptor_dissect_network_name(tvb, offset, len, descriptor_tree);
4512
3
            break;
4513
5
        case 0x41: /* Service List Descriptor */
4514
5
            proto_mpeg_descriptor_dissect_service_list(tvb, offset, len, descriptor_tree);
4515
5
            break;
4516
14
        case 0x42: /* Stuffing Descriptor */
4517
14
            proto_mpeg_descriptor_stuffing(tvb, offset, len, descriptor_tree);
4518
14
            break;
4519
2
        case 0x43: /* Satellite Delivery System Descriptor */
4520
2
            proto_mpeg_descriptor_dissect_satellite_delivery(tvb, offset, descriptor_tree);
4521
2
            break;
4522
4
        case 0x44: /* Cable Delivery System Descriptor */
4523
4
            proto_mpeg_descriptor_dissect_cable_delivery(tvb, offset, descriptor_tree);
4524
4
            break;
4525
2
        case 0x45: /* VBI Data Descriptor */
4526
2
            proto_mpeg_descriptor_dissect_vbi_data(tvb, offset, len, descriptor_tree);
4527
2
            break;
4528
3
        case 0x47: /* Bouquet Name Descriptor */
4529
3
            proto_mpeg_descriptor_dissect_bouquet_name(tvb, offset, len, descriptor_tree);
4530
3
            break;
4531
5
        case 0x48: /* Service Descriptor */
4532
5
            proto_mpeg_descriptor_dissect_service(tvb, offset, descriptor_tree);
4533
5
            break;
4534
3
        case 0x49: /* Country Availability Descriptor */
4535
3
            proto_mpeg_descriptor_dissect_country_availability_descriptor(tvb, offset, len, descriptor_tree);
4536
3
            break;
4537
1
        case 0x4A: /* Linkage Descriptor */
4538
1
            proto_mpeg_descriptor_dissect_linkage(tvb, offset, len, descriptor_tree);
4539
1
            break;
4540
4
        case 0x4B: /* NVOD Reference Descriptor */
4541
4
            proto_mpeg_descriptor_dissect_nvod_reference(tvb, offset, len, descriptor_tree);
4542
4
            break;
4543
0
        case 0x4C: /* Time Shifted Service Descriptor */
4544
0
            proto_mpeg_descriptor_dissect_time_shifted_service(tvb, offset, descriptor_tree);
4545
0
            break;
4546
3
        case 0x4D: /* Short Event Descriptor */
4547
3
            proto_mpeg_descriptor_dissect_short_event(tvb, offset, descriptor_tree);
4548
3
            break;
4549
3
        case 0x4E: /* Extended Event Descriptor */
4550
3
            proto_mpeg_descriptor_dissect_extended_event(tvb, offset, descriptor_tree);
4551
3
            break;
4552
0
        case 0x4F: /* Time Shifted Event Descriptor */
4553
0
            proto_mpeg_descriptor_dissect_time_shifted_event(tvb, offset, descriptor_tree);
4554
0
            break;
4555
2
        case 0x50: /* Component Descriptor */
4556
2
            proto_mpeg_descriptor_dissect_component(tvb, offset, len, descriptor_tree);
4557
2
            break;
4558
2
        case 0x51: /* Mosaic Descriptor */
4559
2
            proto_mpeg_descriptor_dissect_mosaic(tvb, offset, len, descriptor_tree);
4560
2
            break;
4561
1
        case 0x52: /* Stream Identifier Descriptor */
4562
1
            proto_mpeg_descriptor_dissect_stream_identifier(tvb, offset, descriptor_tree);
4563
1
            break;
4564
8
        case 0x53: /* CA Identifier Descriptor */
4565
8
            proto_mpeg_descriptor_dissect_ca_identifier(tvb, offset, len, descriptor_tree);
4566
8
            break;
4567
2
        case 0x54: /* Content Descriptor */
4568
2
            proto_mpeg_descriptor_dissect_content(tvb, offset, len, descriptor_tree);
4569
2
            break;
4570
0
        case 0x55: /* Parental Rating Descriptor */
4571
0
            proto_mpeg_descriptor_dissect_parental_rating(tvb, offset, descriptor_tree);
4572
0
            break;
4573
0
        case 0x56: /* Teletext Descriptor */
4574
0
            proto_mpeg_descriptor_dissect_teletext(tvb, offset, len, descriptor_tree);
4575
0
            break;
4576
9
        case 0x57: /* Telephone Descriptor */
4577
9
            proto_mpeg_descriptor_dissect_telephone(tvb, offset, descriptor_tree);
4578
9
            break;
4579
1
        case 0x58: /* Local Time Offset Descriptor */
4580
1
            proto_mpeg_descriptor_dissect_local_time_offset(tvb, offset, len, descriptor_tree);
4581
1
            break;
4582
3
        case 0x59: /* Subtitling Descriptor */
4583
3
            proto_mpeg_descriptor_dissect_subtitling(tvb, offset, len, descriptor_tree);
4584
3
            break;
4585
1
        case 0x5A: /* Terrestrial Delivery System Descriptor */
4586
1
            proto_mpeg_descriptor_dissect_terrestrial_delivery(tvb, offset, descriptor_tree);
4587
1
            break;
4588
9
        case 0x5B: /* Multilingual Network Name Descriptor */
4589
9
            proto_mpeg_descriptor_dissect_multilng_desc(tvb, pinfo, offset, len, descriptor_tree,
4590
9
                ett_mpeg_descriptor_multilng_network_name_desc_lng, hf_mpeg_descr_multilng_network_name_desc_iso639_language_code,
4591
9
                hf_mpeg_descr_multilng_network_name_desc_name_length, hf_mpeg_descr_multilng_network_name_desc_name_encoding,
4592
9
                hf_mpeg_descr_multilng_network_name_desc_name);
4593
9
            break;
4594
15
        case 0x5C: /* Multilingual Bouquet Name Descriptor */
4595
15
            proto_mpeg_descriptor_dissect_multilng_desc(tvb, pinfo, offset, len, descriptor_tree,
4596
15
                ett_mpeg_descriptor_multilng_bouquet_name_desc_lng, hf_mpeg_descr_multilng_bouquet_name_desc_iso639_language_code,
4597
15
                hf_mpeg_descr_multilng_bouquet_name_desc_name_length, hf_mpeg_descr_multilng_bouquet_name_desc_name_encoding,
4598
15
                hf_mpeg_descr_multilng_bouquet_name_desc_name);
4599
15
            break;
4600
6
        case 0x5D: /* Multilingual Service Name Descriptor */
4601
6
            proto_mpeg_descriptor_dissect_multilng_srv_name_desc(tvb, pinfo, offset, len, descriptor_tree);
4602
6
            break;
4603
9
        case 0x5E: /* Multilingual Component Descriptor */
4604
9
            proto_mpeg_descriptor_dissect_multilng_component_desc(tvb, pinfo, offset, len, descriptor_tree);
4605
9
            break;
4606
0
        case 0x5F: /* Private Data Specifier Descriptor */
4607
0
            proto_mpeg_descriptor_dissect_private_data_specifier(tvb, offset, descriptor_tree);
4608
0
            break;
4609
3
        case 0x61: /* Short Smoothing Buffer Descriptor */
4610
3
            proto_mpeg_descriptor_dissect_short_smoothing_buffer(tvb, offset, len, descriptor_tree);
4611
3
            break;
4612
12
        case 0x63: /* Partial Transport Stream Descriptor */
4613
12
            proto_mpeg_descriptor_dissect_partial_transport_stream(tvb, offset, len, descriptor_tree);
4614
12
            break;
4615
3
        case 0x64: /* Data Broadcast Descriptor */
4616
3
            proto_mpeg_descriptor_dissect_data_bcast(tvb, offset, descriptor_tree);
4617
3
            break;
4618
1
        case 0x66: /* Data Broadcast ID Descriptor */
4619
1
            proto_mpeg_descriptor_dissect_data_bcast_id(tvb, offset, len, descriptor_tree);
4620
1
            break;
4621
1
        case 0x69: /* PDC Descriptor */
4622
1
            proto_mpeg_descriptor_dissect_pdc(tvb, offset, descriptor_tree);
4623
1
            break;
4624
5
        case 0x6A: /* AC-3 Descriptor */
4625
5
            proto_mpeg_descriptor_dissect_ac3(tvb, offset, len, descriptor_tree);
4626
5
            break;
4627
2
        case 0x6F: /* Application Signalling Descriptor */
4628
2
            proto_mpeg_descriptor_dissect_app_sig(tvb, offset, len, descriptor_tree);
4629
2
            break;
4630
6
        case 0x71: /* Service Identifier Descriptor */
4631
6
            proto_mpeg_descriptor_dissect_service_identifier(tvb, offset, len, descriptor_tree);
4632
6
            break;
4633
2
        case 0x72: /* Service Availability Descriptor */
4634
2
            proto_mpeg_descriptor_dissect_service_availability(tvb, offset, len, descriptor_tree);
4635
2
            break;
4636
0
        case 0x73: /* Default Authority Descriptor */
4637
0
            proto_mpeg_descriptor_dissect_default_authority(tvb, offset, len, descriptor_tree);
4638
0
            break;
4639
0
        case 0x75: /* TVA ID Descriptor */
4640
0
            proto_mpeg_descriptor_dissect_tva_id(tvb, offset, len, descriptor_tree);
4641
0
            break;
4642
0
        case 0x76: /* Content Identifier Descriptor */
4643
0
            proto_mpeg_descriptor_dissect_content_identifier(tvb, offset, len, descriptor_tree);
4644
0
            break;
4645
1
        case 0x7D: /* XAIT Content Location Descriptor */
4646
1
            proto_mpeg_descriptor_dissect_xait(tvb, offset, descriptor_tree);
4647
1
            break;
4648
3
        case 0x7E: /* FTA Content Management Descriptor */
4649
3
            proto_mpeg_descriptor_dissect_fta(tvb, offset, descriptor_tree);
4650
3
            break;
4651
6
        case 0x7F: /* ETSI Extension Descriptor */
4652
6
            proto_mpeg_descriptor_dissect_etsi_extension(tvb, offset, len, descriptor_tree);
4653
6
            break;
4654
2
        case 0x81: /* ATSC A/52 AC-3 Audio Descriptor */
4655
2
            proto_mpeg_descriptor_dissect_ac3_system_a(tvb, offset, len, descriptor_tree);
4656
2
            break;
4657
1
        case 0x83: /* NorDig Logical Channel Descriptor (version 1) */
4658
1
            proto_mpeg_descriptor_dissect_nordig_lcd_v1(tvb, offset, len, descriptor_tree);
4659
1
            break;
4660
2
        case 0x87: /* NorDig Logical Channel Descriptor (version 2) */
4661
2
            proto_mpeg_descriptor_dissect_nordig_lcd_v2(tvb, offset, len, descriptor_tree);
4662
2
            break;
4663
0
        case 0xA2: /* Logon Initialize Descriptor */
4664
0
            proto_mpeg_descriptor_dissect_logon_initialize(tvb, offset, len, descriptor_tree);
4665
0
            break;
4666
0
        case 0xA7: /* RCS Content Descriptor */
4667
0
            proto_mpeg_descriptor_dissect_rcs_content(tvb, offset, len, descriptor_tree);
4668
0
            break;
4669
289
        default:
4670
289
            proto_tree_add_item(descriptor_tree, hf_mpeg_descriptor_data, tvb, offset, len, ENC_NA);
4671
289
            break;
4672
594
    }
4673
4674
469
    return len + 2;
4675
594
}
4676
4677
4678
/* dissect a descriptor loop consisting of one or more descriptors
4679
   take into account the contexts defined a private data specifier descriptors */
4680
unsigned
4681
proto_mpeg_descriptor_loop_dissect(tvbuff_t *tvb, packet_info* pinfo, unsigned offset, unsigned loop_len, proto_tree *tree)
4682
205
{
4683
    /* we use the reserved value to indicate that no private context is active */
4684
205
    uint32_t private_data_specifier = PRIVATE_DATA_SPECIFIER_RESERVED;
4685
205
    unsigned   offset_start;
4686
205
    unsigned   desc_len;
4687
205
    uint8_t tag;
4688
4689
205
    offset_start = offset;
4690
4691
846
    while ((offset - offset_start) < loop_len) {
4692
        /* don't increment offset in our pre-checks */
4693
657
        tag = tvb_get_uint8(tvb, offset);
4694
657
        if (tag == 0x5F) {
4695
            /* we have a private data specifier descriptor: get the private data specifier */
4696
            /* offset+1 is length byte, offset+2 is start of payload */
4697
0
            private_data_specifier = tvb_get_ntohl(tvb, offset+2);
4698
0
        }
4699
4700
         /* the default descriptor function takes precedence
4701
            however, if it does not know the current descriptor, we search for a context-specific subfunction
4702
            this subfunction gets to see the entire descriptor, including tag and len */
4703
657
        if (try_val_to_str(tag, mpeg_descriptor_tag_vals)) {
4704
555
            desc_len = proto_mpeg_descriptor_dissect(tvb, pinfo, offset, tree);
4705
555
        }
4706
102
        else {
4707
102
            switch (private_data_specifier) {
4708
0
                case PRIVATE_DATA_SPECIFIER_CIPLUS_LLP:
4709
0
                    desc_len = proto_mpeg_descriptor_dissect_private_ciplus(tvb, offset, tree);
4710
0
                    break;
4711
86
                default:
4712
86
                    desc_len = 0;
4713
86
                    break;
4714
102
            }
4715
86
            if (desc_len == 0) {
4716
                /* either there was no subfunction or it could not handle the descriptor
4717
                   fall back to the default (which will dissect it as unknown) */
4718
86
                desc_len = proto_mpeg_descriptor_dissect(tvb, pinfo, offset, tree);
4719
86
            }
4720
86
        }
4721
4722
641
        offset += desc_len;
4723
641
    }
4724
4725
189
    return offset-offset_start;
4726
205
}
4727
4728
4729
void
4730
proto_register_mpeg_descriptor(void)
4731
14
{
4732
4733
14
    static hf_register_info hf[] = {
4734
14
        { &hf_mpeg_descriptor_tag, {
4735
14
            "Descriptor Tag", "mpeg_descr.tag",
4736
14
            FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descriptor_tag_vals_ext, 0, NULL, HFILL
4737
14
        } },
4738
4739
14
        { &hf_mpeg_descriptor_length, {
4740
14
            "Descriptor Length", "mpeg_descr.len",
4741
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
4742
14
        } },
4743
4744
14
        { &hf_mpeg_descriptor_data, {
4745
14
            "Descriptor Data", "mpeg_descr.data",
4746
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
4747
14
        } },
4748
4749
        /* 0x02 Video Stream Descriptor */
4750
14
        { &hf_mpeg_descr_video_stream_multiple_frame_rate_flag, {
4751
14
            "Multiple Frame Rate Flag", "mpeg_descr.video_stream.multiple_frame_rate_flag",
4752
14
            FT_UINT8, BASE_DEC, VALS(mpeg_descr_video_stream_multiple_frame_rate_flag_vals),
4753
14
            MPEG_DESCR_VIDEO_STREAM_MULTIPLE_FRAME_RATE_FLAG_MASK, NULL, HFILL
4754
14
        } },
4755
4756
14
        { &hf_mpeg_descr_video_stream_frame_rate_code, {
4757
14
            "Frame Rate Code", "mpeg_descr.video_stream.frame_rate_code",
4758
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_VIDEO_STREAM_FRAME_RATE_CODE_MASK, NULL, HFILL
4759
14
        } },
4760
4761
14
        { &hf_mpeg_descr_video_stream_mpeg1_only_flag, {
4762
14
            "MPEG1 Only Flag", "mpeg_descr.video_stream.mpeg1_only_flag",
4763
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_VIDEO_STREAM_MPEG1_ONLY_FLAG_MASK, NULL, HFILL
4764
14
        } },
4765
4766
14
        { &hf_mpeg_descr_video_stream_constrained_parameter_flag, {
4767
14
            "Constrained Parameter Flag", "mpeg_descr.video_stream.constrained_parameter_flag",
4768
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_VIDEO_STREAM_CONSTRAINED_PARAMETER_FLAG_MASK, NULL, HFILL
4769
14
        } },
4770
4771
14
        { &hf_mpeg_descr_video_stream_still_picture_flag, {
4772
14
            "Still Picture Flag", "mpeg_descr.video_stream.still_picture_flag",
4773
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_VIDEO_STREAM_STILL_PICTURE_FLAG_MASK, NULL, HFILL
4774
14
        } },
4775
4776
14
        { &hf_mpeg_descr_video_stream_profile_and_level_indication, {
4777
14
            "Profile and Level Indication", "mpeg_descr.video_stream.profile_level_ind",
4778
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
4779
14
        } },
4780
4781
14
        { &hf_mpeg_descr_video_stream_chroma_format, {
4782
14
            "Chroma Format", "mpeg_descr.video_stream.chroma_format",
4783
14
            FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
4784
14
        } },
4785
4786
14
        { &hf_mpeg_descr_video_stream_frame_rate_extension_flag, {
4787
14
            "Frame Rate Extension Flag", "mpeg_descr.video_stream.frame_rate_extension_flag",
4788
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_VIDEO_STREAM_FRAME_RATE_EXTENSION_FLAG_MASK, NULL, HFILL
4789
14
        } },
4790
4791
14
        { &hf_mpeg_descr_video_stream_reserved, {
4792
14
            "Reserved", "mpeg_descr.video_stream.reserved",
4793
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_VIDEO_STREAM_RESERVED_MASK, NULL, HFILL
4794
14
        } },
4795
4796
        /* 0x03 Audio Stream Descriptor */
4797
14
        { &hf_mpeg_descr_audio_stream_free_format_flag, {
4798
14
            "Free Format Flag", "mpeg_descr.audio_stream.free_format_flag",
4799
14
            FT_UINT8, BASE_DEC, VALS(mpeg_descr_audio_stream_free_format_flag_vals), MPEG_DESCR_AUDIO_STREAM_FREE_FORMAT_FLAG_MASK, NULL, HFILL
4800
14
        } },
4801
4802
14
        { &hf_mpeg_descr_audio_stream_id, {
4803
14
            "ID", "mpeg_descr.audio_stream.id",
4804
14
            FT_UINT8, BASE_DEC, VALS(mpeg_descr_audio_stream_id_vals), MPEG_DESCR_AUDIO_STREAM_ID_MASK, NULL, HFILL
4805
14
        } },
4806
4807
14
        { &hf_mpeg_descr_audio_stream_layer, {
4808
14
            "Layer", "mpeg_descr.audio_stream.layer",
4809
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_AUDIO_STREAM_LAYER_MASK, NULL, HFILL
4810
14
        } },
4811
4812
14
        { &hf_mpeg_descr_audio_stream_variable_rate_audio_indicator, {
4813
14
            "Variable Rate Audio Indicator", "mpeg_descr.audio_stream.vbr_indicator",
4814
14
            FT_UINT8, BASE_DEC, VALS(mpeg_descr_audio_stream_variable_rate_audio_indicator_vals),
4815
14
            MPEG_DESCR_AUDIO_STREAM_VARIABLE_RATE_AUDIO_INDICATOR_MASK, NULL, HFILL
4816
14
        } },
4817
4818
14
        { &hf_mpeg_descr_audio_stream_reserved, {
4819
14
            "Reserved", "mpeg_descr.audio_stream.reserved",
4820
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_AUDIO_STREAM_RESERVED_MASK, NULL, HFILL
4821
14
        } },
4822
4823
        /* 0x05 Registration Descriptor */
4824
14
        { &hf_mpeg_descr_reg_form_id, {
4825
14
            "Format identifier", "mpeg_descr.registration.format_identifier",
4826
14
            FT_UINT32, BASE_HEX, VALS(mpeg_descr_registration_reg_form_vals), 0, NULL, HFILL
4827
14
        } },
4828
4829
14
        { &hf_mpeg_descr_reg_add_id_inf, {
4830
14
            "Additional identification info", "mpeg_descr.registration.add_id_info",
4831
14
            FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
4832
14
        } },
4833
4834
        /* 0x06 Data Stream Alignment Descriptor */
4835
14
        { &hf_mpeg_descr_data_stream_alignment, {
4836
14
            "Data Stream Alignment", "mpeg_descr.data_stream_alignment.alignment",
4837
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_data_stream_alignment_vals), 0, NULL, HFILL
4838
14
        } },
4839
4840
        /* 0x09 CA Descriptor */
4841
14
        { &hf_mpeg_descr_ca_system_id, {
4842
14
            "System ID", "mpeg_descr.ca.sys_id",
4843
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
4844
14
        } },
4845
4846
14
        { &hf_mpeg_descr_ca_reserved, {
4847
14
            "Reserved", "mpeg_descr.ca.reserved",
4848
14
            FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_CA_RESERVED_MASK, NULL, HFILL
4849
14
        } },
4850
4851
14
        { &hf_mpeg_descr_ca_pid, {
4852
14
            "CA PID", "mpeg_descr.ca.pid",
4853
14
            FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_CA_PID_MASK, NULL, HFILL
4854
14
        } },
4855
4856
14
        { &hf_mpeg_descr_ca_private, {
4857
14
            "Private bytes", "mpeg_descr.ca.private",
4858
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
4859
14
        } },
4860
4861
        /* 0x0A ISO 639 Language Descriptor */
4862
14
        { &hf_mpeg_descr_iso639_lang, {
4863
14
            "ISO 639 Language Code", "mpeg_descr.lang.code",
4864
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
4865
14
        } },
4866
4867
14
        { &hf_mpeg_descr_iso639_type, {
4868
14
            "ISO 639 Language Type", "mpeg_descr.lang.type",
4869
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_iso639_type_vals), 0, NULL, HFILL
4870
14
        } },
4871
4872
        /* 0x0B System Clock Descriptor */
4873
14
        { &hf_mpeg_descr_system_clock_external_clock_reference_indicator, {
4874
14
            "External Clock Reference Indicator", "mpeg_descr.sys_clk.external_clk_ref_ind",
4875
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_SYSTEM_CLOCK_EXTERNAL_CLOCK_REFERENCE_INDICATOR_MASK, NULL, HFILL
4876
14
        } },
4877
4878
14
        { &hf_mpeg_descr_system_clock_reserved1, {
4879
14
            "Reserved", "mpeg_descr.sys_clk.reserved1",
4880
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_SYSTEM_CLOCK_RESERVED1_MASK, NULL, HFILL
4881
14
        } },
4882
4883
14
        { &hf_mpeg_descr_system_clock_accuracy_integer, {
4884
14
            "Accuracy Integer", "mpeg_descr.sys_clk.accuracy_integer",
4885
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_SYSTEM_CLOCK_ACCURACY_INTEGER_MASK, NULL, HFILL
4886
14
        } },
4887
4888
14
        { &hf_mpeg_descr_system_clock_accuracy_exponent, {
4889
14
            "Accuracy Exponent", "mpeg_descr.sys_clk.accuracy_exponent",
4890
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_SYSTEM_CLOCK_ACCURACY_EXPONENT_MASK, NULL, HFILL
4891
14
        } },
4892
4893
14
        { &hf_mpeg_descr_system_clock_reserved2, {
4894
14
            "Reserved", "mpeg_descr.sys_clk.reserved2",
4895
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_SYSTEM_CLOCK_RESERVED2_MASK, NULL, HFILL
4896
14
        } },
4897
4898
        /* 0x0E Maximum Bitrate Descriptor */
4899
14
        { &hf_mpeg_descr_max_bitrate_reserved, {
4900
14
            "Maximum Bitrate Reserved", "mpeg_descr.max_bitrate.reserved",
4901
14
            FT_UINT24, BASE_HEX, NULL, MPEG_DESCR_MAX_BITRATE_RESERVED_MASK, NULL, HFILL
4902
14
        } },
4903
4904
14
        { &hf_mpeg_descr_max_bitrate, {
4905
14
            "Maximum Bitrate", "mpeg_descr.max_bitrate.rate",
4906
14
            FT_UINT24, BASE_DEC, NULL, MPEG_DESCR_MAX_BITRATE_MASK, NULL, HFILL
4907
14
        } },
4908
4909
        /* 0x10 Smoothing Buffer Descriptor */
4910
14
        { &hf_mpeg_descr_smoothing_buffer_reserved1, {
4911
14
            "Reserved", "mpeg_descr.smoothing_buf.reserved1",
4912
14
            FT_UINT24, BASE_HEX, NULL, MPEG_DESCR_SMOOTHING_BUFFER_RESERVED1_MASK, NULL, HFILL
4913
14
        } },
4914
4915
14
        { &hf_mpeg_descr_smoothing_buffer_leak_rate, {
4916
14
            "Leak Rate", "mpeg_descr.smoothing_buf.leak_rate",
4917
14
            FT_UINT24, BASE_DEC, NULL, MPEG_DESCR_SMOOTHING_BUFFER_LEAK_RATE_MASK, NULL, HFILL
4918
14
        } },
4919
4920
14
        { &hf_mpeg_descr_smoothing_buffer_reserved2, {
4921
14
            "Reserved", "mpeg_descr.smoothing_buf.reserved2",
4922
14
            FT_UINT24, BASE_HEX, NULL, MPEG_DESCR_SMOOTHING_BUFFER_RESERVED2_MASK, NULL, HFILL
4923
14
        } },
4924
4925
14
        { &hf_mpeg_descr_smoothing_buffer_size, {
4926
14
            "Buffer Size", "mpeg_descr.smoothing_buf.size",
4927
14
            FT_UINT24, BASE_DEC, NULL, MPEG_DESCR_SMOOTHING_BUFFER_SIZE_MASK, NULL, HFILL
4928
14
        } },
4929
4930
        /* 0x11 STD Descriptor */
4931
14
        { &hf_mpeg_descr_std_reserved, {
4932
14
            "Reserved", "mpeg_descr.std.reserved",
4933
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_STD_RESERVED_MASK, NULL, HFILL
4934
14
        } },
4935
4936
14
        { &hf_mpeg_descr_std_leak_valid, {
4937
14
            "Leak Valid", "mpeg_descr.std.leak_valid",
4938
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_STD_LEAK_VALID_MASK, NULL, HFILL
4939
14
        } },
4940
4941
        /* 0x13 Carousel Identifier Descriptor */
4942
14
        { &hf_mpeg_descr_carousel_identifier_id, {
4943
14
            "Carousel ID", "mpeg_descr.carousel_identifier.id",
4944
14
            FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
4945
14
        } },
4946
4947
14
        { &hf_mpeg_descr_carousel_identifier_format_id, {
4948
14
            "Format ID", "mpeg_descr.carousel_identifier.format_id",
4949
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_carousel_identifier_format_id_vals), 0, NULL, HFILL
4950
14
        } },
4951
4952
14
        { &hf_mpeg_descr_carousel_identifier_module_version, {
4953
14
            "Module Version", "mpeg_descr.carousel_identifier.module_version",
4954
14
            FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
4955
14
        } },
4956
4957
14
        { &hf_mpeg_descr_carousel_identifier_module_id, {
4958
14
            "Module ID", "mpeg_descr.carousel_identifier.module_id",
4959
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
4960
14
        } },
4961
4962
14
        { &hf_mpeg_descr_carousel_identifier_block_size, {
4963
14
            "Block Size", "mpeg_descr.carousel_identifier.block_size",
4964
14
            FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
4965
14
        } },
4966
4967
14
        { &hf_mpeg_descr_carousel_identifier_module_size, {
4968
14
            "Module Size", "mpeg_descr.carousel_identifier.module_size",
4969
14
            FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL
4970
14
        } },
4971
4972
14
        { &hf_mpeg_descr_carousel_identifier_compression_method, {
4973
14
            "Compression Method", "mpeg_descr.carousel_identifier.comp_method",
4974
14
            FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
4975
14
        } },
4976
4977
14
        { &hf_mpeg_descr_carousel_identifier_original_size, {
4978
14
            "Original Size", "mpeg_descr.carousel_identifier.orig_size",
4979
14
            FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL
4980
14
        } },
4981
4982
14
        { &hf_mpeg_descr_carousel_identifier_timeout, {
4983
14
            "Timeout", "mpeg_descr.carousel_identifier.timeout",
4984
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
4985
14
        } },
4986
4987
14
        { &hf_mpeg_descr_carousel_identifier_object_key_len, {
4988
14
            "Object Key Length", "mpeg_descr.carousel_identifier.key_len",
4989
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
4990
14
        } },
4991
4992
14
        { &hf_mpeg_descr_carousel_identifier_object_key_data, {
4993
14
            "Object Key Data", "mpeg_descr.carousel_identifier.key_data",
4994
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
4995
14
        } },
4996
4997
14
        { &hf_mpeg_descr_carousel_identifier_private, {
4998
14
            "Private Bytes", "mpeg_descr.carousel_identifier.private",
4999
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
5000
14
        } },
5001
5002
        /* 0x14 Association Tag Descriptor */
5003
14
        { &hf_mpeg_descr_association_tag, {
5004
14
            "Association Tag", "mpeg_descr.assoc_tag.tag",
5005
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5006
14
        } },
5007
5008
14
        { &hf_mpeg_descr_association_tag_use, {
5009
14
            "Use", "mpeg_descr.assoc_tag.use",
5010
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5011
14
        } },
5012
5013
14
        { &hf_mpeg_descr_association_tag_selector_len, {
5014
14
            "Selector Length", "mpeg_descr.assoc_tag.selector_len",
5015
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
5016
14
        } },
5017
5018
14
        { &hf_mpeg_descr_association_tag_transaction_id, {
5019
14
            "Transaction ID", "mpeg_descr.assoc_tag.transaction_id",
5020
14
            FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
5021
14
        } },
5022
5023
14
        { &hf_mpeg_descr_association_tag_timeout, {
5024
14
            "Timeout", "mpeg_descr.assoc_tag.timeout",
5025
14
            FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
5026
14
        } },
5027
5028
14
        { &hf_mpeg_descr_association_tag_selector_bytes, {
5029
14
            "Selector Bytes", "mpeg_descr.assoc_tag.selector_bytes",
5030
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
5031
14
        } },
5032
5033
14
        { &hf_mpeg_descr_association_tag_private_bytes, {
5034
14
            "Private Bytes", "mpeg_descr.assoc_tag.private_bytes",
5035
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
5036
14
        } },
5037
5038
        /* 0x28 AVC Video Descriptor */
5039
14
        { &hf_mpeg_descr_avc_vid_profile_idc, {
5040
14
            "Profile IDC", "mpeg_descr.avc_vid.profile_idc",
5041
14
            FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
5042
14
        } },
5043
5044
14
        { &hf_mpeg_descr_avc_vid_constraint_set0_flag, {
5045
14
            "Constraint Set0 Flag", "mpeg_descr.avc_vid.constraint_set0",
5046
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_AVC_VID_CONSTRAINT_SET0_FLAG_MASK, NULL, HFILL
5047
14
        } },
5048
5049
14
        { &hf_mpeg_descr_avc_vid_constraint_set1_flag, {
5050
14
            "Constraint Set1 Flag", "mpeg_descr.avc_vid.constraint_set1",
5051
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_AVC_VID_CONSTRAINT_SET1_FLAG_MASK, NULL, HFILL
5052
14
        } },
5053
5054
14
        { &hf_mpeg_descr_avc_vid_constraint_set2_flag, {
5055
14
            "Constraint Set2 Flag", "mpeg_descr.avc_vid.constraint_set2",
5056
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_AVC_VID_CONSTRAINT_SET2_FLAG_MASK, NULL, HFILL
5057
14
        } },
5058
5059
14
        { &hf_mpeg_descr_avc_vid_compatible_flags, {
5060
14
            "Constraint Compatible Flags", "mpeg_descr.avc_vid.compatible_flags",
5061
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_AVC_VID_COMPATIBLE_FLAGS_MASK, NULL, HFILL
5062
14
        } },
5063
5064
14
        { &hf_mpeg_descr_avc_vid_level_idc, {
5065
14
            "Level IDC", "mpeg_descr.avc_vid.level_idc",
5066
14
            FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
5067
14
        } },
5068
5069
14
        { &hf_mpeg_descr_avc_vid_still_present, {
5070
14
            "AVC Still Present", "mpeg_descr.avc_vid.still_present",
5071
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_AVC_VID_STILL_PRESENT_MASK, NULL, HFILL
5072
14
        } },
5073
5074
14
        { &hf_mpeg_descr_avc_vid_24h_picture_flag, {
5075
14
            "AVC 24 Hour Picture Flag", "mpeg_descr.avc_vid.24h_picture_flag",
5076
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_AVC_VID_24H_PICTURE_FLAG_MASK, NULL, HFILL
5077
14
        } },
5078
5079
14
        { &hf_mpeg_descr_avc_vid_reserved, {
5080
14
            "Reserved", "mpeg_descr.avc_vid.reserved",
5081
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_AVC_VID_RESERVED_MASK, NULL, HFILL
5082
14
        } },
5083
5084
        /* 0x3F Extension Descriptor (ISO) */
5085
14
        { &hf_mpeg_descr_iso_extension_tag_extension, {
5086
14
            "Descriptor Tag Extension", "mpeg_descr.iso_ext.tag",
5087
14
            FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_iso_extension_tag_extension_vals_ext, 0, NULL, HFILL
5088
14
        } },
5089
5090
14
        { &hf_mpeg_descr_iso_extension_data, {
5091
14
            "Descriptor Extension Data", "mpeg_descr.iso_ext.data",
5092
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
5093
14
        } },
5094
5095
        /* 0x40 Network Name Descriptor */
5096
14
        { &hf_mpeg_descr_network_name_encoding, {
5097
14
            "Network Name Encoding", "mpeg_descr.net_name.name_enc",
5098
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
5099
14
        } },
5100
5101
14
        { &hf_mpeg_descr_network_name_descriptor, {
5102
14
            "Network Name", "mpeg_descr.net_name.name",
5103
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5104
14
        } },
5105
5106
        /* 0x41 Service List Descriptor */
5107
14
        { &hf_mpeg_descr_service_list_id, {
5108
14
            "Service ID", "mpeg_descr.svc_list.id",
5109
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5110
14
        } },
5111
5112
14
        { &hf_mpeg_descr_service_list_type, {
5113
14
            "Service Type", "mpeg_descr.svc_list.type",
5114
14
            FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_service_type_vals_ext, 0, NULL, HFILL
5115
14
        } },
5116
5117
        /* 0x42 Stuffing Descriptor */
5118
14
        { &hf_mpeg_descr_stuffing, {
5119
14
            "Stuffing", "mpeg_descr.stuffing",
5120
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
5121
14
        } },
5122
5123
        /* 0x43 Satellite Delivery System Descriptor */
5124
14
        { &hf_mpeg_descr_satellite_delivery_frequency, {
5125
14
            "Frequency", "mpeg_descr.sat_delivery.freq",
5126
14
            FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, UNS(&units_ghz), 0, NULL, HFILL
5127
14
        } },
5128
5129
14
        { &hf_mpeg_descr_satellite_delivery_orbital_position, {
5130
14
            "Orbital Position", "mpeg_descr.sat_delivery.orbital_pos",
5131
14
            FT_FLOAT, BASE_NONE|BASE_UNIT_STRING, UNS(&units_degree_degrees), 0, NULL, HFILL
5132
14
        } },
5133
5134
14
        { &hf_mpeg_descr_satellite_delivery_west_east_flag, {
5135
14
            "West East Flag", "mpeg_descr.sat_delivery.west_east_flag",
5136
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_satellite_delivery_west_east_flag_vals),
5137
14
            MPEG_DESCR_SATELLITE_DELIVERY_WEST_EAST_FLAG_MASK, NULL, HFILL
5138
14
        } },
5139
5140
14
        { &hf_mpeg_descr_satellite_delivery_polarization, {
5141
14
            "Polarization", "mpeg_descr.sat_delivery.polarization",
5142
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_satellite_delivery_polarization_vals),
5143
14
            MPEG_DESCR_SATELLITE_DELIVERY_POLARIZATION_MASK, NULL, HFILL
5144
14
        } },
5145
5146
14
        { &hf_mpeg_descr_satellite_delivery_roll_off, {
5147
14
            "Roll Off", "mpeg_descr.sat_delivery.roll_off",
5148
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_satellite_delivery_roll_off_vals),
5149
14
            MPEG_DESCR_SATELLITE_DELIVERY_ROLL_OFF_MASK, NULL, HFILL
5150
14
        } },
5151
5152
14
        { &hf_mpeg_descr_satellite_delivery_zero, {
5153
14
            "Zero", "mpeg_descr.sat_delivery.zero",
5154
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_SATELLITE_DELIVERY_ZERO_MASK, NULL, HFILL
5155
14
        } },
5156
5157
14
        { &hf_mpeg_descr_satellite_delivery_modulation_system, {
5158
14
            "Modulation System", "mpeg_descr.sat_delivery.modulation_system",
5159
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_satellite_delivery_modulation_system_vals),
5160
14
            MPEG_DESCR_SATELLITE_DELIVERY_MODULATION_SYSTEM_MASK, NULL, HFILL
5161
14
        } },
5162
5163
14
        { &hf_mpeg_descr_satellite_delivery_modulation_type, {
5164
14
            "Modulation Type", "mpeg_descr.sat_delivery.modulation_type",
5165
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_satellite_delivery_modulation_type_vals),
5166
14
            MPEG_DESCR_SATELLITE_DELIVERY_MODULATION_TYPE_MASK, NULL, HFILL
5167
14
        } },
5168
5169
14
        { &hf_mpeg_descr_satellite_delivery_symbol_rate, {
5170
14
            "Symbol Rate", "mpeg_descr.sat_delivery.symbol_rate",
5171
14
            FT_DOUBLE, BASE_NONE, NULL, 0, NULL, HFILL
5172
14
        } },
5173
5174
14
        { &hf_mpeg_descr_satellite_delivery_fec_inner, {
5175
14
            "FEC Inner", "mpeg_descr.sat_delivery.fec_inner",
5176
14
            FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_satellite_delivery_fec_inner_vals_ext,
5177
14
            MPEG_DESCR_SATELLITE_DELIVERY_FEC_INNER_MASK, NULL, HFILL
5178
14
        } },
5179
5180
        /* 0x44 Cable Delivery System Descriptor */
5181
14
        { &hf_mpeg_descr_cable_delivery_frequency, {
5182
14
            "Frequency", "mpeg_descr.cable_delivery.freq",
5183
14
            FT_DOUBLE, BASE_NONE, NULL, 0, NULL, HFILL
5184
14
        } },
5185
5186
14
        { &hf_mpeg_descr_cable_delivery_reserved, {
5187
14
            "Reserved", "mpeg_descr.cable_delivery.reserved",
5188
14
            FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_CABLE_DELIVERY_RESERVED_MASK, NULL, HFILL
5189
14
        } },
5190
5191
14
        { &hf_mpeg_descr_cable_delivery_fec_outer, {
5192
14
            "FEC Outer", "mpeg_descr.cable_delivery.fec_outer",
5193
14
            FT_UINT16, BASE_HEX, VALS(mpeg_descr_cable_delivery_fec_outer_vals),
5194
14
            MPEG_DESCR_CABLE_DELIVERY_FEC_OUTER_MASK, NULL, HFILL
5195
14
        } },
5196
5197
14
        { &hf_mpeg_descr_cable_delivery_modulation, {
5198
14
            "Modulation", "mpeg_descr.cable_delivery.modulation",
5199
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_cable_delivery_modulation_vals), 0, NULL, HFILL
5200
14
        } },
5201
5202
14
        { &hf_mpeg_descr_cable_delivery_symbol_rate, {
5203
14
            "Symbol Rate", "mpeg_descr.cable_delivery.sym_rate",
5204
14
            FT_DOUBLE, BASE_NONE, NULL, 0, NULL, HFILL
5205
14
        } },
5206
5207
14
        { &hf_mpeg_descr_cable_delivery_fec_inner, {
5208
14
            "FEC Inner", "mpeg_descr.cable_delivery.fec_inner",
5209
14
            FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_cable_delivery_fec_inner_vals_ext,
5210
14
            MPEG_DESCR_CABLE_DELIVERY_FEC_INNER_MASK, NULL, HFILL
5211
14
        } },
5212
5213
        /* 0x45 VBI Data Descriptor */
5214
14
        { &hf_mpeg_descr_vbi_data_service_id, {
5215
14
            "Data Service ID", "mpeg_descr.vbi_data.svc_id",
5216
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_vbi_data_service_id_vals), 0, NULL, HFILL
5217
14
        } },
5218
5219
14
        { &hf_mpeg_descr_vbi_data_descr_len, {
5220
14
            "Data Descriptor Length", "mpeg_descr.vbi_data.decr_len",
5221
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
5222
14
        } },
5223
5224
14
        { &hf_mpeg_descr_vbi_data_reserved1, {
5225
14
            "Reserved", "mpeg_descr.vbi_data.reserved1",
5226
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_VBI_DATA_RESERVED1_MASK, NULL, HFILL
5227
14
        } },
5228
5229
14
        { &hf_mpeg_descr_vbi_data_field_parity, {
5230
14
            "Field Parity", "mpeg_descr.vbi_data.field_parity",
5231
14
            FT_UINT8, BASE_DEC, VALS(mpeg_descr_vbi_data_field_parity_vals),
5232
14
            MPEG_DESCR_VBI_DATA_FIELD_PARITY_MASK, NULL, HFILL
5233
14
        } },
5234
5235
14
        { &hf_mpeg_descr_vbi_data_line_offset, {
5236
14
            "Line offset", "mpeg_descr.vbi_data.line_offset",
5237
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
5238
14
        } },
5239
5240
14
        { &hf_mpeg_descr_vbi_data_reserved2, {
5241
14
            "Reserved", "mpeg_descr.vbi_data.reserved2",
5242
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
5243
14
        } },
5244
5245
        /* 0x47 Bouquet Name Descriptor */
5246
14
        { &hf_mpeg_descr_bouquet_name_encoding, {
5247
14
            "Bouquet Name Encoding", "mpeg_descr.bouquet_name.name_enc",
5248
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
5249
14
        } },
5250
5251
14
        { &hf_mpeg_descr_bouquet_name, {
5252
14
            "Bouquet Name", "mpeg_descr.bouquet_name.name",
5253
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5254
14
        } },
5255
5256
        /* 0x48 Service Descriptor */
5257
14
        { &hf_mpeg_descr_service_type, {
5258
14
            "Service Type", "mpeg_descr.svc.type",
5259
14
            FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_service_type_vals_ext, 0, NULL, HFILL
5260
14
        } },
5261
5262
14
        { &hf_mpeg_descr_service_provider_name_length, {
5263
14
            "Provider Name Length", "mpeg_descr.svc.provider_name_len",
5264
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
5265
14
        } },
5266
5267
14
        { &hf_mpeg_descr_service_provider_name_encoding, {
5268
14
            "Provider Name Encoding", "mpeg_descr.svc.provider_name_enc",
5269
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
5270
14
        } },
5271
5272
14
        { &hf_mpeg_descr_service_provider, {
5273
14
            "Service Provider Name", "mpeg_descr.svc.provider_name",
5274
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5275
14
        } },
5276
5277
14
        { &hf_mpeg_descr_service_name_length, {
5278
14
            "Service Name Length", "mpeg_descr.svc.svc_name_len",
5279
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
5280
14
        } },
5281
5282
14
        { &hf_mpeg_descr_service_name_encoding, {
5283
14
            "Service Name Encoding", "mpeg_descr.svc.svn_name_enc",
5284
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
5285
14
        } },
5286
5287
14
        { &hf_mpeg_descr_service_name, {
5288
14
            "Service Name", "mpeg_descr.svc.svc_name",
5289
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5290
14
        } },
5291
5292
        /* 0x49 Country Availability Descriptor */
5293
14
        { &hf_mpeg_descr_country_availability_flag, {
5294
14
            "Country Availability Flag", "mpeg_descr.country_avail.avail_flag",
5295
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_country_availability_flag_vals),
5296
14
            MPEG_DESCR_COUNTRY_AVAILABILITY_FLAG_MASK, NULL, HFILL
5297
14
        } },
5298
5299
14
        { &hf_mpeg_descr_country_availability_reserved_future_use, {
5300
14
            "Reserved Future Use", "mpeg_descr.country_avail.reserved",
5301
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_COUNTRY_AVAILABILITY_RESERVED_MASK, NULL, HFILL
5302
14
        } },
5303
5304
14
        { &hf_mpeg_descr_country_availability_country_code, {
5305
14
            "Country Code", "mpeg_descr.country_avail.country_code",
5306
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5307
14
        } },
5308
5309
        /* 0x4A Linkage Descriptor */
5310
14
        { &hf_mpeg_descr_linkage_transport_stream_id, {
5311
14
            "Transport Stream ID", "mpeg_descr.linkage.tsid",
5312
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5313
14
        } },
5314
5315
14
        { &hf_mpeg_descr_linkage_original_network_id, {
5316
14
            "Original Network ID", "mpeg_descr.linkage.original_nid",
5317
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5318
14
        } },
5319
5320
14
        { &hf_mpeg_descr_linkage_service_id, {
5321
14
            "Service ID", "mpeg_descr.linkage.svc_id",
5322
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5323
14
        } },
5324
5325
14
        { &hf_mpeg_descr_linkage_linkage_type, {
5326
14
            "Linkage Type", "mpeg_descr.linkage.type",
5327
14
            FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_linkage_linkage_type_vals_ext, 0, NULL, HFILL
5328
14
        } },
5329
5330
14
        { &hf_mpeg_descr_linkage_hand_over_type, {
5331
14
            "Hand-Over Type", "mpeg_descr.linkage.hand_over_type",
5332
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LINKAGE_HAND_OVER_TYPE_MASK, NULL, HFILL
5333
14
        } },
5334
5335
14
        { &hf_mpeg_descr_linkage_reserved1, {
5336
14
            "Reserved", "mpeg_descr.linkage.reserved1",
5337
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LINKAGE_RESERVED1_MASK, NULL, HFILL
5338
14
        } },
5339
5340
14
        { &hf_mpeg_descr_linkage_origin_type, {
5341
14
            "Origin Type", "mpeg_descr.linkage.origin_type",
5342
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_linkage_origin_type_vals), 0, NULL, HFILL
5343
14
        } },
5344
5345
14
        { &hf_mpeg_descr_linkage_network_id, {
5346
14
            "Network ID", "mpeg_descr.linkage.network_id",
5347
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5348
14
        } },
5349
5350
14
        { &hf_mpeg_descr_linkage_initial_service_id, {
5351
14
            "Initial Service ID", "mpeg_descr.linkage.initial_svc_id",
5352
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5353
14
        } },
5354
5355
14
        { &hf_mpeg_descr_linkage_target_event_id, {
5356
14
            "Target Event ID", "mpeg_descr.linkage.target_evt_id",
5357
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5358
14
        } },
5359
5360
14
        { &hf_mpeg_descr_linkage_target_listed, {
5361
14
            "Target Listed", "mpeg_descr.linkage.target_listed",
5362
14
            FT_UINT8, BASE_DEC, VALS(mpeg_descr_linkage_target_listed_vals),
5363
14
            MPEG_DESCR_LINKAGE_TARGET_LISTED_MASK, NULL, HFILL
5364
14
        } },
5365
5366
14
        { &hf_mpeg_descr_linkage_event_simulcast, {
5367
14
            "Event Simulcast", "mpeg_descr.linkage.evt_simulcast",
5368
14
            FT_UINT8, BASE_DEC, VALS(mpeg_descr_linkage_event_simulcast_vals),
5369
14
            MPEG_DESCR_LINKAGE_EVENT_SIMULCAST_MASK, NULL, HFILL
5370
14
        } },
5371
5372
14
        { &hf_mpeg_descr_linkage_reserved2, {
5373
14
            "Reserved", "mpeg_descr.linkage.reserved2",
5374
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LINKAGE_RESERVED2_MASK, NULL, HFILL
5375
14
        } },
5376
5377
14
        { &hf_mpeg_descr_linkage_private_data_byte, {
5378
14
            "Private Data", "mpeg_descr.linkage.private_data",
5379
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
5380
14
        } },
5381
5382
14
        { &hf_mpeg_descr_linkage_interactive_network_id, {
5383
14
            "Interactive Network ID", "mpeg_descr.interactive_network_id",
5384
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5385
14
        } },
5386
5387
14
        { &hf_mpeg_descr_linkage_population_id_loop_count, {
5388
14
            "Population ID loop count", "mpeg_descr.population_id_loop_count",
5389
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
5390
14
        } },
5391
5392
14
        { &hf_mpeg_descr_linkage_population_id, {
5393
14
            "Population ID", "mpeg_descr.population_id",
5394
14
            FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
5395
14
        } },
5396
5397
14
        { &hf_mpeg_descr_linkage_population_id_base, {
5398
14
            "Population ID Base", "mpeg_descr.population_id_base",
5399
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5400
14
        } },
5401
5402
14
        { &hf_mpeg_descr_linkage_population_id_mask, {
5403
14
            "Population ID Mask", "mpeg_descr.population_id_mask",
5404
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5405
14
        } },
5406
5407
        /* 0x4B NVOD Reference Descriptor */
5408
14
        { &hf_mpeg_descr_nvod_reference_tsid, {
5409
14
            "Transport Stream ID", "mpeg_descr.nvod_ref.tsid",
5410
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5411
14
        } },
5412
5413
14
        { &hf_mpeg_descr_nvod_reference_onid, {
5414
14
            "Original Network ID", "mpeg_descr.nvod_ref.onid",
5415
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5416
14
        } },
5417
5418
14
        { &hf_mpeg_descr_nvod_reference_sid, {
5419
14
            "Stream ID", "mpeg_descr.nvod_ref.sid",
5420
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5421
14
        } },
5422
5423
        /* 0x4C Time Shifted Service Descriptor */
5424
14
        { &hf_mpeg_descr_time_shifted_service_id, {
5425
14
            "Reference Service ID", "mpeg_descr.time_shifted_service.id",
5426
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5427
14
        } },
5428
5429
        /* 0x4D Short Event Descriptor */
5430
14
        { &hf_mpeg_descr_short_event_lang_code, {
5431
14
            "Language Code", "mpeg_descr.short_evt.lang_code",
5432
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5433
14
        } },
5434
5435
14
        { &hf_mpeg_descr_short_event_name_length, {
5436
14
            "Event Name Length", "mpeg_descr.short_evt.name_len",
5437
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
5438
14
        } },
5439
5440
14
        { &hf_mpeg_descr_short_event_name_encoding, {
5441
14
            "Event Name Encoding", "mpeg_descr.short_evt.name_enc",
5442
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
5443
14
        } },
5444
5445
14
        { &hf_mpeg_descr_short_event_name, {
5446
14
            "Event Name", "mpeg_descr.short_evt.name",
5447
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5448
14
        } },
5449
5450
14
        { &hf_mpeg_descr_short_event_text_length, {
5451
14
            "Event Text Length", "mpeg_descr.short_evt.txt_len",
5452
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
5453
14
        } },
5454
5455
14
        { &hf_mpeg_descr_short_event_text_encoding, {
5456
14
            "Event Text Encoding", "mpeg_descr.short_evt.txt_enc",
5457
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
5458
14
        } },
5459
5460
14
        { &hf_mpeg_descr_short_event_text, {
5461
14
            "Event Text", "mpeg_descr.short_evt.txt",
5462
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5463
14
        } },
5464
5465
        /* 0x4E Extended Event Descriptor */
5466
14
        { &hf_mpeg_descr_extended_event_descriptor_number, {
5467
14
            "Descriptor Number", "mpeg_descr.ext_evt.descr_num",
5468
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_EXTENDED_EVENT_DESCRIPTOR_NUMBER_MASK, NULL, HFILL
5469
14
        } },
5470
5471
14
        { &hf_mpeg_descr_extended_event_last_descriptor_number, {
5472
14
            "Last Descriptor Number", "mpeg_descr.ext_evt.last_descr_num",
5473
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_EXTENDED_EVENT_LAST_DESCRIPTOR_NUMBER_MASK, NULL, HFILL
5474
14
        } },
5475
5476
14
        { &hf_mpeg_descr_extended_event_lang_code, {
5477
14
            "Language Code", "mpeg_descr.ext_evt.lang_code",
5478
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5479
14
        } },
5480
5481
14
        { &hf_mpeg_descr_extended_event_length_of_items, {
5482
14
            "Length of items", "mpeg_descr.ext_evt.items_len",
5483
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
5484
14
        } },
5485
5486
14
        { &hf_mpeg_descr_extended_event_item_description_length, {
5487
14
            "Item Description Length", "mpeg_descr.ext_evt.item_descr_len",
5488
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
5489
14
        } },
5490
5491
14
        { &hf_mpeg_descr_extended_event_item_description_char, {
5492
14
            "Item Description", "mpeg_descr.ext_evt.item_descr",
5493
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5494
14
        } },
5495
5496
14
        { &hf_mpeg_descr_extended_event_item_length, {
5497
14
            "Item Length", "mpeg_descr.ext_evt.item_len",
5498
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
5499
14
        } },
5500
5501
14
        { &hf_mpeg_descr_extended_event_item_char, {
5502
14
            "Item", "mpeg_descr.ext_evt.item",
5503
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5504
14
        } },
5505
5506
14
        { &hf_mpeg_descr_extended_event_text_length, {
5507
14
            "Text Length", "mpeg_descr.ext_evt.txt_len",
5508
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
5509
14
        } },
5510
5511
14
        { &hf_mpeg_descr_extended_event_text_encoding, {
5512
14
            "Text Encoding", "mpeg_descr.ext_evt.txt_enc",
5513
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
5514
14
        } },
5515
5516
14
        { &hf_mpeg_descr_extended_event_text, {
5517
14
            "Text", "mpeg_descr.ext_evt.txt",
5518
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5519
14
        } },
5520
5521
        /* 0x4F Time Shifted Event Descriptor */
5522
14
        { &hf_mpeg_descr_time_shifted_event_reference_service_id, {
5523
14
            "Reference Service ID", "mpeg_descr.tshift_evt.sid",
5524
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5525
14
        } },
5526
5527
14
        { &hf_mpeg_descr_time_shifted_event_reference_event_id, {
5528
14
            "Reference Event ID", "mpeg_descr.tshift_evt.eid",
5529
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5530
14
        } },
5531
5532
        /* 0x50 Component Descriptor */
5533
14
        { &hf_mpeg_descr_component_nga_bits_b7_reserved, {
5534
14
            "Reserved zero for future use", "mpeg_descr.component.nga.reserved",
5535
14
            FT_UINT16, BASE_HEX, NULL,
5536
14
            MPEG_DESCR_COMPONENT_NGA_BITS_B7_MASK, NULL, HFILL
5537
14
        } },
5538
5539
14
        { &hf_mpeg_descr_component_nga_bits_b6_headphones, {
5540
14
            "Pre-rendered for consumption with headphones", "mpeg_descr.component.nga.headphones",
5541
14
            FT_UINT16, BASE_HEX, NULL,
5542
14
            MPEG_DESCR_COMPONENT_NGA_BITS_B6_MASK, NULL, HFILL
5543
14
        } },
5544
5545
14
        { &hf_mpeg_descr_component_nga_bits_b5_interactivity, {
5546
14
            "Enables interactivity", "mpeg_descr.component.nga.interactivity",
5547
14
            FT_UINT16, BASE_HEX, NULL,
5548
14
            MPEG_DESCR_COMPONENT_NGA_BITS_B5_MASK, NULL, HFILL
5549
14
        } },
5550
5551
14
        { &hf_mpeg_descr_component_nga_bits_b4_dialogue_enhancement, {
5552
14
            "Enables dialogue enhancement", "mpeg_descr.component.nga.dialogue_enhancement",
5553
14
            FT_UINT16, BASE_HEX, NULL,
5554
14
            MPEG_DESCR_COMPONENT_NGA_BITS_B4_MASK, NULL, HFILL
5555
14
        } },
5556
5557
14
        { &hf_mpeg_descr_component_nga_bits_b3_spoken_subtitles, {
5558
14
            "Contains spoken subtitles", "mpeg_descr.component.nga.spoken_subtitles",
5559
14
            FT_UINT16, BASE_HEX, NULL,
5560
14
            MPEG_DESCR_COMPONENT_NGA_BITS_B3_MASK, NULL, HFILL
5561
14
        } },
5562
5563
14
        { &hf_mpeg_descr_component_nga_bits_b2_audio_description, {
5564
14
            "Contains audio description", "mpeg_descr.component.nga.audio_description",
5565
14
            FT_UINT16, BASE_HEX, NULL,
5566
14
            MPEG_DESCR_COMPONENT_NGA_BITS_B2_MASK, NULL, HFILL
5567
14
        } },
5568
5569
14
        { &hf_mpeg_descr_component_nga_bits_b10_channel_layout, {
5570
14
            "Preferred reproduction channel layout", "mpeg_descr.component.nga.channel_layout",
5571
14
            FT_UINT16, BASE_HEX, VALS(mpeg_descr_component_preferred_reproduction_channel_layout_vals),
5572
14
            MPEG_DESCR_COMPONENT_NGA_BITS_B10_MASK, NULL, HFILL
5573
14
        } },
5574
5575
14
        { &hf_mpeg_descr_component_high_stream_content_n_component_type, {
5576
14
            "Stream Content and Component Type", "mpeg_descr.component.content_type",
5577
14
            FT_UINT16, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_component_high_content_type_vals_ext,
5578
14
            MPEG_DESCR_COMPONENT_HIGH_STREAM_CONTENT_N_COMPONENT_TYPE_MASK, NULL, HFILL
5579
14
        } },
5580
5581
14
        { &hf_mpeg_descr_component_high_stream_content_both, {
5582
14
            "Stream Content both", "mpeg_descr.component.stream_content_both",
5583
14
            FT_UINT16, BASE_HEX, VALS(mpeg_descr_component_high_stream_content_vals),
5584
14
            MPEG_DESCR_COMPONENT_HIGH_STREAM_CONTENT_BOTH_MASK, NULL, HFILL
5585
14
        } },
5586
5587
14
        { &hf_mpeg_descr_component_high_stream_content_ext, {
5588
14
            "Stream Content Ext", "mpeg_descr.component.stream_content_ext",
5589
14
            FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_COMPONENT_HIGH_STREAM_CONTENT_EXT_MASK, NULL, HFILL
5590
14
        } },
5591
5592
14
        { &hf_mpeg_descr_component_high_stream_content, {
5593
14
            "Stream Content", "mpeg_descr.component.stream_content",
5594
14
            FT_UINT16, BASE_HEX, NULL,
5595
14
            MPEG_DESCR_COMPONENT_HIGH_STREAM_CONTENT_MASK, NULL, HFILL
5596
14
        } },
5597
5598
14
        { &hf_mpeg_descr_component_high_component_type, {
5599
14
            "Component Type", "mpeg_descr.component.type",
5600
14
            FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_COMPONENT_HIGH_COMPONENT_TYPE_MASK, NULL, HFILL
5601
14
        } },
5602
5603
14
        { &hf_mpeg_descr_component_stream_content_ext, {
5604
14
            "Stream Content Ext", "mpeg_descr.component.stream_content_ext",
5605
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_COMPONENT_STREAM_CONTENT_EXT_MASK, NULL, HFILL
5606
14
        } },
5607
5608
14
        { &hf_mpeg_descr_component_stream_content, {
5609
14
            "Stream Content", "mpeg_descr.component.stream_content",
5610
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_component_stream_content_vals),
5611
14
            MPEG_DESCR_COMPONENT_STREAM_CONTENT_MASK, NULL, HFILL
5612
14
        } },
5613
5614
14
        { &hf_mpeg_descr_component_type, {
5615
14
            "Component Type", "mpeg_descr.component.type",
5616
14
            FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
5617
14
        } },
5618
5619
14
        { &hf_mpeg_descr_component_content_type, {
5620
14
            "Stream Content and Component Type", "mpeg_descr.component.content_type",
5621
14
            FT_UINT16, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_component_content_type_vals_ext,
5622
14
            MPEG_DESCR_COMPONENT_CONTENT_TYPE_MASK, NULL, HFILL
5623
14
        } },
5624
5625
14
        { &hf_mpeg_descr_component_tag, {
5626
14
            "Component Tag", "mpeg_descr.component.tag",
5627
14
            FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
5628
14
        } },
5629
5630
14
        { &hf_mpeg_descr_component_lang_code, {
5631
14
            "Language Code", "mpeg_descr.component.lang_code",
5632
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5633
14
        } },
5634
5635
14
        { &hf_mpeg_descr_component_text_encoding, {
5636
14
            "Text Encoding", "mpeg_descr.component.text_enc",
5637
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
5638
14
        } },
5639
5640
14
        { &hf_mpeg_descr_component_text, {
5641
14
            "Text", "mpeg_descr.component.text",
5642
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5643
14
        } },
5644
5645
        /* 0x51 Mosaic Descriptor */
5646
14
        { &hf_mpeg_descr_mosaic_mosaic_entry_point, {
5647
14
            "Mosaic Entry Point", "mpeg_descr.mosaic.entry_point",
5648
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_MOSAIC_ENTRY_POINT_MASK, NULL, HFILL
5649
14
        } },
5650
5651
14
        { &hf_mpeg_descr_mosaic_number_of_horizontal_elementary_cells, {
5652
14
            "Number Of Horizontal Elementary Cells", "mpeg_descr.mosaic.h_cells_num",
5653
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_mosaic_number_of_e_cells_vals),
5654
14
            MPEG_DESCR_MOSAIC_NUM_OF_H_CELLS_MASK, NULL, HFILL
5655
14
        } },
5656
5657
14
        { &hf_mpeg_descr_mosaic_reserved_future_use1, {
5658
14
            "Reserved Future Use", "mpeg_descr.mosaic.reserved1",
5659
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_MOSAIC_RESERVED1_MASK, NULL, HFILL
5660
14
        } },
5661
5662
14
        { &hf_mpeg_descr_mosaic_number_of_vertical_elementary_cells, {
5663
14
            "Number Of Vertical Elementary Cells", "mpeg_descr.mosaic.v_cells_num",
5664
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_mosaic_number_of_e_cells_vals),
5665
14
            MPEG_DESCR_MOSAIC_NUM_OF_V_CELLS_MASK, NULL, HFILL
5666
14
        } },
5667
5668
14
        { &hf_mpeg_descr_mosaic_logical_cell_id, {
5669
14
            "Logical Cell ID", "mpeg_descr.mosaic.l_cell_id",
5670
14
            FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_MOSAIC_LOGICAL_CELL_ID_MASK, NULL, HFILL
5671
14
        } },
5672
5673
14
        { &hf_mpeg_descr_mosaic_reserved_future_use2, {
5674
14
            "Reserved Future Use", "mpeg_descr.mosaic.reserved2",
5675
14
            FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_MOSAIC_RESERVED2_MASK, NULL, HFILL
5676
14
        } },
5677
5678
14
        { &hf_mpeg_descr_mosaic_logical_cell_presentation_info, {
5679
14
            "Logical Cell Presentation Info", "mpeg_descr.mosaic.l_cell_pr_info",
5680
14
            FT_UINT16, BASE_HEX|BASE_RANGE_STRING, RVALS(mpeg_descr_mosaic_logical_cell_presentation_info_vals),
5681
14
            MPEG_DESCR_MOSAIC_CELL_PRESENTATION_INFO_MASK, NULL, HFILL
5682
14
        } },
5683
5684
14
        { &hf_mpeg_descr_mosaic_elementary_cell_field_length, {
5685
14
            "Elementary Cell Field Length", "mpeg_descr.mosaic.e_cell_field_len",
5686
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
5687
14
        } },
5688
5689
14
        { &hf_mpeg_descr_mosaic_reserved_future_use3, {
5690
14
            "Reserved Future Use", "mpeg_descr.mosaic.reserved3",
5691
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_MOSAIC_RESERVED3_MASK, NULL, HFILL
5692
14
        } },
5693
5694
14
        { &hf_mpeg_descr_mosaic_elementary_cell_id, {
5695
14
            "Elementary Cell ID", "mpeg_descr.mosaic.e_cell_id",
5696
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_MOSAIC_ELEMENTARY_CELL_ID_MASK, NULL, HFILL
5697
14
        } },
5698
5699
14
        { &hf_mpeg_descr_mosaic_cell_linkage_info, {
5700
14
            "Cell Linkage Info", "mpeg_descr.mosaic.cell_link_info",
5701
14
            FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(mpeg_descr_mosaic_cell_linkage_info_vals), 0, NULL, HFILL
5702
14
        } },
5703
5704
14
        { &hf_mpeg_descr_mosaic_bouquet_id, {
5705
14
            "Bouquet ID", "mpeg_descr.mosaic.bouquet_id",
5706
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5707
14
        } },
5708
5709
14
        { &hf_mpeg_descr_mosaic_original_network_id, {
5710
14
            "Original Network ID", "mpeg_descr.mosaic.onid",
5711
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5712
14
        } },
5713
5714
14
        { &hf_mpeg_descr_mosaic_transport_stream_id, {
5715
14
            "Transport Stream ID", "mpeg_descr.mosaic.tsid",
5716
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5717
14
        } },
5718
5719
14
        { &hf_mpeg_descr_mosaic_service_id, {
5720
14
            "Service ID", "mpeg_descr.mosaic.sid",
5721
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5722
14
        } },
5723
5724
14
        { &hf_mpeg_descr_mosaic_event_id, {
5725
14
            "Event ID", "mpeg_descr.mosaic.event_id",
5726
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5727
14
        } },
5728
5729
        /* 0x52 Stream Identifier Descriptor */
5730
14
        { &hf_mpeg_descr_stream_identifier_component_tag, {
5731
14
            "Component Tag", "mpeg_descr.stream_id.component_tag",
5732
14
            FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
5733
14
        } },
5734
5735
        /* 0x53 CA Identifier Descriptor */
5736
14
        { &hf_mpeg_descr_ca_identifier_system_id, {
5737
14
            "CA System ID", "mpeg_descr.ca_id.sys_id",
5738
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
5739
14
        } },
5740
5741
        /* 0x54 Content Descriptor */
5742
14
        { &hf_mpeg_descr_content_nibble, {
5743
14
            "Nibble Level 1 and 2", "mpeg_descr.content.nibble_1_2",
5744
14
            FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_content_nibble_vals_ext, 0, NULL, HFILL
5745
14
        } },
5746
5747
14
        { &hf_mpeg_descr_content_nibble_level_1, {
5748
14
            "Nibble Level 1", "mpeg_descr.content.nibble_lvl_1",
5749
14
            FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_content_nibble_level_1_vals_ext,
5750
14
            MPEG_DESCR_CONTENT_NIBBLE_LEVEL_1_MASK, NULL, HFILL
5751
14
        } },
5752
5753
14
        { &hf_mpeg_descr_content_nibble_level_2, {
5754
14
            "Nibble Level 2", "mpeg_descr.content.nibble_lvl_2",
5755
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_CONTENT_NIBBLE_LEVEL_2_MASK, NULL, HFILL
5756
14
        } },
5757
5758
14
        { &hf_mpeg_descr_content_user_byte, {
5759
14
            "User Byte", "mpeg_descr.content.user",
5760
14
            FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
5761
14
        } },
5762
5763
        /* 0x56 Teletext Descriptor */
5764
14
        { &hf_mpeg_descr_teletext_lang_code, {
5765
14
            "Language Code", "mpeg_descr.teletext.lang_code",
5766
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5767
14
        } },
5768
5769
14
        { &hf_mpeg_descr_teletext_type, {
5770
14
            "Teletext Type", "mpeg_descr.teletext.type",
5771
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_teletext_type_vals),
5772
14
            MPEG_DESCR_TELETEXT_TYPE_MASK, NULL, HFILL
5773
14
        } },
5774
5775
14
        { &hf_mpeg_descr_teletext_magazine_number, {
5776
14
            "Magazine Number", "mpeg_descr.teletext.magazine_num",
5777
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_TELETEXT_MAGAZINE_NUMBER_MASK, NULL, HFILL
5778
14
        } },
5779
5780
14
        { &hf_mpeg_descr_teletext_page_number, {
5781
14
            "Page Number", "mpeg_descr.teletext.page_num",
5782
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
5783
14
        } },
5784
5785
        /* 0x55 Parental Rating Descriptor */
5786
14
        { &hf_mpeg_descr_parental_rating_country_code, {
5787
14
            "Country Code", "mpeg_descr.parental_rating.country_code",
5788
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5789
14
        } },
5790
5791
14
        { &hf_mpeg_descr_parental_rating_rating, {
5792
14
            "Rating", "mpeg_descr.parental_rating.rating",
5793
14
            FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_parental_rating_vals_ext, 0, NULL, HFILL
5794
14
        } },
5795
5796
        /* 0x57 Telephone Descriptor */
5797
14
        { &hf_mpeg_descr_telephone_reserved_future_use1, {
5798
14
            "Reserved Future Use", "mpeg_descr.phone.reserved1",
5799
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_TELEPHONE_RESERVED1_MASK, NULL, HFILL
5800
14
        } },
5801
5802
14
        { &hf_mpeg_descr_telephone_foreign_availability, {
5803
14
            "Foreign Availability", "mpeg_descr.phone.foreign",
5804
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_telephone_foreign_availability_vals),
5805
14
            MPEG_DESCR_TELEPHONE_FOREIGN_AVAILABILITY_MASK, NULL, HFILL
5806
14
        } },
5807
5808
14
        { &hf_mpeg_descr_telephone_connection_type, {
5809
14
            "Connection Type", "mpeg_descr.phone.conn_t",
5810
14
            FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(mpeg_descr_telephone_connection_type_vals),
5811
14
            MPEG_DESCR_TELEPHONE_CONNECTION_TYPE_MASK, NULL, HFILL
5812
14
        } },
5813
5814
14
        { &hf_mpeg_descr_telephone_reserved_future_use2, {
5815
14
            "Reserved Future Use", "mpeg_descr.phone.reserved2",
5816
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_TELEPHONE_RESERVED2_MASK, NULL, HFILL
5817
14
        } },
5818
5819
14
        { &hf_mpeg_descr_telephone_country_prefix_length, {
5820
14
            "Country Prefix Length", "mpeg_descr.phone.nat_code_len",
5821
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_TELEPHONE_COUNTRY_PREFIX_LEN_MASK, NULL, HFILL
5822
14
        } },
5823
5824
14
        { &hf_mpeg_descr_telephone_international_area_code_length, {
5825
14
            "International Area Code Length", "mpeg_descr.phone.int_code_len",
5826
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_TELEPHONE_INTERNATIONAL_CODE_LEN_MASK, NULL, HFILL
5827
14
        } },
5828
5829
14
        { &hf_mpeg_descr_telephone_operator_code_length, {
5830
14
            "Operator Code Length", "mpeg_descr.phone.op_code_len",
5831
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_TELEPHONE_OPERATOR_CODE_LEN_MASK, NULL, HFILL
5832
14
        } },
5833
5834
14
        { &hf_mpeg_descr_telephone_reserved_future_use3, {
5835
14
            "Reserved Future Use", "mpeg_descr.phone.reserved3",
5836
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_TELEPHONE_RESERVED3_MASK, NULL, HFILL
5837
14
        } },
5838
5839
14
        { &hf_mpeg_descr_telephone_national_area_code_length, {
5840
14
            "National Area Code Length", "mpeg_descr.phone.nat_code_len",
5841
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_TELEPHONE_NATIONAL_CODE_LEN_MASK, NULL, HFILL
5842
14
        } },
5843
5844
14
        { &hf_mpeg_descr_telephone_core_number_length, {
5845
14
            "Core Number Length", "mpeg_descr.phone.core_n_len",
5846
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_TELEPHONE_CORE_NUMBER_LEN_MASK, NULL, HFILL
5847
14
        } },
5848
5849
14
        { &hf_mpeg_descr_telephone_number, {
5850
14
            "Telephone Number", "mpeg_descr.phone.number",
5851
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5852
14
        } },
5853
5854
14
        { &hf_mpeg_descr_telephone_country_prefix, {
5855
14
            "Country Prefix", "mpeg_descr.phone.country",
5856
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5857
14
        } },
5858
5859
14
        { &hf_mpeg_descr_telephone_international_area_code, {
5860
14
            "International Area Code", "mpeg_descr.phone.int_area",
5861
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5862
14
        } },
5863
5864
14
        { &hf_mpeg_descr_telephone_operator_code, {
5865
14
            "Operator Code", "mpeg_descr.phone.operator",
5866
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5867
14
        } },
5868
5869
14
        { &hf_mpeg_descr_telephone_national_area_code, {
5870
14
            "National Area Code", "mpeg_descr.phone.nat_code",
5871
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5872
14
        } },
5873
5874
14
        { &hf_mpeg_descr_telephone_core_number, {
5875
14
            "Core Number", "mpeg_descr.phone.core",
5876
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5877
14
        } },
5878
5879
        /* 0x58 Local Time Offset Descriptor */
5880
14
        { &hf_mpeg_descr_local_time_offset_country_code, {
5881
14
            "Country Code", "mpeg_descr.local_time_offset.country_code",
5882
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5883
14
        } },
5884
5885
14
        { &hf_mpeg_descr_local_time_offset_region_id, {
5886
14
            "Region ID", "mpeg_descr.local_time_offset.region_id",
5887
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOCAL_TIME_OFFSET_COUNTRY_REGION_ID_MASK, NULL, HFILL
5888
14
        } },
5889
5890
14
        { &hf_mpeg_descr_local_time_offset_reserved, {
5891
14
            "Reserved", "mpeg_descr.local_time_offset.reserved",
5892
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOCAL_TIME_OFFSET_RESERVED_MASK, NULL, HFILL
5893
14
        } },
5894
5895
14
        { &hf_mpeg_descr_local_time_offset_polarity, {
5896
14
            "Time Offset Polarity", "mpeg_descr.local_time_offset.polarity",
5897
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_local_time_offset_polarity_vals),
5898
14
            MPEG_DESCR_LOCAL_TIME_OFFSET_POLARITY, NULL, HFILL
5899
14
        } },
5900
5901
14
        { &hf_mpeg_descr_local_time_offset_offset, {
5902
14
            "Local Time Offset", "mpeg_descr.local_time_offset.offset",
5903
14
            FT_RELATIVE_TIME, BASE_NONE, NULL, 0, NULL, HFILL
5904
14
        } },
5905
5906
14
        { &hf_mpeg_descr_local_time_offset_time_of_change, {
5907
14
            "Time of Change", "mpeg_descr.local_time_offset.time_of_change",
5908
14
            FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, NULL, HFILL
5909
14
        } },
5910
5911
14
        { &hf_mpeg_descr_local_time_offset_next_time_offset, {
5912
14
            "Next Time Offset", "mpeg_descr.local_time_offset.next_time_offset",
5913
14
            FT_RELATIVE_TIME, BASE_NONE, NULL, 0, NULL, HFILL
5914
14
        } },
5915
5916
        /* 0x59 Subtitling Descriptor */
5917
14
        { &hf_mpeg_descr_subtitling_lang_code, {
5918
14
            "Language Code", "mpeg_descr.subtitling.lang_code",
5919
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
5920
14
        } },
5921
5922
14
        { &hf_mpeg_descr_subtitling_type, {
5923
14
            "Subtitling Type", "mpeg_descr.subtitling.type",
5924
14
            FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_subtitling_type_vals_ext, 0, NULL, HFILL
5925
14
        } },
5926
5927
14
        { &hf_mpeg_descr_subtitling_composition_page_id, {
5928
14
            "Composition Page ID", "mpeg_descr.subtitling.composition_page_id",
5929
14
            FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
5930
14
        } },
5931
5932
14
        { &hf_mpeg_descr_subtitling_ancillary_page_id, {
5933
14
            "Ancillary Page ID", "mpeg_descr.subtitling.ancillary_page_id",
5934
14
            FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
5935
14
        } },
5936
5937
        /* 0x5A Terrestrial Delivery System Descriptor */
5938
14
        { &hf_mpeg_descr_terrestrial_delivery_centre_frequency, {
5939
14
            "Centre Frequency", "mpeg_descr.terr_delivery.centre_freq",
5940
14
            FT_UINT64, BASE_DEC, NULL, 0, NULL, HFILL
5941
14
        } },
5942
5943
14
        { &hf_mpeg_descr_terrestrial_delivery_bandwidth, {
5944
14
            "Bandwidth", "mpeg_descr.terr_delivery.bandwidth",
5945
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_bandwidth_vals),
5946
14
            MPEG_DESCR_TERRESTRIAL_DELIVERY_BANDWIDTH_MASK, NULL, HFILL
5947
14
        } },
5948
5949
14
        { &hf_mpeg_descr_terrestrial_delivery_priority, {
5950
14
            "Priority", "mpeg_descr.terr_delivery.priority",
5951
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_priority_vals),
5952
14
            MPEG_DESCR_TERRESTRIAL_DELIVERY_PRIORITY_MASK, NULL, HFILL
5953
14
        } },
5954
5955
14
        { &hf_mpeg_descr_terrestrial_delivery_time_slicing_indicator, {
5956
14
            "Time Slicing Indicator", "mpeg_descr.terr_delivery.time_slicing_ind",
5957
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_time_slicing_indicator_vals),
5958
14
            MPEG_DESCR_TERRESTRIAL_DELIVERY_TIME_SLICING_INDICATOR_MASK, NULL, HFILL
5959
14
        } },
5960
5961
14
        { &hf_mpeg_descr_terrestrial_delivery_mpe_fec_indicator, {
5962
14
            "MPE-FEC Indicator", "mpeg_descr.terr_delivery.mpe_fec_ind",
5963
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_mpe_fec_indicator_vals),
5964
14
            MPEG_DESCR_TERRESTRIAL_DELIVERY_MPE_FEC_INDICATOR_MASK, NULL, HFILL
5965
14
        } },
5966
5967
14
        { &hf_mpeg_descr_terrestrial_delivery_reserved1, {
5968
14
            "Reserved", "mpeg_descr.terr_delivery.reserved1",
5969
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_TERRESTRIAL_DELIVERY_RESERVED1_MASK, NULL, HFILL
5970
14
        } },
5971
5972
14
        { &hf_mpeg_descr_terrestrial_delivery_constellation, {
5973
14
            "Constellation", "mpeg_descr.terr_delivery.constellation",
5974
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_constellation_vals),
5975
14
            MPEG_DESCR_TERRESTRIAL_DELIVERY_CONSTELLATION_MASK, NULL, HFILL
5976
14
        } },
5977
5978
14
        { &hf_mpeg_descr_terrestrial_delivery_hierarchy_information, {
5979
14
            "Hierarchy Information", "mpeg_descr.terr_delivery.hierarchy_information",
5980
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_hierarchy_information_vals),
5981
14
            MPEG_DESCR_TERRESTRIAL_DELIVERY_HIERARCHY_INFORMATION_MASK, NULL, HFILL
5982
14
        } },
5983
5984
14
        { &hf_mpeg_descr_terrestrial_delivery_code_rate_hp_stream, {
5985
14
            "Code Rate High Priority Stream", "mpeg_descr.terr_delivery.code_rate_hp_stream",
5986
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_code_rate_vals),
5987
14
            MPEG_DESCR_TERRESTRIAL_DELIVERY_CODE_RATE_HP_STREAM_MASK, NULL, HFILL
5988
14
        } },
5989
5990
14
        { &hf_mpeg_descr_terrestrial_delivery_code_rate_lp_stream, {
5991
14
            "Code Rate Low Priority Stream", "mpeg_descr.terr_delivery.code_rate_lp_stream",
5992
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_code_rate_vals),
5993
14
            MPEG_DESCR_TERRESTRIAL_DELIVERY_CODE_RATE_LP_STREAM_MASK, NULL, HFILL
5994
14
        } },
5995
5996
14
        { &hf_mpeg_descr_terrestrial_delivery_guard_interval, {
5997
14
            "Guard Interval", "mpeg_descr.terr_delivery.guard_interval",
5998
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_guard_interval_vals),
5999
14
            MPEG_DESCR_TERRESTRIAL_DELIVERY_GUARD_INTERVAL_MASK, NULL, HFILL
6000
14
        } },
6001
6002
14
        { &hf_mpeg_descr_terrestrial_delivery_transmission_mode, {
6003
14
            "Transmission Mode", "mpeg_descr.terr_delivery.transmission_mode",
6004
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_transmission_mode_vals),
6005
14
            MPEG_DESCR_TERRESTRIAL_DELIVERY_TRANSMISSION_MODE_MASK, NULL, HFILL
6006
14
        } },
6007
6008
14
        { &hf_mpeg_descr_terrestrial_delivery_other_frequency_flag, {
6009
14
            "Other Frequency Flag", "mpeg_descr.terr_delivery.other_freq_flag",
6010
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_other_frequency_flag_vals),
6011
14
            MPEG_DESCR_TERRESTRIAL_DELIVERY_OTHER_FREQUENCY_FLAG_MASK, NULL, HFILL
6012
14
        } },
6013
6014
14
        { &hf_mpeg_descr_terrestrial_delivery_reserved2, {
6015
14
            "Reserved", "mpeg_descr.terr_delivery.reserved2",
6016
14
            FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
6017
14
        } },
6018
6019
        /* 0x5B Multilingual Network Name Descriptor */
6020
14
        { &hf_mpeg_descr_multilng_network_name_desc_iso639_language_code, {
6021
14
            "Language ISO 639-2 Code", "mpeg_descr.net_name.lang_code",
6022
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
6023
14
        } },
6024
6025
14
        { &hf_mpeg_descr_multilng_network_name_desc_name_length, {
6026
14
            "Network Name Length", "mpeg_descr.net_name.name_length",
6027
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
6028
14
        } },
6029
6030
14
        { &hf_mpeg_descr_multilng_network_name_desc_name_encoding, {
6031
14
            "Network Name Encoding", "mpeg_descr.net_name.name_enc",
6032
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
6033
14
        } },
6034
6035
14
        { &hf_mpeg_descr_multilng_network_name_desc_name, {
6036
14
            "Network Name", "mpeg_descr.net_name.name",
6037
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
6038
14
        } },
6039
6040
6041
        /* 0x5C Multilingual Bouquet Name Descriptor */
6042
14
        { &hf_mpeg_descr_multilng_bouquet_name_desc_iso639_language_code, {
6043
14
            "Language ISO 639-2 Code", "mpeg_descr.bouquet_name.lang_code",
6044
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
6045
14
        } },
6046
6047
14
        { &hf_mpeg_descr_multilng_bouquet_name_desc_name_length, {
6048
14
            "Bouquet Name Length", "mpeg_descr.bouquet_name.name_length",
6049
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
6050
14
        } },
6051
6052
14
        { &hf_mpeg_descr_multilng_bouquet_name_desc_name_encoding, {
6053
14
            "Bouquet Name Encoding", "mpeg_descr.bouquet_name.name_enc",
6054
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
6055
14
        } },
6056
6057
14
        { &hf_mpeg_descr_multilng_bouquet_name_desc_name, {
6058
14
            "Bouquet Name", "mpeg_descr.bouquet_name.name",
6059
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
6060
14
        } },
6061
6062
        /* 0x5D Multilingual Service Name Descriptor */
6063
14
        { &hf_mpeg_descr_multilng_srv_name_desc_iso639_language_code, {
6064
14
            "Language ISO 639-2 Code", "mpeg_descr.svc.lang_code",
6065
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
6066
14
        } },
6067
6068
14
        { &hf_mpeg_descr_multilng_srv_name_desc_service_provider_name_length, {
6069
14
            "Service Provider Name Length", "mpeg_descr.svc.provider_name_len",
6070
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
6071
14
        } },
6072
6073
14
        { &hf_mpeg_descr_multilng_srv_name_desc_service_provider_name_encoding, {
6074
14
            "Service Provider Name Encoding", "mpeg_descr.svc.provider_name_enc",
6075
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
6076
14
        } },
6077
6078
14
        { &hf_mpeg_descr_multilng_srv_name_desc_service_provider_name, {
6079
14
            "Service Provider Name", "mpeg_descr.svc.provider_name",
6080
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
6081
14
        } },
6082
6083
14
        { &hf_mpeg_descr_multilng_srv_name_desc_service_name_length, {
6084
14
            "Service Name Length", "mpeg_descr.svc.svc_name_len",
6085
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
6086
14
        } },
6087
6088
14
        { &hf_mpeg_descr_multilng_srv_name_desc_service_name_encoding, {
6089
14
            "Service Name Encoding", "mpeg_descr.svc.svn_name_enc",
6090
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
6091
14
        } },
6092
6093
14
        { &hf_mpeg_descr_multilng_srv_name_desc_service_name, {
6094
14
            "Service Name", "mpeg_descr.svc.svc_name",
6095
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
6096
14
        } },
6097
6098
        /* 0x5E Multilingual Component Descriptor */
6099
14
        { &hf_mpeg_descr_multilng_component_desc_tag, {
6100
14
            "Component Tag", "mpeg_descr.component.tag",
6101
14
            FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
6102
14
        } },
6103
6104
14
        { &hf_mpeg_descr_multilng_component_desc_iso639_language_code, {
6105
14
            "Language ISO 639-2 Code", "mpeg_descr.component.lang_code",
6106
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
6107
14
        } },
6108
6109
14
        { &hf_mpeg_descr_multilng_component_desc_text_length, {
6110
14
            "Text Length", "mpeg_descr.component.text_length",
6111
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
6112
14
        } },
6113
6114
14
        { &hf_mpeg_descr_multilng_component_desc_text_encoding, {
6115
14
            "Text Encoding", "mpeg_descr.component.text_enc",
6116
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
6117
14
        } },
6118
6119
14
        { &hf_mpeg_descr_multilng_component_desc_text, {
6120
14
            "Text", "mpeg_descr.component.text",
6121
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
6122
14
        } },
6123
6124
        /* 0x5F Private Data Specifier */
6125
14
        { &hf_mpeg_descr_private_data_specifier_id, {
6126
14
            "Private Data Specifier", "mpeg_descr.private_data_specifier.id",
6127
14
            FT_UINT32, BASE_HEX, VALS(mpeg_descr_data_specifier_id_vals), 0, NULL, HFILL
6128
14
        } },
6129
6130
        /* 0x61 Short Smoothing Buffer Descriptor */
6131
14
        { &hf_mpeg_descr_short_smoothing_buffer_sb_size, {
6132
14
            "SB Size", "mpeg_descr.ssb.sb_size",
6133
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_ssb_sb_size_vals),
6134
14
            MPEG_DESCR_SHORT_SMOOTHING_BUFFER_SB_SIZE_MASK, NULL, HFILL
6135
14
        } },
6136
6137
14
        { &hf_mpeg_descr_short_smoothing_buffer_sb_leak_rate, {
6138
14
            "SB Leak Rate", "mpeg_descr.ssb.sb_leak_rate",
6139
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &mpeg_descr_ssb_sb_leak_rate_vals_ext,
6140
14
            MPEG_DESCR_SHORT_SMOOTHING_BUFFER_SB_LEAK_RATE_MASK, NULL, HFILL
6141
14
        } },
6142
6143
14
        { &hf_mpeg_descr_short_smoothing_buffer_dvb_reserved, {
6144
14
            "DVB Reserved", "mpeg_descr.ssb.dvb_reserved",
6145
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
6146
14
        } },
6147
6148
        /* 0x63 Partial Transport Stream Descriptor */
6149
14
        { &hf_mpeg_descr_partial_transport_stream_reserved_future_use1, {
6150
14
            "Reserved", "mpeg_descr.partial_transport_stream.reserved_future_use1",
6151
14
            FT_UINT24, BASE_HEX, NULL, PARTIAL_TRANSPORT_STREAM_DESCR_RESERVED_FUTURE_USE1_MASK, NULL, HFILL
6152
14
        } },
6153
6154
14
        { &hf_mpeg_descr_partial_transport_stream_peak_rate, {
6155
14
            "Peak Rate", "mpeg_descr.partial_transport_stream.peak_rate",
6156
14
            FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL
6157
14
        } },
6158
6159
14
        { &hf_mpeg_descr_partial_transport_stream_reserved_future_use2, {
6160
14
            "Reserved", "mpeg_descr.partial_transport_stream.reserved_future_use2",
6161
14
            FT_UINT24, BASE_HEX, NULL, PARTIAL_TRANSPORT_STREAM_DESCR_RESERVED_FUTURE_USE2_MASK, NULL, HFILL
6162
14
        } },
6163
6164
14
        { &hf_mpeg_descr_partial_transport_stream_minimum_overall_smoothing_rate, {
6165
14
            "Minimum Overall Smoothing Rate", "mpeg_descr.partial_transport_stream.minimum_overall_smoothing_rate",
6166
14
            FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL
6167
14
        } },
6168
6169
14
        { &hf_mpeg_descr_partial_transport_stream_reserved_future_use3, {
6170
14
            "Reserved", "mpeg_descr.partial_transport_stream.reserved_future_use3",
6171
14
            FT_UINT16, BASE_HEX, NULL, PARTIAL_TRANSPORT_STREAM_DESCR_RESERVED_FUTURE_USE3_MASK, NULL, HFILL
6172
14
        } },
6173
6174
14
        { &hf_mpeg_descr_partial_transport_stream_maximum_overall_smoothing_buffer, {
6175
14
            "Maximum Overall Smoothing Buffer", "mpeg_descr.partial_transport_stream.maximum_overall_smoothing_buffer",
6176
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
6177
14
        } },
6178
6179
        /* 0x64 Data Broadcast Descriptor */
6180
14
        { &hf_mpeg_descr_data_bcast_bcast_id, {
6181
14
            "Data Broadcast ID", "mpeg_descr.data_bcast.id",
6182
14
            FT_UINT16, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_data_bcast_id_vals_ext, 0, NULL, HFILL
6183
14
        } },
6184
6185
14
        { &hf_mpeg_descr_data_bcast_component_tag, {
6186
14
            "Component Tag", "mpeg_descr.data_bcast.component_tag",
6187
14
            FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
6188
14
        } },
6189
6190
14
        { &hf_mpeg_descr_data_bcast_selector_len, {
6191
14
            "Selector Length", "mpeg_descr.data_bcast.selector_len",
6192
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
6193
14
        } },
6194
6195
14
        { &hf_mpeg_descr_data_bcast_selector_bytes, {
6196
14
            "Selector Bytes", "mpeg_descr.data_bcast.selector_bytes",
6197
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
6198
14
        } },
6199
6200
14
        { &hf_mpeg_descr_data_bcast_lang_code, {
6201
14
            "Language Code", "mpeg_descr.data_bcast.lang_code",
6202
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
6203
14
        } },
6204
6205
14
        { &hf_mpeg_descr_data_bcast_text_len, {
6206
14
            "Text Length", "mpeg_descr.data_bcast.text_len",
6207
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
6208
14
        } },
6209
6210
14
        { &hf_mpeg_descr_data_bcast_text, {
6211
14
            "Text", "mpeg_descr.data_bcast.text",
6212
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
6213
14
        } },
6214
6215
        /* 0x66 Data Broadcast ID Descriptor */
6216
14
        { &hf_mpeg_descr_data_bcast_id_bcast_id, {
6217
14
            "Data Broadcast ID", "mpeg_descr.data_bcast_id.id",
6218
14
            FT_UINT16, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_data_bcast_id_vals_ext, 0, NULL, HFILL
6219
14
        } },
6220
6221
14
        { &hf_mpeg_descr_data_bcast_id_id_selector_bytes, {
6222
14
            "ID Selector Bytes", "mpeg_descr.data_bcast_id.id_selector_bytes",
6223
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
6224
14
        } },
6225
6226
        /* 0x69 PDC Descriptor */
6227
14
        { &hf_mpeg_descr_pdc_reserved, {
6228
14
            "Reserved Future Use", "mpeg_descr.pdc.reserved",
6229
14
            FT_UINT24, BASE_HEX, NULL, MPEG_DESCR_PDC_RESERVED_MASK, NULL, HFILL
6230
14
        } },
6231
6232
14
        { &hf_mpeg_descr_pdc_pil, {
6233
14
            "Program Identification Label (PIL)", "mpeg_descr.pdc.pil",
6234
14
            FT_UINT24, BASE_HEX, NULL, MPEG_DESCR_PDC_PIL_MASK, NULL, HFILL
6235
14
        } },
6236
6237
14
        { &hf_mpeg_descr_pdc_day, {
6238
14
            "Day", "mpeg_descr.pdc.day",
6239
14
            FT_UINT24, BASE_DEC, NULL, MPEG_DESCR_PDC_DAY_MASK, NULL, HFILL
6240
14
        } },
6241
6242
14
        { &hf_mpeg_descr_pdc_month, {
6243
14
            "Month", "mpeg_descr.pdc.month",
6244
14
            FT_UINT24, BASE_DEC, NULL, MPEG_DESCR_PDC_MONTH_MASK, NULL, HFILL
6245
14
        } },
6246
6247
14
        { &hf_mpeg_descr_pdc_hour, {
6248
14
            "Hour", "mpeg_descr.pdc.hour",
6249
14
            FT_UINT24, BASE_DEC, NULL, MPEG_DESCR_PDC_HOUR_MASK, NULL, HFILL
6250
14
        } },
6251
6252
14
        { &hf_mpeg_descr_pdc_minute, {
6253
14
            "Minute", "mpeg_descr.pdc.minute",
6254
14
            FT_UINT24, BASE_DEC, NULL, MPEG_DESCR_PDC_MINUTE_MASK, NULL, HFILL
6255
14
        } },
6256
6257
        /* 0x6A AC-3 Descriptor */
6258
14
        { &hf_mpeg_descr_ac3_component_type_flag, {
6259
14
            "Component Type Flag", "mpeg_descr.ac3.component_type_flag",
6260
14
            FT_UINT8, BASE_DEC, VALS(mpeg_descr_ac3_component_type_flag_vals),
6261
14
            MPEG_DESCR_AC3_COMPONENT_TYPE_FLAG_MASK, NULL, HFILL
6262
14
        } },
6263
6264
14
        { &hf_mpeg_descr_ac3_bsid_flag, {
6265
14
            "BSID Flag", "mpeg_descr.ac3.bsid_flag",
6266
14
            FT_UINT8, BASE_DEC, VALS(mpeg_descr_ac3_bsid_flag_vals),
6267
14
            MPEG_DESCR_AC3_BSID_FLAG_MASK, NULL, HFILL
6268
14
        } },
6269
6270
14
        { &hf_mpeg_descr_ac3_mainid_flag, {
6271
14
            "Main ID Flag", "mpeg_descr.ac3_main_id_flag",
6272
14
            FT_UINT8, BASE_DEC, VALS(mpeg_descr_ac3_mainid_flag_vals),
6273
14
            MPEG_DESCR_AC3_MAINID_FLAG_MASK, NULL, HFILL
6274
14
        } },
6275
6276
14
        { &hf_mpeg_descr_ac3_asvc_flag, {
6277
14
            "ASVC Flag", "mpeg_descr.ac3.asvc_flag",
6278
14
            FT_UINT8, BASE_DEC, VALS(mpeg_descr_ac3_asvc_flag_vals),
6279
14
            MPEG_DESCR_AC3_ASVC_FLAG_MASK, NULL, HFILL
6280
14
        } },
6281
6282
14
        { &hf_mpeg_descr_ac3_reserved, {
6283
14
            "Reserved", "mpeg_descr.ac3.reserved",
6284
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_AC3_RESERVED_MASK, NULL, HFILL
6285
14
        } },
6286
6287
14
        { &hf_mpeg_descr_ac3_component_type_reserved_flag, {
6288
14
            "Type Reserved Flag", "mpeg_descr.ac3.component_type.reserved_flag",
6289
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_AC3_COMPONENT_TYPE_RESERVED_FLAG_MASK, NULL, HFILL
6290
14
        } },
6291
6292
14
        { &hf_mpeg_descr_ac3_component_type_full_service_flag, {
6293
14
            "Full Service Flag", "mpeg_descr.ac3.component_type.full_service_flag",
6294
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_ac3_component_type_full_service_flag_vals),
6295
14
            MPEG_DESCR_AC3_COMPONENT_TYPE_FULL_SERVICE_FLAG_MASK, NULL, HFILL
6296
14
        } },
6297
6298
14
        { &hf_mpeg_descr_ac3_component_type_service_type_flags, {
6299
14
            "Service Type Flags", "mpeg_descr.ac3.component_type.service_type_flags",
6300
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_ac3_component_type_service_type_flags_vals),
6301
14
            MPEG_DESCR_AC3_COMPONENT_TYPE_SERVICE_TYPE_FLAGS_MASK, NULL, HFILL
6302
14
        } },
6303
6304
14
        { &hf_mpeg_descr_ac3_component_type_number_of_channels_flags, {
6305
14
            "Number of Channels Flags", "mpeg_descr.ac3.component_type.number_chan_flags",
6306
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_ac3_component_type_number_of_channels_flags_vals),
6307
14
            MPEG_DESCR_AC3_COMPONENT_TYPE_NUMBER_OF_CHANNELS_FLAGS, NULL, HFILL
6308
14
        } },
6309
6310
14
        { &hf_mpeg_descr_ac3_bsid, {
6311
14
            "BSID", "mpeg_descr.ac3.bsid",
6312
14
            FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
6313
14
        } },
6314
6315
14
        { &hf_mpeg_descr_ac3_mainid, {
6316
14
            "Main ID", "mpeg_descr.ac3.mainid",
6317
14
            FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
6318
14
        } },
6319
6320
14
        { &hf_mpeg_descr_ac3_asvc, {
6321
14
            "ASVC", "mpeg_descr.ac3.asvc",
6322
14
            FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
6323
14
        } },
6324
6325
14
        { &hf_mpeg_descr_ac3_additional_info, {
6326
14
            "Additional Info", "mpeg_descr.ac3.additional_info",
6327
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
6328
14
        } },
6329
6330
        /* 0x6F Application Signalling Descriptor */
6331
14
        { &hf_mpeg_descr_app_sig_app_type, {
6332
14
            "Application type", "mpeg_descr.app_sig.app_type",
6333
14
            FT_UINT16, BASE_HEX, NULL, 0x7FFF, NULL, HFILL
6334
14
        } },
6335
6336
14
        { &hf_mpeg_descr_app_sig_ait_ver, {
6337
14
            "AIT version", "mpeg_descr.app_sig.ait_ver",
6338
14
            FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL
6339
14
        } },
6340
6341
        /* 0x71 Service Identifier Descriptor */
6342
14
        { &hf_mpeg_descr_service_identifier, {
6343
14
            "Service Textual Identifier", "mpeg_descr.sid.txt_identifier",
6344
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
6345
14
        } },
6346
6347
        /* 0x72 Service Availability Descriptor */
6348
14
        { &hf_mpeg_descr_service_availability_flag, {
6349
14
            "Availability Flag", "mpeg_descr.srv_avail.flag",
6350
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_srv_avail_flag_vals),
6351
14
            MPEG_DESCR_SRV_AVAIL_FLAG_MASK, NULL, HFILL
6352
14
        } },
6353
6354
14
        { &hf_mpeg_descr_service_availability_reserved, {
6355
14
            "Reserved", "mpeg_descr.srv_avail.reserved",
6356
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_SRV_AVAIL_RESERVED_MASK, NULL, HFILL
6357
14
        } },
6358
6359
14
        { &hf_mpeg_descr_service_availability_cell_id, {
6360
14
            "Cell ID", "mpeg_descr.srv_avail.cid",
6361
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
6362
14
        } },
6363
6364
        /* 0x73 Default Authority Descriptor */
6365
14
        { &hf_mpeg_descr_default_authority_name, {
6366
14
            "Default Authority Name", "mpeg_descr.default_authority.name",
6367
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
6368
14
        } },
6369
6370
        /* 0x75 TVA ID Descriptor */
6371
14
        { &hf_mpeg_descr_tva_id, {
6372
14
            "TVA ID", "mpeg_descr.tva.id",
6373
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
6374
14
        } },
6375
6376
14
        { &hf_mpeg_descr_tva_reserved, {
6377
14
            "Reserved", "mpeg_descr.tva.reserved",
6378
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_TVA_RESREVED_MASK, NULL, HFILL
6379
14
        } },
6380
6381
14
        { &hf_mpeg_descr_tva_running_status, {
6382
14
            "Running Status", "mpeg_descr.tva.status",
6383
14
            FT_UINT8, BASE_DEC, VALS(mpeg_descr_tva_running_status_vals),
6384
14
            MPEG_DESCR_TVA_RUNNING_STATUS_MASK, NULL, HFILL
6385
14
        } },
6386
6387
        /* 0x76 Content Identifier Descriptor */
6388
14
        { &hf_mpeg_descr_content_identifier_crid_type, {
6389
14
            "CRID Type", "mpeg_descr.content_identifier.crid_type",
6390
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_content_identifier_crid_type_vals),
6391
14
            MPEG_DESCR_CONTENT_IDENTIFIER_CRID_TYPE_MASK, NULL, HFILL
6392
14
        } },
6393
6394
14
        { &hf_mpeg_descr_content_identifier_crid_location, {
6395
14
            "CRID Location", "mpeg_descr.content_identifier.crid_location",
6396
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_content_identifier_crid_location_vals),
6397
14
            MPEG_DESCR_CONTENT_IDENTIFIER_CRID_LOCATION_MASK, NULL, HFILL
6398
14
        } },
6399
6400
14
        { &hf_mpeg_descr_content_identifier_crid_length, {
6401
14
            "CRID Length", "mpeg_descr.content_identifier.crid_len",
6402
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
6403
14
        } },
6404
6405
14
        { &hf_mpeg_descr_content_identifier_crid_bytes, {
6406
14
            "CRID Bytes", "mpeg_descr.content_identifier.crid_bytes",
6407
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
6408
14
        } },
6409
6410
14
        { &hf_mpeg_descr_content_identifier_cird_ref, {
6411
14
            "CRID Reference", "mpeg_descr.content_identifier.crid_ref",
6412
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
6413
14
        } },
6414
6415
        /* 0x7D XAIT Content Location Descriptor */
6416
14
        { &hf_mpeg_descr_xait_onid, {
6417
14
            "Original Network ID", "mpeg_descr.xait.onid",
6418
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
6419
14
        } },
6420
6421
14
        { &hf_mpeg_descr_xait_sid, {
6422
14
            "Service ID", "mpeg_descr.xait.sid",
6423
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
6424
14
        } },
6425
6426
14
        { &hf_mpeg_descr_xait_version_number, {
6427
14
            "Version Number", "mpeg_descr.xait.version",
6428
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_XAIT_VERSION_NUM_MASK, NULL, HFILL
6429
14
        } },
6430
6431
14
        { &hf_mpeg_descr_xait_update_policy, {
6432
14
            "Update Policy", "mpeg_descr.xait.update_policy",
6433
14
            FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(mpeg_descr_xait_update_policy_vals),
6434
14
            MPEG_DESCR_XAIT_UPDATE_POLICY_MASK, NULL, HFILL
6435
14
        } },
6436
6437
        /* 0x7E FTA Content Management Descriptor */
6438
14
        { &hf_mpeg_descr_fta_user_defined, {
6439
14
            "User Defined", "mpeg_descr.fta.user_defined",
6440
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_FTA_USER_DEFINED_MASK, NULL, HFILL
6441
14
        } },
6442
6443
14
        { &hf_mpeg_descr_fta_reserved_future_use, {
6444
14
            "Reserved Future Use", "mpeg_descr.fta.reserved",
6445
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_FTA_RESERVED_MASK, NULL, HFILL
6446
14
        } },
6447
6448
14
        { &hf_mpeg_descr_fta_do_not_scramble, {
6449
14
            "Do Not Scramble Flag", "mpeg_descr.fta.scramble",
6450
14
            FT_BOOLEAN, 8, TFS(&tfs_fta_do_not_scramble), MPEG_DESCR_FTA_DO_NOT_SCRAMBLE_MASK, NULL, HFILL
6451
14
        } },
6452
6453
14
        { &hf_mpeg_descr_fta_control_remote_access_over_internet, {
6454
14
            "Control Remote Access Over Internet", "mpeg_descr.fta.remote",
6455
14
            FT_UINT8, BASE_HEX, VALS(fta_control_remote_access_over_internet_vals),
6456
14
            MPEG_DESCR_FTA_REMOTE_MASK, NULL, HFILL
6457
14
        } },
6458
6459
14
        { &hf_mpeg_descr_fta_do_not_apply_revocation, {
6460
14
            "Do Not Apply Revocation Flag", "mpeg_descr.fta.revocation",
6461
14
            FT_BOOLEAN, 8, TFS(&tfs_fta_do_not_apply_revocation), MPEG_DESCR_FTA_REVOCATION_MASK, NULL, HFILL
6462
14
        } },
6463
6464
        /* 0x7F Extension Descriptor (ETSI) */
6465
14
        { &hf_mpeg_descr_etsi_extension_tag_extension, {
6466
14
            "Descriptor Tag Extension", "mpeg_descr.ext.tag",
6467
14
            FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_etsi_extension_tag_extension_vals_ext, 0, NULL, HFILL
6468
14
        } },
6469
6470
14
        { &hf_mpeg_descr_etsi_extension_data, {
6471
14
            "Descriptor Extension Data", "mpeg_descr.ext.data",
6472
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
6473
14
        } },
6474
6475
        /* Supplementary Audio Descriptor (part of Extension Descriptor) */
6476
14
        { &hf_mpeg_descr_etsi_extension_supp_audio_mix_type, {
6477
14
            "Mix type", "mpeg_descr.ext.supp_audio.mix_type",
6478
14
            FT_UINT8, BASE_HEX, VALS(supp_audio_mix_type_vals), 0x80, NULL, HFILL
6479
14
        } },
6480
6481
14
        { &hf_mpeg_descr_etsi_extension_supp_audio_ed_cla, {
6482
14
            "Editorial classification", "mpeg_descr.ext.supp_audio.ed_cla",
6483
14
            FT_UINT8, BASE_HEX, VALS(supp_audio_ed_cla), 0x7C, NULL, HFILL
6484
14
        } },
6485
6486
14
        { &hf_mpeg_descr_etsi_extension_supp_audio_lang_code_present, {
6487
14
            "Language code present", "mpeg_descr.ext.supp_audio.lang_code_present",
6488
14
            FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL
6489
14
        } },
6490
6491
14
        { &hf_mpeg_descr_etsi_extension_supp_audio_lang_code, {
6492
14
            "ISO 639 language code", "mpeg_descr.ext.supp_audio.lang_code",
6493
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
6494
14
        } },
6495
6496
14
        { &hf_mpeg_descr_etsi_private_data, {
6497
14
            "Private data", "mpeg_descr.private_data",
6498
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
6499
14
        } },
6500
6501
        /* 0x81 ATSC A/52 AC-3 Descriptor */
6502
14
        { &hf_mpeg_descr_ac3_sysa_srate, {
6503
14
            "Sample Rate", "mpeg_descr.ac3.sysa_sample_rate",
6504
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_ac3_sysa_srate_flag_vals),
6505
14
            MPEG_DESCR_AC3_SYSA_SRATE_MASK, NULL, HFILL
6506
14
        } },
6507
6508
14
        { &hf_mpeg_descr_ac3_sysa_bsid, {
6509
14
            "bsid", "mpeg_descr.ac3.sysa_bsid",
6510
14
            FT_UINT8, BASE_HEX, NULL,  MPEG_DESCR_AC3_SYSA_BSID_MASK, NULL, HFILL
6511
14
        } },
6512
6513
14
        { &hf_mpeg_descr_ac3_sysa_bitrate_limit, {
6514
14
            "Bitrate Code limit type", "mpeg_descr.ac3.sysa_bitrate_code_limit",
6515
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_ac3_sysa_bitrate_code_limit_vals),
6516
14
            MPEG_DESCR_AC3_SYSA_BITRATE_CODE_LIMIT_MASK, NULL, HFILL
6517
14
        } },
6518
6519
14
        { &hf_mpeg_descr_ac3_sysa_bitrate, {
6520
14
            "Bitrate Code", "mpeg_descr.ac3.sysa_bitrate_code",
6521
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_ac3_sysa_bitrate_code_vals),
6522
14
            MPEG_DESCR_AC3_SYSA_BITRATE_CODE_MASK, NULL, HFILL
6523
14
        } },
6524
6525
14
        { &hf_mpeg_descr_ac3_sysa_surround, {
6526
14
            "Surround Mode", "mpeg_descr.ac3.sysa_surround_mode",
6527
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_ac3_sysa_surround_mode_vals),
6528
14
            MPEG_DESCR_AC3_SYSA_SURROUND_MODE_MASK, NULL, HFILL
6529
14
        } },
6530
6531
14
        { &hf_mpeg_descr_ac3_sysa_bsmod, {
6532
14
            "Bsmod", "mpeg_descr.ac3.sysa_bsmod",
6533
14
            FT_UINT8, BASE_HEX, NULL,  MPEG_DESCR_AC3_SYSA_BSMOD_MASK, NULL, HFILL
6534
14
        } },
6535
6536
14
        { &hf_mpeg_descr_ac3_sysa_num_channels, {
6537
14
            "Number of Channels", "mpeg_descr.ac3.sysa_num_channels",
6538
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_ac3_sysa_num_channels_vals),
6539
14
            MPEG_DESCR_AC3_SYSA_NUM_CHANNELS_MASK, NULL, HFILL
6540
14
        } },
6541
6542
14
        { &hf_mpeg_descr_ac3_sysa_full_svc, {
6543
14
            "Full Service", "mpeg_descr.ac3.sysa_full_svc",
6544
14
            FT_UINT8, BASE_HEX, NULL,  MPEG_DESCR_AC3_SYSA_FULL_SVC_MASK, NULL, HFILL
6545
14
        } },
6546
6547
14
        { &hf_mpeg_descr_ac3_sysa_langcode, {
6548
14
            "Language Code (Deprecated)", "mpeg_descr.ac3.sysa_langcode",
6549
14
            FT_UINT8, BASE_HEX, NULL,  0x0, NULL, HFILL
6550
14
        } },
6551
6552
14
        { &hf_mpeg_descr_ac3_sysa_langcode2, {
6553
14
            "Language Code 2 (Deprecated)", "mpeg_descr.ac3.sysa_langcode2",
6554
14
            FT_UINT8, BASE_HEX, NULL,  0x0, NULL, HFILL
6555
14
        } },
6556
6557
14
        { &hf_mpeg_descr_ac3_sysa_mainid, {
6558
14
            "Main ID", "mpeg_descr.ac3.sysa_mainid",
6559
14
            FT_UINT8, BASE_HEX, NULL,  MPEG_DESCR_AC3_SYSA_MAINID_MASK, NULL, HFILL
6560
14
        } },
6561
6562
14
        { &hf_mpeg_descr_ac3_sysa_priority, {
6563
14
            "Priority", "mpeg_descr.ac3.sysa_priority",
6564
14
            FT_UINT8, BASE_HEX, VALS(mpeg_descr_ac3_sysa_priority_vals),
6565
14
            MPEG_DESCR_AC3_SYSA_PRIORITY_MASK, NULL, HFILL
6566
14
        } },
6567
6568
14
        { &hf_mpeg_descr_ac3_sysa_reserved, {
6569
14
            "Reserved", "mpeg_descr.ac3.sysa_reserved",
6570
14
            FT_UINT8, BASE_HEX, NULL,  MPEG_DESCR_AC3_SYSA_RESERVED_MASK, NULL, HFILL
6571
14
        } },
6572
6573
14
        { &hf_mpeg_descr_ac3_sysa_asvcflags, {
6574
14
            "Associated Service Flags", "mpeg_descr.ac3.sysa_asvcflags",
6575
14
            FT_UINT8, BASE_HEX, NULL,  0xff, NULL, HFILL
6576
14
        } },
6577
6578
14
        { &hf_mpeg_descr_ac3_sysa_textlen, {
6579
14
            "Text length", "mpeg_descr.ac3.sysa_textlen",
6580
14
            FT_UINT8, BASE_HEX, NULL,  MPEG_DESCR_AC3_SYSA_TEXTLEN_MASK, NULL, HFILL
6581
14
        } },
6582
6583
14
        { &hf_mpeg_descr_ac3_sysa_textcode, {
6584
14
            "Text Code", "mpeg_descr.ac3.sysa_textcode",
6585
14
            FT_UINT8, BASE_HEX, NULL,  MPEG_DESCR_AC3_SYSA_TEXTCODE_MASK, NULL, HFILL
6586
14
        } },
6587
6588
14
        { &hf_mpeg_descr_ac3_sysa_lang1, {
6589
14
            "Language 1 Present", "mpeg_descr.ac3.sysa_lang1",
6590
14
            FT_UINT8, BASE_HEX, NULL,  MPEG_DESCR_AC3_SYSA_LANG1_MASK, NULL, HFILL
6591
14
        } },
6592
6593
14
        { &hf_mpeg_descr_ac3_sysa_lang2, {
6594
14
            "Language 2 Present", "mpeg_descr.ac3.sysa_lang2",
6595
14
            FT_UINT8, BASE_HEX, NULL,  MPEG_DESCR_AC3_SYSA_LANG2_MASK, NULL, HFILL
6596
14
        } },
6597
6598
14
        { &hf_mpeg_descr_ac3_sysa_lang1_bytes, {
6599
14
            "Language 1 ISO 639 language code", "mpeg_descr.ac3.sysa_lang1_bytes",
6600
14
            FT_STRING, BASE_NONE, NULL,  0, NULL, HFILL
6601
14
        } },
6602
6603
14
        { &hf_mpeg_descr_ac3_sysa_lang2_bytes, {
6604
14
            "Language 2 ISO 639 language code", "mpeg_descr.ac3.sysa_lang2_bytes",
6605
14
            FT_STRING, BASE_NONE, NULL,  0, NULL, HFILL
6606
14
        } },
6607
6608
        /* 0x83 NorDig Logical Channel Descriptor (version 1) */
6609
14
        { &hf_mpeg_descr_nordig_lcd_v1_service_list_id, {
6610
14
            "Service ID", "mpeg_descr.nordig.lcd.svc_list.id",
6611
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
6612
14
        } },
6613
6614
14
        { &hf_mpeg_descr_nordig_lcd_v1_service_list_visible_service_flag, {
6615
14
            "Visible", "mpeg_descr.nordig.lcd.svc_list.visible",
6616
14
            FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_NORDIG_LCD_V1_VISIBLE_SERVICE_FLAG_MASK, NULL, HFILL
6617
14
        } },
6618
6619
14
        { &hf_mpeg_descr_nordig_lcd_v1_service_list_reserved, {
6620
14
            "Reserved", "mpeg_descr.nordig.lcd.svc_list.reserved",
6621
14
            FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_NORDIG_LCD_V1_RESERVED_MASK, NULL, HFILL
6622
14
        } },
6623
6624
14
        { &hf_mpeg_descr_nordig_lcd_v1_service_list_logical_channel_number, {
6625
14
            "Logical Channel Number", "mpeg_descr.nordig.lcd.svc_list.lcn",
6626
14
            FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_NORDIG_LCD_V1_LCN_MASK, NULL, HFILL
6627
14
        } },
6628
6629
        /* 0x87 NorDig Logical Channel Descriptor (version 2) */
6630
14
        { &hf_mpeg_descr_nordig_lcd_v2_channel_list_id, {
6631
14
            "Channel List ID", "mpeg_descr.nordig.lcd.ch_list.id",
6632
14
            FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
6633
14
        } },
6634
6635
14
        { &hf_mpeg_descr_nordig_lcd_v2_channel_list_name_length, {
6636
14
            "Channel List Name Length", "mpeg_descr.nordig.lcd.ch_list.name_length",
6637
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
6638
14
        } },
6639
6640
14
        { &hf_mpeg_descr_nordig_lcd_v2_channel_list_name_encoding, {
6641
14
            "Channel List Name Encoding", "mpeg_descr.nordig.lcd.ch_list.name_enc",
6642
14
            FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
6643
14
        } },
6644
6645
14
        { &hf_mpeg_descr_nordig_lcd_v2_channel_list_name, {
6646
14
            "Channel List Name", "mpeg_descr.nordig.lcd.ch_list.name",
6647
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
6648
14
        } },
6649
6650
14
        { &hf_mpeg_descr_nordig_lcd_v2_country_code, {
6651
14
            "Country Code", "mpeg_descr.nordig.lcd.country_code",
6652
14
            FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
6653
14
        } },
6654
6655
14
        { &hf_mpeg_descr_nordig_lcd_v2_descriptor_length, {
6656
14
            "Descriptor Length", "mpeg_descr.nordig.lcd.ch_list.descriptor_length",
6657
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
6658
14
        } },
6659
6660
14
        { &hf_mpeg_descr_nordig_lcd_v2_service_id, {
6661
14
            "Service ID", "mpeg_descr.nordig.lcd.svc_list.id",
6662
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
6663
14
        } },
6664
6665
14
        { &hf_mpeg_descr_nordig_lcd_v2_visible_service_flag, {
6666
14
            "Visible", "mpeg_descr.nordig.lcd.svc_list.visible",
6667
14
            FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_NORDIG_LCD_V2_VISIBLE_SERVICE_FLAG_MASK, NULL, HFILL
6668
14
        } },
6669
6670
14
        { &hf_mpeg_descr_nordig_lcd_v2_reserved, {
6671
14
            "Reserved", "mpeg_descr.nordig.lcd.svc_list.reserved",
6672
14
            FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_NORDIG_LCD_V2_RESERVED_MASK, NULL, HFILL
6673
14
        } },
6674
6675
14
        { &hf_mpeg_descr_nordig_lcd_v2_logical_channel_number, {
6676
14
            "Logical Channel Number", "mpeg_descr.nordig.lcd.svc_list.lcn",
6677
14
            FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_NORDIG_LCD_V2_LCN_MASK, NULL, HFILL
6678
14
        } },
6679
6680
        /* 0xA2 Logon Initialize Descriptor */
6681
14
        { &hf_mpeg_descr_logon_initialize_group_id, {
6682
14
            "Group ID", "mpeg_descr.logon_init.group_id",
6683
14
            FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
6684
14
        } },
6685
6686
14
        { &hf_mpeg_descr_logon_initialize_logon_id, {
6687
14
            "Logon ID", "mpeg_descr.logon_init.logon_id",
6688
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
6689
14
        } },
6690
6691
14
        { &hf_mpeg_descr_logon_initialize_continuous_carrier_reserved, {
6692
14
            "Continuous Carrier Reserved", "mpeg_descr.logon_init.continuous_carrier_reserved",
6693
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_CONTINUOUS_CARRIER_RESERVED_MASK, NULL, HFILL
6694
14
        } },
6695
6696
14
        { &hf_mpeg_descr_logon_initialize_continuous_carrier, {
6697
14
            "Continuous Carrier", "mpeg_descr.logon_init.continuous_carrier",
6698
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_CONTINUOUS_CARRIER_MASK, NULL, HFILL
6699
14
        } },
6700
6701
14
        { &hf_mpeg_descr_logon_initialize_security_handshake_required, {
6702
14
            "Security Handshake Required", "mpeg_descr.logon_init.security_handshake_required",
6703
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_SECURITY_HANDSHAKE_REQUIRED_MASK, NULL, HFILL
6704
14
        } },
6705
6706
14
        { &hf_mpeg_descr_logon_initialize_prefix_flag, {
6707
14
            "Prefix Flag", "mpeg_descr.logon_init.prefix_flag",
6708
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_PREFIX_FLAG_MASK, NULL, HFILL
6709
14
        } },
6710
6711
14
        { &hf_mpeg_descr_logon_initialize_data_unit_labelling_flag, {
6712
14
            "Unit Labelling Flag", "mpeg_descr.logon_init.data_unit_labelling_flag",
6713
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_DATA_UNIT_LABELLING_FLAG_MASK, NULL, HFILL
6714
14
        } },
6715
6716
14
        { &hf_mpeg_descr_logon_initialize_mini_slot_flag, {
6717
14
            "Mini Slot Flag", "mpeg_descr.logon_init.mini_slot_flag",
6718
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_MINI_SLOT_FLAG_MASK, NULL, HFILL
6719
14
        } },
6720
6721
14
        { &hf_mpeg_descr_logon_initialize_contention_based_mini_slot_flag, {
6722
14
            "Contention Based Mini Slot Flag", "mpeg_descr.logon_init.contention_based_mini_slot_flag",
6723
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_CONTENTION_BASED_MINI_SLOT_FLAG_MASK, NULL, HFILL
6724
14
        } },
6725
6726
14
        { &hf_mpeg_descr_logon_initialize_capacity_type_flag_reserved, {
6727
14
            "Capacity Type Flag Reserved", "mpeg_descr.logon_init.capacity_type_flag_reserved",
6728
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_CAPACITY_TYPE_FLAG_RESERVED_MASK, NULL, HFILL
6729
14
        } },
6730
6731
14
        { &hf_mpeg_descr_logon_initialize_capacity_type_flag, {
6732
14
            "Capacity Type Flag", "mpeg_descr.logon_init.capacity_type_flag",
6733
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_CAPACITY_TYPE_FLAG_MASK, NULL, HFILL
6734
14
        } },
6735
6736
14
        { &hf_mpeg_descr_logon_initialize_traffic_burst_type, {
6737
14
            "Traffic Burst Type", "mpeg_descr.logon_init.traffic_burst_type",
6738
14
            FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_TRAFFIC_BURST_TYPE_MASK, NULL, HFILL
6739
14
        } },
6740
6741
14
        { &hf_mpeg_descr_logon_initialize_return_trf_pid, {
6742
14
            "Return TRF PID", "mpeg_descr.logon_init.return_trf_pid",
6743
14
            FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_TRF_PID_MASK, NULL, HFILL
6744
14
        } },
6745
6746
14
        { &hf_mpeg_descr_logon_initialize_return_ctrl_mngm_pid_reserved, {
6747
14
            "Return CTRL MNGM PID Reserved", "mpeg_descr.logon_init.return_mngm_pid_reserved",
6748
14
            FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_CTRL_MNGM_PID_RESERVED_MASK, NULL, HFILL
6749
14
        } },
6750
6751
14
        { &hf_mpeg_descr_logon_initialize_return_ctrl_mngm_pid, {
6752
14
            "Return CTRL MNGM PID", "mpeg_descr.logon_init.return_mngm_pid",
6753
14
            FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_CTRL_MNGM_PID_MASK, NULL, HFILL
6754
14
        } },
6755
6756
14
        { &hf_mpeg_descr_logon_initialize_connectivity, {
6757
14
            "Connectivity", "mpeg_descr.logon_init.connectivity",
6758
14
            FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_CONNECTIVITY_MASK, NULL, HFILL
6759
14
        } },
6760
6761
14
        { &hf_mpeg_descr_logon_initialize_return_vpi_reserved, {
6762
14
            "Return VPI Reserved", "mpeg_descr.logon_init.return_vpi_reserved",
6763
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_VPI_RESERVED_MASK, NULL, HFILL
6764
14
        } },
6765
6766
14
        { &hf_mpeg_descr_logon_initialize_return_vpi, {
6767
14
            "Return VPI", "mpeg_descr.logon_init.return_vpi",
6768
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_VPI_MASK, NULL, HFILL
6769
14
        } },
6770
6771
14
        { &hf_mpeg_descr_logon_initialize_return_vci, {
6772
14
            "Return VCI", "mpeg_descr.logon_init.return_vci",
6773
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
6774
14
        } },
6775
6776
14
        { &hf_mpeg_descr_logon_initialize_return_signalling_vpi_reserved, {
6777
14
            "Return Signalling VPI Reserved", "mpeg_descr.logon_init.return_signalling_vpi_reserved",
6778
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_SIGNALLING_VPI_RESERVED_MASK, NULL, HFILL
6779
14
        } },
6780
6781
14
        { &hf_mpeg_descr_logon_initialize_return_signalling_vpi, {
6782
14
            "Return Signalling VPI", "mpeg_descr.logon_init.return_signalling_vpi",
6783
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_SIGNALLING_VPI_MASK, NULL, HFILL
6784
14
        } },
6785
6786
14
        { &hf_mpeg_descr_logon_initialize_return_signalling_vci, {
6787
14
            "Return Signalling VCI", "mpeg_descr.logon_init.return_signalling_vci",
6788
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
6789
14
        } },
6790
6791
14
        { &hf_mpeg_descr_logon_initialize_forward_signalling_vpi_reserved, {
6792
14
            "Forward Signalling VPI Reserved", "mpeg_descr.logon_init.forward_signalling_vpi_reserved",
6793
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_SIGNALLING_VPI_RESERVED_MASK, NULL, HFILL
6794
14
        } },
6795
6796
14
        { &hf_mpeg_descr_logon_initialize_forward_signalling_vpi, {
6797
14
            "Forward Signalling VPI", "mpeg_descr.logon_init.forward_signalling_vpi",
6798
14
            FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_SIGNALLING_VPI_MASK, NULL, HFILL
6799
14
        } },
6800
6801
14
        { &hf_mpeg_descr_logon_initialize_forward_signalling_vci, {
6802
14
            "Forward Signalling VCI", "mpeg_descr.logon_init.forward_signalling_vci",
6803
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
6804
14
        } },
6805
6806
14
        { &hf_mpeg_descr_logon_initialize_cra_level, {
6807
14
            "CRA Level", "mpeg_descr.logon_init.cra_level",
6808
14
            FT_UINT24, BASE_DEC, NULL, 0, NULL, HFILL
6809
14
        } },
6810
6811
14
        { &hf_mpeg_descr_logon_initialize_vbdc_max_reserved, {
6812
14
            "VDBC Max Reserved", "mpeg_descr.logon_init.vdbc_max_reserved",
6813
14
            FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_VDBC_MAX_RESERVED_MASK, NULL, HFILL
6814
14
        } },
6815
6816
14
        { &hf_mpeg_descr_logon_initialize_vbdc_max, {
6817
14
            "VDBC Max", "mpeg_descr.logon_init.vdbc_max",
6818
14
            FT_UINT16, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_VDBC_MAX_MASK, NULL, HFILL
6819
14
        } },
6820
6821
14
        { &hf_mpeg_descr_logon_initialize_rbdc_max, {
6822
14
            "RDBC Max", "mpeg_descr.logon_init.rdbc_max",
6823
14
            FT_UINT24, BASE_DEC, NULL, 0, NULL, HFILL
6824
14
        } },
6825
6826
14
        { &hf_mpeg_descr_logon_initialize_rbdc_timeout, {
6827
14
            "RDBC Timeout", "mpeg_descr.logon_init.rdbc_timeout",
6828
14
            FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
6829
14
        } },
6830
6831
        /* 0xA7 RCS Content Descriptor */
6832
14
        { &hf_mpeg_descr_rcs_content_table_id, {
6833
14
            "Table ID", "mpeg_descr.rcs_content.tid",
6834
14
            FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
6835
14
        } },
6836
6837
        /* 0xCB CI+ Content Label Descriptor */
6838
14
        { &hf_mpeg_descr_ciplus_cl_cb_min, {
6839
14
           "Content byte minimum value", "mpeg_descr.ciplus_content_label.content_byte_min",
6840
14
           FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
6841
14
        } },
6842
6843
14
        { &hf_mpeg_descr_ciplus_cl_cb_max, {
6844
14
           "Content byte maximum value", "mpeg_descr.ciplus_content_label.content_byte_max",
6845
14
           FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
6846
14
        } },
6847
6848
14
        { &hf_mpeg_descr_ciplus_cl_lang, {
6849
14
         "ISO 639 language code", "mpeg_descr.ciplus_content_label.lang_code",
6850
14
         FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
6851
14
        } },
6852
6853
14
        { &hf_mpeg_descr_ciplus_cl_label, {
6854
14
          "Content label", "mpeg_descr.ciplus_content_label.label",
6855
14
          FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
6856
14
        } },
6857
6858
        /* 0xCC CI+ Service Descriptor */
6859
14
        { &hf_mpeg_descr_ciplus_svc_id, {
6860
14
            "Service ID", "mpeg_descr.ciplus_svc.id",
6861
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
6862
14
        } },
6863
6864
14
        { &hf_mpeg_descr_ciplus_svc_type, {
6865
14
            "Service type", "mpeg_descr.ciplus_svc.type",
6866
14
            FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_service_type_vals_ext, 0, NULL, HFILL
6867
14
        } },
6868
6869
14
        { &hf_mpeg_descr_ciplus_svc_visible, {
6870
14
            "Visible Service Flag", "mpeg_descr.ciplus_svc.visible",
6871
14
            FT_UINT16, BASE_HEX, NULL, 0x8000, NULL, HFILL
6872
14
        } },
6873
6874
14
        { &hf_mpeg_descr_ciplus_svc_selectable, {
6875
14
            "Selectable Service Flag", "mpeg_descr.ciplus_svc.selectable",
6876
14
            FT_UINT16, BASE_HEX, NULL, 0x4000, NULL, HFILL
6877
14
        } },
6878
6879
14
        { &hf_mpeg_descr_ciplus_svc_lcn, {
6880
14
            "Logical Channel Number", "mpeg_descr.ciplus_svc.lcn",
6881
14
            FT_UINT16, BASE_DEC, NULL, 0x3FFF, NULL, HFILL
6882
14
        } },
6883
6884
14
        { &hf_mpeg_descr_ciplus_svc_prov_name, {
6885
14
            "Service Provider Name", "mpeg_descr.ciplus_svc.provider_name",
6886
14
            FT_UINT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
6887
14
        } },
6888
6889
14
        { &hf_mpeg_descr_ciplus_svc_name, {
6890
14
            "Service Name", "mpeg_descr.ciplus_svc.name",
6891
14
            FT_UINT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
6892
14
        } },
6893
6894
14
        { &hf_mpeg_descr_ciplus_prot_free_ci_mode, {
6895
14
            "Free CI mode", "mpeg_descr.ciplus_prot.free_ci_mode",
6896
14
            FT_BOOLEAN, 8, TFS(&tfs_prot_noprot), 0x80, NULL, HFILL
6897
14
        } },
6898
6899
14
        { &hf_mpeg_descr_ciplus_prot_match_brand_flag, {
6900
14
            "Match brand flag", "mpeg_descr.ciplus_prot.match_brand_flag",
6901
14
            FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x40, NULL, HFILL
6902
14
        } },
6903
6904
14
        { &hf_mpeg_descr_ciplus_prot_num_entries, {
6905
14
            "Number of entries", "mpeg_descr.ciplus_prot.num_entries",
6906
14
            FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
6907
14
        } },
6908
6909
14
        { &hf_mpeg_descr_ciplus_prot_brand_id, {
6910
14
            "CICAM brand identifier", "mpeg_descr.ciplus_prot.brand_id",
6911
14
            FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
6912
14
        } }
6913
14
    };
6914
6915
14
    static int *ett[] = {
6916
14
        &ett_mpeg_descriptor,
6917
14
        &ett_mpeg_descriptor_extended_event_item,
6918
14
        &ett_mpeg_descriptor_component_content_type,
6919
14
        &ett_mpeg_descriptor_content_nibble,
6920
14
        &ett_mpeg_descriptor_multilng_network_name_desc_lng,
6921
14
        &ett_mpeg_descriptor_multilng_bouquet_name_desc_lng,
6922
14
        &ett_mpeg_descriptor_multilng_srv_name_desc_lng,
6923
14
        &ett_mpeg_descriptor_multilng_component_desc_lng,
6924
14
        &ett_mpeg_descriptor_country_availability_countries,
6925
14
        &ett_mpeg_descriptor_nvod_reference_triplet,
6926
14
        &ett_mpeg_descriptor_vbi_data_service,
6927
14
        &ett_mpeg_descriptor_srv_avail_cells,
6928
14
        &ett_mpeg_descriptor_tva,
6929
14
        &ett_mpeg_descriptor_content_identifier_crid,
6930
14
        &ett_mpeg_descriptor_mosaic_logical_cell,
6931
14
        &ett_mpeg_descriptor_mosaic_elementary_cells,
6932
14
        &ett_mpeg_descriptor_service_list,
6933
14
        &ett_mpeg_descriptor_telephone_number,
6934
14
        &ett_mpeg_descriptor_pdc_pil,
6935
14
        &ett_mpeg_descriptor_nordig_lcd_v1_service_list,
6936
14
        &ett_mpeg_descriptor_nordig_lcd_v2_channel_list_list,
6937
14
        &ett_mpeg_descriptor_nordig_lcd_v2_service_list,
6938
14
        &ett_mpeg_descriptor_ac3_component_type,
6939
14
        &ett_mpeg_descriptor_linkage_population_id
6940
14
    };
6941
6942
14
    proto_mpeg_descriptor = proto_register_protocol("MPEG2 Descriptors", "MPEG Descriptor", "mpeg_descr");
6943
14
    proto_register_field_array(proto_mpeg_descriptor, hf, array_length(hf));
6944
14
    proto_register_subtree_array(ett, array_length(ett));
6945
6946
14
    iso_ext_tag_table = register_dissector_table("mpeg_descr.iso_ext.tag", "MPEG Descriptor ISO Extension tag", proto_mpeg_descriptor, FT_UINT8, BASE_HEX);
6947
14
}
6948
6949
/*
6950
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
6951
 *
6952
 * Local variables:
6953
 * c-basic-offset: 4
6954
 * tab-width: 8
6955
 * indent-tabs-mode: nil
6956
 * End:
6957
 *
6958
 * vi: set shiftwidth=4 tabstop=8 expandtab:
6959
 * :indentSize=4:tabSize=8:noTabs=true:
6960
 */