summaryrefslogtreecommitdiff
path: root/libavfilter/avfiltergraph.h
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-04-18 11:02:22 +0200
committerNicolas George <nicolas.george@normalesup.org>2012-04-23 14:13:40 +0200
commit2ce797277926358d98593c3743d57eb037d44956 (patch)
treee29c142b6201530b8665de0f79ba7752a18d480a /libavfilter/avfiltergraph.h
parente0761feec4dc9d10bd0fa58a0472b69277563e92 (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.h24
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 */