[vlc-devel] [PATCH] decoder: implement a dummy get_device for the thumbnailer

Steve Lhomme robux4 at ycbcr.xyz
Fri Oct 25 10:17:49 CEST 2019


We don't want to use the hardware decoder for now.
---
 src/input/decoder.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index f4f0f654080..f3b9a9b841c 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1211,6 +1211,15 @@ static void ModuleThread_QueueVideo( decoder_t *p_dec, picture_t *p_pic )
     ModuleThread_UpdateStatVideo( p_owner, success != VLC_SUCCESS );
 }
 
+static vlc_decoder_device * thumbnailer_get_device( decoder_t *p_dec )
+{
+    VLC_UNUSED(p_dec);
+    // no hardware decoder on purpose
+    // we don't want to load many DLLs and allocate many pictures
+    // just to decode one picture
+    return NULL;
+}
+
 static int thumbnailer_update_format( decoder_t *p_dec, vlc_video_context *vctx_out )
 {
     VLC_UNUSED(vctx_out);
@@ -1846,6 +1855,7 @@ static const struct decoder_owner_callbacks dec_video_cbs =
 static const struct decoder_owner_callbacks dec_thumbnailer_cbs =
 {
     .video = {
+        .get_device = thumbnailer_get_device,
         .format_update = thumbnailer_update_format,
         .buffer_new = thumbnailer_buffer_new,
         .queue = ModuleThread_QueueThumbnail,
-- 
2.17.1



More information about the vlc-devel mailing list