Open-AVB AVTP Pipeline SDK  1.4
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Typedefs | Enumerations
openavb_map_pub.h File Reference

Common mapper module public interface. More...

#include "openavb_types_pub.h"
#include "openavb_mediaq_pub.h"

Go to the source code of this file.

Data Structures

struct  openavb_map_cb_t
 Mapping callbacks structure. More...
 

Macros

#define MAP_NULL_OPENAVB_FORMAT   0x00
 Vendor Specific format used in AVTP headers.
 
#define MAP_PIPE_OPENAVB_FORMAT   0x01
 Vendor Specific format used in AVTP headers.
 
#define MAP_CTRL_OPENAVB_FORMAT   0x00
 Vendor Specific CTRL format used in AVTP headers.
 

Typedefs

typedef void(* openavb_map_cfg_cb_t )(media_q_t *pMediaQ, const char *name, const char *value)
 Configuration callback. More...
 
typedef U8(* openavb_map_subtype_cb_t )()
 AVB subtype callback. More...
 
typedef U8(* openavb_map_avtp_version_cb_t )()
 AVTP version callback. More...
 
typedef U16(* openavb_map_max_data_size_cb_t )(media_q_t *pMediaQ)
 Maximum data size callback. More...
 
typedef U32(* openavb_map_transmit_interval_cb_t )(media_q_t *pMediaQ)
 Transmit interval callback. More...
 
typedef void(* openavb_map_gen_init_cb_t )(media_q_t *pMediaQ)
 General initialize callback regardless if a talker or listener. More...
 
typedef void(* openavb_map_avdecc_init_cb_t )(media_q_t *pMediaQ, U16 configIdx, U16 descriptorType, U16 descriptorIdx)
 AVDECC initialize callback for both a talker or listener. More...
 
typedef void(* openavb_map_tx_init_cb_t )(media_q_t *pMediaQ)
 A call to this callback indicates that this mapping module will be a talker. More...
 
typedef tx_cb_ret_t(* openavb_map_tx_cb_t )(media_q_t *pMediaQ, U8 *pData, U32 *datalen)
 This talker callback will be called for each AVB observation interval. More...
 
typedef void(* openavb_map_rx_init_cb_t )(media_q_t *pMediaQ)
 A call to this callback indicates that this mapping module will be a listener. More...
 
typedef bool(* openavb_map_rx_cb_t )(media_q_t *pMediaQ, U8 *pData, U32 datalen)
 This callback occurs when running as a listener and data is available. More...
 
typedef void(* openavb_map_end_cb_t )(media_q_t *pMediaQ)
 This callback will be called when the stream is closing. More...
 
typedef void(* openavb_map_gen_end_cb_t )(media_q_t *pMediaQ)
 General shutdown callback regardless if a talker or listener. More...
 
typedef void(* openavb_map_set_src_bitrate_cb_t )(media_q_t *pMediaQ, unsigned int bitrate)
 Set source bitrate callback. More...
 
typedef unsigned int(* openavb_map_get_max_interval_frames_cb_t )(media_q_t *pMediaQ, SRClassIdx_t sr_class)
 Get max interval frames. More...
 
typedef bool(* openavb_map_initialize_fn_t )(media_q_t *pMediaQ, openavb_map_cb_t *pMapCB, U32 inMaxTransitUsec)
 Main initialization entry point into the mapping module. More...
 

Enumerations

enum  tx_cb_ret_t { TX_CB_RET_PACKET_NOT_READY = 0, TX_CB_RET_PACKET_READY, TX_CB_RET_MORE_PACKETS }
 Return value of talker callback. More...
 

Detailed Description

Common mapper module public interface.

Typedef Documentation

typedef void(* openavb_map_cfg_cb_t)(media_q_t *pMediaQ, const char *name, const char *value)

Configuration callback.

Each configuration name value pair for this mapping will result in this callback being called.

Parameters
pMediaQA pointer to the media queue for this stream
nameconfiguration item name
valueconfiguration item value
typedef U8(* openavb_map_subtype_cb_t)()

AVB subtype callback.

Returns
The AVB subtype for this mapping.
typedef U8(* openavb_map_avtp_version_cb_t)()

AVTP version callback.

Returns
The AVTP version for this mapping.
typedef U16(* openavb_map_max_data_size_cb_t)(media_q_t *pMediaQ)

Maximum data size callback.

Parameters
pMediaQA pointer to the media queue for this stream
Returns
The maximum data size that will be used.
typedef U32(* openavb_map_transmit_interval_cb_t)(media_q_t *pMediaQ)

Transmit interval callback.

Parameters
pMediaQA pointer to the media queue for this stream
Returns
The intended transmit interval (in frames per second). 0 = default for talker / class.
typedef void(* openavb_map_gen_init_cb_t)(media_q_t *pMediaQ)

General initialize callback regardless if a talker or listener.

Called once during openavbTLOpen().

Parameters
pMediaQA pointer to the media queue for this stream
typedef void(* openavb_map_avdecc_init_cb_t)(media_q_t *pMediaQ, U16 configIdx, U16 descriptorType, U16 descriptorIdx)

AVDECC initialize callback for both a talker or listener.

Entity model based configuration can be processed at this time. This callback is optional and only executed when AVDECC is used to connect streams. The descriptorType is expected to be of STREAM_INPUT for listeners and STREAM_OUTPUT for talkers.

Parameters
pMediaQA pointer to the media queue for this stream
configIdxcurrent configuration descriptor index for the Entity Model
descriptorTypeThe descriptorType is expected to be of STREAM_INPUT for listeners and STREAM_OUTPUT for talkers.
descriptorIdxdescriptor index in the Entity Model
See Also
openavb_intf_avdecc_init_cb_t
typedef void(* openavb_map_tx_init_cb_t)(media_q_t *pMediaQ)

A call to this callback indicates that this mapping module will be a talker.

Any talker initialization can be done in this function.

Parameters
pMediaQA pointer to the media queue for this stream
typedef tx_cb_ret_t(* openavb_map_tx_cb_t)(media_q_t *pMediaQ, U8 *pData, U32 *datalen)

This talker callback will be called for each AVB observation interval.

Parameters
pMediaQA pointer to the media queue for this stream
pDatapointer to data
dataLenlength of data
Returns
One of enum tx_cb_ret_t values.
typedef void(* openavb_map_rx_init_cb_t)(media_q_t *pMediaQ)

A call to this callback indicates that this mapping module will be a listener.

Any listener initialization can be done in this function.

Parameters
pMediaQA pointer to the media queue for this stream
typedef bool(* openavb_map_rx_cb_t)(media_q_t *pMediaQ, U8 *pData, U32 datalen)

This callback occurs when running as a listener and data is available.

Parameters
pMediaQA pointer to the media queue for this stream
pDatapointer to data
dataLenlength of data
typedef void(* openavb_map_end_cb_t)(media_q_t *pMediaQ)

This callback will be called when the stream is closing.

Parameters
pMediaQA pointer to the media queue for this stream
typedef void(* openavb_map_gen_end_cb_t)(media_q_t *pMediaQ)

General shutdown callback regardless if a talker or listener.

Called once during openavbTLClose().

Parameters
pMediaQA pointer to the media queue for this stream
typedef void(* openavb_map_set_src_bitrate_cb_t)(media_q_t *pMediaQ, unsigned int bitrate)

Set source bitrate callback.

Used to inform mapping module on the bitrate of the data source (computed by the interface module). The reported bitrate is used by the openavb_map_get_max_interval_frames_cb_t() callback.

Parameters
pMediaQA pointer to the media queue for this stream
bitrateData source bitrate
Note
This callback is optional, does not need to be implemented in the mapping module.
typedef unsigned int(* openavb_map_get_max_interval_frames_cb_t)(media_q_t *pMediaQ, SRClassIdx_t sr_class)

Get max interval frames.

Called to get the maximum number of frames per interval for the talker. The calculation is based on the source bitrate provided in the call to openavb_map_set_src_bitrate_cb_t(). Will override ini file "max_interval_frames" configuration option.

Parameters
pMediaQA pointer to the media queue for this stream
sr_classStream reservation class
Returns
Maximum number of frames per interval
Note
This callback is optional, does not need to be implemented in the mapping module.
typedef bool(* openavb_map_initialize_fn_t)(media_q_t *pMediaQ, openavb_map_cb_t *pMapCB, U32 inMaxTransitUsec)

Main initialization entry point into the mapping module.

Parameters
pMediaQA pointer to the media queue for this stream
[out]pMapCBPointer to the callback structure. All the members of this structure must be set during this function call.
inMaxTransitUsecmaximum expected latency.

Enumeration Type Documentation

Return value of talker callback.

Enumerator
TX_CB_RET_PACKET_NOT_READY 

Packet will not be sent on this callback interval.

TX_CB_RET_PACKET_READY 

Packet will be sent on this callback interal.

TX_CB_RET_MORE_PACKETS 

Packet will be sent and the callback called immediately again.