UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
vo_postprocess.h
Go to the documentation of this file.
1
5/*
6 * Copyright (c) 2011-2023 CESNET, z. s. p. o.
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, is permitted provided that the following conditions
11 * are met:
12 *
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 *
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 *
20 * 3. Neither the name of CESNET nor the names of its contributors may be
21 * used to endorse or promote products derived from this software without
22 * specific prior written permission.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS
25 * "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
26 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
27 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
28 * EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
29 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
30 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
34 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
35 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 */
37#ifndef __vo_postprocess_h
38
39#define __vo_postprocess_h
40
41#include "types.h"
42
43#ifdef __cplusplus
44extern "C" {
45#else
46#include <stdbool.h>
47#endif
48
49/* property type default */
50#define VO_PP_PROPERTY_CODECS 0 /* codec_t[] all uncompressed */
51#define VO_PP_DOES_CHANGE_TILING_MODE 1 /* bool false */
52
53#define VO_PP_ABI_VERSION 7
54
56
60typedef void *(*vo_postprocess_init_t)(const char *cfg);
61
69typedef bool (*vo_postprocess_reconfigure_t)(void *state, struct video_desc desc);
70typedef struct video_frame * (*vo_postprocess_getf_t)(void *state);
71/*
72 * Returns various information about postprocessor format not only output (legacy name).
73 *
74 * @param s postprocessor state
75 * @param out output video description according to input parameters
76 * @param in_display_mode some postprocessors change tiling mode (this is queryied by get_property
77 * function). If postprocessor does not report that it changes tiling mode,
78 * this parameter should be ignored.
79 * @param out_frame_count Because the postprocess function is called synchronously, in case that
80 * from one input frame is generated more, this sets how many can be generated
81 * at maximum.
82 */
83typedef void (*vo_postprocess_get_out_desc_t)(void *s, struct video_desc *out, int *in_tile_mode, int *out_frame_count);
84
99typedef bool (*vo_postprocess_get_property_t)(void *state, int property, void *val, size_t *len);
100
110typedef bool (*vo_postprocess_t)(void *state, struct video_frame *in, struct video_frame *out, int req_out_pitch);
111
115typedef void (*vo_postprocess_done_t)(void *);
116
117
127
128struct vo_postprocess_state *vo_postprocess_init(const char *config_string);
129
132void vo_postprocess_get_out_desc(struct vo_postprocess_state *, struct video_desc *out, int *display_mode, int *out_frames_count);
133bool vo_postprocess_get_property(struct vo_postprocess_state *, int property, void *val, size_t *len);
134
135bool vo_postprocess(struct vo_postprocess_state *, struct video_frame*, struct video_frame*, int req_pitch);
137
138void show_vo_postprocess_help(bool full);
139
140#ifdef __cplusplus
141}
142#endif
143
144#endif /* __vo_postprocess_h */
void ** state
int void * val
struct video_desc desc
int void size_t * len
int property
Struct video_frame represents a video frame and contains video description.
Definition types.h:305
vo_postprocess_reconfigure_t reconfigure
vo_postprocess_done_t done
vo_postprocess_get_out_desc_t get_out_desc
vo_postprocess_get_property_t get_property
vo_postprocess_getf_t getf
vo_postprocess_t vo_postprocess
vo_postprocess_init_t init
This file contains some common data types.
void show_vo_postprocess_help(bool full)
struct vo_postprocess_state * vo_postprocess_init(const char *config_string)
void vo_postprocess_done(struct vo_postprocess_state *s)
bool vo_postprocess(struct vo_postprocess_state *, struct video_frame *, struct video_frame *, int req_pitch)
bool(* vo_postprocess_get_property_t)(void *state, int property, void *val, size_t *len)
struct video_frame *(* vo_postprocess_getf_t)(void *state)
bool(* vo_postprocess_reconfigure_t)(void *state, struct video_desc desc)
bool(* vo_postprocess_t)(void *state, struct video_frame *in, struct video_frame *out, int req_out_pitch)
void(* vo_postprocess_done_t)(void *)
struct video_frame * vo_postprocess_getf(struct vo_postprocess_state *)
void vo_postprocess_get_out_desc(struct vo_postprocess_state *, struct video_desc *out, int *display_mode, int *out_frames_count)
bool vo_postprocess_get_property(struct vo_postprocess_state *, int property, void *val, size_t *len)
bool vo_postprocess_reconfigure(struct vo_postprocess_state *, struct video_desc)
void(* vo_postprocess_get_out_desc_t)(void *s, struct video_desc *out, int *in_tile_mode, int *out_frame_count)
void *(* vo_postprocess_init_t)(const char *cfg)