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 568686 - appsrc caps aren't getting set correctly
appsrc caps aren't getting set correctly
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.21
Other All
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-01-22 13:11 UTC by Snark
Modified: 2009-06-17 13:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The log of the command I mention in comment #1 (19.14 KB, application/octet-stream)
2009-01-22 13:12 UTC, Snark
Details
Log of the crash (52.55 KB, application/octet-stream)
2009-01-22 20:54 UTC, Snark
Details
The --gst-debug-level=5 log of the crash (214.10 KB, application/x-compressed-tar)
2009-01-23 07:53 UTC, Snark
Details
The gst-debug-level=5 log of NULL caps though they were given (245.00 KB, application/x-bzip)
2009-01-26 10:51 UTC, Snark
Details

Description Snark 2009-01-22 13:11:01 UTC
The log from :

gst-launch-0.10 --gst-debug-level=3 --gst-debug-no-color appsrc is-live=true caps=audio/x-raw-int,rate=44100,channels=2,width=16 ! volume ! alsasink 2> /tmp/log

which I'll attach to that bug, shows :
0:00:00.090367840  8967  0x9bf4050 INFO          GST_PIPELINE ./grammar.y:478:gs
t_parse_perform_link: linking appsrc0:(any) to volume0:(any) (0/0) with caps "(N
ULL)"

which is not normal, since I explicitly set caps!

This I think is the reason why my audio output code in ekiga doesn't work (worse: crashes), as reported on the mailing-list recently.
Comment 1 Snark 2009-01-22 13:12:27 UTC
Created attachment 126993 [details]
The log of the command I mention in comment #1

I'm using the package gstreamer0.10-plugins-base 0.10.21.3-1 from debian experimental, in case that matters.
Comment 2 Wim Taymans 2009-01-22 13:46:22 UTC
Those caps are not complete.

You need something like : audio/x-raw-int,rate=44100,channels=2,width=16,depth=16,signed=true,endianness=1234
Comment 3 Snark 2009-01-22 15:06:41 UTC
Uh... so when they're not complete, they just get ignored?

Notice that the following :
gst-launch-0.10 --gst-debug-level=3 --gst-debug-no-color appsrc is-live=true caps=audio/x-raw-int,rate=44100,channels=2,depth=16,width=16,signed=true,endianness=1234 ! volume ! alsasink 2>/tmp/log

doesn't show more caps used...
Comment 4 Tim-Philipp Müller 2009-01-22 20:18:52 UTC
> Uh... so when they're not complete, they just get ignored?

I think they should be rejected by the downstream element, with a GST_FLOW_NOT_NEGOTIATED being returned to appsrc, which in turn will then post a 'internal flow error' message on the bus.


 
> Notice that the following :
> gst-launch-0.10 --gst-debug-level=3 --gst-debug-no-color appsrc is-live=true
> caps=audio/x-raw-int,rate=44100,channels=2,depth=16,width=16,signed=true,endianness=1234
> ! volume ! alsasink 2>/tmp/log
> 
> doesn't show more caps used...

That's because no buffers get pushed when you use this in gst-launch (try with is-live=false and you'll see that it doesn't even preroll).
 

Comment 5 Snark 2009-01-22 20:23:55 UTC
The following at least links appsrc to capsfilter with the right caps :

gst-launch-0.10 --gst-debug-level=3 --gst-debug-no-color appsrc is-live=true ! audio/x-raw-int,rate=44100,channels=2,depth=16,width=16,signed=true,endianness=1234 ! volume ! alsasink 2>/tmp/log

But the caps aren't used anymore when connecting the other elements :-/

Notice that modifying my ekiga code to do likewise makes the crash go away... and some buffers go through (not all of them though).
Comment 6 Tim-Philipp Müller 2009-01-22 20:42:00 UTC
> Notice that modifying my ekiga code to do likewise makes the crash go away...

It shouldn't crash, that's a bug. Please provide a full stack trace with debugging symbols. 
Comment 7 Snark 2009-01-22 20:54:57 UTC
Created attachment 127037 [details]
Log of the crash

This is the log from the crash I had when I used caps= and not a capsfilter element ; it's triggered by a failed assertion : I'm pushing buffer in the pipeline...
Comment 8 Tim-Philipp Müller 2009-01-22 21:13:29 UTC
Please attach or make available a full *:5 log *:3 logs are usually not very useful.
Comment 9 Snark 2009-01-23 07:53:29 UTC
Created attachment 127072 [details]
The --gst-debug-level=5 log of the crash

Oh, sorry -- no problem, it's pretty easy to reproduce!
Comment 10 Snark 2009-01-25 14:53:14 UTC
Is the second log better?
Comment 11 Wim Taymans 2009-01-26 10:15:36 UTC
the width property is not set on the appsrc caps.
Comment 12 Snark 2009-01-26 10:51:03 UTC
Created attachment 127244 [details]
The gst-debug-level=5 log of NULL caps though they were given

Sigh... next try -- it doesn't crash anymore, but it's still linking ekiga_src to ekiga_volume with NULL caps -- which seems wrong.

Notice that having wrong caps doesn't explain why it was crashing : if they were invalid, they should have triggered error messages, not stopped the program on a failed assertion.
Comment 13 Wim Taymans 2009-01-26 15:22:21 UTC
I don't see an error except some strange behaviour:

A whole bunch of buffers are pushed into appsrc (255780 bytes) but before those buffers are played by the audiosink, the pipeline is set to NULL again. I don't know why anyone would do that, what's going on here?

Comment 14 Snark 2009-01-26 18:49:57 UTC
The behaviour is simple :
- the pipeline gets created ;
- the data is pushed through chunk by chunks ;
- the pipeline gets disposed of.

Of course, if the pipeline didn't consume the data, that would explain why I don't get any sound!
(notice that video input works like this -- using appsink of course -- but works)