After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 709614 - wavenc: Uses invalid caps for alaw and mulaw
wavenc: Uses invalid caps for alaw and mulaw
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.x
Other Linux
: Normal normal
: 1.2.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-10-08 08:55 UTC by Harish Jenny K N
Modified: 2013-10-10 10:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Attaching the fix (491 bytes, patch)
2013-10-08 09:03 UTC, Harish Jenny K N
rejected Details | Review

Description Harish Jenny K N 2013-10-08 08:55:45 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 ...
Comment 1 Harish Jenny K N 2013-10-08 08:57:35 UTC
Reason being GST_EVENT_CAPS function is not being forwarded to wavenc and hence not getting negotated.
Comment 2 Harish Jenny K N 2013-10-08 09:03:07 UTC
Created attachment 256696 [details] [review]
Attaching the fix
Comment 3 Harish Jenny K N 2013-10-08 09:06:22 UTC
Patch contains event GST_EVENT_CAPS to be resent to wavenc.
Comment 4 Sebastian Dröge (slomo) 2013-10-08 09:25:17 UTC
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.
Comment 5 Sebastian Dröge (slomo) 2013-10-08 09:25:53 UTC
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
Comment 6 Sebastian Dröge (slomo) 2013-10-08 09:28:49 UTC
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
Comment 7 Harish Jenny K N 2013-10-08 09:35:02 UTC
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.
Comment 8 Harish Jenny K N 2013-10-08 09:40:07 UTC
patch is not correct as you say , but the bug still is there right ?
Comment 9 Sebastian Dröge (slomo) 2013-10-08 09:58:27 UTC
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.
Comment 10 Harish Jenny K N 2013-10-08 10:00:04 UTC
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
Comment 11 Harish Jenny K N 2013-10-08 10:00:42 UTC
oh ! you have already provided the commit !!

thanks anyway !