<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Mark,<div><br></div><div>I have it figured out - have programmed 2 - they connect to my Manta - please come up and verify</div><div><br></div><div>Conrad</div><div><br><div><div>On Sep 19, 2011, at 11:46 AM, Erik Blankinship wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><br><div class="gmail_quote">On Mon, Sep 19, 2011 at 1:08 PM, Xabier Rodriguez Calvar <span dir="ltr">&lt;<a href="mailto:calvaris@igalia.com" target="_blank">calvaris@igalia.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

O Lun, 19-09-2011 ás 12:08 -0400, Erik Blankinship escribiu:<br>
&gt; But two problems arise:<br>
&gt; &nbsp; &nbsp; &nbsp;1. It appears red and blue have been swapped in my pixbuf. &nbsp;Do I<br>
<div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; need to run the buffer through a pre-process before<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; pixbuf_new_from_data?<br>
<br>
</div> &nbsp; &nbsp; &nbsp; &nbsp;I had used this at an old piece of code in C:<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;pixbuf = gdk_pixbuf_new_from_data(<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GST_BUFFER_DATA(new_buffer), GDK_COLORSPACE_RGB,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FALSE, 8, width, height,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GST_ROUND_UP_4(3 * width), _destroy_pixbuf,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;new_buffer);<br>
<br></blockquote><div><br></div><div>I am continuing to have trouble with this. &nbsp;Most every combination I try ends up with a distorted image. &nbsp;Further, there doesn't appear to be a pygst counterpart to&nbsp;GST_ROUND_UP_4, but it is easy enough to compute.</div>
<div><br></div><div><span class="Apple-style-span" style="font-size: 13px; background-color: rgb(255, 255, 255); "><font class="Apple-style-span" face="'courier new', monospace"><div>def f(num):</div><div>&nbsp; &nbsp; return (num + 3) &amp; ~3</div>
</font></span></div><div><br></div><div>If it is of help to anyone out there, my caps read as follows:</div><div><br></div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div class="gmail_quote"><div><div><font class="Apple-style-span" face="'courier new', monospace">video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)512, height=(int)277, framerate=(fraction)24/1, pixel-aspect-ratio=(fraction)1/1, color-matrix=(string)sdtv, chroma-site=(string)jpeg;</font></div>
</div></div></blockquote><div class="gmail_quote"><div><br></div><div>What's the thinking and solution behind mapping this buffer into a gdk pixbuf successfully?</div><div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<br>
&gt; &nbsp; &nbsp; &nbsp;1. What is the best way to get the values for the width and<br>
<div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; height of the buffer we're converting to a pixbuf? &nbsp;Grab and<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; cache them from the playbin2?<br>
<br>
</div>You have them in the code I pasted. They should be in the the buffer<br>
caps.</blockquote><div><br></div><div>Yes, of course. &nbsp;Thanks again for that.</div><div><br></div><div>In pygst for future searchers:</div><div><br></div><div><font size="1" face="'courier new', monospace">caps = last_frame.get_caps()[0]</font></div>
<div>
<font size="1" face="'courier new', monospace">width = int(caps["width"])</font></div><div><font size="1" face="'courier new', monospace">height = int(caps["height"])</font></div>
<div>&nbsp;</div></div>
<span>&lt;ATT00001..txt&gt;</span></blockquote></div><br></div></body></html>