mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
mxf: Replace g_hash_table_get_values with code working with glib 2.6.
Fixes #575565
This commit is contained in:
parent
1f7d3aa35d
commit
43117a8d86
2 changed files with 27 additions and 13 deletions
|
@ -489,6 +489,15 @@ gst_mxf_demux_handle_primer_pack (GstMXFDemux * demux, const MXFUL * key,
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !GLIB_CHECK_VERSION (2, 16, 0)
|
||||||
|
static void
|
||||||
|
set_resolve_state_none (gpointer key, gpointer value, gpointer user_data)
|
||||||
|
{
|
||||||
|
MXFMetadataBase *m = (MXFMetadataBase *) value;
|
||||||
|
m->resolved = MXF_METADATA_BASE_RESOLVE_STATE_NONE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_mxf_demux_resolve_references (GstMXFDemux * demux)
|
gst_mxf_demux_resolve_references (GstMXFDemux * demux)
|
||||||
{
|
{
|
||||||
|
@ -515,11 +524,7 @@ gst_mxf_demux_resolve_references (GstMXFDemux * demux)
|
||||||
m->resolved = MXF_METADATA_BASE_RESOLVE_STATE_NONE;
|
m->resolved = MXF_METADATA_BASE_RESOLVE_STATE_NONE;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
values = g_hash_table_get_values (demux->metadata);
|
g_hash_table_foreach (demux->metadata, set_resolve_state_none, NULL);
|
||||||
for (l = values; l; l = l->next) {
|
|
||||||
m = l->data;
|
|
||||||
m->resolved = MXF_METADATA_BASE_RESOLVE_STATE_NONE;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GLIB_CHECK_VERSION (2, 16, 0)
|
#if GLIB_CHECK_VERSION (2, 16, 0)
|
||||||
|
|
|
@ -62,6 +62,14 @@ mxf_metadata_base_resolve_default (MXFMetadataBase * self,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !GLIB_CHECK_VERSION (2, 16, 0)
|
||||||
|
static void
|
||||||
|
build_values_in_hash_table (gpointer key, gpointer value, GList ** valuelist)
|
||||||
|
{
|
||||||
|
*valuelist = g_list_prepend (*valuelist, value);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static GstStructure *
|
static GstStructure *
|
||||||
mxf_metadata_base_to_structure_default (MXFMetadataBase * self)
|
mxf_metadata_base_to_structure_default (MXFMetadataBase * self)
|
||||||
{
|
{
|
||||||
|
@ -96,9 +104,10 @@ mxf_metadata_base_to_structure_default (MXFMetadataBase * self)
|
||||||
|
|
||||||
g_hash_table_iter_init (&iter, self->other_tags);
|
g_hash_table_iter_init (&iter, self->other_tags);
|
||||||
#else
|
#else
|
||||||
GList *l, *values;
|
GList *l, *values = NULL;
|
||||||
|
|
||||||
values = g_hash_table_get_values (self->other_tags);
|
g_hash_table_foreach (self->other_tags, build_values_in_hash_table,
|
||||||
|
&values);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
g_value_init (&va, GST_TYPE_ARRAY);
|
g_value_init (&va, GST_TYPE_ARRAY);
|
||||||
|
@ -1227,9 +1236,9 @@ mxf_metadata_essence_container_data_resolve (MXFMetadataBase * m,
|
||||||
|
|
||||||
g_hash_table_iter_init (&iter, metadata);
|
g_hash_table_iter_init (&iter, metadata);
|
||||||
#else
|
#else
|
||||||
GList *l, *values;
|
GList *l, *values = NULL;
|
||||||
|
|
||||||
values = g_hash_table_get_values (metadata);
|
g_hash_table_foreach (metadata, build_values_in_hash_table, &values);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GLIB_CHECK_VERSION (2, 16, 0)
|
#if GLIB_CHECK_VERSION (2, 16, 0)
|
||||||
|
@ -2586,9 +2595,9 @@ mxf_metadata_source_clip_resolve (MXFMetadataBase * m, GHashTable * metadata)
|
||||||
|
|
||||||
g_hash_table_iter_init (&iter, metadata);
|
g_hash_table_iter_init (&iter, metadata);
|
||||||
#else
|
#else
|
||||||
GList *l, *values;
|
GList *l, *values = NULL;
|
||||||
|
|
||||||
values = g_hash_table_get_values (metadata);
|
g_hash_table_foreach (metadata, build_values_in_hash_table, &values);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GLIB_CHECK_VERSION (2, 16, 0)
|
#if GLIB_CHECK_VERSION (2, 16, 0)
|
||||||
|
@ -3457,8 +3466,8 @@ mxf_metadata_generic_picture_essence_descriptor_to_structure (MXFMetadataBase *
|
||||||
{
|
{
|
||||||
GstStructure *ret =
|
GstStructure *ret =
|
||||||
MXF_METADATA_BASE_CLASS
|
MXF_METADATA_BASE_CLASS
|
||||||
(mxf_metadata_generic_picture_essence_descriptor_parent_class)->to_structure
|
(mxf_metadata_generic_picture_essence_descriptor_parent_class)->
|
||||||
(m);
|
to_structure (m);
|
||||||
MXFMetadataGenericPictureEssenceDescriptor *self =
|
MXFMetadataGenericPictureEssenceDescriptor *self =
|
||||||
MXF_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR (m);
|
MXF_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR (m);
|
||||||
gchar str[48];
|
gchar str[48];
|
||||||
|
|
Loading…
Reference in a new issue