[vlc-devel] [PATCH 2/7] decoder: add code to send 3d metadata to the output modules to be handled

Steve Lhomme robux4 at ycbcr.xyz
Thu Aug 16 11:00:44 CEST 2018


From: "Mohammed (Shaan) Huzaifa Danish" <shaan3 at gmail.com>

This is because we don't want a new vout everytime the video stereo mode changes.

We check that the video output can actually change stereo source mode dynamically
otherwise we recreate one.

Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
---
 src/input/decoder.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 0c7ee686b4..b2f646114d 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -445,7 +445,8 @@ static int vout_update_format( decoder_t *p_dec )
      || (int64_t)p_dec->fmt_out.video.i_sar_num * p_owner->fmt.video.i_sar_den !=
         (int64_t)p_dec->fmt_out.video.i_sar_den * p_owner->fmt.video.i_sar_num ||
         p_dec->fmt_out.video.orientation != p_owner->fmt.video.orientation ||
-        p_dec->fmt_out.video.multiview_mode != p_owner->fmt.video.multiview_mode )
+       (p_dec->fmt_out.video.multiview_mode != p_owner->fmt.video.multiview_mode &&
+         !vout_CanHandleStereoInput(p_owner->p_vout, p_dec->fmt_out.video.orientation)) )
     {
         vout_thread_t *p_vout;
 
@@ -572,7 +573,8 @@ static int vout_update_format( decoder_t *p_dec )
          p_dec->fmt_out.video.lighting.MaxCLL !=
          p_owner->fmt.video.lighting.MaxCLL ||
          p_dec->fmt_out.video.lighting.MaxFALL !=
-         p_owner->fmt.video.lighting.MaxFALL)
+         p_owner->fmt.video.lighting.MaxFALL ||
+         p_dec->fmt_out.video.multiview_mode != p_owner->fmt.video.multiview_mode )
     {
         /* the format has changed but we don't need a new vout */
         vlc_mutex_lock( &p_owner->lock );
-- 
2.17.0



More information about the vlc-devel mailing list