Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the gstreamer caps syntax?

Tags:

gstreamer

What is the syntax for caps, specifying media capabilities, in gstreamer? Caps are strings that specify the type of media allowed and look like "audio/x-raw-int,..." but I haven't been able to find good documentation on exactly what is allowed in a caps string.

like image 885
joeforker Avatar asked Mar 04 '10 15:03

joeforker


2 Answers

The syntax is:

<type>[,<property>=<value>]...

Note that the type is not a MIME type, however much it may look like one.

You can find out which caps properties elements support by using gst-inspect. It will proviide "pad templates" for the element's pads, which will specify the ranges of caps supported.

The GStreamer plugin writer's guide also contains a list of defined types which describes properties for common audio, video and image formats.

like image 172
daf Avatar answered Nov 02 '22 14:11

daf


Here is the format as far as I understand it:

caps = <caps_name>, <field_name>=<field_value>[; <caps>]
<caps_name> = image/jpeg etc
<field_name> = width etc
<field_value> = <fixed_field_value>|<ranged_field_value>|<multi_field_value>
<fixed_field_value> = 800 etc
<ranged_field_value> = [<lower_value>, <upper_value>]
<multi_field_value> = {<fixed_field_value>, <fixed_field_value>, <fixed_field_value>, ...}
like image 38
Meros Avatar answered Nov 02 '22 15:11

Meros