gst/mxf/: Some more format string fixes and usage of guint instead of gint where negative values don't make sense.

Original commit message from CVS:
* gst/mxf/mxfdemux.c: (gst_mxf_demux_push_src_event),
(gst_mxf_demux_handle_header_metadata_update_streams):
* gst/mxf/mxfparse.c: (gst_mxf_ul_hash),
(mxf_partition_pack_parse), (mxf_primer_pack_parse),
(mxf_metadata_preface_parse), (mxf_metadata_content_storage_parse),
(mxf_metadata_generic_package_parse),
(mxf_metadata_sequence_parse),
(mxf_metadata_generic_descriptor_parse),
(mxf_metadata_multiple_descriptor_parse):
Some more format string fixes and usage of guint instead of gint
where negative values don't make sense.
This commit is contained in:
Sebastian Dröge 2008-11-22 14:51:06 +00:00
parent f336a478ba
commit e1806aa1ad
3 changed files with 47 additions and 32 deletions

View file

@ -1,3 +1,17 @@
2008-11-22 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* gst/mxf/mxfdemux.c: (gst_mxf_demux_push_src_event),
(gst_mxf_demux_handle_header_metadata_update_streams):
* gst/mxf/mxfparse.c: (gst_mxf_ul_hash),
(mxf_partition_pack_parse), (mxf_primer_pack_parse),
(mxf_metadata_preface_parse), (mxf_metadata_content_storage_parse),
(mxf_metadata_generic_package_parse),
(mxf_metadata_sequence_parse),
(mxf_metadata_generic_descriptor_parse),
(mxf_metadata_multiple_descriptor_parse):
Some more format string fixes and usage of guint instead of gint
where negative values don't make sense.
2008-11-22 Sebastian Dröge <sebastian.droege@collabora.co.uk> 2008-11-22 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* gst/mxf/mxfaes-bwf.c: * gst/mxf/mxfaes-bwf.c:

View file

@ -43,19 +43,19 @@ static GstStaticPadTemplate mxf_sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
); );
static GstStaticPadTemplate audio_src_template = static GstStaticPadTemplate audio_src_template =
GST_STATIC_PAD_TEMPLATE ("audio_%d", GST_STATIC_PAD_TEMPLATE ("audio_%u",
GST_PAD_SRC, GST_PAD_SRC,
GST_PAD_SOMETIMES, GST_PAD_SOMETIMES,
GST_STATIC_CAPS_ANY); GST_STATIC_CAPS_ANY);
static GstStaticPadTemplate video_src_template = static GstStaticPadTemplate video_src_template =
GST_STATIC_PAD_TEMPLATE ("video_%d", GST_STATIC_PAD_TEMPLATE ("video_%u",
GST_PAD_SRC, GST_PAD_SRC,
GST_PAD_SOMETIMES, GST_PAD_SOMETIMES,
GST_STATIC_CAPS_ANY); GST_STATIC_CAPS_ANY);
static GstStaticPadTemplate data_src_template = static GstStaticPadTemplate data_src_template =
GST_STATIC_PAD_TEMPLATE ("data_%d", GST_STATIC_PAD_TEMPLATE ("data_%u",
GST_PAD_SRC, GST_PAD_SRC,
GST_PAD_SOMETIMES, GST_PAD_SOMETIMES,
GST_STATIC_CAPS_ANY); GST_STATIC_CAPS_ANY);
@ -399,7 +399,7 @@ static gboolean
gst_mxf_demux_push_src_event (GstMXFDemux * demux, GstEvent * event) gst_mxf_demux_push_src_event (GstMXFDemux * demux, GstEvent * event)
{ {
gboolean ret = TRUE; gboolean ret = TRUE;
gint i; guint i;
GST_DEBUG_OBJECT (demux, "Pushing '%s' event downstream", GST_DEBUG_OBJECT (demux, "Pushing '%s' event downstream",
GST_EVENT_TYPE_NAME (event)); GST_EVENT_TYPE_NAME (event));
@ -1127,8 +1127,9 @@ gst_mxf_demux_handle_header_metadata_resolve_references (GstMXFDemux * demux)
MXFMetadataEssenceContainerData, i); MXFMetadataEssenceContainerData, i);
for (j = 0; j < demux->content_storage.n_essence_container_data; j++) { for (j = 0; j < demux->content_storage.n_essence_container_data; j++) {
if (mxf_ul_is_equal (&demux->content_storage. if (mxf_ul_is_equal (&demux->
essence_container_data_uids[j], &data->instance_uid)) { content_storage.essence_container_data_uids[j],
&data->instance_uid)) {
demux->content_storage.essence_container_data[j] = data; demux->content_storage.essence_container_data[j] = data;
break; break;
} }
@ -1519,7 +1520,7 @@ choose_package:
GstMXFPad *pad = NULL; GstMXFPad *pad = NULL;
GstCaps *caps = NULL; GstCaps *caps = NULL;
GST_DEBUG_OBJECT (demux, "Handling track %d", i); GST_DEBUG_OBJECT (demux, "Handling track %u", i);
if (!track) { if (!track) {
GST_WARNING_OBJECT (demux, "Unresolved track"); GST_WARNING_OBJECT (demux, "Unresolved track");
@ -1607,20 +1608,20 @@ choose_package:
case MXF_METADATA_TRACK_PICTURE_ESSENCE: case MXF_METADATA_TRACK_PICTURE_ESSENCE:
templ = templ =
gst_element_class_get_pad_template (GST_ELEMENT_GET_CLASS (demux), gst_element_class_get_pad_template (GST_ELEMENT_GET_CLASS (demux),
"video_%d"); "video_%u");
pad_name = g_strdup_printf ("video_%d", source_track->track_id); pad_name = g_strdup_printf ("video_%u", source_track->track_id);
break; break;
case MXF_METADATA_TRACK_SOUND_ESSENCE: case MXF_METADATA_TRACK_SOUND_ESSENCE:
templ = templ =
gst_element_class_get_pad_template (GST_ELEMENT_GET_CLASS (demux), gst_element_class_get_pad_template (GST_ELEMENT_GET_CLASS (demux),
"audio_%d"); "audio_%u");
pad_name = g_strdup_printf ("audio_%d", source_track->track_id); pad_name = g_strdup_printf ("audio_%u", source_track->track_id);
break; break;
case MXF_METADATA_TRACK_DATA_ESSENCE: case MXF_METADATA_TRACK_DATA_ESSENCE:
templ = templ =
gst_element_class_get_pad_template (GST_ELEMENT_GET_CLASS (demux), gst_element_class_get_pad_template (GST_ELEMENT_GET_CLASS (demux),
"data_%d"); "data_%u");
pad_name = g_strdup_printf ("data_%d", source_track->track_id); pad_name = g_strdup_printf ("data_%u", source_track->track_id);
break; break;
default: default:
g_assert_not_reached (); g_assert_not_reached ();

View file

@ -264,7 +264,7 @@ static guint
gst_mxf_ul_hash (const MXFUL * key) gst_mxf_ul_hash (const MXFUL * key)
{ {
guint32 ret = 0; guint32 ret = 0;
gint i; guint i;
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
ret ^= ret ^=
@ -393,7 +393,7 @@ gboolean
mxf_partition_pack_parse (const MXFUL * key, MXFPartitionPack * pack, mxf_partition_pack_parse (const MXFUL * key, MXFPartitionPack * pack,
const guint8 * data, guint size) const guint8 * data, guint size)
{ {
gint i; guint i;
gchar str[48]; gchar str[48];
g_return_val_if_fail (data != NULL, FALSE); g_return_val_if_fail (data != NULL, FALSE);
@ -503,7 +503,7 @@ mxf_partition_pack_parse (const MXFUL * key, MXFPartitionPack * pack,
pack->n_essence_containers); pack->n_essence_containers);
for (i = 0; i < pack->n_essence_containers; i++) { for (i = 0; i < pack->n_essence_containers; i++) {
GST_DEBUG (" essence container %d = %s", i, GST_DEBUG (" essence container %u = %s", i,
mxf_ul_to_string (&pack->essence_containers[i], str)); mxf_ul_to_string (&pack->essence_containers[i], str));
} }
@ -538,7 +538,7 @@ gboolean
mxf_primer_pack_parse (const MXFUL * key, MXFPrimerPack * pack, mxf_primer_pack_parse (const MXFUL * key, MXFPrimerPack * pack,
const guint8 * data, guint size) const guint8 * data, guint size)
{ {
gint i; guint i;
guint32 n; guint32 n;
g_return_val_if_fail (data != NULL, FALSE); g_return_val_if_fail (data != NULL, FALSE);
@ -682,7 +682,7 @@ mxf_metadata_preface_parse (const MXFUL * key,
guint16 tag, tag_size; guint16 tag, tag_size;
const guint8 *tag_data; const guint8 *tag_data;
gchar str[48]; gchar str[48];
gint i; guint i;
g_return_val_if_fail (data != NULL, FALSE); g_return_val_if_fail (data != NULL, FALSE);
@ -845,15 +845,15 @@ mxf_metadata_preface_parse (const MXFUL * key,
GST_DEBUG (" number of DM schemes = %u", preface->n_dm_schemes); GST_DEBUG (" number of DM schemes = %u", preface->n_dm_schemes);
for (i = 0; i < preface->n_identifications; i++) for (i = 0; i < preface->n_identifications; i++)
GST_DEBUG (" identification %d = %s", i, GST_DEBUG (" identification %u = %s", i,
mxf_ul_to_string (&preface->identifications_uids[i], str)); mxf_ul_to_string (&preface->identifications_uids[i], str));
for (i = 0; i < preface->n_essence_containers; i++) for (i = 0; i < preface->n_essence_containers; i++)
GST_DEBUG (" essence container %d = %s", i, GST_DEBUG (" essence container %u = %s", i,
mxf_ul_to_string (&preface->essence_containers[i], str)); mxf_ul_to_string (&preface->essence_containers[i], str));
for (i = 0; i < preface->n_dm_schemes; i++) for (i = 0; i < preface->n_dm_schemes; i++)
GST_DEBUG (" DM schemes %d = %s", i, GST_DEBUG (" DM schemes %u = %s", i,
mxf_ul_to_string (&preface->dm_schemes[i], str)); mxf_ul_to_string (&preface->dm_schemes[i], str));
return TRUE; return TRUE;
@ -1036,7 +1036,7 @@ mxf_metadata_content_storage_parse (const MXFUL * key,
guint16 tag, tag_size; guint16 tag, tag_size;
const guint8 *tag_data; const guint8 *tag_data;
gchar str[48]; gchar str[48];
gint i; guint i;
g_return_val_if_fail (data != NULL, FALSE); g_return_val_if_fail (data != NULL, FALSE);
@ -1124,10 +1124,10 @@ mxf_metadata_content_storage_parse (const MXFUL * key,
content_storage->n_essence_container_data); content_storage->n_essence_container_data);
for (i = 0; i < content_storage->n_packages; i++) for (i = 0; i < content_storage->n_packages; i++)
GST_DEBUG (" package %i = %s", i, GST_DEBUG (" package %u = %s", i,
mxf_ul_to_string (&content_storage->packages_uids[i], str)); mxf_ul_to_string (&content_storage->packages_uids[i], str));
for (i = 0; i < content_storage->n_packages; i++) for (i = 0; i < content_storage->n_packages; i++)
GST_DEBUG (" essence container data %i = %s", i, GST_DEBUG (" essence container data %u = %s", i,
mxf_ul_to_string (&content_storage->essence_container_data_uids[i], mxf_ul_to_string (&content_storage->essence_container_data_uids[i],
str)); str));
@ -1255,7 +1255,7 @@ mxf_metadata_generic_package_parse (const MXFUL * key,
guint16 tag, tag_size; guint16 tag, tag_size;
const guint8 *tag_data; const guint8 *tag_data;
gchar str[96]; gchar str[96];
gint i; guint i;
g_return_val_if_fail (data != NULL, FALSE); g_return_val_if_fail (data != NULL, FALSE);
@ -1368,7 +1368,7 @@ mxf_metadata_generic_package_parse (const MXFUL * key,
GST_DEBUG (" number of tracks = %u", generic_package->n_tracks); GST_DEBUG (" number of tracks = %u", generic_package->n_tracks);
for (i = 0; i < generic_package->n_tracks; i++) for (i = 0; i < generic_package->n_tracks; i++)
GST_DEBUG (" track %d = %s", i, GST_DEBUG (" track %u = %s", i,
mxf_ul_to_string (&generic_package->tracks_uids[i], str)); mxf_ul_to_string (&generic_package->tracks_uids[i], str));
return TRUE; return TRUE;
@ -1561,7 +1561,7 @@ mxf_metadata_sequence_parse (const MXFUL * key,
guint16 tag, tag_size; guint16 tag, tag_size;
const guint8 *tag_data; const guint8 *tag_data;
gchar str[48]; gchar str[48];
gint i; guint i;
g_return_val_if_fail (data != NULL, FALSE); g_return_val_if_fail (data != NULL, FALSE);
@ -1642,7 +1642,7 @@ mxf_metadata_sequence_parse (const MXFUL * key,
sequence->n_structural_components); sequence->n_structural_components);
for (i = 0; i < sequence->n_structural_components; i++) for (i = 0; i < sequence->n_structural_components; i++)
GST_DEBUG (" structural component %d = %s", i, GST_DEBUG (" structural component %u = %s", i,
mxf_ul_to_string (&sequence->structural_components_uids[i], str)); mxf_ul_to_string (&sequence->structural_components_uids[i], str));
@ -1837,7 +1837,7 @@ mxf_metadata_generic_descriptor_parse (const MXFUL * key,
guint16 tag, tag_size; guint16 tag, tag_size;
const guint8 *tag_data; const guint8 *tag_data;
gchar str[48]; gchar str[48];
gint i; guint i;
g_return_val_if_fail (data != NULL, FALSE); g_return_val_if_fail (data != NULL, FALSE);
@ -1899,7 +1899,7 @@ mxf_metadata_generic_descriptor_parse (const MXFUL * key,
GST_DEBUG (" number of locators = %u", descriptor->n_locators); GST_DEBUG (" number of locators = %u", descriptor->n_locators);
for (i = 0; i < descriptor->n_locators; i++) for (i = 0; i < descriptor->n_locators; i++)
GST_DEBUG (" locator %d = %s", i, GST_DEBUG (" locator %u = %s", i,
mxf_ul_to_string (&descriptor->locators_uids[i], str)); mxf_ul_to_string (&descriptor->locators_uids[i], str));
return TRUE; return TRUE;
@ -2528,7 +2528,7 @@ mxf_metadata_multiple_descriptor_parse (const MXFUL * key,
guint16 tag, tag_size; guint16 tag, tag_size;
const guint8 *tag_data; const guint8 *tag_data;
gchar str[48]; gchar str[48];
gint i; guint i;
g_return_val_if_fail (data != NULL, FALSE); g_return_val_if_fail (data != NULL, FALSE);
@ -2583,7 +2583,7 @@ mxf_metadata_multiple_descriptor_parse (const MXFUL * key,
GST_DEBUG ("Parsed multiple descriptor:"); GST_DEBUG ("Parsed multiple descriptor:");
GST_DEBUG (" number of sub descriptors = %u", descriptor->n_sub_descriptors); GST_DEBUG (" number of sub descriptors = %u", descriptor->n_sub_descriptors);
for (i = 0; i < descriptor->n_sub_descriptors; i++) for (i = 0; i < descriptor->n_sub_descriptors; i++)
GST_DEBUG (" sub descriptor %d = %s", i, GST_DEBUG (" sub descriptor %u = %s", i,
mxf_ul_to_string (&descriptor->sub_descriptors_uids[i], str)); mxf_ul_to_string (&descriptor->sub_descriptors_uids[i], str));
return TRUE; return TRUE;