[vlc-devel] [PATCH 02/18] filters: allow specifying a close callback when creating the default operations

Steve Lhomme robux4 at ycbcr.xyz
Thu Oct 8 10:31:56 CEST 2020


---
 include/vlc_filter.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/vlc_filter.h b/include/vlc_filter.h
index fa1caf770b5..88df8ae5daa 100644
--- a/include/vlc_filter.h
+++ b/include/vlc_filter.h
@@ -354,7 +354,7 @@ VLC_API void filter_DeleteBlend( vlc_blender_t * );
  *
  * Currently used by the chroma video filters
  */
-#define VIDEO_FILTER_WRAPPER( name )                                    \
+#define VIDEO_FILTER_WRAPPER_CLOSE( name, close_cb )                    \
     static picture_t *name ## _Filter ( filter_t *p_filter,             \
                                         picture_t *p_pic )              \
     {                                                                   \
@@ -368,9 +368,11 @@ VLC_API void filter_DeleteBlend( vlc_blender_t * );
         return p_outpic;                                                \
     }                                                                   \
     static const struct vlc_filter_operations name ## _ops = {          \
-        .filter_video = name ## _Filter,                                \
+        .filter_video = name ## _Filter, .close = close_cb,             \
     };
 
+#define VIDEO_FILTER_WRAPPER( name )   VIDEO_FILTER_WRAPPER_CLOSE( name, NULL )
+
 /**
  * Filter chain management API
  * The filter chain management API is used to dynamically construct filters
-- 
2.26.2



More information about the vlc-devel mailing list