[vlc-devel] [PATCH 7/7] video_output: keep track of the vout modules that can switch stereo modes dynamically

Steve Lhomme robux4 at ycbcr.xyz
Fri Aug 17 13:33:15 CEST 2018


I agree this is not ideal but until we do a big rework of the vout 
handling (I have some proposal) it's better than reseting the vout when 
the stereo input change.


Alternativaly I'd be OK with not changing at all when stereo is 
encountered and living it to the current vout to do changes if it can 
(in most cases it won't and nothing else is possible so no need to 
recreate anything).


On 17/08/2018 12:52, Rémi Denis-Courmont wrote:
> Given that support for stereo is susceptible to change asynchronously 
> depending on user controls or window management, this static and 
> synchronous approach probably will never work.
>
> Le 17 août 2018 12:27:10 GMT+03:00, Steve Lhomme <robux4 at ycbcr.xyz> a 
> écrit :
>
>     ---
>       include/vlc_vout_display.h       | 1 +
>       src/video_output/display.c       | 1 +
>       src/video_output/video_output.c  | 9 +++++++++
>       src/video_output/vout_internal.h | 5 +++++
>       4 files changed, 16 insertions(+)
>
>     diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
>     index afa7ad7888..9b8c3cb140 100644
>     --- a/include/vlc_vout_display.h
>     +++ b/include/vlc_vout_display.h
>     @@ -112,6 +112,7 @@ typedef struct {
>           bool is_slow;                           /* The picture memory has slow read/write */
>           bool has_double_click;                  /* Is double-click generated */
>           bool has_pictures_invalid;              /* Will VOUT_DISPLAY_EVENT_PICTURES_INVALID be used */
>     +    int stereo_modes;                       /* bitmask of multiview modes supported dynamically */
>           const vlc_fourcc_t *subpicture_chromas; /* List of supported chromas for subpicture rendering. */
>       } vout_display_info_t;
>       
>     diff --git a/src/video_output/display.c b/src/video_output/display.c
>     index fa64d38bbc..4aca94b869 100644
>     --- a/src/video_output/display.c
>     +++ b/src/video_output/display.c
>     @@ -93,6 +93,7 @@ static vout_display_t *vout_display_New(vlc_object_t *obj,
>           vd->info.has_double_click = false;
>           vd->info.has_pictures_invalid = false;
>           vd->info.subpicture_chromas = NULL;
>     +    vd->info.stereo_modes = (1 << MULTIVIEW_2D);
>       
>           vd->cfg = cfg;
>           vd->pool = NULL;
>     diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
>     index d80f825987..f5385d0d77 100644
>     --- a/src/video_output/video_output.c
>     +++ b/src/video_output/video_output.c
>     @@ -500,6 +500,15 @@ int vout_GetSnapshot(vout_thread_t *vout,
>           return VLC_SUCCESS;
>       }
>       
>     +bool vout_CanHandleStereoInput(vout_thread_t *vout, video_multiview_mode_t mode)
>     +{
>     +    vlc_mutex_lock(&vout->p->display.lock);
>     +    vout_display_t *vd = vout->p->display.vd;
>     +    bool res = vd && vd->info.stereo_modes & (1<<mode);
>     +    vlc_mutex_unlock(&vout->p->display.lock);
>     +    return res;
>     +}
>     +
>       void vout_ChangeAspectRatio( vout_thread_t *p_vout,
>                                    unsigned int i_num, unsigned int i_den )
>       {
>     diff --git a/src/video_output/vout_internal.h b/src/video_output/vout_internal.h
>     index ba583e7c8e..fd94c89cff 100644
>     --- a/src/video_output/vout_internal.h
>     +++ b/src/video_output/vout_internal.h
>     @@ -283,6 +283,11 @@ void vout_DisplayTitle( vout_thread_t *p_vout, const char *psz_title );
>        */
>       bool vout_IsEmpty( vout_thread_t *p_vout );
>       
>     +/**
>     + * Returns true if the vout can handle the multiview input switch dynamically.
>     + */
>     +bool vout_CanHandleStereoInput(vout_thread_t *, video_multiview_mode_t);
>     +
>       void vout_SetSpuHighlight( vout_thread_t *p_vout, const vlc_spu_highlight_t * );
>       
>       #endif
>
>
> -- 
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez 
> excuser ma brièveté.
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list