[gst-devel] Adding a pad while PLAYING
Steve Fink
sphink at gmail.com
Sat Aug 4 18:50:22 CEST 2007
I have a pipeline that contains my custom element, which has a source
that generates data forever, feeding into an 'adder' element. I want
to be able to send an event to my element and have it dynamically
create a new pad, link it up to the same adder, and start feeding data
from my element on the dynamic pad to the adder without stopping the
pipeline. I want the new sound to start playing "as soon as possible,
but no sooner" -- i.e., I don't care about the synchronization between
the existing stream and the new sound, I just want it to start playing
as soon as it can, without disrupting the existing stream. (It is a
"non-streaming" sound being merged into an existing PLAYING audio
stream.)
Is this possible? I've put together some code that does it, but I
haven't made it to the point where the new pad is properly linked into
the graph. I'm still a raw beginner with gstreamer, so I'm not
completely clear on how to do that part, which is probably the easy
part. I'll try to figure that out on my own, or (more likely) post a
separate question about it.
Current state: I create my new pad, give it the same caps as my
already-existing source pad, and then call set_active. My
activate_push function starts a new task that (for now) just returns
an immediate EOS. I get this warning:
(gst-launch-0.10:29592): GStreamer-WARNING **: adding flushing pad
'clip1' to running element 'cc'
which is true and all, but is there a way to do this that will make
gstreamer happy?
More information about the gstreamer-devel
mailing list