lavfi: make filter_frame non-recursive.
A lot of changes happen at the same time: - Add a framequeue fifo to AVFilterLink. - split AVFilterLink.status into status_in and status_out: requires changes to the few filters and programs that use it directly (f_interleave, split, filtfmts). - Add a field ready to AVFilterContext, marking when the filter is ready and its activation priority. - Add flags to mark blocked links. - Change ff_filter_frame() to enqueue the frame. - Change all filtering functions to update the ready field and the blocked flags. - Update ff_filter_graph_run_once() to use the ready field. - buffersrc: always push the frame immediately.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include "avfiltergraph.h"
|
||||
#include "formats.h"
|
||||
#include "framepool.h"
|
||||
#include "framequeue.h"
|
||||
#include "thread.h"
|
||||
#include "version.h"
|
||||
#include "video.h"
|
||||
@@ -147,6 +148,7 @@ struct AVFilterPad {
|
||||
struct AVFilterGraphInternal {
|
||||
void *thread;
|
||||
avfilter_execute_func *thread_execute;
|
||||
FFFrameQueueGlobal frame_queues;
|
||||
};
|
||||
|
||||
struct AVFilterInternal {
|
||||
@@ -336,6 +338,8 @@ int ff_request_frame(AVFilterLink *link);
|
||||
|
||||
int ff_request_frame_to_filter(AVFilterLink *link);
|
||||
|
||||
int ff_filter_frame_to_filter(AVFilterLink *link);
|
||||
|
||||
#define AVFILTER_DEFINE_CLASS(fname) \
|
||||
static const AVClass fname##_class = { \
|
||||
.class_name = #fname, \
|
||||
@@ -376,6 +380,8 @@ int ff_filter_frame(AVFilterLink *link, AVFrame *frame);
|
||||
*/
|
||||
AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name);
|
||||
|
||||
int ff_filter_activate(AVFilterContext *filter);
|
||||
|
||||
/**
|
||||
* Remove a filter from a graph;
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user