jpegenc a theora playbin2 buffer?

Erik Blankinship jedierikb at gmail.com
Mon Sep 19 09:08:00 PDT 2011


>
>
> Actually, you wouldn't need create it as jpeg. It would be enough if you
> get video/x-raw-rgb and load that as pixbuf. This way you save the jpeg
> encoding and decoding.
>
>
Oh wow, this is a much better approach!  Thank you.

last_frame = self.playbin2.get_property( "frame" )
if last_frame is None:
    return

pix_buf = gtk.gdk.pixbuf_new_from_data( last_frame, gtk.gdk.COLORSPACE_RGB,
True, 8, hardcoded_width, hardcoded_height, 4*hardcoded_width )

But two problems arise:

   1. It appears red and blue have been swapped in my pixbuf.  Do I need to
   run the buffer through a pre-process before pixbuf_new_from_data?
   2. What is the best way to get the values for the width and height of the
   buffer we're converting to a pixbuf?  Grab and cache them from the playbin2?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110919/50dce566/attachment.htm>


More information about the gstreamer-devel mailing list