[vlc-commits] filters: allow specifying a close callback when creating the default operations

Steve Lhomme git at videolan.org
Mon Oct 12 15:55:48 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Oct  6 11:00:35 2020 +0200| [5dedd10a5bc08cd642d529f1548382c881163c45] | committer: Steve Lhomme

filters: allow specifying a close callback when creating the default operations

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5dedd10a5bc08cd642d529f1548382c881163c45
---

 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 fa1caf770b..88df8ae5da 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



More information about the vlc-commits mailing list