libklvanc
Loading...
Searching...
No Matches
vanc-afd.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 Kernel Labs Inc. All Rights Reserved
3 *
4 * Address: Kernel Labs Inc., PO Box 745, St James, NY. 11780
5 * Contact: sales@kernellabs.com
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
28
29#ifndef _VANC_AFD_H
30#define _VANC_AFD_H
31
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
42{
43 ASPECT_UNDEFINED = 0,
44 ASPECT_4x3,
45 ASPECT_16x9,
46};
47
52{
53 AFD_UNDEFINED = 0x00,
54 AFD_BOX_16x9_TOP = 0x02,
55 AFD_BOX_14x9_TOP = 0x03,
56 AFD_BOX_16x9_CENTER = 0x04,
57 AFD_FULL_FRAME = 0x08,
58 AFD_FULL_FRAME_ALT = 0x09,
59 AFD_16x9_CENTER = 0x0a,
60 AFD_14x9_CENTER = 0x0b,
61 AFD_4x3_WITH_ALTERNATIVE_14x9_CENTER = 0x0d,
62 AFD_16x9_WITH_ALTERNATIVE_14x9_CENTER = 0x0e,
63 AFD_16x9_WITH_ALTERNATIVE_4x3_CENTER = 0x0f,
64};
65
66enum klvanc_payload_afd_barflags {
67 BARS_NONE = 0x00,
68 BARS_LEFTRIGHT = 0x03,
69 BARS_TOPBOTTOM = 0x0c,
70};
71
76{
77 struct klvanc_packet_header_s hdr;
78 enum klvanc_payload_aspect_ratio_e aspectRatio;
79 enum klvanc_payload_afd_e afd;
80 enum klvanc_payload_afd_barflags barDataFlags;
81 unsigned short top;
82 unsigned short bottom;
83 unsigned short left;
84 unsigned short right;
85};
86
94
102
109const char *klvanc_barFlags_to_string(enum klvanc_payload_afd_barflags flags);
110
117int klvanc_dump_AFD(struct klvanc_context_s *ctx, void *p);
118
126
132
140int klvanc_set_AFD_val(struct klvanc_packet_afd_s *pkt, unsigned char val);
141
153int klvanc_convert_AFD_to_words(struct klvanc_packet_afd_s *pkt, uint16_t **words, uint16_t *wordCount);
154
166int klvanc_convert_AFD_to_packetBytes(struct klvanc_packet_afd_s *pkt, uint8_t **bytes, uint16_t *byteCount);
167
168#ifdef __cplusplus
169};
170#endif
171
172#endif /* _VANC_AFD_H */
Application specific context, the library allocates and stores user specific instance information.
Definition vanc.h:125
TODO - Brief description goes here.
Definition vanc-afd.h:76
TODO - Brief description goes here.
Definition vanc-packets.h:59
int klvanc_create_AFD(struct klvanc_packet_afd_s **pkt)
Create an AFD VANC packet.
int klvanc_dump_AFD(struct klvanc_context_s *ctx, void *p)
TODO - Brief description goes here.
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 succ...
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,...
void klvanc_destroy_AFD(struct klvanc_packet_afd_s *pkt)
Destroy an AFD VANC packet.
klvanc_payload_afd_e
TODO - Brief description goes here.
Definition vanc-afd.h:52
const char * klvanc_afd_to_string(enum klvanc_payload_afd_e afd)
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.
klvanc_payload_aspect_ratio_e
TODO - Brief description goes here.
Definition vanc-afd.h:42
int klvanc_set_AFD_val(struct klvanc_packet_afd_s *pkt, unsigned char val)
Set the AFD value on an AFD packet.
const char * klvanc_aspectRatio_to_string(enum klvanc_payload_aspect_ratio_e ar)
TODO - Brief description goes here.
VANC Headers and packet structure.