Parse VANC lines, interpret data, call user callbacks with populated structures.
Callers allocate a usage context, assign callbacks to this context and then feed
VANC data into the library. VANC messages that are understood are parse, converted
into structs and if the user has registered a callback for that specific message type
then the structure is passed via the callback.
Callbacks should not attempt to modify or release the callback structs, releasing of
memory allocats is automatically taken care of by this library.
More...
Go to the source code of this file.
|
#define | LIBKLVANC_LOGLEVEL_ERR 0 |
|
#define | LIBKLVANC_LOGLEVEL_WARN 1 |
|
#define | LIBKLVANC_LOGLEVEL_INFO 2 |
|
#define | LIBKLVANC_LOGLEVEL_DEBUG 3 |
|
|
int | klvanc_context_create (struct klvanc_context_s **ctx) |
| Create or destroy some basic application/library context.
The context is considered private and is likely to change. More...
|
|
int | klvanc_context_destroy (struct klvanc_context_s *ctx) |
| Deallocate and destroy a context. See klvanc_context_create() More...
|
|
int | klvanc_context_dump (struct klvanc_context_s *ctx) |
| Generate user visible context details to the console. More...
|
|
int | klvanc_packet_parse (struct klvanc_context_s *ctx, unsigned int lineNr, unsigned short *words, unsigned int wordCount) |
| Parse a line of payload, trigger callbacks as necessary. lineNr is passed around and only
used for reporting purposes, so we can figure out which line this came from in different
callbacks and various parts of the reporting stack. More...
|
|
void | klvanc_dump_words_console (struct klvanc_context_s *ctx, uint16_t *vanc, int maxlen, unsigned int linenr, int onlyvalid) |
| TODO - Brief description goes here. More...
|
|
int | klvanc_sdi_create_payload (uint8_t sdid, uint8_t did, const uint8_t *src, uint16_t srcByteCount, uint16_t **dst, uint16_t *dstWordCount, uint32_t bitDepth) |
| Take an array of payload, create a fully formed VANC message. bitDepth of 10 is the only valid input value. did: 0x41, sdid: 0x07 = SCTE104 generateParity = 1/0. More...
|
|
const char * | klvanc_lookupDescriptionByType (enum klvanc_packet_type_e type) |
| TODO - Brief description goes here. More...
|
|
const char * | klvanc_lookupSpecificationByType (enum klvanc_packet_type_e type) |
| TODO - Brief description goes here. More...
|
|
int | klvanc_packet_copy (struct klvanc_packet_header_s **dst, struct klvanc_packet_header_s *src) |
| TODO - Brief description goes here. More...
|
|
void | klvanc_packet_free (struct klvanc_packet_header_s *src) |
| TODO - Brief description goes here. More...
|
|
Parse VANC lines, interpret data, call user callbacks with populated structures.
Callers allocate a usage context, assign callbacks to this context and then feed
VANC data into the library. VANC messages that are understood are parse, converted
into structs and if the user has registered a callback for that specific message type
then the structure is passed via the callback.
Callbacks should not attempt to modify or release the callback structs, releasing of
memory allocats is automatically taken care of by this library.
- Author
- Steven Toth stoth.nosp@m.@ker.nosp@m.nella.nosp@m.bs.c.nosp@m.om
- Copyright
- Copyright (c) 2016 Kernel Labs Inc. All Rights Reserved.
Create or destroy some basic application/library context.
The context is considered private and is likely to change.
- Parameters
-
- Returns
- 0 - Success
-
< 0 - Error
Generate user visible context details to the console.
- Parameters
-
- Returns
- 0 - Success
-
< 0 - Error
void klvanc_dump_words_console |
( |
struct klvanc_context_s * |
ctx, |
|
|
uint16_t * |
vanc, |
|
|
int |
maxlen, |
|
|
unsigned int |
linenr, |
|
|
int |
onlyvalid |
|
) |
| |
TODO - Brief description goes here.
- Parameters
-
[in] | uint16_t | *array - Array of SDI words (10bit) that the caller wants parsed. |
[in] | int | len - Number of words in array. |
[in] | unsigned | int linenr - SDI line number the array data came from. Used for information / tracking purposes only. |
[in] | int | onlyvalid - Brief description goes here. |
TODO - Brief description goes here.
- Parameters
-
[in] | enum | packet_type_e type |
- Returns
- TODO.
TODO - Brief description goes here.
- Parameters
-
[in] | enum | packet_type_e type |
- Returns
- TODO.
TODO - Brief description goes here.
- Parameters
-
[in] | struct | packet_header_s **dst |
[in] | struct | packet_header_s *src |
- Returns
- TODO.
TODO - Brief description goes here.
- Parameters
-
[in] | struct | packet_header_s *src |
int klvanc_packet_parse |
( |
struct klvanc_context_s * |
ctx, |
|
|
unsigned int |
lineNr, |
|
|
unsigned short * |
words, |
|
|
unsigned int |
wordCount |
|
) |
| |
Parse a line of payload, trigger callbacks as necessary. lineNr is passed around and only
used for reporting purposes, so we can figure out which line this came from in different
callbacks and various parts of the reporting stack.
- Parameters
-
[in] | struct | klvanc_context_s *ctx - Context. |
[in] | unsigned | int lineNr - SDI line number the array data came from. Used for information / tracking purposes only. |
[in] | unsigned | short *words - Array of SDI words (10bit) that the caller wants parsed. |
[in] | unsigned | int wordCount - Number of words in array. |
- Returns
- 0 - Success
-
< 0 - Error
int klvanc_sdi_create_payload |
( |
uint8_t |
sdid, |
|
|
uint8_t |
did, |
|
|
const uint8_t * |
src, |
|
|
uint16_t |
srcByteCount, |
|
|
uint16_t ** |
dst, |
|
|
uint16_t * |
dstWordCount, |
|
|
uint32_t |
bitDepth |
|
) |
| |
Take an array of payload, create a fully formed VANC message. bitDepth of 10 is the only valid input value. did: 0x41, sdid: 0x07 = SCTE104 generateParity = 1/0.
- Parameters
-
[in] | uint8_t | sdid, uint8_t did - Brief description goes here. |
[in] | const | uint8_t *src - Brief description goes here. |
[in] | uint16_t | srcByteCount - Brief description goes here. |
[in] | uint16_t | **dst - Brief description goes here. |
[in] | uint16_t | *dstWordCount - Brief description goes here. |
[in] | uint32_t | bitDepth - Brief description goes here. |
- Returns
- 0 - Success
-
< 0 - Error