<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
Actually, you wouldn't need create it as jpeg. It would be enough if you<br>
get video/x-raw-rgb and load that as pixbuf. This way you save the jpeg<br>
encoding and decoding.<br><br></blockquote><div><br></div><div>Oh wow, this is a much better approach! Thank you.</div><div><br></div><div><div><font class="Apple-style-span" size="1" face="'courier new', monospace">last_frame = self.playbin2.get_property( "frame" )</font></div>
<div><font class="Apple-style-span" size="1" face="'courier new', monospace">if last_frame is None:</font></div><div><font class="Apple-style-span" size="1" face="'courier new', monospace"> return</font></div>
<div><font class="Apple-style-span" size="1" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" size="1" face="'courier new', monospace">pix_buf = gtk.gdk.pixbuf_new_from_data( last_frame, gtk.gdk.COLORSPACE_RGB, True, 8, hardcoded_width, hardcoded_height, 4*hardcoded_width ) </font></div>
</div><div><br></div><div>But two problems arise:</div><div><ol><li>It appears red and blue have been swapped in my pixbuf. Do I need to run the buffer through a pre-process before <font class="Apple-style-span" face="'courier new', monospace" size="1">pixbuf_new_from_data</font>?</li>
<li>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?</li></ol></div><div><font class="Apple-style-span" face="'courier new', monospace" size="1"><br>
</font></div></div>