media:media proto:protocol tool:tool-nameSee the SDP specification for definitions of media and protocol. Tool-name is the name of the tool you wish to be started to send/receive this session.
protoname:human readable versions of protocolProtoname is used at configure menus and labels on the user interface.
create:no
fmt:formatSee the SDP specification for a more complete definition of what is meant by a format.
More normally however a format definition will require additional configuration, and this can be done as follows:
fmt:format { fmtname:human readable version of format flags:command line flags for tool with this format }
Attributes can be of two types - either with a set of values, or just on/off.
On-off attributes can be configured as follows:
attr:attribute name { attrname:human readable version of attribute flags:command line flags for tool with this attribute }Attributes with a set of values can be configured as follows:
attr:attribute name { attrname:human readable version of attribute attrvalue:one possible value of attribute { attrvaluename:human readable version of this attribute vale flags:command line flags for tool with this attribute and value } attrvalue:another possible value of attribute { attrvaluename:human readable version of this attribute vale flags:command line flags for tool with this attribute and value } }Either type of attribute may be used within a format definition (if the attribute is format specific) or after all the format definitions are complete (if the attribute is independant of the format).
This mechanism assumes you can explicitly list all the values of an attribute. Whilst this is often the case, it is not always so, and sdr plugins also allow the use of the macro and value definitions to allow flexible passing of attribute values directly to the media tool. See below for more details.
noattr:attribute name { flags:command line flags for tool if this attribute is missing }A noattr definition must follow the equivalent attr definition.
media:audio proto:RTP/AVP tool:rat fmt:pcm { flags:-f pcm } fmt:dvi { flags:-f dvi } flags:-t $(TTL) flags:$(ADDRESS)/$(PORT)
For an rtp session with pcm format audio on address 224.2.3.4 and port 3456 with ttl 1, this would start the rat tool as follows:
rat -f pcm -t 1 224.2.3.4/3456As can be seen above, flags definitions can include variables that will be expanded when the session is started. As complete list of these variables is:
media:audio proto:vat tool:vat fmt:pcm attr:id { macro:ID { value:/$(VALUE) } } flags:$(ADDRESS)/$(PORT)$(ID)In this case, the session attribute attribute "id" needs to be passed to vat at the end of the command line. The special variable $(VALUE) is given the value of the "id" attribute, and this is substitutes in the string given in the "value" definition. The resulting string is stored in the $(ID) variable, and expanded in the same way normal variables are when the tool is run. If there is no "id" attribute in this particular session, then the $(ID) variable is set to the empty string.
For example, a session with address/port 224.5.6.7/5432 and no id field would be started as:
vat 224.5.6.7/5432and a session with the id atribute 1234 would have $(ID) defined as "/1234" and would be started as:
vat 224.5.6.7/5432/1234