[vlc-devel] [PATCH 1/3] decoder device: add a helper macro to set the module (typed) callback/priority

Steve Lhomme robux4 at ycbcr.xyz
Fri Jul 19 15:34:08 CEST 2019


---
 include/vlc_codec.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/vlc_codec.h b/include/vlc_codec.h
index aa45f36f36..8ecdcadb39 100644
--- a/include/vlc_codec.h
+++ b/include/vlc_codec.h
@@ -539,6 +539,15 @@ typedef struct vlc_decoder_device
 typedef int (*vlc_decoder_device_Open)(vlc_decoder_device *device,
                                         vout_window_t *window);
 
+#define set_callback_dec_device(activate, priority) \
+    { \
+        vlc_decoder_device_Open open__ = activate; \
+        (void) open__; \
+        set_callback(activate) \
+    } \
+    set_capability( "decoder device", priority )
+
+
 /**
  * Create a decoder device from a window
  *
-- 
2.17.1



More information about the vlc-devel mailing list