diff options
author | Michael Niedermayer | 2012-08-20 17:03:04 +0200 |
---|---|---|
committer | Michael Niedermayer | 2012-08-20 17:06:50 +0200 |
commit | aee51039ee204197fdb4c924f8ee433b803ab1e1 (patch) | |
tree | b1138f704eec5bf82e6fcc23591c7b245f728ac5 /cmdutils.h | |
parent | 67a6dac7c18caecb418f7590a484dcbfcad869ab (diff) | |
parent | f8b1e665539010d3ca148f09cb1203c20c1ca174 (diff) |
Merge commit 'f8b1e665539010d3ca148f09cb1203c20c1ca174'
* commit 'f8b1e665539010d3ca148f09cb1203c20c1ca174':
avconv: print info/capabilities options in a separate help group.
avtools: add -h demuxer/muxer
cmdutils: extend -h to allow printing codec details.
Conflicts:
cmdutils.h
ffmpeg_filter.c
ffmpeg_opt.c
ffplay.c
ffserver.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'cmdutils.h')
-rw-r--r-- | cmdutils.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/cmdutils.h b/cmdutils.h index fb2229fc50..84ef3718df 100644 --- a/cmdutils.h +++ b/cmdutils.h @@ -189,6 +189,17 @@ 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(). + */ +void show_help_default(const char *opt, const char *arg); + +/** + * Generic -h handler common to all avtools. + */ +int show_help(const char *opt, const char *arg); + +/** * Parse the command line arguments. * * @param optctx an opaque options context @@ -449,4 +460,23 @@ void filter_release_buffer(AVFilterBuffer *fb); * buffers have been released. */ void free_buffer_pool(FrameBuffer **pool); + +#define GET_PIX_FMT_NAME(pix_fmt)\ + const char *name = av_get_pix_fmt_name(pix_fmt); + +#define GET_SAMPLE_FMT_NAME(sample_fmt)\ + const char *name = av_get_sample_fmt_name(sample_fmt) + +#define GET_SAMPLE_RATE_NAME(rate)\ + char name[16];\ + snprintf(name, sizeof(name), "%d", rate); + +#define GET_CH_LAYOUT_NAME(ch_layout)\ + char name[16];\ + snprintf(name, sizeof(name), "0x%"PRIx64, ch_layout); + +#define GET_CH_LAYOUT_DESC(ch_layout)\ + char name[128];\ + av_get_channel_layout_string(name, sizeof(name), 0, ch_layout); + #endif /* CMDUTILS_H */ |