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.
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.
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>, ...}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With