summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@noraisin.net>2009-03-18 10:35:43 +0000
committerJan Schmidt <thaytan@noraisin.net>2009-03-18 10:35:43 +0000
commitcf4485133b741355d97abf4bf784b7af91f9aaba (patch)
tree1a94fd65997af6deec5ca4133190b40e6f276e81 /gst
parente1c71b1b88632c33f9d335529a7ee9b92bd11049 (diff)
downloadgst-plugins-bad-cf4485133b741355d97abf4bf784b7af91f9aaba.tar.gz
gst-plugins-bad-cf4485133b741355d97abf4bf784b7af91f9aaba.tar.bz2
gst-plugins-bad-cf4485133b741355d97abf4bf784b7af91f9aaba.zip
mxfdemux: Fix build on GLib < 2.16 some more
Diffstat (limited to 'gst')
-rw-r--r--gst/mxf/mxfdemux.c43
-rw-r--r--gst/mxf/mxfmetadata.c31
2 files changed, 42 insertions, 32 deletions
diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c
index cd3ed8ad..9e486f1e 100644
--- a/gst/mxf/mxfdemux.c
+++ b/gst/mxf/mxfdemux.c
@@ -496,6 +496,14 @@ set_resolve_state_none (gpointer key, gpointer value, gpointer user_data)
MXFMetadataBase *m = (MXFMetadataBase *) value;
m->resolved = MXF_METADATA_BASE_RESOLVE_STATE_NONE;
}
+
+static void
+build_values_in_hash_table (gpointer key, gpointer value, gpointer user_data)
+{
+ GList **valuelist = (GList **) (user_data);
+
+ *valuelist = g_list_prepend (*valuelist, value);
+}
#endif
static GstFlowReturn
@@ -505,7 +513,7 @@ gst_mxf_demux_resolve_references (GstMXFDemux * demux)
#if GLIB_CHECK_VERSION (2, 16, 0)
GHashTableIter iter;
#else
- GList *l, *values;
+ GList *l, *values = NULL;
#endif
MXFMetadataBase *m = NULL;
GstStructure *structure;
@@ -532,6 +540,7 @@ gst_mxf_demux_resolve_references (GstMXFDemux * demux)
while (g_hash_table_iter_next (&iter, NULL, (gpointer) & m)) {
gboolean resolved;
#else
+ g_hash_table_foreach (demux->metadata, build_values_in_hash_table, &values);
for (l = values; l; l = l->next) {
gboolean resolved;
@@ -641,11 +650,11 @@ gst_mxf_demux_choose_package (GstMXFDemux * demux)
for (i = 0; i < demux->preface->content_storage->n_packages; i++) {
if (demux->preface->content_storage->packages[i] &&
- MXF_IS_METADATA_MATERIAL_PACKAGE (demux->preface->
- content_storage->packages[i])) {
+ MXF_IS_METADATA_MATERIAL_PACKAGE (demux->preface->content_storage->
+ packages[i])) {
ret =
- MXF_METADATA_GENERIC_PACKAGE (demux->preface->
- content_storage->packages[i]);
+ MXF_METADATA_GENERIC_PACKAGE (demux->preface->content_storage->
+ packages[i]);
break;
}
}
@@ -805,8 +814,8 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux)
essence_container);
if (track->parent.type == MXF_METADATA_TRACK_PICTURE_ESSENCE) {
- if (MXF_IS_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR (track->
- parent.descriptor[0]))
+ if (MXF_IS_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR (track->parent.
+ descriptor[0]))
mxf_ul_to_string (&MXF_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR
(track->parent.descriptor[0])->picture_essence_coding,
essence_compression);
@@ -815,8 +824,8 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux)
g_strdup_printf ("video/x-mxf-%s-%s", essence_container,
essence_compression);
} else if (track->parent.type == MXF_METADATA_TRACK_SOUND_ESSENCE) {
- if (MXF_IS_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR (track->
- parent.descriptor[0]))
+ if (MXF_IS_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR (track->parent.
+ descriptor[0]))
mxf_ul_to_string (&MXF_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR
(track->parent.descriptor[0])->sound_essence_compression,
essence_compression);
@@ -825,8 +834,8 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux)
g_strdup_printf ("audio/x-mxf-%s-%s", essence_container,
essence_compression);
} else if (track->parent.type == MXF_METADATA_TRACK_DATA_ESSENCE) {
- if (MXF_IS_METADATA_GENERIC_DATA_ESSENCE_DESCRIPTOR (track->
- parent.descriptor[0]))
+ if (MXF_IS_METADATA_GENERIC_DATA_ESSENCE_DESCRIPTOR (track->parent.
+ descriptor[0]))
mxf_ul_to_string (&MXF_METADATA_GENERIC_DATA_ESSENCE_DESCRIPTOR
(track->parent.descriptor[0])->data_essence_coding,
essence_compression);
@@ -1417,8 +1426,8 @@ gst_mxf_demux_pad_set_component (GstMXFDemux * demux, GstMXFDemuxPad * pad,
pad->current_component_index);
pad->current_component =
- MXF_METADATA_SOURCE_CLIP (sequence->
- structural_components[pad->current_component_index]);
+ MXF_METADATA_SOURCE_CLIP (sequence->structural_components[pad->
+ current_component_index]);
if (pad->current_component == NULL) {
GST_ERROR_OBJECT (demux, "No such structural component");
return GST_FLOW_ERROR;
@@ -1426,8 +1435,8 @@ gst_mxf_demux_pad_set_component (GstMXFDemux * demux, GstMXFDemuxPad * pad,
if (!pad->current_component->source_package
|| !pad->current_component->source_package->top_level
- || !MXF_METADATA_GENERIC_PACKAGE (pad->
- current_component->source_package)->tracks) {
+ || !MXF_METADATA_GENERIC_PACKAGE (pad->current_component->
+ source_package)->tracks) {
GST_ERROR_OBJECT (demux, "Invalid component");
return GST_FLOW_ERROR;
}
@@ -3002,8 +3011,8 @@ gst_mxf_demux_pad_set_last_stop (GstMXFDemux * demux, GstMXFDemuxPad * p,
for (i = 0; i < p->material_track->parent.sequence->n_structural_components;
i++) {
clip =
- MXF_METADATA_SOURCE_CLIP (p->material_track->parent.
- sequence->structural_components[i]);
+ MXF_METADATA_SOURCE_CLIP (p->material_track->parent.sequence->
+ structural_components[i]);
if (clip->parent.duration <= 0)
break;
diff --git a/gst/mxf/mxfmetadata.c b/gst/mxf/mxfmetadata.c
index 3fa52f81..cc53ec15 100644
--- a/gst/mxf/mxfmetadata.c
+++ b/gst/mxf/mxfmetadata.c
@@ -64,8 +64,9 @@ mxf_metadata_base_resolve_default (MXFMetadataBase * self,
#if !GLIB_CHECK_VERSION (2, 16, 0)
static void
-build_values_in_hash_table (gpointer key, gpointer value, GList ** valuelist)
+build_values_in_hash_table (gpointer key, gpointer value, gpointer user_data)
{
+ GList **valuelist = (GList **) (user_data);
*valuelist = g_list_prepend (*valuelist, value);
}
#endif
@@ -1595,8 +1596,8 @@ mxf_metadata_material_package_resolve (MXFMetadataBase * m,
MXFMetadataTimelineTrack *tmp;
if (!sc->source_package->parent.tracks[k] ||
- !MXF_IS_METADATA_TIMELINE_TRACK (sc->source_package->
- parent.tracks[k]))
+ !MXF_IS_METADATA_TIMELINE_TRACK (sc->source_package->parent.
+ tracks[k]))
continue;
tmp =
@@ -3444,8 +3445,8 @@ mxf_metadata_generic_picture_essence_descriptor_handle_tag (MXFMetadataBase *
default:
ret =
MXF_METADATA_BASE_CLASS
- (mxf_metadata_generic_picture_essence_descriptor_parent_class)->
- handle_tag (metadata, primer, tag, tag_data, tag_size);
+ (mxf_metadata_generic_picture_essence_descriptor_parent_class)->handle_tag
+ (metadata, primer, tag, tag_data, tag_size);
break;
}
@@ -3466,8 +3467,8 @@ mxf_metadata_generic_picture_essence_descriptor_to_structure (MXFMetadataBase *
{
GstStructure *ret =
MXF_METADATA_BASE_CLASS
- (mxf_metadata_generic_picture_essence_descriptor_parent_class)->
- to_structure (m);
+ (mxf_metadata_generic_picture_essence_descriptor_parent_class)->to_structure
+ (m);
MXFMetadataGenericPictureEssenceDescriptor *self =
MXF_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR (m);
gchar str[48];
@@ -3710,8 +3711,8 @@ mxf_metadata_generic_sound_essence_descriptor_handle_tag (MXFMetadataBase *
default:
ret =
MXF_METADATA_BASE_CLASS
- (mxf_metadata_generic_sound_essence_descriptor_parent_class)->
- handle_tag (metadata, primer, tag, tag_data, tag_size);
+ (mxf_metadata_generic_sound_essence_descriptor_parent_class)->handle_tag
+ (metadata, primer, tag, tag_data, tag_size);
break;
}
@@ -3894,8 +3895,8 @@ mxf_metadata_cdci_picture_essence_descriptor_handle_tag (MXFMetadataBase *
default:
ret =
MXF_METADATA_BASE_CLASS
- (mxf_metadata_cdci_picture_essence_descriptor_parent_class)->
- handle_tag (metadata, primer, tag, tag_data, tag_size);
+ (mxf_metadata_cdci_picture_essence_descriptor_parent_class)->handle_tag
+ (metadata, primer, tag, tag_data, tag_size);
break;
}
@@ -4077,8 +4078,8 @@ mxf_metadata_rgba_picture_essence_descriptor_handle_tag (MXFMetadataBase *
default:
ret =
MXF_METADATA_BASE_CLASS
- (mxf_metadata_rgba_picture_essence_descriptor_parent_class)->
- handle_tag (metadata, primer, tag, tag_data, tag_size);
+ (mxf_metadata_rgba_picture_essence_descriptor_parent_class)->handle_tag
+ (metadata, primer, tag, tag_data, tag_size);
break;
}
@@ -4190,8 +4191,8 @@ mxf_metadata_generic_data_essence_descriptor_handle_tag (MXFMetadataBase *
default:
ret =
MXF_METADATA_BASE_CLASS
- (mxf_metadata_generic_data_essence_descriptor_parent_class)->
- handle_tag (metadata, primer, tag, tag_data, tag_size);
+ (mxf_metadata_generic_data_essence_descriptor_parent_class)->handle_tag
+ (metadata, primer, tag, tag_data, tag_size);
break;
}