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

Steve Lhomme git at videolan.org
Mon Jul 22 07:20:39 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jul 12 10:27:06 2019 +0200| [4f48d553f9c1a236befb1d6f057ca2ae7b0c2bb1] | committer: Steve Lhomme

decoder device: add a helper macro to set the module (typed) callback/priority

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

 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
  *



More information about the vlc-commits mailing list