Video format in gstreamer-1.0

Tim-Philipp Müller t.i.m at zen.co.uk
Tue Sep 24 07:25:11 PDT 2013


On Tue, 2013-09-24 at 16:04 +0200, Thomas Scheuermann wrote:

Hi,

> I want to port my application to gstreamer-1.0 and I use there the appsink.
> I specify there with the caps what kind of video data I want to get. In
> gstreamer-0.10 I specified it the following way:
> 
> caps =
> gst_caps_from_string("video/x-raw-yuv,format=(fourcc){YUY2};video/x-raw-rgb,format=(fourcc){RGBx}");
> 
> Now I want to do this for gstreamer-1.0 but I can't get this working. I
> tried:
> 
> caps = gst_caps_from_string("video/x-raw,format=(fourcc){YUY2}");
> 
> but g_assert(caps) failed.
> For me it is important to get the YUY2 format from videoconvert.
> 
> How do I have to specify the caps in gstreamer-1.0 for my needs?

The format field is now a string, so it should be:

 video/x-raw,format=YUY2

or

 video/x-raw,format=(string)YUY2

"video/x-raw-yuv,format=(fourcc){YUY2};video/x-raw-rgb,format=(fourcc){RGBx}" could be expressed as:

video/x-raw,format={ YUY2, RGBx }

but "video/x-raw-rgb,format=(fourcc){RGBx}" was never valid in 0.10, the
RGB caps worked differently in 0.10, there was no format fourcc, you had
to express this via red/green/blue/alpha_mask fields and endianness etc.

Cheers
 -Tim



More information about the gstreamer-devel mailing list