[gst-devel] fun with loop based elements
iain at prettypeople.org
Sat Oct 25 09:48:07 CEST 2003
Fix one thing, another comes along after it.
This is a pipeline I'm having issues with
filesrc ! mad ! alsasink
The problem is that in this pipeline the alsasink is the loop based
element and as such is the scheduler entry point. This means that when
the scheduler starts it calls alsa_sink_loop, and waits for alsasink to
do a pull on its sink pad, which then schedules the mad element.
Alright so far?
The problem is that the caps on mad cannot be fixed until mad has read
the mp3 header and it can't read that data until it gets a pull on its
src pad. And it can't get a pull on its source pad until it is connected
to alsasink:sink. And it can't get connected until it has fixed caps.
What happens in this situation is that alsa_sink_loop is constantly
called, does a pull on the src pad, the srcpad isn't connected so it
returns, and is called again and again, and again and again, until you
stop the pipeline, and nothing gets done.
Any ideas on how to fix this, or if my diagnoises is completely wrong?
iain (hoping wim doesn't mind me cc'ing him, but he is the person who
understands the schedulers most)
"There is no such thing as conversation.
There are intersecting monologues, that is all" - Rebecca West
More information about the gstreamer-devel