From 549ba4eb8926e6a241970dbe2f710edaaf08dd7d Mon Sep 17 00:00:00 2001 From: Eunhye Choi Date: Fri, 14 Feb 2020 16:59:05 +0900 Subject: [PATCH] pitch: add audio meta - add audio meta info in case of non-interleaved layout which is required when it is converted to interleaved. Change-Id: I8a7c03b9a40f9093e6f0416e53b75f14086d6b88 --- ext/soundtouch/gstpitch.cc | 14 ++++++++++++-- packaging/gst-plugins-bad.spec | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ext/soundtouch/gstpitch.cc b/ext/soundtouch/gstpitch.cc index 89bab3f07..1981a17cc 100644 --- a/ext/soundtouch/gstpitch.cc +++ b/ext/soundtouch/gstpitch.cc @@ -459,8 +459,8 @@ gst_pitch_src_event (GstPad * pad, GstObject * parent, GstEvent * event) return res; } -/* generic convert function based on caps, no rate - * used here +/* generic convert function based on caps, no rate + * used here */ static gboolean gst_pitch_convert (GstPitch * pitch, @@ -890,6 +890,16 @@ gst_pitch_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) GstBuffer *out_buffer; out_buffer = gst_pitch_prepare_buffer (pitch); + +#ifdef TIZEN_FEATURE_PITCH_AUDIO_META + gint samples = GST_BUFFER_OFFSET (out_buffer); + + if (GST_AUDIO_INFO_LAYOUT (&pitch->info) == + GST_AUDIO_LAYOUT_NON_INTERLEAVED) { + gst_buffer_add_audio_meta (out_buffer, &pitch->info, samples, NULL); + } +#endif + if (out_buffer) return gst_pitch_forward_buffer (pitch, out_buffer); } diff --git a/packaging/gst-plugins-bad.spec b/packaging/gst-plugins-bad.spec index 3e87b2ea5..f3ef65077 100644 --- a/packaging/gst-plugins-bad.spec +++ b/packaging/gst-plugins-bad.spec @@ -79,6 +79,7 @@ export CFLAGS+=" -Wall -g -fPIC\ -fstack-protector-strong\ -Wl,-z,relro\ -D_FORTIFY_SOURCE=2" +export CXXFLAGS+=" -DTIZEN_FEATURE_PITCH_AUDIO_META" %configure\ --disable-static\ -- 2.34.1