[gst-devel] are bystreams compatible with bins?

Akos Maroy darkeye at tyrell.hu
Sat May 28 06:14:00 CEST 2005

I'm trying to create a plugin, that has a GstBin as its parent. I'm
trying to read from the sink of the plugin by using a bytestream.

the strange thing is, that I only get GST_EVENT_INTERRUPT type events
when trying to read from the bytestream. (all this happens when the
element itself just received the GST_STATE_PAUSED_TO_PLAYING state
change, so it should be OK..)

if I simply change the parent type of the plugin to GstElement (as
opposed to GstBin), the same bytestream operation works fine...

I could use GstElement as well, but there I also have a problem.

what I'm really tying to do is to create an element that would play an
audio playlist. this involves reading a playlist file, parsing it, and
creating a GstElement hierarchy, that represents the contents of the
playlist file. in essence, this is a set of elements, having an outer
GstBin container.

I've managed to get so far as to parse the playlist file, and create the
element hierarchy. the top of the hierarchy, as stated earlier, is a
GstBin element, contained in my own plugin. the problem I'm facing now
is that I can't seem to be able to get the result of my element 'out' of
my plugin.

if I use GstBin as the base type for my plugin, I could create a ghost
pad between my top-most bin and the plugin. but see my problem above, I
can't parse my playlist file while being a bin.

if I use GstElement, I could use the _loop() function to push data out
of my plugin. but here I'm also in a problem: gst_pad_pull() need a sink
pad (whereas the data I need comes from the src pad of my topmost bin).
so, as a workaround I created an internal sink pad, that I link to the
src of my topmost bin. so far so good, but when I try to pull data from
it, I get a GST_EVENT_INTERRUPT even from it...

Any ideas?


More information about the gstreamer-devel mailing list