GF_Err emsg_box_dump(GF_Box *a, FILE * trace)
{
	GF_EventMessageBox *p = (GF_EventMessageBox *) a;

	gf_isom_box_dump_start(a, "EventMessageBox", trace);
	fprintf(trace, "timescale=\"%u\" presentation_time%s=\""LLU"\" event_duration=\"%u\" event_id=\"%u\"",
		p->timescale, (p->version==0) ? "_delta" : "", p->presentation_time_delta, p->event_duration, p->event_id);

	if (p->scheme_id_uri)
		fprintf(trace, " scheme_id_uri=\"%s\"", p->scheme_id_uri);
	if (p->value)
		fprintf(trace, " value=\"%s\"", p->value);

	if (p->message_data)
		dump_data_attribute(trace, " message_data", p->message_data, p->message_data_size);

	gf_fprintf(trace, ">\n");
	gf_isom_box_dump_done("EventMessageBox", a, trace);
	return GF_OK;
}
GF_Err emsg_box_dump(GF_Box *a, FILE * trace)
{
	GF_EventMessageBox *p = (GF_EventMessageBox *) a;

	gf_isom_box_dump_start(a, "EventMessageBox", trace);
	fprintf(trace, "timescale=\"%u\" presentation_time%s=\""LLU"\" event_duration=\"%u\" event_id=\"%u\"",
		p->timescale, (p->version==0) ? "_delta" : "", p->presentation_time_delta, p->event_duration, p->event_id);

	if (p->scheme_id_uri)
		fprintf(trace, " scheme_id_uri=\"%s\"", p->scheme_id_uri);
	if (p->value)
		fprintf(trace, " value=\"%s\"", p->value);

	if (p->message_data)
		dump_data_attribute(trace, " message_data", p->message_data, p->message_data_size);

	gf_fprintf(trace, ">\n");
	gf_isom_box_dump_done("EventMessageBox", a, trace);
	return GF_OK;
}