aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-h263.c
diff options
context:
space:
mode:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2005-03-16 20:06:01 +0000
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2005-03-16 20:06:01 +0000
commit13acc1214b3be2af6ccbb63d3747cd076e9213ef (patch)
tree6016271169e915c442c38d99b9094e0ab8b90c23 /epan/dissectors/packet-h263.c
parentd782a461a6ec800fd4cd681da0730a9b7abab8f3 (diff)
Dissect a bit of the payload to, Picture start block and temporal ref.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13776 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-h263.c')
-rw-r--r--epan/dissectors/packet-h263.c57
1 files changed, 50 insertions, 7 deletions
diff --git a/epan/dissectors/packet-h263.c b/epan/dissectors/packet-h263.c
index e0feaf106a..d0ede9b47b 100644
--- a/epan/dissectors/packet-h263.c
+++ b/epan/dissectors/packet-h263.c
@@ -73,6 +73,9 @@ static int hf_h263_hmv1 = -1;
static int hf_h263_vmv1 = -1;
static int hf_h263_hmv2 = -1;
static int hf_h263_vmv2 = -1;
+/* Fields for the data section */
+static int hf_h263_psc = -1;
+static int hf_h263_TR =-1;
static int hf_h263_data = -1;
@@ -96,15 +99,18 @@ static const value_string srcformat_vals[] =
};
/* H.263 fields defining a sub tree */
-static gint ett_h263 = -1;
-
+static gint ett_h263 = -1;
+static gint ett_h263_payload = -1;
static void
dissect_h263( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
{
- proto_item *ti = NULL;
- proto_tree *h263_tree = NULL;
- unsigned int offset = 0;
- unsigned int h263_version = 0;
+ proto_item *ti = NULL;
+ proto_item *h263_payload_item = NULL;
+ proto_tree *h263_tree = NULL;
+ proto_tree *h263_payload_tree = NULL;
+ unsigned int offset = 0;
+ unsigned int h263_version = 0;
+ guint32 data;
h263_version = (tvb_get_guint8( tvb, offset ) & 0xc0 ) >> 6;
@@ -242,7 +248,19 @@ dissect_h263( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
} /* end not mode a */
/* The rest of the packet is the H.263 stream */
- proto_tree_add_item( h263_tree, hf_h263_data, tvb, offset, -1, FALSE );
+ h263_payload_item = proto_tree_add_text(h263_tree,tvb,offset,-1,"H263 Payload");
+ h263_payload_tree = proto_item_add_subtree( h263_payload_item, ett_h263_payload );
+
+ /* Check for PSC, PSC is a word of 22 bits. Its value is 0000 0000 0000 0000' 1000 00xx xxxx xxxx. */
+ data = tvb_get_ntohl(tvb, offset);
+ if (( data & 0xfffffc00) == 0x00008000 ) { /* PSC found */
+ proto_tree_add_uint(h263_payload_tree, hf_h263_psc,tvb, offset,3,data);
+ offset = offset + 2;
+ proto_tree_add_uint(h263_payload_tree, hf_h263_TR,tvb, offset,2,data);
+
+ }
+
+ proto_tree_add_item( h263_payload_tree, hf_h263_data, tvb, offset, -1, FALSE );
}
}
@@ -515,11 +533,36 @@ proto_register_h263(void)
"The H.263 stream including its Picture, GOB or Macro block start code.", HFILL
}
},
+ {
+ &hf_h263_psc,
+ {
+ "H.263 Picture start Code",
+ "h263.psc",
+ FT_UINT32,
+ BASE_HEX,
+ NULL,
+ 0xfffffc00,
+ "Picture start Code, PSC", HFILL
+ }
+ },
+ {
+ &hf_h263_TR,
+ {
+ "H.263 Temporal Reference",
+ "h263.tr2",
+ FT_UINT32,
+ BASE_HEX,
+ NULL,
+ 0x000003fc,
+ "Temporal Reference, TR", HFILL
+ }
+ },
};
static gint *ett[] =
{
&ett_h263,
+ &ett_h263_payload,
};