]> git.sesse.net Git - ffmpeg/blobdiff - cmdutils.h
lavu: add an API function to return the Libav version string
[ffmpeg] / cmdutils.h
index cdcfc0728e99af0934dab4d1943147a1c003b179..d90ad4549dc2e38eda99304b005e7fe1e6fa25fb 100644 (file)
@@ -44,6 +44,16 @@ extern AVFormatContext *avformat_opts;
 extern struct SwsContext *sws_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) av_noreturn;
+
 /**
  * Initialize the cmdutils option system, in particular
  * allocate the *_opts contexts.
@@ -61,6 +71,11 @@ void uninit_opts(void);
  */
 void log_callback_help(void* ptr, int level, const char* fmt, va_list vl);
 
+/**
+ * Override the cpuflags mask.
+ */
+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.
@@ -144,6 +159,8 @@ typedef struct OptionDef {
                                    an int containing element count in the array. */
 #define OPT_TIME  0x10000
 #define OPT_DOUBLE 0x20000
+#define OPT_INPUT  0x40000
+#define OPT_OUTPUT 0x80000
      union {
         void *dst_ptr;
         int (*func_arg)(void *, const char *, const char *);
@@ -224,6 +241,11 @@ typedef struct OptionGroupDef {
      * are terminated by a non-option argument (e.g. avconv output files)
      */
     const char *sep;
+    /**
+     * Option flags that must be set on each option that is
+     * applied to this group
+     */
+    int flags;
 } OptionGroupDef;
 
 typedef struct OptionGroup {
@@ -507,6 +529,11 @@ FILE *get_preset_file(char *filename, size_t filename_size,
  */
 void *grow_array(void *array, int elem_size, int *size, int new_size);
 
+/**
+ * Get a string describing a media type.
+ */
+const char *media_type_string(enum AVMediaType media_type);
+
 #define GROW_ARRAY(array, nb_elems)\
     array = grow_array(array, sizeof(*array), &nb_elems, nb_elems + 1)