mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-06-26 09:50:39 +00:00
audioconvert: copy metadata that only has the "audio" tag.
https://bugzilla.gnome.org/show_bug.cgi?id=750406
This commit is contained in:
parent
decea41ac7
commit
88484399c5
|
@ -86,6 +86,8 @@ static gboolean gst_audio_convert_set_caps (GstBaseTransform * base,
|
||||||
GstCaps * incaps, GstCaps * outcaps);
|
GstCaps * incaps, GstCaps * outcaps);
|
||||||
static GstFlowReturn gst_audio_convert_transform (GstBaseTransform * base,
|
static GstFlowReturn gst_audio_convert_transform (GstBaseTransform * base,
|
||||||
GstBuffer * inbuf, GstBuffer * outbuf);
|
GstBuffer * inbuf, GstBuffer * outbuf);
|
||||||
|
static gboolean gst_audio_convert_transform_meta (GstBaseTransform * trans,
|
||||||
|
GstBuffer * outbuf, GstMeta * meta, GstBuffer * inbuf);
|
||||||
static void gst_audio_convert_set_property (GObject * object, guint prop_id,
|
static void gst_audio_convert_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec);
|
const GValue * value, GParamSpec * pspec);
|
||||||
static void gst_audio_convert_get_property (GObject * object, guint prop_id,
|
static void gst_audio_convert_get_property (GObject * object, guint prop_id,
|
||||||
|
@ -216,6 +218,8 @@ gst_audio_convert_class_init (GstAudioConvertClass * klass)
|
||||||
GST_DEBUG_FUNCPTR (gst_audio_convert_set_caps);
|
GST_DEBUG_FUNCPTR (gst_audio_convert_set_caps);
|
||||||
basetransform_class->transform =
|
basetransform_class->transform =
|
||||||
GST_DEBUG_FUNCPTR (gst_audio_convert_transform);
|
GST_DEBUG_FUNCPTR (gst_audio_convert_transform);
|
||||||
|
basetransform_class->transform_meta =
|
||||||
|
GST_DEBUG_FUNCPTR (gst_audio_convert_transform_meta);
|
||||||
|
|
||||||
basetransform_class->passthrough_on_same_caps = TRUE;
|
basetransform_class->passthrough_on_same_caps = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -863,6 +867,23 @@ convert_error:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gst_audio_convert_transform_meta (GstBaseTransform * trans, GstBuffer * outbuf,
|
||||||
|
GstMeta * meta, GstBuffer * inbuf)
|
||||||
|
{
|
||||||
|
const GstMetaInfo *info = meta->info;
|
||||||
|
const gchar *const *tags;
|
||||||
|
|
||||||
|
tags = gst_meta_api_type_get_tags (info->api);
|
||||||
|
|
||||||
|
if (tags && g_strv_length ((gchar **) tags) == 1
|
||||||
|
&& gst_meta_api_type_has_tag (info->api,
|
||||||
|
g_quark_from_string (GST_META_TAG_AUDIO_STR)))
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_audio_convert_set_property (GObject * object, guint prop_id,
|
gst_audio_convert_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec)
|
const GValue * value, GParamSpec * pspec)
|
||||||
|
|
Loading…
Reference in a new issue