X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=cmdutils.h;h=e001ab9201487f90281655dc273e49b22e4bde66;hb=6cbe81999b07862895515fcbdae7bc3a320ca29c;hp=d460200f4e2db4af1d970989a0d2b43cb39c9e8a;hpb=f8ae3a2108b612776e886d927b4a7289dde619f1;p=ffmpeg diff --git a/cmdutils.h b/cmdutils.h index d460200f4e2..e001ab92014 100644 --- a/cmdutils.h +++ b/cmdutils.h @@ -22,11 +22,17 @@ #ifndef FFMPEG_CMDUTILS_H #define FFMPEG_CMDUTILS_H -#include +#include + #include "libavcodec/avcodec.h" +#include "libavfilter/avfilter.h" #include "libavformat/avformat.h" #include "libswscale/swscale.h" +#ifdef __MINGW32__ +#undef main /* We don't want SDL to override our main() */ +#endif + /** * program name, defined by the program for show_version(). */ @@ -41,6 +47,7 @@ extern const char **opt_names; extern AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB]; extern AVFormatContext *avformat_opts; extern struct SwsContext *sws_opts; +extern AVDictionary *format_opts, *video_opts, *audio_opts, *sub_opts; /** * Initialize the cmdutils option system, in particular @@ -119,17 +126,14 @@ typedef struct { #define OPT_INT 0x0080 #define OPT_FLOAT 0x0100 #define OPT_SUBTITLE 0x0200 -#define OPT_FUNC2 0x0400 -#define OPT_INT64 0x0800 -#define OPT_EXIT 0x1000 -#define OPT_DATA 0x2000 -#define OPT_DUMMY 0x4000 +#define OPT_INT64 0x0400 +#define OPT_EXIT 0x0800 +#define OPT_DATA 0x1000 union { - void (*func_arg)(const char *); //FIXME passing error code as int return would be nicer then exit() in the func int *int_arg; char **str_arg; float *float_arg; - int (*func2_arg)(const char *, const char *); + int (*func_arg)(const char *, const char *); int64_t *int64_arg; } u; const char *help; @@ -147,7 +151,7 @@ void show_help_options(const OptionDef *options, const char *msg, int mask, int * not have to be processed. */ void parse_options(int argc, char **argv, const OptionDef *options, - void (* parse_arg_function)(const char*)); + int (* parse_arg_function)(const char *opt, const char *arg)); void set_context_opts(void *ctx, void *opts_ctx, int flags, AVCodec *codec); @@ -241,7 +245,8 @@ int read_file(const char *filename, char **bufptr, size_t *size); * If is_path is non-zero, look for the file in the path preset_name. * Otherwise search for a file named arg.ffpreset in the directories * $FFMPEG_DATADIR (if set), $HOME/.ffmpeg, and in the datadir defined - * at configuration time, in that order. If no such file is found and + * at configuration time or in a "ffpresets" folder along the executable + * on win32, in that order. If no such file is found and * codec_name is defined, then search for a file named * codec_name-preset_name.ffpreset in the above-mentioned directories. * @@ -255,24 +260,4 @@ int read_file(const char *filename, char **bufptr, size_t *size); FILE *get_preset_file(char *filename, size_t filename_size, const char *preset_name, int is_path, const char *codec_name); -#if CONFIG_AVFILTER -#include "libavfilter/avfilter.h" - -typedef struct { - enum PixelFormat pix_fmt; -} FFSinkContext; - -extern AVFilter ffsink; - -/** - * Extract a frame from sink. - * - * @return a negative error in case of failure, 1 if one frame has - * been extracted successfully. - */ -int get_filtered_video_frame(AVFilterContext *sink, AVFrame *frame, - AVFilterBufferRef **picref, AVRational *pts_tb); - -#endif /* CONFIG_AVFILTER */ - #endif /* FFMPEG_CMDUTILS_H */