CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
Loading...
Searching...
No Matches
ndi_to_cdi.c File Reference

This file contains definitions and functions for the NDI<>CDI Converter application. More...

#include <assert.h>
#include <inttypes.h>
#include <stdbool.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "cdi_baseline_profile_02_00_api.h"
#include "cdi_core_api.h"
#include "cdi_logger_api.h"
#include "cdi_os_api.h"
#include "fifo_api.h"
#include "test_common.h"
#include "utilities_api.h"
#include "ndi_test.h"
#include "ndi_wrapper.h"
#include <Processing.NDI.Lib.h>

Functions

void TestConnectionCallback (const CdiCoreConnectionCbData *cb_data_ptr)
 
static void ProcessCoreTxCallback (TestConnectionInfo *con_info_ptr, const CdiCoreCbData *core_cb_data_ptr)
 Process core Tx callback.
 
static void DoneWithPayload (TestConnectionInfo *con_info_ptr, FrameData *frame_data_ptr)
 Done with a NDI payload.
 
static void AvmTxCallback (const CdiAvmTxCbData *cb_data_ptr)
 Handle the Tx AVM callback. NOTE: Only used by the AVM API functions.
 
static CdiReturnStatus SendAvmPayload (FrameData *frame_data_ptr, CdiSgList *sgl_ptr, CdiPtpTimestamp *timestamp_ptr, CdiAvmConfig *avm_config_ptr, int stream_identifier)
 Send a payload using an AVM API function.
 
static CdiPtpTimestamp GetPtpTimestamp (TestConnectionInfo *con_info_ptr, const FrameData *frame_data_ptr)
 Return a CDI PTP timestamp for the specified NDI frame.
 
CdiReturnStatus NdiReceiverToCdiTransmitter (TestConnectionInfo *con_info_ptr)
 External reference.
 

Detailed Description

This file contains definitions and functions for the NDI<>CDI Converter application.

Function Documentation

◆ AvmTxCallback()

static void AvmTxCallback ( const CdiAvmTxCbData * cb_data_ptr)
static

Handle the Tx AVM callback. NOTE: Only used by the AVM API functions.

Parameters
cb_data_ptrPointer to Tx AVM callback data.

◆ DoneWithPayload()

static void DoneWithPayload ( TestConnectionInfo * con_info_ptr,
FrameData * frame_data_ptr )
static

Done with a NDI payload.

Parameters
con_info_ptrPointer to test connection information.
frame_data_ptrPointer to NDI frame data.

◆ GetPtpTimestamp()

static CdiPtpTimestamp GetPtpTimestamp ( TestConnectionInfo * con_info_ptr,
const FrameData * frame_data_ptr )
static

Return a CDI PTP timestamp for the specified NDI frame.

Parameters
con_info_ptrPointer to connection information structure.
frame_data_ptrPointer to frame data structure.
Returns
Timestamp that should be used for the frame.

◆ ProcessCoreTxCallback()

static void ProcessCoreTxCallback ( TestConnectionInfo * con_info_ptr,
const CdiCoreCbData * core_cb_data_ptr )
static

Process core Tx callback.

Parameters
con_info_ptrPointer to test connection state data.
core_cb_data_ptrPointer to core callback data.

◆ SendAvmPayload()

static CdiReturnStatus SendAvmPayload ( FrameData * frame_data_ptr,
CdiSgList * sgl_ptr,
CdiPtpTimestamp * timestamp_ptr,
CdiAvmConfig * avm_config_ptr,
int stream_identifier )
static

Send a payload using an AVM API function.

Parameters
frame_data_ptrPointer to frame data structure.
sgl_ptrPointer to SGL.
timestamp_ptrPointer to timestamp.
avm_config_ptrPointer to the generic configuration structure to use for the stream.
stream_identifierStream identifier.
Returns
A value from the CdiReturnStatus enumeration.

◆ TestConnectionCallback()

void TestConnectionCallback ( const CdiCoreConnectionCbData * cb_data_ptr)
extern

Handle the connection callback.

Parameters
cb_data_ptrPointer to core connection callback data.