GNOME Bugzilla – Bug 709614
wavenc: Uses invalid caps for alaw and mulaw
Last modified: 2013-10-10 10:37:27 UTC
gst-launch-1.0 audiotestsrc ! alawenc ! wavenc ! filesink location=~/output.wav -v Setting pipeline to PAUSED ... Pipeline is PREROLLING ... /GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc0.GstPad:src: caps = audio/x-raw, rate=(int)44100, channels=(int)1, format=(string)S16LE, layout=(string)interleaved /GstPipeline:pipeline0/GstALawEnc:alawenc0.GstPad:src: caps = audio/x-alaw, rate=(int)44100, channels=(int)1 /GstPipeline:pipeline0/GstALawEnc:alawenc0.GstPad:sink: caps = audio/x-raw, rate=(int)44100, channels=(int)1, format=(string)S16LE, layout=(string)interleaved ERROR: from element /GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc0: Internal data flow error. Additional debug info: gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc0: streaming task paused, reason not-negotiated (-4) ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... /GstPipeline:pipeline0/GstALawEnc:alawenc0.GstPad:src: caps = NULL /GstPipeline:pipeline0/GstALawEnc:alawenc0.GstPad:sink: caps = NULL /GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc0.GstPad:src: caps = NULL Freeing pipeline ...
Reason being GST_EVENT_CAPS function is not being forwarded to wavenc and hence not getting negotated.
Created attachment 256696 [details] [review] Attaching the fix
Patch contains event GST_EVENT_CAPS to be resent to wavenc.
Comment on attachment 256696 [details] [review] Attaching the fix This is not correct, you would forward the caps event for the raw audio. Not the alaw caps.
The problem here is the following: 0:00:00.177363583 7588 0x1069d40 DEBUG GST_PADS gstpad.c:2986:gst_pad_query_default:<wavenc0:sink> not forwarding 0x7f8ee8003320 (accept-caps) query 0:00:00.177369479 7588 0x1069d40 DEBUG GST_PADS gstpad.c:3470:gst_pad_query:<wavenc0:sink> sent query 0x7f8ee8003320 (accept-caps), result 1 0:00:00.177375603 7588 0x1069d40 DEBUG default gstutils.c:2850:gst_pad_query_accept_caps:<wavenc0:sink> query returned 0 0:00:00.177381054 7588 0x1069d40 DEBUG GST_CAPS gstpad.c:4886:pre_eventfunc_check:<wavenc0:sink> caps audio/x-alaw, rate=(int)44100, channels=(int)1 not accepted
commit b8f9e966d5f920916a6aa51d1dd658139196bf29 Author: Sebastian Dröge <slomo@circular-chaos.org> Date: Tue Oct 8 11:28:04 2013 +0200 wavenc: A-Law and Mu-Law don't have width/depth/signed caps fields https://bugzilla.gnome.org/show_bug.cgi?id=709614
gst-launch-0.10 audiotestsrc ! alawenc ! wavenc ! filesink location=~/output.wav had worked and there also alawenc did not have width/depth/signed fields. I did try to add width/depth/signed in the caps and still it did not work.
patch is not correct as you say , but the bug still is there right ?
Yes, and it's fixed now in git with the commit mentioned above :) In 0.10 it worked because the caps checks were less strict (and incorrect) there.
I did try to remove width/depth/signed fields from wavenc diff --git a/gst/wavenc/gstwavenc.c b/gst/wavenc/gstwavenc.c index 6d64f1e..9c95787 100644 --- a/gst/wavenc/gstwavenc.c +++ b/gst/wavenc/gstwavenc.c @@ -131,10 +131,7 @@ typedef struct "; " \ "audio/x-alaw, " \ "rate = (int) [ 8000, 192000 ], " \ - "channels = (int) [ 1, 2 ], " \ - "width = (int) 8, " \ - "depth = (int) 8, " \ - "signed = (boolean) false; " \ + "channels = (int) [ 1, 2 ];" \ "audio/x-mulaw, " \ "rate = (int) [ 8000, 192000 ], " \ "channels = (int) [ 1, 2 ], " \ and it worked
oh ! you have already provided the commit !! thanks anyway !