66#define MAGIC to_fourcc('V', 'P', 'S', 'T')
67#define MAGIC_SINGLE to_fourcc('V', 'P', 'S', 'S')
68#define MOD_NAME "[vo_postprocess] "
87 printf(
"Possible postprocess modules:\n");
92 char *cpy = strdup(config_string);
94 char *save_ptr = NULL;
97 while ((
item = strtok_r(tmp,
",", &save_ptr)) != NULL) {
98 const char *vo_postprocess_options =
"";
99 char *lib_name =
item;
100 if (strchr(lib_name,
':')) {
101 vo_postprocess_options = strchr(lib_name,
':') + 1;
102 *strchr(lib_name,
':') =
'\0';
130 if (!config_string) {
134 if (strcmp(config_string,
"help") == 0 || strcmp(config_string,
"fullhelp") == 0) {
143 if (!
init(s, config_string)) {
159 bool filter_complex =
false;
169 int display_mode = 0;
170 int out_frames_count = 0;
171 state->funcs->get_out_desc(
state->state, &
desc, &display_mode, &out_frames_count);
175 filter_complex =
true;
181 "cannot be used in filter chain (more postprocessors)!\n");
199 if (
state->f == NULL) {
228 next = state_next->
f;
235 bool ret =
state->funcs->vo_postprocess(
state->state, in, next, pitch);
265 state->funcs->get_out_desc(
state->state, out, display_mode, out_frames_count);
int vc_get_linesize(unsigned int width, codec_t codec)
int color_printf(const char *format,...)
void log_msg(int level, const char *format,...)
#define LOG_LEVEL_ERROR
general errors
@ DISPLAY_PROPERTY_VIDEO_MERGED
monolithic framebuffer
void list_modules(enum library_class cls, int abi_version, bool full)
const void * load_library(const char *name, enum library_class cls, int abi_version)
@ LIBRARY_CLASS_VIDEO_POSTPROCESS
void simple_linked_list_append(struct simple_linked_list *l, void *data)
void * simple_linked_list_it_peek_next(const void *it)
void * simple_linked_list_it_next(void **i)
int simple_linked_list_size(struct simple_linked_list *l)
void * simple_linked_list_last(struct simple_linked_list *l)
returns last element of list, UB if empty
struct simple_linked_list * simple_linked_list_init(void)
void simple_linked_list_destroy(struct simple_linked_list *l)
void * simple_linked_list_first(struct simple_linked_list *l)
returns first element of list, UB if empty
void simple_linked_list_it_destroy(void *i)
Should be used when it != NULL, eg. when leaving the loop before the end.
void * simple_linked_list_it_init(struct simple_linked_list *l)
Struct video_frame represents a video frame and contains video description.
struct tile tiles[FLEXIBLE_ARRAY_MEMBER]
vo_postprocess_init_t init
const struct vo_postprocess_info * funcs
struct simple_linked_list * postprocessors
void show_vo_postprocess_help(bool full)
struct vo_postprocess_state * vo_postprocess_init(const char *config_string)
bool vo_postprocess_get_property(struct vo_postprocess_state *s, int property, void *val, size_t *len)
bool vo_postprocess_reconfigure(struct vo_postprocess_state *s, struct video_desc desc)
void vo_postprocess_get_out_desc(struct vo_postprocess_state *s, struct video_desc *out, int *display_mode, int *out_frames_count)
void vo_postprocess_done(struct vo_postprocess_state *s)
bool vo_postprocess(struct vo_postprocess_state *s, struct video_frame *in, struct video_frame *out, int req_pitch)
static _Bool init(struct vo_postprocess_state *s, const char *config_string)
struct video_frame * vo_postprocess_getf(struct vo_postprocess_state *s)
#define VO_PP_DOES_CHANGE_TILING_MODE
#define VO_PP_PROPERTY_CODECS
#define VO_PP_ABI_VERSION