<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"><<a href="mailto:calvaris@igalia.com" target="_blank">calvaris@igalia.com</a>></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>
> But two problems arise:<br>
> 1. It appears red and blue have been swapped in my pixbuf. Do I<br>
<div>> need to run the buffer through a pre-process before<br>
> pixbuf_new_from_data?<br>
<br>
</div> I had used this at an old piece of code in C:<br>
<br>
pixbuf = gdk_pixbuf_new_from_data(<br>
GST_BUFFER_DATA(new_buffer), GDK_COLORSPACE_RGB,<br>
FALSE, 8, width, height,<br>
GST_ROUND_UP_4(3 * width), _destroy_pixbuf,<br>
new_buffer);<br>
<br></blockquote><div><br></div><div>I am continuing to have trouble with this. Most every combination I try ends up with a distorted image. Further, there doesn't appear to be a pygst counterpart to 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> return (num + 3) & ~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> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> 1. What is the best way to get the values for the width and<br>
<div>> height of the buffer we're converting to a pixbuf? Grab and<br>
> 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. 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> </div></div>
<span><ATT00001..txt></span></blockquote></div><br></div></body></html>