]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/avfilter.h
Merge commit '03ef89faf23c4851848208c9fe004cd9ef690cec'
[ffmpeg] / libavfilter / avfilter.h
index dca02945f6f92b18bf38224f1e60588ad947f207..04bf5855e29fce8368049cb3e7a82cf8dcdfc830 100644 (file)
@@ -435,10 +435,16 @@ struct AVFilterLink {
 
     /**
      * Current timestamp of the link, as defined by the most recent
-     * frame(s), in AV_TIME_BASE units.
+     * frame(s), in link time_base units.
      */
     int64_t current_pts;
 
+    /**
+     * Current timestamp of the link, as defined by the most recent
+     * frame(s), in AV_TIME_BASE units.
+     */
+    int64_t current_pts_us;
+
     /**
      * Index in the age array.
      */
@@ -484,16 +490,16 @@ struct AVFilterLink {
     int max_samples;
 
     /**
-     * True if the link is closed.
-     * If set, all attempts of start_frame, filter_frame or request_frame
-     * will fail with AVERROR_EOF, and if necessary the reference will be
-     * destroyed.
-     * If request_frame returns AVERROR_EOF, this flag is set on the
+     * Link status.
+     * If not zero, all attempts of filter_frame or request_frame
+     * will fail with the corresponding code, and if necessary the reference
+     * will be destroyed.
+     * If request_frame returns an error, the status is set on the
      * corresponding link.
      * It can be set also be set by either the source or the destination
      * filter.
      */
-    int closed;
+    int status;
 
     /**
      * Number of channels.
@@ -514,6 +520,20 @@ struct AVFilterLink {
      * A pointer to a FFVideoFramePool struct.
      */
     void *video_frame_pool;
+
+    /**
+     * True if a frame is currently wanted on the input of this filter.
+     * Set when ff_request_frame() is called by the output,
+     * cleared when the request is handled or forwarded.
+     */
+    int frame_wanted_in;
+
+    /**
+     * True if a frame is currently wanted on the output of this filter.
+     * Set when ff_request_frame() is called by the output,
+     * cleared when a frame is filtered.
+     */
+    int frame_wanted_out;
 };
 
 /**
@@ -540,7 +560,10 @@ int avfilter_link_get_channels(AVFilterLink *link);
 
 /**
  * Set the closed field of a link.
+ * @deprecated applications are not supposed to mess with links, they should
+ * close the sinks.
  */
+attribute_deprecated
 void avfilter_link_set_closed(AVFilterLink *link, int closed);
 
 /**