aboutsummaryrefslogtreecommitdiffstats
path: root/cmdutils.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-08-05 12:39:51 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-08-05 13:02:20 +0200
commit22d841becd89f21fcd88a76bcafb675fd051ce86 (patch)
tree04f910119420fabb5557217eb8c7cd6c1a0d24ea /cmdutils.h
parent25c2f13d00fcfdb81c33a459795c33d29f8690e8 (diff)
parent6e19cfb083eda83aaf4b49ae765ab2b3e578d32d (diff)
downloadffmpeg-22d841becd89f21fcd88a76bcafb675fd051ce86.tar.gz
Merge branch 'master' into oldabi
* master: (780 commits) ffmpeg: Fix doxygen comments for MetadataMap filters.texi: fix wrong references in the "Filtergraph syntax" section yadif: correct documentation on the parity parameter mpegvideo.h: remove the 1 line difference to qatar applehttp: fix variant discard logic Fix possible crash when decoding mpeg streams. h263dec: Fix asserts broken by the elimination of FF_COMMON_FRAME. avidec: skip seek pos adjustment for non interleaved files. Fixes Ticket327 lsws: remove deprecated and unused stuff after the 0->1 major bump cosmetics: remove some stray comments from AVCodec declarations cosmetics: fix indentation/alignment in AVCodec declarations Abort if command offset decreases, avoids potential endless loop. Warn when falling back to unreliable UMF fps tag. Detect NI-avi at playtime like mplayer. Fixes Ticket333 avidec: Fix XAN DPCM demuxing. Fix a possible miscompilation of cabac with old (broken) compilers. Fix -loop_input. Set bits_per_coded_sample when encoding ADPCM. vf_boxblur: call avfilter_draw_slice() at the end of draw_slice() vf_boxblur: fix out-of-buffer access when h > w ... Conflicts: ffmpeg.c libavcodec/avcodec.h libavcodec/opt.h libavcodec/version.h libavdevice/avdevice.h libavfilter/avfilter.h libavformat/avformat.h libavformat/aviobuf.c libavformat/rtsp.c libavformat/udp.c libavformat/utils.c libavformat/version.h libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'cmdutils.h')
-rw-r--r--cmdutils.h53
1 files changed, 41 insertions, 12 deletions
diff --git a/cmdutils.h b/cmdutils.h
index e001ab9201..8348bf266a 100644
--- a/cmdutils.h
+++ b/cmdutils.h
@@ -43,11 +43,10 @@ extern const char program_name[];
*/
extern const int program_birth_year;
-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;
+extern AVDictionary *format_opts, *codec_opts;
/**
* Initialize the cmdutils option system, in particular
@@ -62,7 +61,7 @@ void uninit_opts(void);
/**
* Trivial log callback.
- * Only suitable for show_help and similar since it lacks prefix handling.
+ * Only suitable for opt_help and similar since it lacks prefix handling.
*/
void log_callback_help(void* ptr, int level, const char* fmt, va_list vl);
@@ -153,7 +152,29 @@ void show_help_options(const OptionDef *options, const char *msg, int mask, int
void parse_options(int argc, char **argv, const OptionDef *options,
int (* parse_arg_function)(const char *opt, const char *arg));
-void set_context_opts(void *ctx, void *opts_ctx, int flags, AVCodec *codec);
+/**
+ * Filter out options for given codec.
+ *
+ * Create a new options dictionary containing only the options from
+ * opts which apply to the codec with ID codec_id.
+ *
+ * @param encoder if non-zero the codec is an encoder, otherwise is a decoder
+ * @return a pointer to the created dictionary
+ */
+AVDictionary *filter_codec_opts(AVDictionary *opts, enum CodecID codec_id, int encoder);
+
+/**
+ * Setup AVCodecContext options for avformat_find_stream_info().
+ *
+ * Create an array of dictionaries, one dictionary for each stream
+ * contained in s.
+ * Each dictionary will contain the options from codec_opts which can
+ * be applied to the corresponding stream codec context.
+ *
+ * @return pointer to the created array of dictionaries, NULL if it
+ * cannot be created
+ */
+AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, AVDictionary *codec_opts);
/**
* Print an error message to stderr, indicating filename and a human
@@ -177,50 +198,58 @@ void show_banner(void);
* Print the version of the program to stdout. The version message
* depends on the current versions of the repository and of the libav*
* libraries.
+ * This option processing function does not utilize the arguments.
*/
-void show_version(void);
+int opt_version(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.
*/
-void show_license(void);
+int opt_license(const char *opt, const char *arg);
/**
* Print a listing containing all the formats supported by the
* program.
+ * This option processing function does not utilize the arguments.
*/
-void show_formats(void);
+int opt_formats(const char *opt, const char *arg);
/**
* Print a listing containing all the codecs supported by the
* program.
+ * This option processing function does not utilize the arguments.
*/
-void show_codecs(void);
+int opt_codecs(const char *opt, const char *arg);
/**
* Print a listing containing all the filters supported by the
* program.
+ * This option processing function does not utilize the arguments.
*/
-void show_filters(void);
+int opt_filters(const char *opt, const char *arg);
/**
* Print a listing containing all the bit stream filters supported by the
* program.
+ * This option processing function does not utilize the arguments.
*/
-void show_bsfs(void);
+int opt_bsfs(const char *opt, const char *arg);
/**
* Print a listing containing all the protocols supported by the
* program.
+ * This option processing function does not utilize the arguments.
*/
-void show_protocols(void);
+int opt_protocols(const char *opt, const char *arg);
/**
* Print a listing containing all the pixel formats supported by the
* program.
+ * This option processing function does not utilize the arguments.
*/
-void show_pix_fmts(void);
+int opt_pix_fmts(const char *opt, const char *arg);
/**
* Return a positive value if a line read from standard input