libklvanc
Loading...
Searching...
No Matches
vanc-afd.h File Reference

SMPTE 2016-3 Vertical Ancillary Data Mapping of Active Format Description and Bar Data. More...

Go to the source code of this file.

Classes

struct  klvanc_packet_afd_s
 TODO - Brief description goes here. More...

Enumerations

enum  klvanc_payload_aspect_ratio_e { ASPECT_UNDEFINED = 0 , ASPECT_4x3 , ASPECT_16x9 }
 TODO - Brief description goes here.
enum  klvanc_payload_afd_e {
  AFD_UNDEFINED = 0x00 , AFD_BOX_16x9_TOP = 0x02 , AFD_BOX_14x9_TOP = 0x03 , AFD_BOX_16x9_CENTER = 0x04 ,
  AFD_FULL_FRAME = 0x08 , AFD_FULL_FRAME_ALT = 0x09 , AFD_16x9_CENTER = 0x0a , AFD_14x9_CENTER = 0x0b ,
  AFD_4x3_WITH_ALTERNATIVE_14x9_CENTER = 0x0d , AFD_16x9_WITH_ALTERNATIVE_14x9_CENTER = 0x0e , AFD_16x9_WITH_ALTERNATIVE_4x3_CENTER = 0x0f
}
 TODO - Brief description goes here.
enum  klvanc_payload_afd_barflags { BARS_NONE = 0x00 , BARS_LEFTRIGHT = 0x03 , BARS_TOPBOTTOM = 0x0c }

Functions

const char * klvanc_afd_to_string (enum klvanc_payload_afd_e afd)
 TODO - Brief description goes here.
const char * klvanc_aspectRatio_to_string (enum klvanc_payload_aspect_ratio_e ar)
 TODO - Brief description goes here.
const char * klvanc_barFlags_to_string (enum klvanc_payload_afd_barflags flags)
 Return a string representing the bar flags field.
int klvanc_dump_AFD (struct klvanc_context_s *ctx, void *p)
 TODO - Brief description goes here.
int klvanc_create_AFD (struct klvanc_packet_afd_s **pkt)
 Create an AFD VANC packet.
void klvanc_destroy_AFD (struct klvanc_packet_afd_s *pkt)
 Destroy an AFD VANC packet.
int klvanc_set_AFD_val (struct klvanc_packet_afd_s *pkt, unsigned char val)
 Set the AFD value on an AFD packet.
int klvanc_convert_AFD_to_words (struct klvanc_packet_afd_s *pkt, uint16_t **words, uint16_t *wordCount)
 Convert type struct klvanc_packet_afd_s into a more traditional line of
vanc words, so that we may push out as VANC data. On success, caller MUST free the resulting *words array.
int klvanc_convert_AFD_to_packetBytes (struct klvanc_packet_afd_s *pkt, uint8_t **bytes, uint16_t *byteCount)
 Convert type struct klvanc_packet_afd_s into a block of bytes which represents
an AFD packet On success, caller MUST free the resulting *bytes array.

Detailed Description

SMPTE 2016-3 Vertical Ancillary Data Mapping of Active Format Description and Bar Data.

Author
Steven Toth stoth.nosp@m.@ker.nosp@m.nella.nosp@m.bs.c.nosp@m.om

Function Documentation

◆ klvanc_afd_to_string()

const char * klvanc_afd_to_string ( enum klvanc_payload_afd_e afd)

TODO - Brief description goes here.

Parameters
[in]enumpayload_afd_e afd - Brief description goes here.
Returns
Success - User facing printable string.
Error - NULL

◆ klvanc_aspectRatio_to_string()

const char * klvanc_aspectRatio_to_string ( enum klvanc_payload_aspect_ratio_e ar)

TODO - Brief description goes here.

Parameters
[in]enumpayload_aspect_ratio_e ar - Brief description goes here.
Returns
Success - User facing printable string.
Error - NULL

◆ klvanc_barFlags_to_string()

const char * klvanc_barFlags_to_string ( enum klvanc_payload_afd_barflags flags)

Return a string representing the bar flags field.

Parameters
[in]enumklvanc_payload_afd_barflags flags - Value of flags field
Returns
Success - User facing printable string.
Error - NULL

◆ klvanc_convert_AFD_to_packetBytes()

int klvanc_convert_AFD_to_packetBytes ( struct klvanc_packet_afd_s * pkt,
uint8_t ** bytes,
uint16_t * byteCount )

Convert type struct klvanc_packet_afd_s into a block of bytes which represents
an AFD packet On success, caller MUST free the resulting *bytes array.

Parameters
[in]structklvanc_packet_afd_s *pkt - A AFD VANC entry, received from the AFD parser
[out]uint8_t**bytes - An array of bytes representing the serialized AFD packet
[out]uint16_t*byteCount - Number of bytes in the array.
Returns
0 - Success
< 0 - Error
-ENOMEM - Not enough memory to satisfy request

◆ klvanc_convert_AFD_to_words()

int klvanc_convert_AFD_to_words ( struct klvanc_packet_afd_s * pkt,
uint16_t ** words,
uint16_t * wordCount )

Convert type struct klvanc_packet_afd_s into a more traditional line of
vanc words, so that we may push out as VANC data. On success, caller MUST free the resulting *words array.

Parameters
[in]structklvanc_packet_afd_s *pkt - A AFD VANC entry
[out]uint16_t**words - An array of words representing a fully formed vanc line.
[out]uint16_t*wordCount - Number of words in the array.
Returns
0 - Success
< 0 - Error
-ENOMEM - Not enough memory to satisfy request

◆ klvanc_create_AFD()

int klvanc_create_AFD ( struct klvanc_packet_afd_s ** pkt)

Create an AFD VANC packet.

Parameters
[out]structklvanc_packet_afd_s **pkt - Pointer to newly created packet
Returns
0 - Success
< 0 - Error

◆ klvanc_destroy_AFD()

void klvanc_destroy_AFD ( struct klvanc_packet_afd_s * pkt)

Destroy an AFD VANC packet.

Parameters
[in]structklvanc_packet_afd_s *pkt - Packet to be destroyed

◆ klvanc_dump_AFD()

int klvanc_dump_AFD ( struct klvanc_context_s * ctx,
void * p )

TODO - Brief description goes here.

Parameters
[in]structvanc_context_s *ctx, void *p - Brief description goes here.
Returns
0 - Success
< 0 - Error

◆ klvanc_set_AFD_val()

int klvanc_set_AFD_val ( struct klvanc_packet_afd_s * pkt,
unsigned char val )

Set the AFD value on an AFD packet.

Parameters
[in]structklvanc_packet_afd_s *pkt - Packet to be modified
[in]unsignedchar val - Value to set the AFD field to
Returns
0 - Success
< 0 - Unknown framerate specified