appsink to appscr mixes up color channels

Richard Cagley rcagley at gmail.com
Sat May 25 21:04:30 PDT 2013


Tim,
Thanks for the hint about endianness. The below gets me BGRA with B being
the LSB. This mask stuff is confusing. How do I get RGBA? What's with the
negative sign?

caps = gst_caps_new_simple ("video/x-raw-rgb",
          "endianness", G_TYPE_INT, 4321,
          "red_mask", G_TYPE_INT, 65280,
          "green_mask", G_TYPE_INT, 16711680,
          "blue_mask", G_TYPE_INT, -16777216,
          "width", G_TYPE_INT, 640,
          "height", G_TYPE_INT, 480,
          "framerate", GST_TYPE_FRACTION, 30000, 1001,
          NULL);



On Sat, May 25, 2013 at 4:00 PM, Tim-Philipp Müller <t.i.m at zen.co.uk> wrote:

> On Sat, 2013-05-25 at 15:49 -0700, Richard Cagley wrote:
>
> Hi,
>
> > I'm using videotestsrc and ximagesink and changing the patterns on
> > videotestsrc and looking at the output. I also have some print
> > statements to read the raw data pointers.
> >
> >
> > What would cause this? I'm setting the caps like this...
> >
> >
> > caps = gst_caps_new_simple ("video/x-raw-rgb",
> >           "format", G_TYPE_STRING, "RGB",
>
> Are you using 1.0 or 0.10 ? Those caps look like a mix of both.
>
>
> In 0.10 it's
> video/x-raw-rgb,endianness=...,{red,blue,green,alpha}_mask=..
>
> In 1.0 it's video/x-raw,format=(string)xyz
>
> Why are you creating the caps yourself anyway? Why not just forward/set
> the caps you get on the appsink?
>
> Cheers
>  -Tim
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130525/d6bc084b/attachment.html>


More information about the gstreamer-devel mailing list