[gst-devel] Changing an image on the fly

Daniel Díaz mrchapp at gmail.com
Tue Jul 11 02:29:02 CEST 2006


Hello!


On 7/10/06, Jan Schmidt <thaytan at noraisin.net> wrote:
> On Mon, 2006-07-10 at 16:04 -0500, Daniel Díaz wrote:
> > Hello there!
> >
> > I'm trying to do a tiny application that reads a web image, and then
> > reloads that image every 5 minutes. For that, I have this pipeline
> > (which works great, btw):
> >
> > gst-launch neonhttpsrc
> > uri="http://dfwtraffic.dot.state.tx.us/sod/Snapshots/DAL_316.jpg" !
> > jpegdec ! freeze ! ffmpegcolorspace ! ximagesink
> >
> > Now, how can I change the image that's being displayed?
> >
> > I'm thinking I should pause, unlink, change, relink, and set to play
> > again something, but I just can't figure out the combination.
> >
>
> It should be sufficient to set the pipeline to READY, change the uri on
> neonhttpsrc and then set it to PLAYING again. Any failure in that cycle
> is a bug in an element not resetting itself correctly - the elements
> you're using should all do that ok except possibly freeze.

Indeed, freeze's behavior was a special case. But everything worked
nicely in the end!

For record purposes, I had to:
* Set pipeline to READY
* Change URI in neonhttpsrc
* Unlink decoder-freezer-conv
* Remove freezer from the pipeline
* Unref freezer
* Create a new freezer
* Add freezer to the pipeline
* Link decoder-freezer-conv
* Set pipeline to PLAYING

Thanks for the hint, and greetings!

Daniel Díaz
yosoy at danieldiaz.org




More information about the gstreamer-devel mailing list