playbin2

Akihiro TSUKADA tskd2 at yahoo.co.jp
Fri Feb 3 09:02:06 PST 2012


I know almost nothing about embedded world,
but if your video-sink cannot hold an image and
send EOS immediately after rendering it,
then the followings converts an image to a video stream
(and worked on my PC).

gst-launch playbin2 uri=file:///foo.img \
 video-sink="videorate ! video/x-raw-yuv,framerate=1/10 ! autovideosink"
 or
gst-launch playbin2 uri=file:///foo.img \
 video-sink="imagefreeze ! autovideosink"

thus, you can build a sink-bin like the above ones and set it to the
"video-sink" property in your script, like described in
http://pygstdocs.berlios.de/pygst-tutorial/playbin.html.

One problem though is that it may be impossible to set/change video-sink
property in "about-to-finish" event handler.
In that case, maybe you can write a source-bin element with a custom URI
handler, like dvbbasebin,
which consists of filesrc, videorate and caps-filters and converts an
image to video stream.

for example,
mysrcbin :=
  filesrc location=<from URI> ! jpegparse ! videorate ! \
     image/jpeg,framerate=1/<LENGTH>
then you can set "myproto:///foo.jpg" in about-to-finish handler.

but I am afraid that it may be easier to build another pipeline for
displaying images, or else, to display images directly in your script
instead of using gstreamer.

cheers,
akihiro


More information about the gstreamer-devel mailing list