[vlc-devel] [PATCH 3/4] core: vout: pass an input_thread_t to vout_GetDevice()

Thomas Guillem thomas at gllm.fr
Thu Jan 16 17:41:36 CET 2020


Optinal, will be used to get the input_thread_t "dec-dev" variable.
---
 src/input/resource.c             | 2 +-
 src/video_output/video_output.c  | 3 ++-
 src/video_output/vout_internal.h | 3 ++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/input/resource.c b/src/input/resource.c
index 4ff6edd79c0..ce15c47917b 100644
--- a/src/input/resource.c
+++ b/src/input/resource.c
@@ -427,7 +427,7 @@ vout_thread_t *input_resource_GetVoutDecoderDevice(input_resource_t *p_resource,
 
     if (pp_dec_dev)
     {
-        *pp_dec_dev = vout_GetDevice(cfg);
+        *pp_dec_dev = vout_GetDevice(cfg, p_resource->p_input);
     }
 
     vout = cfg->vout;
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index d493b6a545c..3d33f329fb5 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -2100,7 +2100,8 @@ int vout_Request(const vout_configuration_t *cfg, vlc_video_context *vctx, input
     return 0;
 }
 
-vlc_decoder_device *vout_GetDevice(const vout_device_configuration_t *cfg)
+vlc_decoder_device *vout_GetDevice(const vout_device_configuration_t *cfg,
+                                   input_thread_t *input)
 {
     vlc_decoder_device *dec_device = NULL;
 
diff --git a/src/video_output/vout_internal.h b/src/video_output/vout_internal.h
index 0ca81871fee..76b94431695 100644
--- a/src/video_output/vout_internal.h
+++ b/src/video_output/vout_internal.h
@@ -205,7 +205,8 @@ vout_thread_t *vout_CreateDummy(vlc_object_t *obj) VLC_USED;
  * \param cfg the video configuration requested.
  * \return pointer to a decoder device reference to use with the vout or NULL
  */
-vlc_decoder_device *vout_GetDevice(const vout_device_configuration_t *cfg);
+vlc_decoder_device *vout_GetDevice(const vout_device_configuration_t *cfg,
+                                   input_thread_t *input);
 
 /**
  * Returns a suitable vout or release the given one.
-- 
2.20.1



More information about the vlc-devel mailing list