mpeg descriptor: add TVA ID Descriptor (0x75)
This commit is contained in:
parent
70d432c357
commit
581f3142bb
|
@ -125,6 +125,7 @@ static const value_string mpeg_descriptor_tag_vals[] = {
|
|||
/* SID (0x71) from ETSI TS 102 812 */
|
||||
{ 0x71, "Service Identifier Descriptor" },
|
||||
{ 0x72, "Service Availability Descriptor" },
|
||||
/* 0x73...0x76 from ETSI TS 102 323 */
|
||||
{ 0x73, "Default Authority Descriptor" },
|
||||
{ 0x74, "Related Content Descriptor" },
|
||||
{ 0x75, "TVA ID Descriptor" },
|
||||
|
@ -3487,6 +3488,49 @@ proto_mpeg_descriptor_dissect_default_authority(tvbuff_t *tvb, guint offset, gui
|
|||
proto_tree_add_item(tree, hf_mpeg_descr_default_authority_name, tvb, offset, len, ENC_ASCII);
|
||||
}
|
||||
|
||||
/* 0x75 TVA ID Descriptor */
|
||||
static int hf_mpeg_descr_tva_id = -1;
|
||||
static int hf_mpeg_descr_tva_reserved = -1;
|
||||
static int hf_mpeg_descr_tva_running_status = -1;
|
||||
|
||||
static gint ett_mpeg_descriptor_tva = -1;
|
||||
|
||||
#define MPEG_DESCR_TVA_RESREVED_MASK 0xF8
|
||||
#define MPEG_DESCR_TVA_RUNNING_STATUS_MASK 0x07
|
||||
|
||||
static const value_string mpeg_descr_tva_running_status_vals[] = {
|
||||
{ 0, "Reserved" },
|
||||
{ 1, "Not yet running" },
|
||||
{ 2, "Starts (or restarts) shortly" },
|
||||
{ 3, "Paused" },
|
||||
{ 4, "Running" },
|
||||
{ 5, "Cancelled" },
|
||||
{ 6, "Completed" },
|
||||
{ 7, "Reserved" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static void
|
||||
proto_mpeg_descriptor_dissect_tva_id(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
|
||||
{
|
||||
guint end = offset + len;
|
||||
guint tva_cnt = 0;
|
||||
|
||||
proto_tree * tva_tree;
|
||||
|
||||
while (offset < end) {
|
||||
guint id = tvb_get_guint16(tvb, offset, ENC_BIG_ENDIAN);
|
||||
tva_tree = proto_tree_add_subtree_format(tree, tvb, offset, 3, ett_mpeg_descriptor_tva, NULL, "TVA %u (0x%04X)", tva_cnt, id);
|
||||
proto_tree_add_item(tva_tree, hf_mpeg_descr_tva_id, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
offset += 2;
|
||||
tva_cnt += 1;
|
||||
|
||||
proto_tree_add_item(tva_tree, hf_mpeg_descr_tva_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(tva_tree, hf_mpeg_descr_tva_running_status, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
offset += 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* 0x76 Content Identifier Descriptor */
|
||||
static int hf_mpeg_descr_content_identifier_crid_type = -1;
|
||||
static int hf_mpeg_descr_content_identifier_crid_location = -1;
|
||||
|
@ -4531,6 +4575,9 @@ proto_mpeg_descriptor_dissect(tvbuff_t *tvb, guint offset, proto_tree *tree)
|
|||
case 0x73: /* Default Authority Descriptor */
|
||||
proto_mpeg_descriptor_dissect_default_authority(tvb, offset, len, descriptor_tree);
|
||||
break;
|
||||
case 0x75: /* TVA ID Descriptor */
|
||||
proto_mpeg_descriptor_dissect_tva_id(tvb, offset, len, descriptor_tree);
|
||||
break;
|
||||
case 0x76: /* Content Identifier Descriptor */
|
||||
proto_mpeg_descriptor_dissect_content_identifier(tvb, offset, len, descriptor_tree);
|
||||
break;
|
||||
|
@ -6245,6 +6292,23 @@ proto_register_mpeg_descriptor(void)
|
|||
FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
|
||||
} },
|
||||
|
||||
/* 0x75 TVA ID Descriptor */
|
||||
{ &hf_mpeg_descr_tva_id, {
|
||||
"TVA ID", "mpeg_descr.tva.id",
|
||||
FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
|
||||
} },
|
||||
|
||||
{ &hf_mpeg_descr_tva_reserved, {
|
||||
"Reserved", "mpeg_descr.tva.reserved",
|
||||
FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_TVA_RESREVED_MASK, NULL, HFILL
|
||||
} },
|
||||
|
||||
{ &hf_mpeg_descr_tva_running_status, {
|
||||
"Running Status", "mpeg_descr.tva.status",
|
||||
FT_UINT8, BASE_DEC, VALS(mpeg_descr_tva_running_status_vals),
|
||||
MPEG_DESCR_TVA_RUNNING_STATUS_MASK, NULL, HFILL
|
||||
} },
|
||||
|
||||
/* 0x76 Content Identifier Descriptor */
|
||||
{ &hf_mpeg_descr_content_identifier_crid_type, {
|
||||
"CRID Type", "mpeg_descr.content_identifier.crid_type",
|
||||
|
@ -6759,6 +6823,7 @@ proto_register_mpeg_descriptor(void)
|
|||
&ett_mpeg_descriptor_nvod_reference_triplet,
|
||||
&ett_mpeg_descriptor_vbi_data_service,
|
||||
&ett_mpeg_descriptor_srv_avail_cells,
|
||||
&ett_mpeg_descriptor_tva,
|
||||
&ett_mpeg_descriptor_content_identifier_crid,
|
||||
&ett_mpeg_descriptor_mosaic_logical_cell,
|
||||
&ett_mpeg_descriptor_mosaic_elementary_cells,
|
||||
|
|
Loading…
Reference in New Issue