partially flushing branch of pipeline

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

partially flushing branch of pipeline

Marc Leeman
I am creating an application that has net-in, net-out; it does some
transformations on on packaging and partial transcoding.

I'd like to add an add on that does 'sampling', recodes it and sends it
back out. Basically converting a continuous slideshow.

The input stream format is unknown, so using decodebin with a callback
to new-decoded-pad provides a nice way of implicitly triggering on the
first encountered I-frame.

The catch is that I cannot afford letting decodebin run continously; I
need to disable it as soon as possible to minimise the overhead.

I set up the following system that works (kindof).

+---------+ +-------+ +-----+   +------+ +-------+
|  udpsrc |-| demux |-| tee |-+-|rtppay|-|udpsink|
+---------+ +-------+ +-----+ | +------+ +-------+
                              |
                              | +-----------------+   +-----------+ +---------+ +---------+
                              +-| output-selector |-+-| decodebin |-| jpegenc |-| udpsink |
                                +-----------------+ | +-----------+ +---------+ +---------+
                                                    |
                                                    | +----------+
                                                    +-| fakesink |
                                                      +----------+

I add an output-selector to a decodebin; from the moment I get an
encoded-frame (jpegenc); I toggle the output from the selector to a
fakesink.

The overhead is minimal. Unfortunately; I seem to have an issue with the
buffers in decodebin.

The first image is always perfect; but it start being corrupted since the
decoder keeps working on the old data (combining data from before the
select switch and the re-connection of it to the decodebin). The effect
is, dependent on the stream; that one image is good and a number
afterwards are corrupt.

Basically, before reconnnecting the data feed to the decodebin; I would
need to send a signal to the sink pad of decode bin; that all currently
stored data should be discarted; just as it did with the first image
creation.

I have experimented with flushing and resetting timestamps; but in that
case; at least the way I've tried it; either my pipeline stalls or the
RTP packets get corrupted in the top branch.

The top branch really is the most important one and should not be
affected by operations on the bottom branches of the pipeline.

Does anyone have feedback on how to tackle this and possibly an example
of a module that works in similar ways.

--
  greetz, marc
The universe is all a spin-off of the Big Bang.
crichton 2.6.26 #1 PREEMPT Tue Jul 29 21:17:59 CDT 2008 GNU/Linux

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

signature.asc (196 bytes) Download Attachment