[vlc-devel] [PATCH v1 22/33] filter: add a wrapper for filters sending the output into a sink
Steve Lhomme
robux4 at ycbcr.xyz
Fri Sep 25 16:46:58 CEST 2020
---
include/vlc_filter.h | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/include/vlc_filter.h b/include/vlc_filter.h
index f8f1d48a417..b84c8374278 100644
--- a/include/vlc_filter.h
+++ b/include/vlc_filter.h
@@ -403,6 +403,24 @@ VLC_API void filter_DeleteBlend( vlc_blender_t * );
return p_outpic; \
}
+#define VIDEO_FILTER_WRAPPER2( name ) \
+ static int name ## _Filter ( filter_t *p_filter, \
+ picture_t *p_pic, \
+ struct vlc_video_sink *sink ) \
+ { \
+ if ( unlikely(p_pic == NULL) ) return VLC_EBADVAR; \
+ picture_t *p_outpic = filter_NewPicture( p_filter ); \
+ if( unlikely(p_outpic == NULL) ) \
+ { \
+ picture_Release( p_pic ); \
+ return VLC_ENOMEM; \
+ } \
+ name( p_filter, p_pic, p_outpic ); \
+ picture_CopyProperties( p_outpic, p_pic ); \
+ picture_Release( p_pic ); \
+ return vlc_video_sink_PutPicture( sink, p_outpic ); \
+ }
+
/**
* 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