CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
Loading...
Searching...
No Matches
cdi_avm_payloads_api.h
Go to the documentation of this file.
1// -------------------------------------------------------------------------------------------
2// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
3// This file is part of the AWS CDI-SDK, licensed under the BSD 2-Clause "Simplified" License.
4// License details at: https://github.com/aws/aws-cdi-sdk/blob/mainline/LICENSE
5// -------------------------------------------------------------------------------------------
6
7#ifndef CDI_AVM_PAYLOADS_API_H__
8#define CDI_AVM_PAYLOADS_API_H__
9
17#include "cdi_core_api.h"
18
19#include <stdbool.h>
20#include <stdint.h>
21
22//*********************************************************************************************************************
23//***************************************** START OF DEFINITIONS AND TYPES ********************************************
24//*********************************************************************************************************************
25
27#define CDI_MAX_ANC_USER_DATA_WORDS (255)
28
44
73
87typedef const CdiAvmAncillaryDataPacket* (CdiAvmPacketizeAncCallback)(void* context_ptr);
88
108typedef void (CdiAvmUnpacketizeAncCallback)(void* context_ptr, CdiFieldKind field_kind,
109 const CdiAvmAncillaryDataPacket* packet_ptr, bool has_parity_error, bool has_checksum_error);
110
111//*********************************************************************************************************************
112//******************************************* START OF PUBLIC FUNCTIONS ***********************************************
113//*********************************************************************************************************************
114
123CDI_INTERFACE int CdiAvmGetAncillaryDataPayloadSize(uint16_t num_anc_packets, uint8_t data_counts[]);
124
144 CdiFieldKind field_kind, void* context_ptr, char* buffer_ptr, int* size_in_bytes_ptr);
145
158 CdiAvmUnpacketizeAncCallback* consume_next_packet_ptr, void* context_ptr);
159
160#endif // CDI_AVM_PAYLOADS_API_H__
CDI_INTERFACE CdiReturnStatus CdiAvmUnpacketizeAncillaryData(const CdiSgList *sgl_ptr, CdiAvmUnpacketizeAncCallback *consume_next_packet_ptr, void *context_ptr)
Definition cdi_avm_payloads_api.c:213
CDI_INTERFACE CdiReturnStatus CdiAvmPacketizeAncillaryData(CdiAvmPacketizeAncCallback *produce_next_packet_ptr, CdiFieldKind field_kind, void *context_ptr, char *buffer_ptr, int *size_in_bytes_ptr)
Definition cdi_avm_payloads_api.c:175
void CdiAvmUnpacketizeAncCallback(void *context_ptr, CdiFieldKind field_kind, const CdiAvmAncillaryDataPacket *packet_ptr, bool has_parity_error, bool has_checksum_error)
Prototype of callback function used by CdiAvmUnpacketizeAncillaryData.
Definition cdi_avm_payloads_api.h:108
CDI_INTERFACE int CdiAvmGetAncillaryDataPayloadSize(uint16_t num_anc_packets, uint8_t data_counts[])
Definition cdi_avm_payloads_api.c:165
const CdiAvmAncillaryDataPacket * CdiAvmPacketizeAncCallback(void *context_ptr)
Prototype of callback function used by CdiAvmPacketizeAncillaryData.
Definition cdi_avm_payloads_api.h:87
#define CDI_MAX_ANC_USER_DATA_WORDS
Maximum number of user data words per ancillary data packet (SMPTE ST 291-1 Section 6....
Definition cdi_avm_payloads_api.h:27
CdiFieldKind
Definition cdi_avm_payloads_api.h:34
@ kCdiFieldKindInterlacedSecond
Indicates that the payload timestamp refers to the second field of an interlaced video signal.
Definition cdi_avm_payloads_api.h:42
@ kCdiFieldKindInvalid
Not a valid choice, receivers should ignore the payload.
Definition cdi_avm_payloads_api.h:38
@ kCdiFieldKindInterlacedFirst
Indicates that the payload timestamp refers to the first field of an interlaced video signal.
Definition cdi_avm_payloads_api.h:40
@ kCdiFieldKindUnspecified
Indicates that no associated video field has been specified. Use with progressive scan mode.
Definition cdi_avm_payloads_api.h:36
This file declares the public API data types, structures and functions that comprise the CDI low-leve...
CdiReturnStatus
Values used for API function return codes.
Definition cdi_core_api.h:189
#define CDI_INTERFACE
Specify C linkage when compiling as C++ and define API interface export for Windows.
Definition cdi_utility_api.h:34
An ancillary data packet. See https://datatracker.ietf.org/doc/html/rfc8331#section-2....
Definition cdi_avm_payloads_api.h:48
int packet_size
Size (in bytes) of payload chunk that encodes this ANC data packet.
Definition cdi_avm_payloads_api.h:52
unsigned source_stream_number
Source stream number.
Definition cdi_avm_payloads_api.h:62
uint8_t sdid
Secondary data identification number.
Definition cdi_avm_payloads_api.h:66
unsigned line_number
The digital interface line number.
Definition cdi_avm_payloads_api.h:56
bool is_valid_source_stream_number
True when the source_stream_number value is set.
Definition cdi_avm_payloads_api.h:60
bool is_color_difference_channel
True when the ANC data corresponds to the color-difference data channel.
Definition cdi_avm_payloads_api.h:54
unsigned horizontal_offset
The horizontal offset in an SDI raster relative to the start of active video.
Definition cdi_avm_payloads_api.h:58
uint8_t data_count
Number of user data words in packet.
Definition cdi_avm_payloads_api.h:68
uint8_t did
Data identification number.
Definition cdi_avm_payloads_api.h:64
int packet_offset
Offset (in bytes) into payload buffer to the start of this ANC data packet.
Definition cdi_avm_payloads_api.h:50
This structure defines a scatter-gather list (SGL) which is used to represent an array of data compri...
Definition cdi_core_api.h:728