The declarations in this header file correspond to the definitions in cdi_utility_api.c and are meant to provide access to helpful SDK data structures and functions that are not part of the core API functionality.
More...
#include <stdbool.h>
#include <stdint.h>
Go to the source code of this file.
|
#define | CDI_INTERFACE |
| Specify C linkage when compiling as C++ and define API interface export for Windows.
|
|
#define | CDI_INVALID_ENUM_VALUE (-1) |
| Used to define an invalid enum found.
|
|
|
typedef struct CdiPtpTimestamp | CdiPtpTimestamp |
| Forward structure declaration to create pointer to PTP timestamp.
|
|
The declarations in this header file correspond to the definitions in cdi_utility_api.c and are meant to provide access to helpful SDK data structures and functions that are not part of the core API functionality.
◆ CdiConnectionProtocolType
This enumeration is used in the CdiConnectionState structure to indicate what connection layer is being used.
Enumerator |
---|
kProtocolTypeRaw | Raw connection.
|
kProtocolTypeAvm | Audio, Video and Metadata (AVM) connection.
|
◆ CdiEnumStringKeyType
Enums used to indicate which key-value array a function is to access.
NOTE: Update CdiUtilityKeyGetArray in cdi_utility_api.c whenever an entry is added to this table.
Enumerator |
---|
kKeyAdapterType | Key for CdiAdapterTypeSelection.
|
kKeyBufferType | Key for CdiBufferType.
|
kKeyConnectionProtocolType | Key for CdiConnectionProtocolType.
|
kKeyLogMethod | Key for CdiLogMethod.
|
kKeyLogComponent | Key for CdiLogComponent.
|
kKeyLogLevel | Key for CdiLogLevel.
|
kKeyConnectionStatus | Key for CdiConnectionStatus.
|
kKeyTestUnit | Key for CdiTestUnitName.
|
◆ CdiUtilityBoolToString()
static const char * CdiUtilityBoolToString |
( |
bool | b | ) |
|
|
inlinestatic |
Convenience function to return the human readable string associated with the given boolean value.
- Parameters
-
- Returns
- The address of a human readable character string.
◆ CdiUtilityEnumValueToString()
Convert an enum value to a string.
- Parameters
-
key_array | Pointer to array enum/string key pairs to use for the conversion. |
enum_value | Value to convert to a string. |
- Returns
- Pointer to returned string. If no match was found, NULL is returned.
◆ CdiUtilityKeyEnumToString()
Function used to convert an enum value to a string.
- Parameters
-
key_type | Enum from CdiEnumStringKeyType which indicates which key-value array to search for enum_value. |
enum_value | Value to convert to a string. |
- Returns
- Pointer to returned string. If no match was found, NULL is returned.
◆ CdiUtilityKeyGetArray()
Function used to get a pointer to a key-value array of a type specified by key_type.
- Parameters
-
key_type | Enum from CdiEnumStringKeyType which indicates which key-value array to return. |
- Returns
- Pointer to returned string. If no match was found, NULL is returned.
◆ CdiUtilityKeyStringToEnum()
Function used to convert a string to a matching enum value.
- Parameters
-
key_type | Enum from CdiEnumStringKeyType which indicates which key-value array to search for name_str. |
name_str | Pointer to string name of enumerated value. |
- Returns
- Returned enumerated value. If no match was found, CDI_INVALID_ENUM_VALUE is returned.
◆ CdiUtilityPtpTimestampToMicroseconds()
Convert the specified PTP timestamp into microseconds.
- Parameters
-
timestamp_ptr | Pointer to PTP timestamp to convert. |
- Returns
- PTP timestamp in microseconds.
◆ CdiUtilityPtpToRtp()
Function used to convert a PTP timestamp into an RTP timestamp.
- Parameters
-
ptp_timestamp_ptr | A pointer to a PTP timestamp consisting of seconds and nanoseconds; |
sample_rate | A sample rate value in Hz for the number of samples per second used for the RTP units. |
- Returns
- An RTP timestamp in sample_rate units. If sample_rate is 0 or ptp_timestamp_ptr is NULL 0 is returned.
◆ CdiUtilityStringToEnumValue()
Convert a string to a matching enum value.
- Parameters
-
key_array | Pointer to array enum/string key pairs to use for the conversion. |
name_str | Pointer to string name of enumerated value. |
- Returns
- Returned enumerated value. If no match was found, CDI_INVALID_ENUM_VALUE is returned.