X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=cmdutils.c;h=9cdc801ece600bd87b4b847932535134498e0f5c;hb=1f36b43c280d36a403874e54a017472a3b2f472a;hp=3543edd0cb36317152d43e837b043f27a54001d6;hpb=fc97b1f091ff38210699b2e5819c94e4f4ebd1fa;p=ffmpeg diff --git a/cmdutils.c b/cmdutils.c index 3543edd0cb3..9cdc801ece6 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -533,7 +533,12 @@ int opt_default(void *optctx, const char *opt, const char *arg) #if CONFIG_AVRESAMPLE const AVClass *rc = avresample_get_class(); #endif - const AVClass *sc, *swr_class; +#if CONFIG_SWSCALE + const AVClass *sc = sws_get_class(); +#endif +#if CONFIG_SWRESAMPLE + const AVClass *swr_class = swr_get_class(); +#endif if (!strcmp(opt, "debug") || !strcmp(opt, "fdebug")) av_log_set_level(AV_LOG_DEBUG); @@ -557,7 +562,6 @@ int opt_default(void *optctx, const char *opt, const char *arg) consumed = 1; } #if CONFIG_SWSCALE - sc = sws_get_class(); if (!consumed && (o = opt_find(&sc, opt, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) { struct SwsContext *sws = sws_alloc_context(); @@ -585,7 +589,6 @@ int opt_default(void *optctx, const char *opt, const char *arg) } #endif #if CONFIG_SWRESAMPLE - swr_class = swr_get_class(); if (!consumed && (o=opt_find(&swr_class, opt, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) { struct SwrContext *swr = swr_alloc(); @@ -1319,16 +1322,47 @@ static void print_codec(const AVCodec *c) printf("%s %s [%s]:\n", encoder ? "Encoder" : "Decoder", c->name, c->long_name ? c->long_name : ""); + printf(" General capabilities: "); + if (c->capabilities & AV_CODEC_CAP_DRAW_HORIZ_BAND) + printf("horizband "); + if (c->capabilities & AV_CODEC_CAP_DR1) + printf("dr1 "); + if (c->capabilities & AV_CODEC_CAP_TRUNCATED) + printf("trunc "); + if (c->capabilities & AV_CODEC_CAP_DELAY) + printf("delay "); + if (c->capabilities & AV_CODEC_CAP_SMALL_LAST_FRAME) + printf("small "); + if (c->capabilities & AV_CODEC_CAP_SUBFRAMES) + printf("subframes "); + if (c->capabilities & AV_CODEC_CAP_EXPERIMENTAL) + printf("exp "); + if (c->capabilities & AV_CODEC_CAP_CHANNEL_CONF) + printf("chconf "); + if (c->capabilities & AV_CODEC_CAP_PARAM_CHANGE) + printf("small "); + if (c->capabilities & AV_CODEC_CAP_PARAM_CHANGE) + printf("variable "); + if (c->capabilities & (AV_CODEC_CAP_FRAME_THREADS | + AV_CODEC_CAP_SLICE_THREADS | + AV_CODEC_CAP_AUTO_THREADS)) + printf("threads "); + if (!c->capabilities) + printf("none"); + printf("\n"); + if (c->type == AVMEDIA_TYPE_VIDEO || c->type == AVMEDIA_TYPE_AUDIO) { printf(" Threading capabilities: "); switch (c->capabilities & (AV_CODEC_CAP_FRAME_THREADS | - AV_CODEC_CAP_SLICE_THREADS)) { + AV_CODEC_CAP_SLICE_THREADS | + AV_CODEC_CAP_AUTO_THREADS)) { case AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_SLICE_THREADS: printf("frame and slice"); break; case AV_CODEC_CAP_FRAME_THREADS: printf("frame"); break; case AV_CODEC_CAP_SLICE_THREADS: printf("slice"); break; - default: printf("no"); break; + case AV_CODEC_CAP_AUTO_THREADS : printf("auto"); break; + default: printf("none"); break; } printf("\n"); }