mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
audioresample: copy metadata that only has the "audio" tag.
https://bugzilla.gnome.org/show_bug.cgi?id=750406
This commit is contained in:
parent
579967278a
commit
2ad27e4c13
1 changed files with 21 additions and 0 deletions
|
@ -133,6 +133,8 @@ static gboolean gst_audio_resample_set_caps (GstBaseTransform * base,
|
||||||
GstCaps * incaps, GstCaps * outcaps);
|
GstCaps * incaps, GstCaps * outcaps);
|
||||||
static GstFlowReturn gst_audio_resample_transform (GstBaseTransform * base,
|
static GstFlowReturn gst_audio_resample_transform (GstBaseTransform * base,
|
||||||
GstBuffer * inbuf, GstBuffer * outbuf);
|
GstBuffer * inbuf, GstBuffer * outbuf);
|
||||||
|
static gboolean gst_audio_resample_transform_meta (GstBaseTransform * trans,
|
||||||
|
GstBuffer * outbuf, GstMeta * meta, GstBuffer * inbuf);
|
||||||
static gboolean gst_audio_resample_sink_event (GstBaseTransform * base,
|
static gboolean gst_audio_resample_sink_event (GstBaseTransform * base,
|
||||||
GstEvent * event);
|
GstEvent * event);
|
||||||
static gboolean gst_audio_resample_start (GstBaseTransform * base);
|
static gboolean gst_audio_resample_start (GstBaseTransform * base);
|
||||||
|
@ -201,6 +203,8 @@ gst_audio_resample_class_init (GstAudioResampleClass * klass)
|
||||||
GST_DEBUG_FUNCPTR (gst_audio_resample_transform);
|
GST_DEBUG_FUNCPTR (gst_audio_resample_transform);
|
||||||
GST_BASE_TRANSFORM_CLASS (klass)->sink_event =
|
GST_BASE_TRANSFORM_CLASS (klass)->sink_event =
|
||||||
GST_DEBUG_FUNCPTR (gst_audio_resample_sink_event);
|
GST_DEBUG_FUNCPTR (gst_audio_resample_sink_event);
|
||||||
|
GST_BASE_TRANSFORM_CLASS (klass)->transform_meta =
|
||||||
|
GST_DEBUG_FUNCPTR (gst_audio_resample_transform_meta);
|
||||||
|
|
||||||
GST_BASE_TRANSFORM_CLASS (klass)->passthrough_on_same_caps = TRUE;
|
GST_BASE_TRANSFORM_CLASS (klass)->passthrough_on_same_caps = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1246,6 +1250,23 @@ gst_audio_resample_transform (GstBaseTransform * base, GstBuffer * inbuf,
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gst_audio_resample_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 gboolean
|
static gboolean
|
||||||
gst_audio_resample_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
gst_audio_resample_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue