diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-04-18 13:02:22 +0400 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-04-23 16:13:40 +0400 |
commit | 2ce797277926358d98593c3743d57eb037d44956 (patch) | |
tree | e29c142b6201530b8665de0f79ba7752a18d480a /libavfilter/avfiltergraph.h | |
parent | e0761feec4dc9d10bd0fa58a0472b69277563e92 (diff) |
avfiltergraph: add avfilter_graph_request_oldest().
Keep a heap of all sink links ordered by timestamps.
Diffstat (limited to 'libavfilter/avfiltergraph.h')
-rw-r--r-- | libavfilter/avfiltergraph.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libavfilter/avfiltergraph.h b/libavfilter/avfiltergraph.h index 2c612b481d..b003795750 100644 --- a/libavfilter/avfiltergraph.h +++ b/libavfilter/avfiltergraph.h @@ -33,6 +33,16 @@ typedef struct AVFilterGraph { AVFilterContext **filters; char *scale_sws_opts; ///< sws options to use for the auto-inserted scale filters + + /** + * Private fields + * + * The following fields are for internal use only. + * Their type, offset, number and semantic can change without notice. + */ + + AVFilterLink **sink_links; + int sink_links_count; } AVFilterGraph; /** @@ -221,4 +231,18 @@ int avfilter_graph_queue_command(AVFilterGraph *graph, const char *target, const */ char *avfilter_graph_dump(AVFilterGraph *graph, const char *options); +/** + * Request a frame on the oldest sink link. + * + * If the request returns AVERROR_EOF, try the next. + * + * Note that this function is not meant to be the sole scheduling mechanism + * of a filtergraph, only a convenience function to help drain a filtergraph + * in a balanced way under normal circumstances. + * + * @return the return value of avfilter_request_frame, + * or AVERROR_EOF of all links returned AVERROR_EOF. + */ +int avfilter_graph_request_oldest(AVFilterGraph *graph); + #endif /* AVFILTER_AVFILTERGRAPH_H */ |