summaryrefslogtreecommitdiff
path: root/cmdutils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-13 04:55:40 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-13 06:00:03 +0200
commitf884ef00de362a5460a9c58318d009bcae440cc8 (patch)
tree955b7a1dc3f2bf89fb9332d0e732aac9e52b0e29 /cmdutils.c
parentc1847c932b1576e8224c38e112a5fd29fa8a6098 (diff)
parent47a1d794dba02239f9eeb37e9dfd4dfdb634c3b7 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: (31 commits) tiffenc: initialize forgotten avctx. avplay: free the active audio packet at exit. avplay: free rdft data used for spectrogram analysis. log.h: make AVClass a named struct fix ac3 encoder documentation vc1: more prettyprinting cosmetics vc1: prettyprint some tables vc1: K&R formatting cosmetics AVOptions: bump minor and add APIchanges entry. cmdutils/avtools: simplify show_help() by using av_opt_child_class_next() AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_* Remove all uses of deprecated AVOptions API. AVOptions: add av_opt_next, deprecate av_next_option. AVOptions: add functions for evaluating option strings. AVOptions: split get_number(). AVOptions: add av_opt_get*, deprecate av_get*. AVOptions: add av_opt_set*(). AVOptions: add new API for enumerating children. rv34: move inverse transform functions to DSP context flvenc: Write the right metadata entry count ... Conflicts: avconv.c cmdutils.c doc/APIchanges ffplay.c ffprobe.c libavcodec/ac3dec.c libavcodec/h264.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/mpeg12enc.c libavcodec/options.c libavdevice/libdc1394.c libavdevice/v4l2.c libavfilter/vf_drawtext.c libavformat/flvdec.c libavformat/mpegtsenc.c libavformat/options.c libavutil/avutil.h libavutil/opt.c libswscale/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'cmdutils.c')
-rw-r--r--cmdutils.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/cmdutils.c b/cmdutils.c
index c3fd8b87a3..d27759ea93 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -130,6 +130,16 @@ void show_help_options(const OptionDef *options, const char *msg, int mask, int
}
}
+void show_help_children(const AVClass *class, int flags)
+{
+ const AVClass *child = NULL;
+ av_opt_show2(&class, NULL, flags, 0);
+ printf("\n");
+
+ while (child = av_opt_child_class_next(class, child))
+ show_help_children(child, flags);
+}
+
static const OptionDef* find_option(const OptionDef *po, const char *name){
const char *p = strchr(name, ':');
int len = p ? p - name : strlen(name);
@@ -342,7 +352,7 @@ void parse_loglevel(int argc, char **argv, const OptionDef *options)
opt_loglevel("loglevel", argv[idx + 1]);
}
-#define FLAGS(o) ((o)->type == FF_OPT_TYPE_FLAGS) ? AV_DICT_APPEND : 0
+#define FLAGS(o) ((o)->type == AV_OPT_TYPE_FLAGS) ? AV_DICT_APPEND : 0
int opt_default(const char *opt, const char *arg)
{
const AVOption *oc, *of, *os;
@@ -364,7 +374,7 @@ int opt_default(const char *opt, const char *arg)
sc = sws_get_class();
if ((os = av_opt_find(&sc, opt, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) {
// XXX we only support sws_flags, not arbitrary sws options
- int ret = av_set_string3(sws_opts, opt, arg, 1, NULL);
+ int ret = av_opt_set(sws_opts, opt, arg, 0);
if (ret < 0) {
av_log(NULL, AV_LOG_ERROR, "Error setting option %s.\n", opt);
return ret;