libklvanc
Classes | Macros | Functions
vanc-eia_708b.h File Reference

CEA-708 Closed Captions. More...

#include <libklvanc/vanc-packets.h>

Go to the source code of this file.

Classes

struct  klvanc_packet_eia_708b_cdp_header
 
struct  klvanc_packet_eia_708b_time_code_section
 
struct  klvanc_packet_eia_708b_ccdata_entry
 
struct  klvanc_packet_eia_708b_ccdata_section
 
struct  klvanc_packet_eia_708b_ccsvcinfo_entry
 
struct  klvanc_packet_eia_708b_ccsvcinfo_section
 
struct  klvanc_packet_eia_708b_cdp_footer
 
struct  klvanc_packet_eia_708b_s
 TODO - Brief description goes here. More...
 

Macros

#define KLVANC_MAX_CC_COUNT   30
 
#define KLVANC_MAX_CCSVC_COUNT   16
 

Functions

int klvanc_dump_EIA_708B (struct klvanc_context_s *ctx, void *p)
 TODO - Brief description goes here. More...
 
int klvanc_create_eia708_cdp (struct klvanc_packet_eia_708b_s **pkt)
 Create an EIA-708 VANC packet. More...
 
void klvanc_destroy_eia708_cdp (struct klvanc_packet_eia_708b_s *pkt)
 Destroy an EIA-708 VANC packet. More...
 
int klvanc_set_framerate_EIA_708B (struct klvanc_packet_eia_708b_s *pkt, int num, int den)
 Set the framerate on an EIA-708 packet. More...
 
void klvanc_finalize_EIA_708B (struct klvanc_packet_eia_708b_s *pkt, uint16_t seqNum)
 Finalize a packet and prepare to serialize to output. More...
 
int klvanc_convert_EIA_708B_to_words (struct klvanc_packet_eia_708b_s *pkt, uint16_t **words, uint16_t *wordCount)
 Convert type struct klvanc_packet_eia_708b_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. More...
 
int klvanc_convert_EIA_708B_to_packetBytes (struct klvanc_packet_eia_708b_s *pkt, uint8_t **bytes, uint16_t *byteCount)
 Convert type struct klvanc_packet_eia_708b_s into a block of bytes which represents
an EIA-708 packet On success, caller MUST free the resulting *bytes array. More...
 

Detailed Description

CEA-708 Closed Captions.

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

Function Documentation

int klvanc_convert_EIA_708B_to_packetBytes ( struct klvanc_packet_eia_708b_s pkt,
uint8_t **  bytes,
uint16_t *  byteCount 
)

Convert type struct klvanc_packet_eia_708b_s into a block of bytes which represents
an EIA-708 packet On success, caller MUST free the resulting *bytes array.

Parameters
[in]structklvanc_packet_eia_708b_s *pkt - A EIA-608 VANC entry, received from the EIA-708 parser
[out]uint8_t**bytes - An array of bytes representing the serialized CDP packet
[out]uint16_t*byteCount - Number of bytes in the array.
Returns
0 - Success
< 0 - Error
-ENOMEM - Not enough memory to satisfy request
int klvanc_convert_EIA_708B_to_words ( struct klvanc_packet_eia_708b_s pkt,
uint16_t **  words,
uint16_t *  wordCount 
)

Convert type struct klvanc_packet_eia_708b_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_eia_708bs *pkt - A EIA-708 VANC entry, received from the EIA-708 parser
[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
int klvanc_create_eia708_cdp ( struct klvanc_packet_eia_708b_s **  pkt)

Create an EIA-708 VANC packet.

Parameters
[out]structklvanc_packet_eia_708b_s **pkt - Pointer to newly created packet
Returns
0 - Success
< 0 - Error
void klvanc_destroy_eia708_cdp ( struct klvanc_packet_eia_708b_s pkt)

Destroy an EIA-708 VANC packet.

Parameters
[in]structklvanc_packet_eia_708b_s *pkt - Packet to be destroyed
int klvanc_dump_EIA_708B ( struct klvanc_context_s ctx,
void *  p 
)

TODO - Brief description goes here.

Parameters
[in]structklvanc_context_s *ctx, void *p - Brief description goes here.
Returns
0 - Success
< 0 - Error
void klvanc_finalize_EIA_708B ( struct klvanc_packet_eia_708b_s pkt,
uint16_t  seqNum 
)

Finalize a packet and prepare to serialize to output.

Parameters
[in]structklvanc_packet_eia_708b_s *pkt - A EIA-608 VANC entry, received from the EIA-708 parser
[in]uint16_tseqNum - Sequence Number. This value should increment with each packet output over the final SDI link.
int klvanc_set_framerate_EIA_708B ( struct klvanc_packet_eia_708b_s pkt,
int  num,
int  den 
)

Set the framerate on an EIA-708 packet.

Parameters
[in]structklvanc_packet_eia_708b_s *pkt - Packet to be modified
[in]intnum - numerator (e.g. 1001)
[in]intdenominator - numerator (e.g. 30000)
Returns
0 - Success
< 0 - Unknown framerate specified