mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
8c9cd079d4
Original commit message from CVS: Merge CAPS branch
54 lines
1.3 KiB
Text
54 lines
1.3 KiB
Text
|
|
Canonical caps/structure strings (those created by gst_caps_to_string()
|
|
and gst_structure_to_string()) do not have AUTO_VALUE.
|
|
|
|
Goals:
|
|
- UTF-8 clean
|
|
- SIMPLE_STRINGs should cover most simple cases that don't interfere
|
|
with other parts of the gst_caps or gst_parse grammar
|
|
- forward-parsed grammar
|
|
- quoted strings handle backslash escaping as well as XML-style (&ack;)
|
|
escaping
|
|
|
|
CAPS = STRUCTURE [ ';' STRUCTURE ]*
|
|
|
|
STRUCTURE = STRUCTURE_NAME [ ',' FIELD ]*
|
|
|
|
STRUCTURE_NAME = STRING
|
|
|
|
FIELD = FIELD_NAME '=' TYPED_VALUE
|
|
|
|
FIELD_NAME = SIMPLE_STRING
|
|
|
|
TYPED_VALUE = CANONICAL_VALUE | AUTO_VALUE
|
|
|
|
CANONICAL_VALUE = '{' TYPED_VALUE [ ',' TYPED_VALUE ]* '}'
|
|
| '[' TYPED_VALUE ',' TYPED_VALUE ']'
|
|
| '(' TYPE ')' VALUE
|
|
|
|
AUTO_VALUE = [-+]?[0-9][0-9]*
|
|
| [-+]?[0-9][0-9]*[.][0-9]*[eE][-+][0-9]*
|
|
| STRING
|
|
|
|
VALUE = STRING
|
|
|
|
STRING = ["][^"]["]
|
|
| ['][^'][']
|
|
| SIMPLE_STRING
|
|
|
|
SIMPLE_STRING = [A-Za-z0-9_+-:./]+
|
|
|
|
TYPE = "int" | "i" | "float" | "f" | "double" | "d" | "fourcc" | "4"
|
|
| "boolean" | "bool" | "b"
|
|
| GTYPE
|
|
|
|
|
|
Canonical Examples:
|
|
|
|
"audio/raw"
|
|
"audio/raw", rate=(int)44100
|
|
"audio/raw", rate=(int)44100, signed=(boolean)true
|
|
"audio/raw", rate={ (int)44100, (int)48000 }
|
|
"audio/raw", rate=[ (int)8000, (int)48000 ]
|
|
|
|
|