/*****************************************************************************1* video.h: video filters2*****************************************************************************3* Copyright (C) 2010-2016 x264 project4*5* Authors: Steven Walters <[email protected]>6*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License as published by9* the Free Software Foundation; either version 2 of the License, or10* (at your option) any later version.11*12* This program is distributed in the hope that it will be useful,13* but WITHOUT ANY WARRANTY; without even the implied warranty of14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15* GNU General Public License for more details.16*17* You should have received a copy of the GNU General Public License18* along with this program; if not, write to the Free Software19* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.20*21* This program is also available under a commercial proprietary license.22* For more information, contact us at [email protected].23*****************************************************************************/2425#ifndef X264_FILTER_VIDEO_H26#define X264_FILTER_VIDEO_H2728#include "input/input.h"29#include "filters/filters.h"3031typedef struct cli_vid_filter_t cli_vid_filter_t;3233struct cli_vid_filter_t34{35/* name of the filter */36const char *name;37/* help: a short message on what the filter does and how to use it.38* this should only be implemented by filters directly accessible by the user */39void (*help)( int longhelp );40/* init: initializes the filter given the input clip properties and parameter to adjust them as necessary41* with the given options provided by the user.42* returns 0 on success, nonzero on error. */43int (*init)( hnd_t *handle, cli_vid_filter_t *filter, video_info_t *info, x264_param_t *param, char *opt_string );44/* get_frame: given the storage for the output frame and desired frame number, generate the frame accordingly.45* the image data returned by get_frame should be treated as const and not be altered.46* returns 0 on success, nonzero on error. */47int (*get_frame)( hnd_t handle, cli_pic_t *output, int frame );48/* release_frame: frame is done being used and is signaled for cleanup.49* returns 0 on succeess, nonzero on error. */50int (*release_frame)( hnd_t handle, cli_pic_t *pic, int frame );51/* free: run filter cleanup procedures. */52void (*free)( hnd_t handle );53/* next registered filter, unused by filters themselves */54cli_vid_filter_t *next;55};5657void x264_register_vid_filters( void );58void x264_vid_filter_help( int longhelp );59int x264_init_vid_filter( const char *name, hnd_t *handle, cli_vid_filter_t *filter,60video_info_t *info, x264_param_t *param, char *opt_string );6162#endif636465