File: avfilter.h

package info (click to toggle)
baresip 1.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,328 kB
  • sloc: ansic: 53,606; cpp: 2,268; makefile: 332; objc: 320; python: 259; sh: 40; xml: 19
file content (39 lines) | stat: -rw-r--r-- 790 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
 * @file avfilter.h  Video filter using libavfilter -- internal API
 *
 * Copyright (C) 2020 Mikhail Kurkov
 */

/* Maximum filter length */
#define MAX_DESCR 512


/* Filter state */
struct avfilter_st {
	struct vidfilt_enc_st vf;   /* base class */

	struct vidsz size;
	enum vidfmt format;
	bool enabled;

	AVFilterContext *buffersink_ctx;
	AVFilterContext *buffersrc_ctx;
	AVFilterGraph *filter_graph;
	AVFrame *vframe_in;
	AVFrame *vframe_out;
};


/*
 * Filter API
 */

int filter_init(struct avfilter_st *st, const char *filter_descr,
		struct vidframe *frame);

void filter_reset(struct avfilter_st *st);

bool filter_valid(const struct avfilter_st *st, const struct vidframe *frame);

int filter_encode(struct avfilter_st *st, struct vidframe *frame,
		  uint64_t *timestamp);