mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
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:
parent
f336a478ba
commit
e1806aa1ad
3 changed files with 47 additions and 32 deletions
14
ChangeLog
14
ChangeLog
|
@ -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>
|
||||
|
||||
* gst/mxf/mxfaes-bwf.c:
|
||||
|
|
|
@ -43,19 +43,19 @@ static GstStaticPadTemplate mxf_sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
|
|||
);
|
||||
|
||||
static GstStaticPadTemplate audio_src_template =
|
||||
GST_STATIC_PAD_TEMPLATE ("audio_%d",
|
||||
GST_STATIC_PAD_TEMPLATE ("audio_%u",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_SOMETIMES,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
static GstStaticPadTemplate video_src_template =
|
||||
GST_STATIC_PAD_TEMPLATE ("video_%d",
|
||||
GST_STATIC_PAD_TEMPLATE ("video_%u",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_SOMETIMES,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
static GstStaticPadTemplate data_src_template =
|
||||
GST_STATIC_PAD_TEMPLATE ("data_%d",
|
||||
GST_STATIC_PAD_TEMPLATE ("data_%u",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_SOMETIMES,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
@ -399,7 +399,7 @@ static gboolean
|
|||
gst_mxf_demux_push_src_event (GstMXFDemux * demux, GstEvent * event)
|
||||
{
|
||||
gboolean ret = TRUE;
|
||||
gint i;
|
||||
guint i;
|
||||
|
||||
GST_DEBUG_OBJECT (demux, "Pushing '%s' event downstream",
|
||||
GST_EVENT_TYPE_NAME (event));
|
||||
|
@ -1127,8 +1127,9 @@ gst_mxf_demux_handle_header_metadata_resolve_references (GstMXFDemux * demux)
|
|||
MXFMetadataEssenceContainerData, i);
|
||||
|
||||
for (j = 0; j < demux->content_storage.n_essence_container_data; j++) {
|
||||
if (mxf_ul_is_equal (&demux->content_storage.
|
||||
essence_container_data_uids[j], &data->instance_uid)) {
|
||||
if (mxf_ul_is_equal (&demux->
|
||||
content_storage.essence_container_data_uids[j],
|
||||
&data->instance_uid)) {
|
||||
demux->content_storage.essence_container_data[j] = data;
|
||||
break;
|
||||
}
|
||||
|
@ -1519,7 +1520,7 @@ choose_package:
|
|||
GstMXFPad *pad = NULL;
|
||||
GstCaps *caps = NULL;
|
||||
|
||||
GST_DEBUG_OBJECT (demux, "Handling track %d", i);
|
||||
GST_DEBUG_OBJECT (demux, "Handling track %u", i);
|
||||
|
||||
if (!track) {
|
||||
GST_WARNING_OBJECT (demux, "Unresolved track");
|
||||
|
@ -1607,20 +1608,20 @@ choose_package:
|
|||
case MXF_METADATA_TRACK_PICTURE_ESSENCE:
|
||||
templ =
|
||||
gst_element_class_get_pad_template (GST_ELEMENT_GET_CLASS (demux),
|
||||
"video_%d");
|
||||
pad_name = g_strdup_printf ("video_%d", source_track->track_id);
|
||||
"video_%u");
|
||||
pad_name = g_strdup_printf ("video_%u", source_track->track_id);
|
||||
break;
|
||||
case MXF_METADATA_TRACK_SOUND_ESSENCE:
|
||||
templ =
|
||||
gst_element_class_get_pad_template (GST_ELEMENT_GET_CLASS (demux),
|
||||
"audio_%d");
|
||||
pad_name = g_strdup_printf ("audio_%d", source_track->track_id);
|
||||
"audio_%u");
|
||||
pad_name = g_strdup_printf ("audio_%u", source_track->track_id);
|
||||
break;
|
||||
case MXF_METADATA_TRACK_DATA_ESSENCE:
|
||||
templ =
|
||||
gst_element_class_get_pad_template (GST_ELEMENT_GET_CLASS (demux),
|
||||
"data_%d");
|
||||
pad_name = g_strdup_printf ("data_%d", source_track->track_id);
|
||||
"data_%u");
|
||||
pad_name = g_strdup_printf ("data_%u", source_track->track_id);
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
|
|
|
@ -264,7 +264,7 @@ static guint
|
|||
gst_mxf_ul_hash (const MXFUL * key)
|
||||
{
|
||||
guint32 ret = 0;
|
||||
gint i;
|
||||
guint i;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
ret ^=
|
||||
|
@ -393,7 +393,7 @@ gboolean
|
|||
mxf_partition_pack_parse (const MXFUL * key, MXFPartitionPack * pack,
|
||||
const guint8 * data, guint size)
|
||||
{
|
||||
gint i;
|
||||
guint i;
|
||||
gchar str[48];
|
||||
|
||||
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);
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
|
@ -538,7 +538,7 @@ gboolean
|
|||
mxf_primer_pack_parse (const MXFUL * key, MXFPrimerPack * pack,
|
||||
const guint8 * data, guint size)
|
||||
{
|
||||
gint i;
|
||||
guint i;
|
||||
guint32 n;
|
||||
|
||||
g_return_val_if_fail (data != NULL, FALSE);
|
||||
|
@ -682,7 +682,7 @@ mxf_metadata_preface_parse (const MXFUL * key,
|
|||
guint16 tag, tag_size;
|
||||
const guint8 *tag_data;
|
||||
gchar str[48];
|
||||
gint i;
|
||||
guint i;
|
||||
|
||||
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);
|
||||
|
||||
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));
|
||||
|
||||
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));
|
||||
|
||||
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));
|
||||
|
||||
return TRUE;
|
||||
|
@ -1036,7 +1036,7 @@ mxf_metadata_content_storage_parse (const MXFUL * key,
|
|||
guint16 tag, tag_size;
|
||||
const guint8 *tag_data;
|
||||
gchar str[48];
|
||||
gint i;
|
||||
guint i;
|
||||
|
||||
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);
|
||||
|
||||
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));
|
||||
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],
|
||||
str));
|
||||
|
||||
|
@ -1255,7 +1255,7 @@ mxf_metadata_generic_package_parse (const MXFUL * key,
|
|||
guint16 tag, tag_size;
|
||||
const guint8 *tag_data;
|
||||
gchar str[96];
|
||||
gint i;
|
||||
guint i;
|
||||
|
||||
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);
|
||||
|
||||
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));
|
||||
|
||||
return TRUE;
|
||||
|
@ -1561,7 +1561,7 @@ mxf_metadata_sequence_parse (const MXFUL * key,
|
|||
guint16 tag, tag_size;
|
||||
const guint8 *tag_data;
|
||||
gchar str[48];
|
||||
gint i;
|
||||
guint i;
|
||||
|
||||
g_return_val_if_fail (data != NULL, FALSE);
|
||||
|
||||
|
@ -1642,7 +1642,7 @@ mxf_metadata_sequence_parse (const MXFUL * key,
|
|||
sequence->n_structural_components);
|
||||
|
||||
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));
|
||||
|
||||
|
||||
|
@ -1837,7 +1837,7 @@ mxf_metadata_generic_descriptor_parse (const MXFUL * key,
|
|||
guint16 tag, tag_size;
|
||||
const guint8 *tag_data;
|
||||
gchar str[48];
|
||||
gint i;
|
||||
guint i;
|
||||
|
||||
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);
|
||||
|
||||
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));
|
||||
|
||||
return TRUE;
|
||||
|
@ -2528,7 +2528,7 @@ mxf_metadata_multiple_descriptor_parse (const MXFUL * key,
|
|||
guint16 tag, tag_size;
|
||||
const guint8 *tag_data;
|
||||
gchar str[48];
|
||||
gint i;
|
||||
guint i;
|
||||
|
||||
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 (" number of sub descriptors = %u", descriptor->n_sub_descriptors);
|
||||
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));
|
||||
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue