aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mp4ves.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2009-01-28 21:52:57 +0000
committerBill Meier <wmeier@newsguy.com>2009-01-28 21:52:57 +0000
commit0e1613fbe598912370b0b57b0fec0e8bbc33a04a (patch)
treed9f7c69a0c0818a539cd0a3ff9d6e7768a5f13fb /epan/dissectors/packet-mp4ves.c
parent3c11319ea43806d417003c7b2fd825e6b3759c67 (diff)
Minor changes mostly related to proto_register & proto_reg_handoff;
- Use 'dissector standard template format' - Remove 'once-only' ["if (!initialized) ..."] if not req'd - Misc Also: adjust some indentation svn path=/trunk/; revision=27324
Diffstat (limited to 'epan/dissectors/packet-mp4ves.c')
-rw-r--r--epan/dissectors/packet-mp4ves.c458
1 files changed, 231 insertions, 227 deletions
diff --git a/epan/dissectors/packet-mp4ves.c b/epan/dissectors/packet-mp4ves.c
index ad9fdfd61e..ba252b39bf 100644
--- a/epan/dissectors/packet-mp4ves.c
+++ b/epan/dissectors/packet-mp4ves.c
@@ -77,88 +77,88 @@ Table G-1 FLC table for profile_and_level_indication Profile/Level Code
*/
const value_string mp4ves_level_indication_vals[] =
{
- { 0, "Reserved" },
- { 1, "Simple Profile/Level 1" },
- { 2, "Simple Profile/Level 2" },
- { 3, "Reserved" },
- { 4, "Reserved" },
- { 5, "Reserved" },
- { 6, "Reserved" },
- { 7, "Reserved" },
- { 8, "Simple Profile/Level 0" },
- { 9, "Simple Profile/Level 0b" },
- /* Reserved 00001001 - 00010000 */
- { 0x11, "Simple Scalable Profile/Level 1" },
- { 0x12, "Simple Scalable Profile/Level 2" },
- /* Reserved 00010011 - 00100000 */
- { 0x21, "Core Profile/Level 1" },
- { 0x22, "Core Profile/Level 2" },
- /* Reserved 00100011 - 00110001 */
- { 0x32, "Main Profile/Level 2" },
- { 0x33, "Main Profile/Level 3" },
- { 0x34, "Main Profile/Level 4" },
- /* Reserved 00110101 - 01000001 */
- { 0x42, "N-bit Profile/Level 2" },
- /* Reserved 01000011 - 01010000 */
- { 0x51, "Scalable Texture Profile/Level 1" },
- /* Reserved 01010010 - 01100000 */
- { 0x61, "Simple Face Animation Profile/Level 1" },
- { 0x62, "Simple Face Animation Profile/Level 2" },
- { 0x63, "Simple FBA Profile/Level 1" },
- { 0x64, "Simple FBA Profile/Level 2" },
- /* Reserved 01100101 - 01110000 */
- { 0x71, "Basic Animated Texture Profile/Level 1" },
- { 0x72, "Basic Animated Texture Profile/Level 2" },
- /* Reserved 01110011 - 10000000 */
- { 0x81, "Hybrid Profile/Level 1" },
- { 0x82, "Hybrid Profile/Level 2" },
- /* Reserved 10000011 - 10010000 */
- { 0x91, "Advanced Real Time Simple Profile/Level 1" },
- { 0x92, "Advanced Real Time Simple Profile/Level 2" },
- { 0x93, "Advanced Real Time Simple Profile/Level 3" },
- { 0x94, "Advanced Real Time Simple Profile/Level 4" },
- /* Reserved 10010101 - 10100000 */
- { 0xa1, "Core Scalable Profile/Level 1" },
- { 0xa2, "Core Scalable Profile/Level 2" },
- { 0xa3, "Core Scalable Profile/Level 3" },
- /* Reserved 10100100 - 10110000 */
- { 0xb1, "Advanced Coding Efficiency Profile/Level 1" },
- { 0xb2, "Advanced Coding Efficiency Profile/Level 2" },
- { 0xb3, "Advanced Coding Efficiency Profile/Level 3" },
- { 0xb4, "Advanced Coding Efficiency Profile/Level 4" },
- /* Reserved 10110101 - 11000000 */
- { 0xc1, "Advanced Core Profile/Level 1" },
- { 0xc2, "Advanced Core Profile/Level 2" },
- /* Reserved 11000011 - 11010000 */
- { 0xd1, "Advanced Scalable Texture/Level 1" },
- { 0xd2, "Advanced Scalable Texture/Level 2" },
- { 0xd3, "Advanced Scalable Texture/Level 3" },
- /* Reserved 11010100 - 11100000 */
- { 0xe1, "Simple Studio Profile/Level 1" },
- { 0xe2, "Simple Studio Profile/Level 2" },
- { 0xe3, "Simple Studio Profile/Level 3" },
- { 0xe4, "Simple Studio Profile/Level 4" },
- { 0xe5, "Core Studio Profile/Level 1" },
- { 0xe6, "Core Studio Profile/Level 2" },
- { 0xe7, "Core Studio Profile/Level 3" },
- { 0xe8, "Core Studio Profile/Level 4" },
- /* Reserved 11101001 - 11101111 */
- { 0xf0, "Advanced Simple Profile/Level 0" },
- { 0xf1, "Advanced Simple Profile/Level 1" },
- { 0xf2, "Advanced Simple Profile/Level 2" },
- { 0xf3, "Advanced Simple Profile/Level 3" },
- { 0xf4, "Advanced Simple Profile/Level 4" },
- { 0xf5, "Advanced Simple Profile/Level 5" },
- /* Reserved 11110110 - 11110111 */
- { 0xf8, "Fine Granularity Scalable Profile/Level 0" },
- { 0xf9, "Fine Granularity Scalable Profile/Level 1" },
- { 0xfa, "Fine Granularity Scalable Profile/Level 2" },
- { 0xfb, "Fine Granularity Scalable Profile/Level 3" },
- { 0xfc, "Fine Granularity Scalable Profile/Level 4" },
- { 0xfd, "Fine Granularity Scalable Profile/Level 5" },
- { 0xfe, "Reserved" },
- { 0xff, "Reserved for Escape" },
- { 0, NULL },
+ { 0, "Reserved" },
+ { 1, "Simple Profile/Level 1" },
+ { 2, "Simple Profile/Level 2" },
+ { 3, "Reserved" },
+ { 4, "Reserved" },
+ { 5, "Reserved" },
+ { 6, "Reserved" },
+ { 7, "Reserved" },
+ { 8, "Simple Profile/Level 0" },
+ { 9, "Simple Profile/Level 0b" },
+ /* Reserved 00001001 - 00010000 */
+ { 0x11, "Simple Scalable Profile/Level 1" },
+ { 0x12, "Simple Scalable Profile/Level 2" },
+ /* Reserved 00010011 - 00100000 */
+ { 0x21, "Core Profile/Level 1" },
+ { 0x22, "Core Profile/Level 2" },
+ /* Reserved 00100011 - 00110001 */
+ { 0x32, "Main Profile/Level 2" },
+ { 0x33, "Main Profile/Level 3" },
+ { 0x34, "Main Profile/Level 4" },
+ /* Reserved 00110101 - 01000001 */
+ { 0x42, "N-bit Profile/Level 2" },
+ /* Reserved 01000011 - 01010000 */
+ { 0x51, "Scalable Texture Profile/Level 1" },
+ /* Reserved 01010010 - 01100000 */
+ { 0x61, "Simple Face Animation Profile/Level 1" },
+ { 0x62, "Simple Face Animation Profile/Level 2" },
+ { 0x63, "Simple FBA Profile/Level 1" },
+ { 0x64, "Simple FBA Profile/Level 2" },
+ /* Reserved 01100101 - 01110000 */
+ { 0x71, "Basic Animated Texture Profile/Level 1" },
+ { 0x72, "Basic Animated Texture Profile/Level 2" },
+ /* Reserved 01110011 - 10000000 */
+ { 0x81, "Hybrid Profile/Level 1" },
+ { 0x82, "Hybrid Profile/Level 2" },
+ /* Reserved 10000011 - 10010000 */
+ { 0x91, "Advanced Real Time Simple Profile/Level 1" },
+ { 0x92, "Advanced Real Time Simple Profile/Level 2" },
+ { 0x93, "Advanced Real Time Simple Profile/Level 3" },
+ { 0x94, "Advanced Real Time Simple Profile/Level 4" },
+ /* Reserved 10010101 - 10100000 */
+ { 0xa1, "Core Scalable Profile/Level 1" },
+ { 0xa2, "Core Scalable Profile/Level 2" },
+ { 0xa3, "Core Scalable Profile/Level 3" },
+ /* Reserved 10100100 - 10110000 */
+ { 0xb1, "Advanced Coding Efficiency Profile/Level 1" },
+ { 0xb2, "Advanced Coding Efficiency Profile/Level 2" },
+ { 0xb3, "Advanced Coding Efficiency Profile/Level 3" },
+ { 0xb4, "Advanced Coding Efficiency Profile/Level 4" },
+ /* Reserved 10110101 - 11000000 */
+ { 0xc1, "Advanced Core Profile/Level 1" },
+ { 0xc2, "Advanced Core Profile/Level 2" },
+ /* Reserved 11000011 - 11010000 */
+ { 0xd1, "Advanced Scalable Texture/Level 1" },
+ { 0xd2, "Advanced Scalable Texture/Level 2" },
+ { 0xd3, "Advanced Scalable Texture/Level 3" },
+ /* Reserved 11010100 - 11100000 */
+ { 0xe1, "Simple Studio Profile/Level 1" },
+ { 0xe2, "Simple Studio Profile/Level 2" },
+ { 0xe3, "Simple Studio Profile/Level 3" },
+ { 0xe4, "Simple Studio Profile/Level 4" },
+ { 0xe5, "Core Studio Profile/Level 1" },
+ { 0xe6, "Core Studio Profile/Level 2" },
+ { 0xe7, "Core Studio Profile/Level 3" },
+ { 0xe8, "Core Studio Profile/Level 4" },
+ /* Reserved 11101001 - 11101111 */
+ { 0xf0, "Advanced Simple Profile/Level 0" },
+ { 0xf1, "Advanced Simple Profile/Level 1" },
+ { 0xf2, "Advanced Simple Profile/Level 2" },
+ { 0xf3, "Advanced Simple Profile/Level 3" },
+ { 0xf4, "Advanced Simple Profile/Level 4" },
+ { 0xf5, "Advanced Simple Profile/Level 5" },
+ /* Reserved 11110110 - 11110111 */
+ { 0xf8, "Fine Granularity Scalable Profile/Level 0" },
+ { 0xf9, "Fine Granularity Scalable Profile/Level 1" },
+ { 0xfa, "Fine Granularity Scalable Profile/Level 2" },
+ { 0xfb, "Fine Granularity Scalable Profile/Level 3" },
+ { 0xfc, "Fine Granularity Scalable Profile/Level 4" },
+ { 0xfd, "Fine Granularity Scalable Profile/Level 5" },
+ { 0xfe, "Reserved" },
+ { 0xff, "Reserved for Escape" },
+ { 0, NULL },
};
static const range_string mp4ves_startcode_vals[] = {
{ 0x00, 0x1f, "video_object_start_code" },
@@ -790,133 +790,102 @@ dissect_mp4ves(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_mp4ves_par_profile(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_)
{
- int offset = 0;
- guint16 lvl;
- const gchar *p = NULL;
- asn1_ctx_t *actx;
-
- actx = get_asn1_ctx(pinfo->private_data);
- DISSECTOR_ASSERT(actx);
-
- lvl = tvb_get_ntohs(tvb, offset);
- p = match_strval(lvl, VALS(mp4ves_level_indication_vals));
- if (p) {
- proto_item_append_text(actx->created_item, " - profileAndLevel %s", p);
- }
- offset += 2;
- return offset;
+ int offset = 0;
+ guint16 lvl;
+ const gchar *p = NULL;
+ asn1_ctx_t *actx;
+
+ actx = get_asn1_ctx(pinfo->private_data);
+ DISSECTOR_ASSERT(actx);
+
+ lvl = tvb_get_ntohs(tvb, offset);
+ p = match_strval(lvl, VALS(mp4ves_level_indication_vals));
+ if (p) {
+ proto_item_append_text(actx->created_item, " - profileAndLevel %s", p);
+ }
+ offset += 2;
+ return offset;
}
static int
dissect_mp4ves_par_video_object_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_)
{
- int offset = 0;
- guint16 lvl;
- const gchar *p = NULL;
- asn1_ctx_t *actx;
-
- actx = get_asn1_ctx(pinfo->private_data);
- DISSECTOR_ASSERT(actx);
-
- lvl = tvb_get_ntohs(tvb, offset);
- p = match_strval(lvl, VALS(mp4ves_video_object_type_vals));
- if (p) {
- proto_item_append_text(actx->created_item, " - video_object_type %s", p);
- }
- offset += 2;
- return offset;
+ int offset = 0;
+ guint16 lvl;
+ const gchar *p = NULL;
+ asn1_ctx_t *actx;
+
+ actx = get_asn1_ctx(pinfo->private_data);
+ DISSECTOR_ASSERT(actx);
+
+ lvl = tvb_get_ntohs(tvb, offset);
+ p = match_strval(lvl, VALS(mp4ves_video_object_type_vals));
+ if (p) {
+ proto_item_append_text(actx->created_item, " - video_object_type %s", p);
+ }
+ offset += 2;
+ return offset;
}
static int
dissect_mp4ves_par_decoderConfigurationInformation(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_)
{
- asn1_ctx_t *actx;
+ asn1_ctx_t *actx;
- actx = get_asn1_ctx(pinfo->private_data);
- DISSECTOR_ASSERT(actx);
+ actx = get_asn1_ctx(pinfo->private_data);
+ DISSECTOR_ASSERT(actx);
- dissect_mp4ves_config(tvb, pinfo, tree);
+ dissect_mp4ves_config(tvb, pinfo, tree);
- return tvb_length(tvb);
+ return tvb_length(tvb);
}
typedef struct _mp4ves_capability_t {
- const gchar *id;
- const gchar *name;
- new_dissector_t content_pdu;
+ const gchar *id;
+ const gchar *name;
+ new_dissector_t content_pdu;
} mp4ves_capability_t;
static mp4ves_capability_t mp4ves_capability_tab[] = {
- /* ITU-T H.245 capabilities ISO/IEC 14496-2(m*/
- { "GenericCapability/0.0.8.245.1.0.0/nonCollapsing/0", "profileAndLevel", dissect_mp4ves_par_profile },
- { "GenericCapability/0.0.8.245.1.0.0/nonCollapsing/1", "object", dissect_mp4ves_par_video_object_type },
- { "GenericCapability/0.0.8.245.1.0.0/nonCollapsing/2", "decoderConfigurationInformation", dissect_mp4ves_par_decoderConfigurationInformation },
- { "GenericCapability/0.0.8.245.1.0.0/nonCollapsing/3", "drawingOrder", NULL },
- { "GenericCapability/0.0.8.245.1.0.0/collapsing/4", "visualBackChannelHandle", NULL },
- { NULL, NULL, NULL },
+ /* ITU-T H.245 capabilities ISO/IEC 14496-2(m*/
+ { "GenericCapability/0.0.8.245.1.0.0/nonCollapsing/0", "profileAndLevel", dissect_mp4ves_par_profile },
+ { "GenericCapability/0.0.8.245.1.0.0/nonCollapsing/1", "object", dissect_mp4ves_par_video_object_type },
+ { "GenericCapability/0.0.8.245.1.0.0/nonCollapsing/2", "decoderConfigurationInformation", dissect_mp4ves_par_decoderConfigurationInformation },
+ { "GenericCapability/0.0.8.245.1.0.0/nonCollapsing/3", "drawingOrder", NULL },
+ { "GenericCapability/0.0.8.245.1.0.0/collapsing/4", "visualBackChannelHandle", NULL },
+ { NULL, NULL, NULL },
};
static mp4ves_capability_t *find_cap(const gchar *id) {
- mp4ves_capability_t *ftr = NULL;
- mp4ves_capability_t *f;
+ mp4ves_capability_t *ftr = NULL;
+ mp4ves_capability_t *f;
- for (f=mp4ves_capability_tab; f->id; f++) {
- if (!strcmp(id, f->id)) { ftr = f; break; }
- }
- return ftr;
+ for (f=mp4ves_capability_tab; f->id; f++) {
+ if (!strcmp(id, f->id)) { ftr = f; break; }
+ }
+ return ftr;
}
static void
dissect_mp4ves_name(tvbuff_t *tvb _U_, packet_info *pinfo, proto_tree *tree)
{
- asn1_ctx_t *actx;
- mp4ves_capability_t *ftr = NULL;
-
- actx = get_asn1_ctx(pinfo->private_data);
- DISSECTOR_ASSERT(actx);
- if (tree) {
- ftr = find_cap(pinfo->match_string);
- if (ftr) {
- proto_item_append_text(actx->created_item, " - %s", ftr->name);
- proto_item_append_text(proto_item_get_parent(proto_tree_get_parent(tree)), ": %s", ftr->name);
- } else {
- proto_item_append_text(actx->created_item, " - unknown(%s)", pinfo->match_string);
- }
- }
-}
-
-void
-proto_reg_handoff_mp4ves(void)
-{
- static dissector_handle_t mp4ves_handle;
- static guint dynamic_payload_type;
- static gboolean mp4ves_prefs_initialized = FALSE;
+ asn1_ctx_t *actx;
+ mp4ves_capability_t *ftr = NULL;
- if (!mp4ves_prefs_initialized) {
- dissector_handle_t mp4ves_name_handle;
- mp4ves_capability_t *ftr;
-
- mp4ves_handle = find_dissector("mp4ves");
- dissector_add_string("rtp_dyn_payload_type","MP4V-ES", mp4ves_handle);
- mp4ves_prefs_initialized = TRUE;
-
- mp4ves_name_handle = create_dissector_handle(dissect_mp4ves_name, proto_mp4ves);
- for (ftr=mp4ves_capability_tab; ftr->id; ftr++) {
- if (ftr->name)
- dissector_add_string("h245.gef.name", ftr->id, mp4ves_name_handle);
- if (ftr->content_pdu)
- dissector_add_string("h245.gef.content", ftr->id, new_create_dissector_handle(ftr->content_pdu, proto_mp4ves));
+ actx = get_asn1_ctx(pinfo->private_data);
+ DISSECTOR_ASSERT(actx);
+ if (tree) {
+ ftr = find_cap(pinfo->match_string);
+ if (ftr) {
+ proto_item_append_text(actx->created_item, " - %s", ftr->name);
+ proto_item_append_text(proto_item_get_parent(proto_tree_get_parent(tree)), ": %s", ftr->name);
+ } else {
+ proto_item_append_text(actx->created_item, " - unknown(%s)", pinfo->match_string);
}
- }else{
- if ( dynamic_payload_type > 95 )
- dissector_delete("rtp.pt", dynamic_payload_type, mp4ves_handle);
- }
- dynamic_payload_type = global_dynamic_payload_type;
-
- if ( dynamic_payload_type > 95 ){
- dissector_add("rtp.pt", dynamic_payload_type, mp4ves_handle);
}
}
+void
+proto_reg_handoff_mp4ves(void);
void
proto_register_mp4ves(void)
@@ -926,79 +895,79 @@ proto_register_mp4ves(void)
/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{ &hf_mp4ves_config,
- { "Configuration", "mp4ves.configuration",
- FT_BYTES, BASE_NONE, NULL, 0x0,
- "Configuration", HFILL }
+ { "Configuration", "mp4ves.configuration",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ "Configuration", HFILL }
},
{ &hf_mp4ves_start_code_prefix,
- { "start code prefix", "mp4ves.start_code_prefix",
- FT_UINT32, BASE_HEX, NULL, 0x0,
- "start code prefix", HFILL }
+ { "start code prefix", "mp4ves.start_code_prefix",
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ "start code prefix", HFILL }
},
{ &hf_mp4ves_start_code,
- { "Start code", "mp4ves.start_code",
- FT_UINT8, BASE_RANGE_STRING|BASE_HEX, RVALS(&mp4ves_startcode_vals), 0x0,
- "Start code", HFILL }
+ { "Start code", "mp4ves.start_code",
+ FT_UINT8, BASE_RANGE_STRING|BASE_HEX, RVALS(&mp4ves_startcode_vals), 0x0,
+ "Start code", HFILL }
},
{ &hf_mp4ves_vop_coding_type,
- { "vop_coding_type", "mp4ves.vop_coding_type",
- FT_UINT8, BASE_DEC, VALS(mp4ves_vop_coding_type_vals), 0x0,
- "Start code", HFILL }
+ { "vop_coding_type", "mp4ves.vop_coding_type",
+ FT_UINT8, BASE_DEC, VALS(mp4ves_vop_coding_type_vals), 0x0,
+ "Start code", HFILL }
},
{&hf_mp4ves_profile_and_level_indication,
- { "profile_and_level_indication", "mp4ves.profile_and_level_indication",
- FT_UINT8, BASE_DEC,VALS(mp4ves_level_indication_vals), 0x0,
- "profile_and_level_indication", HFILL }
+ { "profile_and_level_indication", "mp4ves.profile_and_level_indication",
+ FT_UINT8, BASE_DEC,VALS(mp4ves_level_indication_vals), 0x0,
+ "profile_and_level_indication", HFILL }
},
{ &hf_mp4ves_is_visual_object_identifier,
- { "visual_object_identifier", "mp4ves.visual_object_identifier",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "visual_object_identifier", HFILL }
+ { "visual_object_identifier", "mp4ves.visual_object_identifier",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "visual_object_identifier", HFILL }
},
{ &hf_mp4ves_visual_object_type,
- { "visual_object_type", "mp4ves.visual_object_type",
- FT_UINT32, BASE_DEC, VALS(mp4ves_visual_object_type_vals), 0x0,
- "visual_object_type", HFILL }
+ { "visual_object_type", "mp4ves.visual_object_type",
+ FT_UINT32, BASE_DEC, VALS(mp4ves_visual_object_type_vals), 0x0,
+ "visual_object_type", HFILL }
},
{ &hf_mp4ves_video_signal_type,
- { "video_signal_type", "mp4ves.video_signal_type",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "video_signal_type", HFILL }
+ { "video_signal_type", "mp4ves.video_signal_type",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "video_signal_type", HFILL }
},
{ &hf_mp4ves_stuffing,
- { "Stuffing", "mp4ves.stuffing",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Stuffing", HFILL }
+ { "Stuffing", "mp4ves.stuffing",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Stuffing", HFILL }
},
{ &hf_mp4ves_video_object_type_indication,
- { "video_object_type_indication", "mp4ves.video_object_type_indication",
- FT_UINT8, BASE_DEC, VALS(mp4ves_video_object_type_indication_vals), 0x0,
- "video_object_type_indication", HFILL }
+ { "video_object_type_indication", "mp4ves.video_object_type_indication",
+ FT_UINT8, BASE_DEC, VALS(mp4ves_video_object_type_indication_vals), 0x0,
+ "video_object_type_indication", HFILL }
},
{ &hf_mp4ves_random_accessible_vol,
- { "random_accessible_vol", "mp4ves.random_accessible_vol",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "video_object_type_indication", HFILL }
+ { "random_accessible_vol", "mp4ves.random_accessible_vol",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "video_object_type_indication", HFILL }
},
{ &hf_mp4ves_is_object_layer_identifier,
- { "is_object_layer_identifier", "mp4ves.is_object_layer_identifier",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "is_object_layer_identifier", HFILL }
+ { "is_object_layer_identifier", "mp4ves.is_object_layer_identifier",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "is_object_layer_identifier", HFILL }
},
{ &hf_mp4ves_aspect_ratio_info,
- { "aspect_ratio_info", "mp4ves.aspect_ratio_info",
- FT_UINT8, BASE_DEC, VALS(mp4ves_aspect_ratio_info_vals), 0x0,
- "aspect_ratio_info", HFILL }
+ { "aspect_ratio_info", "mp4ves.aspect_ratio_info",
+ FT_UINT8, BASE_DEC, VALS(mp4ves_aspect_ratio_info_vals), 0x0,
+ "aspect_ratio_info", HFILL }
},
{ &hf_mp4ves_vol_control_parameters,
- { "vol_control_parameters", "mp4ves.vol_control_parameters",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "vol_control_parameters", HFILL }
+ { "vol_control_parameters", "mp4ves.vol_control_parameters",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "vol_control_parameters", HFILL }
},
{ &hf_mp4ves_video_object_layer_shape,
- { "video_object_layer_shape", "mp4ves.video_object_layer_shape",
- FT_UINT8, BASE_DEC, VALS(mp4ves_video_object_layer_shape_vals), 0x0,
- "video_object_layer_shape", HFILL }
+ { "video_object_layer_shape", "mp4ves.video_object_layer_shape",
+ FT_UINT8, BASE_DEC, VALS(mp4ves_video_object_layer_shape_vals), 0x0,
+ "video_object_layer_shape", HFILL }
},
};
@@ -1023,10 +992,45 @@ proto_register_mp4ves(void)
/* Register a configuration option for port */
mp4ves_module = prefs_register_protocol(proto_mp4ves, proto_reg_handoff_mp4ves);
- prefs_register_uint_preference(mp4ves_module, "dynamic.payload.type",
- "MP4V-ES dynamic payload type",
- "The dynamic payload type which will be interpreted as MP4V-ES",
- 10,
- &global_dynamic_payload_type);
+ prefs_register_uint_preference(mp4ves_module,
+ "dynamic.payload.type",
+ "MP4V-ES dynamic payload type",
+ "The dynamic payload type which will be interpreted as MP4V-ES",
+ 10,
+ &global_dynamic_payload_type);
}
+
+void
+proto_reg_handoff_mp4ves(void)
+{
+ static dissector_handle_t mp4ves_handle;
+ static guint dynamic_payload_type;
+ static gboolean mp4ves_prefs_initialized = FALSE;
+
+ if (!mp4ves_prefs_initialized) {
+ dissector_handle_t mp4ves_name_handle;
+ mp4ves_capability_t *ftr;
+
+ mp4ves_handle = find_dissector("mp4ves");
+ dissector_add_string("rtp_dyn_payload_type","MP4V-ES", mp4ves_handle);
+ mp4ves_prefs_initialized = TRUE;
+
+ mp4ves_name_handle = create_dissector_handle(dissect_mp4ves_name, proto_mp4ves);
+ for (ftr=mp4ves_capability_tab; ftr->id; ftr++) {
+ if (ftr->name)
+ dissector_add_string("h245.gef.name", ftr->id, mp4ves_name_handle);
+ if (ftr->content_pdu)
+ dissector_add_string("h245.gef.content", ftr->id, new_create_dissector_handle(ftr->content_pdu, proto_mp4ves));
+ }
+ }else{
+ if ( dynamic_payload_type > 95 )
+ dissector_delete("rtp.pt", dynamic_payload_type, mp4ves_handle);
+ }
+ dynamic_payload_type = global_dynamic_payload_type;
+
+ if ( dynamic_payload_type > 95 ){
+ dissector_add("rtp.pt", dynamic_payload_type, mp4ves_handle);
+ }
+}
+