summaryrefslogtreecommitdiff
path: root/ffmpeg/cmdutils.h
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg/cmdutils.h')
-rw-r--r--ffmpeg/cmdutils.h51
1 files changed, 40 insertions, 11 deletions
diff --git a/ffmpeg/cmdutils.h b/ffmpeg/cmdutils.h
index 54f0be8..f4f23ef 100644
--- a/ffmpeg/cmdutils.h
+++ b/ffmpeg/cmdutils.h
@@ -43,11 +43,6 @@ extern const char program_name[];
*/
extern const int program_birth_year;
-/**
- * this year, defined by the program for show_banner()
- */
-extern const int this_year;
-
extern AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB];
extern AVFormatContext *avformat_opts;
extern struct SwsContext *sws_opts;
@@ -55,6 +50,16 @@ extern AVDictionary *swr_opts;
extern AVDictionary *format_opts, *codec_opts, *resample_opts;
/**
+ * Register a program-specific cleanup routine.
+ */
+void register_exit(void (*cb)(int ret));
+
+/**
+ * Wraps exit with a program-specific cleanup routine.
+ */
+void exit_program(int ret);
+
+/**
* Initialize the cmdutils option system, in particular
* allocate the *_opts contexts.
*/
@@ -72,6 +77,11 @@ void uninit_opts(void);
void log_callback_help(void* ptr, int level, const char* fmt, va_list vl);
/**
+ * Override the cpuflags.
+ */
+int opt_cpuflags(void *optctx, const char *opt, const char *arg);
+
+/**
* Fallback for options that are not explicitly handled, these will be
* parsed through AVOptions.
*/
@@ -86,10 +96,14 @@ int opt_report(const char *opt);
int opt_max_alloc(void *optctx, const char *opt, const char *arg);
-int opt_cpuflags(void *optctx, const char *opt, const char *arg);
-
int opt_codec_debug(void *optctx, const char *opt, const char *arg);
+#if CONFIG_OPENCL
+int opt_opencl(void *optctx, const char *opt, const char *arg);
+
+int opt_opencl_bench(void *optctx, const char *opt, const char *arg);
+#endif
+
/**
* Limit the execution time.
*/
@@ -192,13 +206,13 @@ void show_help_options(const OptionDef *options, const char *msg, int req_flags,
void show_help_children(const AVClass *class, int flags);
/**
- * Per-avtool specific help handler. Implemented in each
- * avtool, called by show_help().
+ * Per-fftool specific help handler. Implemented in each
+ * fftool, called by show_help().
*/
void show_help_default(const char *opt, const char *arg);
/**
- * Generic -h handler common to all avtools.
+ * Generic -h handler common to all fftools.
*/
int show_help(void *optctx, const char *opt, const char *arg);
@@ -400,6 +414,13 @@ void show_banner(int argc, char **argv, const OptionDef *options);
int show_version(void *optctx, const char *opt, const char *arg);
/**
+ * Print the build configuration of the program to stdout. The contents
+ * depend on the definition of FFMPEG_CONFIGURATION.
+ * This option processing function does not utilize the arguments.
+ */
+int show_buildconf(void *optctx, const char *opt, const char *arg);
+
+/**
* Print the license of the program to stdout. The license depends on
* the license of the libraries compiled into the program.
* This option processing function does not utilize the arguments.
@@ -474,6 +495,12 @@ int show_layouts(void *optctx, const char *opt, const char *arg);
int show_sample_fmts(void *optctx, const char *opt, const char *arg);
/**
+ * Print a listing containing all the color names and values recognized
+ * by the program.
+ */
+int show_colors(void *optctx, const char *opt, const char *arg);
+
+/**
* Return a positive value if a line read from standard input
* starts with [yY], otherwise return 0.
*/
@@ -486,7 +513,7 @@ int read_yesno(void);
* @param filename file to read from
* @param bufptr location where pointer to buffer is returned
* @param size location where size of buffer is returned
- * @return 0 in case of success, a negative value corresponding to an
+ * @return >= 0 in case of success, a negative value corresponding to an
* AVERROR error code in case of failure.
*/
int cmdutils_read_file(const char *filename, char **bufptr, size_t *size);
@@ -524,6 +551,8 @@ FILE *get_preset_file(char *filename, size_t filename_size,
*/
void *grow_array(void *array, int elem_size, int *size, int new_size);
+#define media_type_string av_get_media_type_string
+
#define GROW_ARRAY(array, nb_elems)\
array = grow_array(array, sizeof(*array), &nb_elems, nb_elems + 1)