<< >>

AVB Source Control

avb_source_format_t

Enum Values:

AVB_SOURCE_FORMAT_MBLA_24BIT
void get_avb_source_format(unsigned source_num, unsigned format, unsigned &rate)

Get the format of an AVB source.

Parameters:
  • source_num – the local source number
  • format – the format of the stream
  • rate – the sample rate of the stream in Hz
void set_avb_source_format(unsigned source_num, unsigned format, unsigned rate)

Set the format of an AVB source.

The AVB source format covers the encoding and sample rate of the source. Currently the format is limited to a single encoding MBLA 24 bit signed integers.

This setting will not take effect until the next time the source state moves from disabled to potential.

Parameters:
  • source_num – the local source number
  • format – the format of the stream
  • rate – the sample rate of the stream in Hz
void get_avb_source_channels(unsigned source_num, unsigned &n)

Get the channel count of an AVB source.

Parameters:
  • source_num – the local source number
  • n – the number of channels
void set_avb_source_channels(unsigned source_num, unsigned n)

Set the channel count of an AVB source.

Sets the number of channels in the stream.

This setting will not take effect until the next time the source state moves from disabled to potential.

Parameters:
  • source_num – the local source number
  • n – the number of channels
void get_avb_source_map(unsigned source_num, unsigned map[], unsigned &len)

Get the channel map of an avb source.

Parameters:
  • source_num – the local source number to set
  • map – the map, an array of integers giving the input FIFOs that make up the stream
  • len – the length of the map; should be equal to the number of channels in the stream
void set_avb_source_map(unsigned source_num, unsigned map[], unsigned len)

Set the channel map of an avb source.

Sets the channel map of a source i.e. the list of input FIFOs that constitute the stream.

This setting will not take effect until the next time the source state moves from disabled to potential.

Parameters:
  • source_num – the local source number to set
  • map – the map, an array of integers giving the input FIFOs that make up the stream
  • len – the length of the map; should be equal to the number of channels in the stream
void get_avb_source_sync(unsigned source_num, unsigned &mclock)

Get the media clock of an AVB source.

Parameters:
  • source_num – the local source number
  • mclock – the media clock number
void set_avb_source_sync(unsigned source_num, unsigned mclock)

Set the media clock of an AVB source.

Sets the media clock of the stream.

Parameters:
  • source_num – the local source number
  • mclock – the media clock number
void get_avb_source_presentation(unsigned source_num, unsigned &offset)

Get the presentation time offset of an AVB source.

Parameters:
  • source_num – the local source number to set
  • offset – the presentation offset in ms
void set_avb_source_presentation(unsigned source_num, unsigned offset)

Set the presentation time offset of an AVB source.

Sets the presentation time offset of a source i.e. the time after sampling that the stream should be played. The default value for this is 2ms.

This setting will not take effect until the next time the source state moves from disabled to potential.

Parameters:
  • source_num – the local source number to set
  • offset – the presentation offset in ms
void get_avb_source_name(unsigned source_num, char name[])

Get the name of an AVB source.

Parameters:
  • source_num – the local source number
  • name – the string containing the name
void set_avb_source_name(unsigned source_num, char name[])

Set the name of an AVB source.

Sets a human readable name for the stream. This name must be fewer than AVB_MAX_NAME_LEN which can be set in avb_conf.h.

Parameters:
  • source_num – the local source number
  • name – the string containing the name
void get_avb_source_dest(unsigned source_num, char addr[], unsigned &len)

Get the destination address of an avb source.

Parameters:
  • source_num – the local source number
  • addr – the destination address as an array of 6 bytes
  • len – the length of the address, should always be equal to 6
void set_avb_source_dest(unsigned source_num, char addr[], unsigned len)

Set the destination address of an avb source.

Sets the destination MAC address of a source. This setting will not take effect until the next time the source state moves from disabled to potential.

Parameters:
  • source_num – the local source number
  • addr – the destination address as an array of 6 bytes
  • len – the length of the address, should always be equal to 6
void get_avb_source_vlan(unsigned source_num, unsigned &vlan)

Get the destination vlan of an AVB source.

Parameters:
  • source_num – the local source number
  • vlan – the destination vlan id, The media clock number
void set_avb_source_vlan(unsigned source_num, unsigned vlan)

Set the destination vlan of an AVB source.

Sets the vlan that the source will transmit on. This defaults to 2.

This setting will not take effect until the next time the source state moves from disabled to potential.

Parameters:
  • source_num – the local source number
  • vlan – the destination vlan id, The media clock number
avb_source_state_t

The state of an AVB source.

Enum Values:

AVB_SOURCE_STATE_DISABLED

The source is disabled and will not transmit.

AVB_SOURCE_STATE_POTENTIAL

The source is enabled and will transmit if a listener requests it.

AVB_SOURCE_STATE_ENABLED

The source is enabled and transmitting.

void get_avb_source_state(unsigned source_num, avb_source_state_t &state)

Get the current state of an AVB source.

Parameters:
  • source_num – the local source number
  • state – the state of the source
void set_avb_source_state(unsigned source_num, avb_source_state_t state)

Set the current state of an AVB source.

Sets the current state of an AVB source. You cannot set the state to ENABLED. Changing the state to POTENTIAL turns the stream on and it will automatically change to ENABLED when connected to a listener and streaming.

Parameters:
  • source_num – the local source number
  • state – the state of the source