NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
Ethernet Audio/Video Bridge API

Detailed Description

Describes the available application controls for the Ethernet Audio/Video Bridge (EAVB.)

The Ethernet Audio Video Bridge (EAVB) carries different types of packets (e.g., audio and video) on different virtual LANs (VLANs), using IEEE P802.1p tagging to distinguish different types of packets. This saves applications from having to monitor all of the packets delivered to the physical interface; an application can listen instead to the VLAN interface that delivers the type of packets that interest it.

The avtp_buffer data is arranged in the following ways:

Data Structures

struct  tagNvAvtp1722Header
 Defines the AVTP 1722 header structure. More...
 
struct  tagNvAvtp618836Fsd3Hdr
 Defines the AVTP 61883-6 header structure. More...
 
struct  tagNvAvtp618834Fsd3Hdr
 Holds the AVTP 61883-4 header structure. More...
 
struct  tagNvAvtpCvfFsd2Hdr
 Holds the AVTP CVF header structure fsd2. More...
 
struct  tagNvAvtpCvfFsd3Hdr
 Holds the AVTP CVF header structure. More...
 
struct  tagNvAvtpCvfH264PayloadHdr
 
struct  tagNvAvtp1722AAFFsd2
 Defines the 1722 AVTP audio format fsd2. More...
 
struct  tagNvAvtp1722AAFFsd3Hdr
 Defines the 1722 AVTP audio format header. More...
 
struct  tagNvAvtpEthernetHeader
 Defines the Ethernet header structure. More...
 
struct  tagNvAvtpCRFHeader
 
struct  tagNvAvtpInputParams
 Specifies the AVTP input parameters structure. More...
 
struct  tagNvAvtp1722AAFParams
 Defines the AVTP AAF input parameter structure. More...
 
struct  tagNvAvtpCRFParams
 Defines the CRF input parameters structure. More...
 

Macros

#define NVAVTP_ETH_INT_MAX   64
 
#define NVAVTP_ETH_INT_MAX   64
 
#define NV_AVTP_ETHERNET_HEADER_SIZE   sizeof(NvAvtpEthernetHeader)
 Macro for header offsets. See Ethernet Audio/Video Bridge API. More...
 
#define NV_AVTP_ETHERNET_HEADER_WITHOUT_QTAG_SIZE   (sizeof(NvAvtpEthernetHeader) - 4)
 Macro for header offsets. See Ethernet Audio/Video Bridge API. More...
 
#define NV_AVTP_1722_HEADER_SIZE   sizeof(NvAvtp1722Header)
 Macro for header offsets. See Ethernet Audio/Video Bridge API. More...
 
#define NV_AVTP_CRF_HEADER_SIZE   sizeof(NvAvtpCRFHeader)
 Macro for header offsets. See Ethernet Audio/Video Bridge API. More...
 
#define NV_AVTP_61883_6_FSD3_HEADER_SIZE   sizeof(NvAvtp618836Fsd3Hdr)
 Macro for header offsets. See Ethernet Audio/Video Bridge API. More...
 
#define NV_AVTP_61883_4_FSD3_HEADER_SIZE   sizeof(NvAvtp618834Fsd3Hdr)
 Macro for header offsets. See Ethernet Audio/Video Bridge API. More...
 
#define NV_AVTP_1722_AAF_FSD3_HEADER_SIZE   sizeof(NvAvtp1722AAFFsd3Hdr)
 Macro for header offsets. See Ethernet Audio/Video Bridge API. More...
 
#define NV_AVTP_1722_61883_HEADER_SIZE   8
 
#define NV_AVTP_CVF_FSD3_HEADER_SIZE   sizeof(NvAvtpCvfFsd3Hdr)
 Macro for header offsets. See Ethernet Audio/Video Bridge API. More...
 
#define NV_AVTP_H264_PAYLOAD_HEADER_SIZE   sizeof(NvAvtpH264PayloadHdr)
 Macro for header offsets. See Ethernet Audio/Video Bridge API. More...
 
#define NVAVTP_TSP_SIZE   188
 
#define NV_AVTP_MPEGTS_MAX_TS_PER_PKT   7
 
#define NV_AVTP_ETHER_TYPE_OFFSET   12
 

Typedefs

typedef unsigned char U8
 
typedef unsigned short U16
 
typedef unsigned int U32
 
typedef unsigned long long U64
 
typedef signed char S8
 
typedef signed short S16
 
typedef signed int S32
 
typedef signed long long S64
 
typedef enum tagNvAvtpSubHeaderType ENvAvtpSubHeaderType
 Defines AVTP sub-header types. More...
 
typedef enum tagNvAvtpStatus ENvAvtpStatus
 Indicates results from an AVTP function. More...
 
typedef enum tagNvAvtpBool ENvAvtpBool
 Defines Boolean flags for true/false states. More...
 
typedef struct tagNvAvtp1722Header NvAvtp1722Header
 Defines the AVTP 1722 header structure. More...
 
typedef struct tagNvAvtp618836Fsd3Hdr NvAvtp618836Fsd3Hdr
 Defines the AVTP 61883-6 header structure. More...
 
typedef struct tagNvAvtp618834Fsd3Hdr NvAvtp618834Fsd3Hdr
 Holds the AVTP 61883-4 header structure. More...
 
typedef struct tagNvAvtpCvfFsd2Hdr NvAvtpCvfFsd2Hdr
 Holds the AVTP CVF header structure fsd2. More...
 
typedef struct tagNvAvtpCvfFsd3Hdr NvAvtpCvfFsd3Hdr
 Holds the AVTP CVF header structure. More...
 
typedef struct tagNvAvtpCvfH264PayloadHdr NvAvtpH264PayloadHdr
 
typedef struct tagNvAvtp1722AAFFsd2 NvAvtp1722AAFFsd2
 Defines the 1722 AVTP audio format fsd2. More...
 
typedef struct tagNvAvtp1722AAFFsd3Hdr NvAvtp1722AAFFsd3Hdr
 Defines the 1722 AVTP audio format header. More...
 
typedef struct tagNvAvtpEthernetHeader NvAvtpEthernetHeader
 Defines the Ethernet header structure. More...
 
typedef struct tagNvAvtpCRFHeader NvAvtpCRFHeader
 
typedef struct tagNvAvtpInputParams NvAvtpInputParams
 Specifies the AVTP input parameters structure. More...
 
typedef struct tagNvAvtp1722AAFParams NvAvtp1722AAFParams
 Defines the AVTP AAF input parameter structure. More...
 
typedef struct tagNvAvtpCRFParams NvAvtpCRFParams
 Defines the CRF input parameters structure. More...
 
typedef voidNvAvtpContextHandle
 

Enumerations

enum  tagNvAvtpSubHeaderType {
  eNvAudio,
  eNvMpegts,
  eNvAAF,
  eNvCRF,
  eNvRawVideo,
  eNvCvf
}
 Defines AVTP sub-header types. More...
 
enum  tagNvAvtpStatus {
  eNvAvtpSuccess,
  eNvAvtpFail,
  eNvAvtpInvalidPointer,
  eNvAvtpAllocError,
  eNvAvtpUnsupported,
  eNvAvtpInvalidParam
}
 Indicates results from an AVTP function. More...
 
enum  tagNvAvtpBool {
  eNvAvtpFalse,
  eNvAvtpTrue
}
 Defines Boolean flags for true/false states. More...
 

Functions

ENvAvtpStatus NvAvtpInit (NvAvtpInputParams *pNvAvtpInpParams, NvAvtpContextHandle *phContext)
 Initializes prerequisites to start AVB communication, This function performs the following tasks: More...
 
ENvAvtpStatus NvAvtpDeinit (NvAvtpContextHandle hContext)
 Deinitializes AVB initializations and destroys the AVB context structure instance. More...
 
ENvAvtpStatus NvAvtpSetStaticAvtpHeader (NvAvtpContextHandle hContext, U8 *pPacket)
 Sets the static header part of the AVTP header. More...
 
ENvAvtpStatus NvAvtpSetPacketSize (NvAvtpContextHandle hContext, U16 numSampleUnits)
 Sets the AVTP packet size (header + payload) based on the number of samples to be sent per packet. More...
 
U32 NvAvtpGetPacketSize (NvAvtpContextHandle hContext)
 Gets the AVTP packet size required for the header and payload. More...
 
ENvAvtpStatus NvAvtpSetDestAdd (NvAvtpContextHandle hContext, U8 *pPacket, U8 *pDestAddr)
 Sets the Destination MAC Address in the packet header. More...
 
ENvAvtpStatus NvAvtpSetSrcAdd (NvAvtpContextHandle hContext, U8 *pPacket, U8 *pSrcAddr)
 Sets the Source MAC Address in the packet header. More...
 
ENvAvtpStatus NvAvtpSetQTagFields (NvAvtpContextHandle hContext, U8 *pPacket, U32 priority, U32 vid)
 Sets the QTag fields of the AVTP header. More...
 
ENvAvtpStatus NvAvtpSetSIDValid (NvAvtpContextHandle hContext, U8 *pPacket, U8 sidValid)
 Sets Stream ID validity. More...
 
ENvAvtpStatus NvAvtpSetStreamID (NvAvtpContextHandle hContext, U8 *pPacket, U8 *stream_id)
 Sets the stream ID in the packet header. More...
 
ENvAvtpStatus NvAvtpGetCurrentGptpTimeStamp (NvAvtpContextHandle hContext, U32 *pPtpTime)
 Gets the current time from PHC. More...
 
ENvAvtpStatus NvAvtpSetDynamicAvtpHeader (NvAvtpContextHandle hContext, U8 *pPacket)
 Sets the dynamic part of the packet header. More...
 
ENvAvtpStatus NvAvtpFillDataPayload (NvAvtpContextHandle hContext, U8 *pPacket, U8 *pPayload, U16 numSample)
 Sets the data payload in the AVTP packet. More...
 
U32 NvAvtpGetTimeStamp (NvAvtpContextHandle hContext, U8 *pPacket)
 Gets the timestamp in the 1722 header. More...
 
U8 NvAvtpGetSequenceNum (NvAvtpContextHandle hContext, U8 *pPacket)
 Gets the sequence number in the 1722 header. More...
 
U64 NvAvtpGetStreamId (NvAvtpContextHandle hContext, U8 *pPacket)
 Gets the stream id in the 1722 header. More...
 
ENvAvtpStatus NvAvtpGetStreamLength (NvAvtpContextHandle hContext, U8 *pPacket, U32 *streamLength)
 Gets the length of the data payload in the packet. More...
 
ENvAvtpStatus NvAvtpExtractDataPayload (NvAvtpContextHandle hContext, U8 *pPacket, U8 *pPayload)
 Gets the data payload from the AVTP packet. More...
 
ENvAvtpBool NvAvtpIs1722Packet (U8 *pPacket)
 Determines whether the Ethernet packet is an AVTP 1722 packet. More...
 
ENvAvtpStatus NvAvtpGetAAFParams (NvAvtpContextHandle hContext, U8 *pPacket, NvAvtp1722AAFParams *pAvtp1722AAFParameters)
 Gets the recorded AAF parameters from context. More...
 
ENvAvtpStatus NvAvtpParseAAFHeaders (NvAvtpContextHandle hContext, U8 *pPacket)
 Parses the AVTP AAF headers and populates the AAF parameter structure specified with hContext. More...
 
ENvAvtpStatus NvAvtpSetAAFParams (NvAvtpContextHandle hContext, NvAvtp1722AAFParams *pAvtp1722AAFParameters)
 Sets the AAF parameters into the context. More...
 
ENvAvtpStatus NvAvtpSetAAFDefaultParams (NvAvtpContextHandle hContext)
 Sets the default AAF parameters into the context. More...
 
ENvAvtpStatus NvAvtpSetStaticAAFHeader (NvAvtpContextHandle hContext, U8 *pPacket)
 Sets the static header part of the AVTP header. More...
 
ENvAvtpStatus NvAvtpParseAvtpPacket (NvAvtpContextHandle hContext, U8 *pPacket, ENvAvtpSubHeaderType *peDataType)
 Parses the AVTP packet and populates the header offsets specified with hContext. More...
 
ENvAvtpStatus NvAvtpGetMpegtsDataPayloadSize (NvAvtpContextHandle hContext, U8 *pPacket, U32 *dataPayloadSize)
 Gets the payload size of the AVTP MPEGTS packet. More...
 
ENvAvtpStatus NvAvtpGetCvfDataPayloadSize (NvAvtpContextHandle hContext, U8 *pPacket, U32 *dataPayloadSize)
 Gets the payload size of the AVTP H264 packet. More...
 
ENvAvtpStatus NvAvtpGetAudioDataPayloadSize (NvAvtpContextHandle hContext, U8 *pPacket, U32 *dataPayloadSize)
 Gets the payload size of the AVTP audio packet. More...
 
ENvAvtpStatus NvAvtpGetCRFParams (NvAvtpContextHandle hContext, U8 *pPacket, NvAvtpCRFParams *pAvtpCRFParameters)
 Gets the recorded CRF parameters from the context. More...
 

Macro Definition Documentation

◆ NV_AVTP_1722_61883_HEADER_SIZE

#define NV_AVTP_1722_61883_HEADER_SIZE   8

Definition at line 354 of file nvavtp.h.

◆ NV_AVTP_1722_AAF_FSD3_HEADER_SIZE

#define NV_AVTP_1722_AAF_FSD3_HEADER_SIZE   sizeof(NvAvtp1722AAFFsd3Hdr)

Macro for header offsets. See Ethernet Audio/Video Bridge API.

Definition at line 353 of file nvavtp.h.

◆ NV_AVTP_1722_HEADER_SIZE

#define NV_AVTP_1722_HEADER_SIZE   sizeof(NvAvtp1722Header)

Macro for header offsets. See Ethernet Audio/Video Bridge API.

Definition at line 345 of file nvavtp.h.

◆ NV_AVTP_61883_4_FSD3_HEADER_SIZE

#define NV_AVTP_61883_4_FSD3_HEADER_SIZE   sizeof(NvAvtp618834Fsd3Hdr)

Macro for header offsets. See Ethernet Audio/Video Bridge API.

Definition at line 351 of file nvavtp.h.

◆ NV_AVTP_61883_6_FSD3_HEADER_SIZE

#define NV_AVTP_61883_6_FSD3_HEADER_SIZE   sizeof(NvAvtp618836Fsd3Hdr)

Macro for header offsets. See Ethernet Audio/Video Bridge API.

Definition at line 349 of file nvavtp.h.

◆ NV_AVTP_CRF_HEADER_SIZE

#define NV_AVTP_CRF_HEADER_SIZE   sizeof(NvAvtpCRFHeader)

Macro for header offsets. See Ethernet Audio/Video Bridge API.

Definition at line 347 of file nvavtp.h.

◆ NV_AVTP_CVF_FSD3_HEADER_SIZE

#define NV_AVTP_CVF_FSD3_HEADER_SIZE   sizeof(NvAvtpCvfFsd3Hdr)

Macro for header offsets. See Ethernet Audio/Video Bridge API.

Definition at line 356 of file nvavtp.h.

◆ NV_AVTP_ETHER_TYPE_OFFSET

#define NV_AVTP_ETHER_TYPE_OFFSET   12

Definition at line 362 of file nvavtp.h.

◆ NV_AVTP_ETHERNET_HEADER_SIZE

#define NV_AVTP_ETHERNET_HEADER_SIZE   sizeof(NvAvtpEthernetHeader)

Macro for header offsets. See Ethernet Audio/Video Bridge API.

Definition at line 341 of file nvavtp.h.

◆ NV_AVTP_ETHERNET_HEADER_WITHOUT_QTAG_SIZE

#define NV_AVTP_ETHERNET_HEADER_WITHOUT_QTAG_SIZE   (sizeof(NvAvtpEthernetHeader) - 4)

Macro for header offsets. See Ethernet Audio/Video Bridge API.

Definition at line 343 of file nvavtp.h.

◆ NV_AVTP_H264_PAYLOAD_HEADER_SIZE

#define NV_AVTP_H264_PAYLOAD_HEADER_SIZE   sizeof(NvAvtpH264PayloadHdr)

Macro for header offsets. See Ethernet Audio/Video Bridge API.

Definition at line 358 of file nvavtp.h.

◆ NV_AVTP_MPEGTS_MAX_TS_PER_PKT

#define NV_AVTP_MPEGTS_MAX_TS_PER_PKT   7

Definition at line 361 of file nvavtp.h.

◆ NVAVTP_ETH_INT_MAX [1/2]

#define NVAVTP_ETH_INT_MAX   64

Definition at line 363 of file nvavtp.h.

◆ NVAVTP_ETH_INT_MAX [2/2]

#define NVAVTP_ETH_INT_MAX   64

Definition at line 363 of file nvavtp.h.

◆ NVAVTP_TSP_SIZE

#define NVAVTP_TSP_SIZE   188

Definition at line 360 of file nvavtp.h.

Typedef Documentation

◆ ENvAvtpBool

typedef enum tagNvAvtpBool ENvAvtpBool

Defines Boolean flags for true/false states.

◆ ENvAvtpStatus

Indicates results from an AVTP function.

◆ ENvAvtpSubHeaderType

Defines AVTP sub-header types.

◆ NvAvtp1722AAFFsd2

Defines the 1722 AVTP audio format fsd2.

◆ NvAvtp1722AAFFsd3Hdr

Defines the 1722 AVTP audio format header.

◆ NvAvtp1722AAFParams

Defines the AVTP AAF input parameter structure.

◆ NvAvtp1722Header

Defines the AVTP 1722 header structure.

◆ NvAvtp618834Fsd3Hdr

Holds the AVTP 61883-4 header structure.

◆ NvAvtp618836Fsd3Hdr

Defines the AVTP 61883-6 header structure.

◆ NvAvtpContextHandle

Definition at line 365 of file nvavtp.h.

◆ NvAvtpCRFHeader

◆ NvAvtpCRFParams

Defines the CRF input parameters structure.

◆ NvAvtpCvfFsd2Hdr

Holds the AVTP CVF header structure fsd2.

◆ NvAvtpCvfFsd3Hdr

Holds the AVTP CVF header structure.

◆ NvAvtpEthernetHeader

Defines the Ethernet header structure.

◆ NvAvtpH264PayloadHdr

◆ NvAvtpInputParams

Specifies the AVTP input parameters structure.

◆ S16

typedef signed short S16

Definition at line 54 of file nvavtp.h.

◆ S32

typedef signed int S32

Definition at line 55 of file nvavtp.h.

◆ S64

typedef signed long long S64

Definition at line 56 of file nvavtp.h.

◆ S8

typedef signed char S8

Definition at line 53 of file nvavtp.h.

◆ U16

typedef unsigned short U16

Definition at line 50 of file nvavtp.h.

◆ U32

typedef unsigned int U32

Definition at line 51 of file nvavtp.h.

◆ U64

typedef unsigned long long U64

Definition at line 52 of file nvavtp.h.

◆ U8

typedef unsigned char U8

Definition at line 49 of file nvavtp.h.

Enumeration Type Documentation

◆ tagNvAvtpBool

Defines Boolean flags for true/false states.

Enumerator
eNvAvtpFalse 

Indicates false.

eNvAvtpTrue 

Indicates true.

Definition at line 94 of file nvavtp.h.

◆ tagNvAvtpStatus

Indicates results from an AVTP function.

Enumerator
eNvAvtpSuccess 

Indicates success.

eNvAvtpFail 

Indicates failure.

eNvAvtpInvalidPointer 

Indicates a null pointer argument.

eNvAvtpAllocError 

Indicates a memory allocation error.

eNvAvtpUnsupported 

Indicates an unsupported setting.

eNvAvtpInvalidParam 

Indicates an invalid entry.

Definition at line 78 of file nvavtp.h.

◆ tagNvAvtpSubHeaderType

Defines AVTP sub-header types.

Enumerator
eNvAudio 

Specifies IEC 61883-6 audio and music data transmission protocol (uncompressed audio).

eNvMpegts 

Specifies IEC 61883-4 MPEG2-TS data transmission.

eNvAAF 

Specifies 1722 AVTP audio format.

eNvCRF 

Specifies 1722 AVTP clock reference frame.

eNvRawVideo 

Specifies IEC 61883-8 61883-8 transmission of ITU-R BT.601-style digital video data (raw video.)

eNvCvf 

Specifies 1722 CVF format.

Definition at line 60 of file nvavtp.h.

Function Documentation

◆ NvAvtpDeinit()

ENvAvtpStatus NvAvtpDeinit ( NvAvtpContextHandle  hContext)

Deinitializes AVB initializations and destroys the AVB context structure instance.

Parameters
[in]hContextA handle to the AVB context structure to destroy.

◆ NvAvtpExtractDataPayload()

ENvAvtpStatus NvAvtpExtractDataPayload ( NvAvtpContextHandle  hContext,
U8 pPacket,
U8 pPayload 
)

Gets the data payload from the AVTP packet.

Parameters
[in]hContextA handle to the AVB context structure.
[in]pPacketA pointer to an AVTP packet.
[out]pPayloadA pointer to the data payload.

◆ NvAvtpFillDataPayload()

ENvAvtpStatus NvAvtpFillDataPayload ( NvAvtpContextHandle  hContext,
U8 pPacket,
U8 pPayload,
U16  numSample 
)

Sets the data payload in the AVTP packet.

Parameters
[in]hContextA handle to the AVB context structure.
[in]pPacketA pointer to the AVTP packet.
[in]pPayloadA pointer to the data payload.
[in]numSampleSpecifies the number of samples in the packet.

◆ NvAvtpGetAAFParams()

ENvAvtpStatus NvAvtpGetAAFParams ( NvAvtpContextHandle  hContext,
U8 pPacket,
NvAvtp1722AAFParams pAvtp1722AAFParameters 
)

Gets the recorded AAF parameters from context.

Parameters
[in]hContextA handle to the AVB context structure.
[in]pPacketA pointer to an AVTP packet.
[out]pAvtp1722AAFParametersA pointer to the AAF parameters.

◆ NvAvtpGetAudioDataPayloadSize()

ENvAvtpStatus NvAvtpGetAudioDataPayloadSize ( NvAvtpContextHandle  hContext,
U8 pPacket,
U32 dataPayloadSize 
)

Gets the payload size of the AVTP audio packet.

Parameters
[in]hContextA handle to the AVB context structure.
[in]pPacketA pointer to the AVTP packet.
[out]dataPayloadSizeA pointer to the payload size of the AVTP audio packet.

◆ NvAvtpGetCRFParams()

ENvAvtpStatus NvAvtpGetCRFParams ( NvAvtpContextHandle  hContext,
U8 pPacket,
NvAvtpCRFParams pAvtpCRFParameters 
)

Gets the recorded CRF parameters from the context.

Parameters
[in]hContextA handle to the AVB context structure.
[in]pPacketA pointer to the AVTP packet.
[out]pAvtpCRFParametersA pointer to the recorded CRF parameters from the context.

◆ NvAvtpGetCurrentGptpTimeStamp()

ENvAvtpStatus NvAvtpGetCurrentGptpTimeStamp ( NvAvtpContextHandle  hContext,
U32 pPtpTime 
)

Gets the current time from PHC.

Parameters
[in]hContextA handle to the AVB context structure.
[out]pPtpTimeA pointer to the PHC timestamp.

◆ NvAvtpGetCvfDataPayloadSize()

ENvAvtpStatus NvAvtpGetCvfDataPayloadSize ( NvAvtpContextHandle  hContext,
U8 pPacket,
U32 dataPayloadSize 
)

Gets the payload size of the AVTP H264 packet.

Parameters
[in]hContextA handle to the AVB context structure.
[in]pPacketA pointer to the AVTP packet.
[out]dataPayloadSizeA pointer to the payload size of the AVTP H264 packet.

◆ NvAvtpGetMpegtsDataPayloadSize()

ENvAvtpStatus NvAvtpGetMpegtsDataPayloadSize ( NvAvtpContextHandle  hContext,
U8 pPacket,
U32 dataPayloadSize 
)

Gets the payload size of the AVTP MPEGTS packet.

Parameters
[in]hContextA handle to the AVB context structure.
[in]pPacketA pointer to the AVTP packet.
[out]dataPayloadSizeA pointer to the payload size of the AVTP MPEGTS packet.

◆ NvAvtpGetPacketSize()

U32 NvAvtpGetPacketSize ( NvAvtpContextHandle  hContext)

Gets the AVTP packet size required for the header and payload.

Parameters
[in]hContextA handle to the AVB context structure.

◆ NvAvtpGetSequenceNum()

U8 NvAvtpGetSequenceNum ( NvAvtpContextHandle  hContext,
U8 pPacket 
)

Gets the sequence number in the 1722 header.

Parameters
[in]hContextA handle to the AVB context structure.
[in]pPacketA pointer to an AVTP packet.
Returns
The sequence number in the 1722 header.

◆ NvAvtpGetStreamId()

U64 NvAvtpGetStreamId ( NvAvtpContextHandle  hContext,
U8 pPacket 
)

Gets the stream id in the 1722 header.

Parameters
[in]hContextA handle to the AVB context structure.
[in]pPacketA pointer to an AVTP packet.

◆ NvAvtpGetStreamLength()

ENvAvtpStatus NvAvtpGetStreamLength ( NvAvtpContextHandle  hContext,
U8 pPacket,
U32 streamLength 
)

Gets the length of the data payload in the packet.

Parameters
[in]hContextA handle to the AVB context structure.
[in]pPacketA pointer to an AVTP packet.
[out]streamLengthA pointer to the stream length.

◆ NvAvtpGetTimeStamp()

U32 NvAvtpGetTimeStamp ( NvAvtpContextHandle  hContext,
U8 pPacket 
)

Gets the timestamp in the 1722 header.

Parameters
[in]hContextA handle to the AVB context structure.
[in]pPacketA pointer to an AVTP packet.
Returns
The timestamp in the 1722 header.

◆ NvAvtpInit()

ENvAvtpStatus NvAvtpInit ( NvAvtpInputParams pNvAvtpInpParams,
NvAvtpContextHandle phContext 
)

Initializes prerequisites to start AVB communication, This function performs the following tasks:

  • Initializes for MRP static stream reservation.
  • Initializes communication with gPTP daemon.
  • Populates the default headers.
  • Creates an AVB context structure instance.
Parameters
[in]pNvAvtpInpParamsA pointer to the input parameters.
[in]phContextA pointer to the context to create.

◆ NvAvtpIs1722Packet()

ENvAvtpBool NvAvtpIs1722Packet ( U8 pPacket)

Determines whether the Ethernet packet is an AVTP 1722 packet.

Parameters
[in]pPacketA pointer to an AVTP packet.
Returns
A Boolean that, if true, indicates the packet is an AVTP 1722 packet.

◆ NvAvtpParseAAFHeaders()

ENvAvtpStatus NvAvtpParseAAFHeaders ( NvAvtpContextHandle  hContext,
U8 pPacket 
)

Parses the AVTP AAF headers and populates the AAF parameter structure specified with hContext.

Parameters
[in]hContextA handle to the AVB context structure.
[in]pPacketA pointer to an AVTP packet.

◆ NvAvtpParseAvtpPacket()

ENvAvtpStatus NvAvtpParseAvtpPacket ( NvAvtpContextHandle  hContext,
U8 pPacket,
ENvAvtpSubHeaderType peDataType 
)

Parses the AVTP packet and populates the header offsets specified with hContext.

Checks if there are any packet drops, and checks which type of 61883 packet is present.

Parameters
[in]hContextA handle to the AVB context structure.
[in]pPacketA pointer to the AVTP packet.
[in]peDataTypeA pointer to the AVTP subheader type.

◆ NvAvtpSetAAFDefaultParams()

ENvAvtpStatus NvAvtpSetAAFDefaultParams ( NvAvtpContextHandle  hContext)

Sets the default AAF parameters into the context.

Parameters
[in]hContextA handle to the AVB context structure.

◆ NvAvtpSetAAFParams()

ENvAvtpStatus NvAvtpSetAAFParams ( NvAvtpContextHandle  hContext,
NvAvtp1722AAFParams pAvtp1722AAFParameters 
)

Sets the AAF parameters into the context.

Parameters
[in]hContextA handle to the AVB context structure.
[in]pAvtp1722AAFParametersA pointer to NvAvtp1722AAFParams.

◆ NvAvtpSetDestAdd()

ENvAvtpStatus NvAvtpSetDestAdd ( NvAvtpContextHandle  hContext,
U8 pPacket,
U8 pDestAddr 
)

Sets the Destination MAC Address in the packet header.

Parameters
[in]hContextA handle to the AVB context structure.
[in]pPacketA pointer to the AVTP packet.
[in]pDestAddrA pointer to the destination address.

◆ NvAvtpSetDynamicAvtpHeader()

ENvAvtpStatus NvAvtpSetDynamicAvtpHeader ( NvAvtpContextHandle  hContext,
U8 pPacket 
)

Sets the dynamic part of the packet header.

Parameters
[in]hContextA handle to the AVB context structure.
[in]pPacketA pointer to the AVTP packet.

◆ NvAvtpSetPacketSize()

ENvAvtpStatus NvAvtpSetPacketSize ( NvAvtpContextHandle  hContext,
U16  numSampleUnits 
)

Sets the AVTP packet size (header + payload) based on the number of samples to be sent per packet.

Parameters
[in]hContextA handle to the AVB context structure.
[in]numSampleUnitsSpecifies the number of samples per packet.

◆ NvAvtpSetQTagFields()

ENvAvtpStatus NvAvtpSetQTagFields ( NvAvtpContextHandle  hContext,
U8 pPacket,
U32  priority,
U32  vid 
)

Sets the QTag fields of the AVTP header.

Parameters
[in]hContextA handle to the AVB context structure.
[in]pPacketA pointer to the AVTP packet.
[in]prioritySpecifies the priority of the stream.
[in]vidSpecifies the VLAN ID.

◆ NvAvtpSetSIDValid()

ENvAvtpStatus NvAvtpSetSIDValid ( NvAvtpContextHandle  hContext,
U8 pPacket,
U8  sidValid 
)

Sets Stream ID validity.

Parameters
[in]hContextA handle to the AVB context structure.
[in]pPacketA pointer to the AVTP packet.
[in]sidValidSpecifies the validity of the stream ID.

◆ NvAvtpSetSrcAdd()

ENvAvtpStatus NvAvtpSetSrcAdd ( NvAvtpContextHandle  hContext,
U8 pPacket,
U8 pSrcAddr 
)

Sets the Source MAC Address in the packet header.

Parameters
[in]hContextA handle to the AVB context structure.
[in]pPacketA pointer to the AVTP packet.
[in]pSrcAddrA pointer to the source address.

◆ NvAvtpSetStaticAAFHeader()

ENvAvtpStatus NvAvtpSetStaticAAFHeader ( NvAvtpContextHandle  hContext,
U8 pPacket 
)

Sets the static header part of the AVTP header.

Parameters
[in]hContextA handle to the AVB context structure.
[in]pPacketA pointer to the AVTP packet.

◆ NvAvtpSetStaticAvtpHeader()

ENvAvtpStatus NvAvtpSetStaticAvtpHeader ( NvAvtpContextHandle  hContext,
U8 pPacket 
)

Sets the static header part of the AVTP header.

Parameters
[in]hContextA handle to the AVB context structure.
[in]pPacketA pointer to the AVTP packet.

◆ NvAvtpSetStreamID()

ENvAvtpStatus NvAvtpSetStreamID ( NvAvtpContextHandle  hContext,
U8 pPacket,
U8 stream_id 
)

Sets the stream ID in the packet header.

Parameters
[in]hContextA handle to the AVB context structure.
[in]pPacketA pointer to the AVTP packet.
[in]stream_idA pointer to the stream ID.