[vlc-devel] [PATCH 03/18] filters: set the input/output video context on video filters

Steve Lhomme robux4 at ycbcr.xyz
Fri Nov 15 15:51:05 CET 2019


The input context pushed by the decoder (and soon by the preceding filter in chain).

The output context is similar to the output video video context set by the decoder.

The filter should hold a reference to the output video context and release it
when it doesn't need it anymore.
---
 include/vlc_filter.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/vlc_filter.h b/include/vlc_filter.h
index 6cc923e9d04..5de39d915a3 100644
--- a/include/vlc_filter.h
+++ b/include/vlc_filter.h
@@ -28,6 +28,8 @@
 #include <vlc_es.h>
 #include <vlc_picture.h>
 
+typedef struct vlc_video_context  vlc_video_context;
+
 /**
  * \defgroup filter Filters
  * \ingroup output
@@ -74,9 +76,11 @@ struct filter_t
 
     /* Input format */
     es_format_t         fmt_in;
+    vlc_video_context   *vctx_in;  // video filter, set by owner
 
     /* Output format of filter */
     es_format_t         fmt_out;
+    vlc_video_context   *vctx_out; // video filter, handled by the filter
     bool                b_allow_fmt_out_change;
 
     /* Name of the "video filter" shortcut that is requested, can be NULL */
-- 
2.17.1



More information about the vlc-devel mailing list