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

Steve Lhomme git at videolan.org
Mon Nov 4 12:15:00 CET 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jul  9 08:43:22 2019 +0200| [e84eff3b5ad4fae53d8fb792484e3082d2510a8a] | committer: Steve Lhomme

decoder: implement a dummy get_device for the thumbnailer

We don't want to use the hardware decoder for now.

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

 src/input/decoder.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 496d9c7e9a..55001d7996 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1145,6 +1145,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 picture_t *thumbnailer_buffer_new( decoder_t *p_dec )
 {
     struct decoder_owner *p_owner = dec_get_owner( p_dec );
@@ -1773,6 +1782,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,
         .buffer_new = thumbnailer_buffer_new,
         .queue = ModuleThread_QueueThumbnail,
     },



More information about the vlc-commits mailing list