History

avfilter: add ff_filter_get_nb_threads()

Paul B Mahol committed 10 years ago

Commit 5b190711 parent 44933902 files · +13 −0Browse files

Unified · Split

2 files
  1. libavfilter/avfilter.c +7 −0
  2. libavfilter/internal.h +6 −0
libavfilter/avfilter.c+7−0
@@ -783,6 +783,13 @@ void avfilter_free(AVFilterContext *filter) · 782 unmodified lines
783 av_free(filter);783 av_free(filter);
784}784}
785 785
786int ff_filter_get_nb_threads(AVFilterContext *ctx)
787{
788 if (ctx->nb_threads > 0)
789 return FFMIN(ctx->nb_threads, ctx->graph->nb_threads);
790 return ctx->graph->nb_threads;
791}
792
786static int process_options(AVFilterContext *ctx, AVDictionary **options,793static int process_options(AVFilterContext *ctx, AVDictionary **options,
787 const char *args)794 const char *args)
788{795{
libavfilter/internal.h+6−0
@@ -402,4 +402,10 @@ static inline int ff_norm_qscale(int qscale, int type) · 401 unmodified lines
402 return qscale;402 return qscale;
403}403}
404 404
405/**
406 * Get number of threads for current filter instance.
407 * This number is always same or less than graph->nb_threads.
408 */
409int ff_filter_get_nb_threads(AVFilterContext *ctx);
410
405#endif /* AVFILTER_INTERNAL_H */411#endif /* AVFILTER_INTERNAL_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t