From: Eunhye Choi Date: Fri, 14 Feb 2020 07:59:05 +0000 (+0900) Subject: pitch: add audio meta X-Git-Tag: accepted/tizen/unified/20220217.153506~2^2~10^2~9^2~12^2~2^2~90^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=549ba4eb8926e6a241970dbe2f710edaaf08dd7d;p=platform%2Fupstream%2Fgstreamer.git 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 --- diff --git a/ext/soundtouch/gstpitch.cc b/ext/soundtouch/gstpitch.cc index 89bab3f..1981a17 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 3e87b2e..f3ef650 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\