Open-AVB AVTP Pipeline SDK
1.4
|
The configuration of streams (talkers and listeners) is controlled via the structure openavb_tl_cfg_t that is passed to the openavbTLConfigure function. There are 3 major sections within the configuration structure. The general talker / listener (AVTP stream) section, the mapping module section and the interface module section. The general section has settings used by the talker/listener module directly. The mapping module section has settings specific to the mapping module being used for the stream and the interface module section has settings specific to the interface module being used for the stream.
How the openavb_tl_cfg_t structure gets set is platform dependent. For the Linux reference implementation reading from .ini files is supported which in turn fills this structure. For RTOSes the stream configuration structure is usually set directly via code in the AVB host application module. Therefore the use of .ini files is a layer above the what the core AVB stack uses. The Release Notes for the AVB port should be referenced with regards to where the configuration values can be set.
Here is a sample configuration structure initialization for a H.264 listener.
These are common stream configuration values.
Name | Description |
---|---|
role | Sets the process as a talker or listener. Valid values are talker or listener. |
stream_addr | Used on the listener and should be set to the mac address of the talker. |
stream_uid | The unique stream ID. The talker and listener must both have this set the same. |
dest_addr | Destination multicast address for the stream. If using
|
max_interval_frames | The maximum number of packets that will be sent during an observation interval. This is only used on the talker. |
max_frame_size | Maximum size of the frame |
sr_class | A talker only setting. Values are either A or B. If not set an internal default is used. |
sr_rank | A talker only setting. If not set an internal default is used. |
max_transit_usec | Allows manually specifying a maximum transit time.
|
max_transmit_deficit_usec | Allows setting the maximum packet transmit rate deficit that will be recovered when a talker falls behind. When a talker can not keep up with the specified transmit rate it builds up a deficit and will attempt to make up for this deficit by sending more packets. There is normally some variability in the transmit rate because of other demands on the system so this is expected. However, without this bounding value the deficit could grew too large in cases such where more streams are started than the system can support and when the number of streams is reduced the remaining streams will attempt to recover this deficit by sending packets at a higher rate. This can cause a problem at the listener side and significantly delay the recovery time before media playback will return to normal. Typically this value can be set to the expected buffer size (in usec) that listeners are expected to be buffering. Note: This is only used on a talker side. |
internal_latency | Allows mannually specifying an internal latency time. This is used only on the talker. |
max_stale | The number of microseconds beyond the presentation time that media queue items will be purged because they are too old (past the presentation time). Note: needing to purge old media queue items is often a sign of some other problem. |
raw_tx_buffers | The number of raw socket transmit buffers. Typically 4 - 8 are good values. This is only used by the talker. If not set internal defaults are used. |
raw_rx_buffers | The number of raw socket receive buffers. Typically 50 - 100 are good values. This is only used by the listener. If not set internal defaults are used. |
report_seconds | How often to output stats. Defaults to 10 seconds. 0 turns off the stats. |
tx_blocking_in_intf | The interface module will block until data is available. This is a talker only configuration value and not all interface modules support it. |
pMapInitFn | Pointer to the mapping module initialization function. Since this is a pointer to a function addresss is it not directly set in platforms that use a .ini file. |
IntfInitFn | Pointer to the interface module initialization function. Since this is a pointer to a function addresss is it not directly set in platforms that use a .ini file. |
Some platform ports have unique configuration values.
Name | Description |
---|---|
map_lib | The name of the library file (commonly a .so file) that implements the Initialize function. Comment out the map_lib name and link in the .c file to the openavb_tl executable to embed the mapper directly into the executable unit. There is no need to change anything else. The Initialize function will still be dynamically linked in. |
map_fn | The name of the initialize function in the mapper |
intf_lib | The name of the library file (commonly a .so file) that implements the Initialize function. Comment out the intf_lib name and link in the .c file to the openavb_tl executable to embed the interface directly into the executable unit. There is no need to change anything else. The Initialize function will still be dynamically linked in |
intf_fn | The name of the initialize function in the interface |
Below are a few interface / mapping module combinations. Notice that a single interface module may work with mutliple mapping modules. Additionally some mappings may work with multiple interface modules.
interface module | mapping module | description |
---|---|---|
echo | pipe | Demonstration interface used mostly for verification and testing purposes. |
alsa | uncmp_audio | Audio interface created for demonstration on Linux. Can be used to play captured (line in, mic) audio stream via EAVB |
alsa | aaf_audio | Audio interface created for demonstration on Linux. Can be used to play captured (line in, mic) audio stream via EAVB |
wav_file | uncmp_audio | Configuration for playing wave file via EAVB |
Each interface module and mapping module has unique configuration values. Details of these configuration values can be found in the reference pages for each module.