libklvanc
Loading...
Searching...
No Matches
vanc-lines.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
35
36#ifndef _KLVANC_LINE_H
37#define _KLVANC_LINE_H
38
39#include <stdint.h>
40#include <sys/types.h>
41#include <sys/errno.h>
42
43#ifdef __cplusplus
44extern "C" {
45#endif
46
47#define KLVANC_MAX_VANC_LINES 64
48#define KLVANC_MAX_VANC_ENTRIES 16
49
51{
52 int h_offset;
53 uint16_t *payload;
54 int pixel_width;
55};
56
61{
62 int line_number;
63 struct klvanc_entry_s *p_entries[KLVANC_MAX_VANC_ENTRIES];
64 int num_entries;
65};
66
70
72{
73 int num_lines;
74 struct klvanc_line_s *lines[KLVANC_MAX_VANC_LINES];
75};
76
84struct klvanc_line_s *klvanc_line_create(int line_number);
85
92
108int klvanc_line_insert(struct klvanc_context_s *ctx, struct klvanc_line_set_s *vanc_lines,
109 uint16_t *pixels, int pixel_width, int line_number, int horizontal_offset);
110
136 uint16_t **out_buf, int *out_len, int line_pixel_width);
137
162 uint8_t *out_buf, int line_pixel_width);
163
164#ifdef __cplusplus
165};
166#endif
167
168#endif /* _VANC_LINES_H */
Application specific context, the library allocates and stores user specific instance information.
Definition vanc.h:125
Definition vanc-lines.h:51
Represents a VANC line prior to serialization.
Definition vanc-lines.h:61
Represents a group of VANC lines (e.g. perhaps corresponding to a video frame)
Definition vanc-lines.h:72
int klvanc_line_insert(struct klvanc_context_s *ctx, struct klvanc_line_set_s *vanc_lines, uint16_t *pixels, int pixel_width, int line_number, int horizontal_offset)
Insert a VANC packet into a VANC frame.
int klvanc_generate_vanc_line_v210(struct klvanc_context_s *ctx, struct klvanc_line_s *line, uint8_t *out_buf, int line_pixel_width)
Generate byte array representing a fully formed VANC line. This function will take in a klvanc_line_s...
struct klvanc_line_s * klvanc_line_create(int line_number)
Create a VANC line.
void klvanc_line_free(struct klvanc_line_s *line)
Free a previously created klvanc_line_s structure.
int klvanc_generate_vanc_line(struct klvanc_context_s *ctx, struct klvanc_line_s *line, uint16_t **out_buf, int *out_len, int line_pixel_width)
Generate pixel array representing a fully formed VANC line. This function will take in a klvanc_line_...