lavfi: Add support for increasing hardware frame pool sizes

AVFilterContext.extra_hw_frames functions identically to the field of
the same name in AVCodecContext.
This commit is contained in:
Mark Thompson
2017-03-27 21:10:53 +01:00
parent cad739dace
commit 6d86cef06b
5 changed files with 60 additions and 1 deletions

View File

@@ -226,4 +226,21 @@ void ff_filter_graph_remove_filter(AVFilterGraph *graph, AVFilterContext *filter
*/
#define FF_FILTER_FLAG_HWFRAME_AWARE (1 << 0)
/**
* Perform any additional setup required for hardware frames.
*
* link->hw_frames_ctx must be set before calling this function.
* Inside link->hw_frames_ctx, the fields format, sw_format, width and
* height must be set. If dynamically allocated pools are not supported,
* then initial_pool_size must also be set, to the minimum hardware frame
* pool size necessary for the filter to work (taking into account any
* frames which need to stored for use in operations as appropriate). If
* default_pool_size is nonzero, then it will be used as the pool size if
* no other modification takes place (this can be used to preserve
* compatibility).
*/
int ff_filter_init_hw_frames(AVFilterContext *avctx, AVFilterLink *link,
int default_pool_size);
#endif /* AVFILTER_INTERNAL_H */