[vlc-devel] [PATCH v2 1/3] decoder device: add a helper macro to set the module callbacks/priority
Steve Lhomme
robux4 at ycbcr.xyz
Tue Jul 16 09:06:41 CEST 2019
---
include/vlc_codec.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/vlc_codec.h b/include/vlc_codec.h
index 86f092c029..118d1d059f 100644
--- a/include/vlc_codec.h
+++ b/include/vlc_codec.h
@@ -534,6 +534,16 @@ typedef int (*vlc_decoder_device_Open)(vlc_decoder_device *device,
/** "decoder device" module close entry point */
typedef void (*vlc_decoder_device_Close)(vlc_decoder_device *device);
+#define set_callbacks_dec_device(activate, deactivate, priority) \
+ { \
+ vlc_decoder_device_Open open__ = activate; \
+ vlc_decoder_device_Close close__ = deactivate; \
+ (void) open__; (void) close__; \
+ set_callbacks(activate, deactivate) \
+ } \
+ set_capability( "decoder device", priority )
+
+
/**
* Create a decoder device from a window
*
--
2.17.1
More information about the vlc-devel
mailing list