Add a pointer to the start frame of each gop in the gog's tree

svn path=/trunk/; revision=13423
This commit is contained in:
Luis Ontanon 2005-02-18 20:02:40 +00:00
parent 99f52419d5
commit f7a7af313d
3 changed files with 37 additions and 7 deletions

View File

@ -210,6 +210,8 @@ typedef struct _mate_cfg_item {
LoAL* keys;
int hfid_gog_num_of_gops;
int hfid_gog_gop;
int hfid_gog_gopstart;
gint ett_gog_gop;
} mate_cfg_item;

View File

@ -159,7 +159,9 @@ static mate_cfg_item* new_mate_cfg_item(guint8* name) {
new->lifetime = -1.0;
new->hfid_gop_pdu = -1;
new->hfid_gop_num_pdus = -1;
new->ett_gog_gop = -1;
new->hfid_gog_gopstart = -1;
new->gop_index = NULL;
new->gog_index = NULL;
@ -1406,6 +1408,15 @@ static void analyze_gog_config(gpointer k _U_, gpointer v, gpointer p _U_) {
g_array_append_val(matecfg->hfrs,hfri);
hfri.p_id = &(cfg->hfid_gog_gopstart);
hfri.hfinfo.name = "GopStart frame";
hfri.hfinfo.abbrev = g_strdup_printf("mate.%s.GopStart",cfg->name);
hfri.hfinfo.type = FT_FRAMENUM;
hfri.hfinfo.display = BASE_DEC;
hfri.hfinfo.blurb = g_strdup("The start frame of a GOP");
g_array_append_val(matecfg->hfrs,hfri);
hfri.p_id = &(cfg->hfid_start_time);
hfri.hfinfo.name = g_strdup_printf("%s start time",cfg->name);
hfri.hfinfo.abbrev = g_strdup_printf("mate.%s.StartTime",cfg->name);
@ -1467,6 +1478,9 @@ static void analyze_gog_config(gpointer k _U_, gpointer v, gpointer p _U_) {
ett = &cfg->ett_times;
g_array_append_val(matecfg->ett,ett);
ett = &cfg->ett_gog_gop;
g_array_append_val(matecfg->ett,ett);
}
static void analyze_config(void) {

View File

@ -70,9 +70,12 @@ void mate_gog_tree(proto_tree* tree, tvbuff_t *tvb, mate_gog* gog, mate_gop* gop
proto_tree *gog_tree;
proto_item *gog_time_item;
proto_tree *gog_time_tree;
proto_item *gog_gops_item;
proto_tree *gog_gops_tree;
mate_gop* gog_gops;
proto_item *gog_gop_item;
proto_tree *gog_gop_tree;
mate_gop* gog_gops;
#ifdef _MATE_DEBUGGING
proto_item* gog_key_item;
proto_tree* gog_key_tree;
@ -92,21 +95,32 @@ void mate_gog_tree(proto_tree* tree, tvbuff_t *tvb, mate_gog* gog, mate_gop* gop
proto_tree_add_float(gog_time_tree, gog->cfg->hfid_last_time, tvb, 0, 0, gog->last_time - gog->start_time);
}
gog_gop_item = proto_tree_add_uint(gog_tree, gog->cfg->hfid_gog_num_of_gops,
gog_gops_item = proto_tree_add_uint(gog_tree, gog->cfg->hfid_gog_num_of_gops,
tvb, 0, 0, gog->num_of_gops);
gog_gop_tree = proto_item_add_subtree(gog_gop_item, gog->cfg->ett_children);
gog_gops_tree = proto_item_add_subtree(gog_gops_item, gog->cfg->ett_children);
for (gog_gops = gog->gops; gog_gops; gog_gops = gog_gops->next) {
if (gop != gog_gops) {
if (gog->cfg->gop_as_subtree) {
mate_gop_tree(gog_gop_tree, tvb, gog_gops);
mate_gop_tree(gog_gops_tree, tvb, gog_gops);
gog_gop_item = NULL;
} else {
proto_tree_add_uint(gog_gop_tree,gog_gops->cfg->hfid,tvb,0,0,gog_gops->id);
gog_gop_item = proto_tree_add_uint(gog_gops_tree,gog_gops->cfg->hfid,tvb,0,0,gog_gops->id);
if (gop->pdus && gop->cfg->show_pdu_tree == mc->frame_tree) {
gog_gop_tree = proto_item_add_subtree(gog_gop_item, gog->cfg->ett_gog_gop);
proto_tree_add_uint(gog_gop_tree,gog->cfg->hfid_gog_gopstart,tvb,0,0,gog_gops->pdus->frame);
}
}
} else {
proto_tree_add_uint_format(gog_gop_tree,gop->cfg->hfid,tvb,0,0,gop->id,"%s of current frame: %d",gop->cfg->name,gop->id);
gog_gop_item = proto_tree_add_uint_format(gog_gops_tree,gop->cfg->hfid,tvb,0,0,gop->id,"%s of current frame: %d",gop->cfg->name,gop->id);
}
if (gog_gop_item) {
}
}
}