[vlc-devel] [PATCH 02/39] video_output: set the pose outside of VoutGetDisplayCfg

Thomas Guillem thomas at gllm.fr
Mon Oct 7 09:42:55 CEST 2019


On Mon, Oct 7, 2019, at 09:41, Steve Lhomme wrote:
> For now I'm concentrating on the least amount of necessary changes.
> 
> That being said, I think it's better to init the display with as many 
> information as possible.
> 
> On 2019-10-06 20:23, Alexandre Janniaux wrote:
> > Hi,
> > 
> > Maybe viewpoint should be completely removed from the creation
> > chain and moved to a call to the dedicated control?
> > 
> > I'm not sure of what use case a video output that can handle
> > viewpoint only in Open() is or if I'm missing something, but
> > I would say that:
> > + either the display doesn't support viewpoint, we shouldn't
> >    care except from the UI side.
> > + or the display support viewpoint in control, and passing it
> >    in the Open or display configuration is useless.
> > + or it support viewpoints but doesn't support control, and it
> >    might need to be restarted like with any other unsupported
> >    input format change?
> > 
> > It would need an additional info boolean to avoid restarting
> > displays which don't support viewpoint though, but at least
> > it would be consistant from the display API user point of view,
> > like the scaling capability.

I agree with Alexandre but this could be done in an other patchset.

> > 
> > Regards,
> > --
> > Alexandre Janniaux
> > Videolabs
> > 
> > On Wed, Oct 02, 2019 at 04:23:17PM +0200, Steve Lhomme wrote:
> >> Avoid passing the video format just for that.
> >> ---
> >>   src/video_output/video_output.c | 7 +++----
> >>   1 file changed, 3 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
> >> index 4b11d4c6de4..e0d7dcc317b 100644
> >> --- a/src/video_output/video_output.c
> >> +++ b/src/video_output/video_output.c
> >> @@ -631,11 +631,9 @@ void vout_ChangeViewpoint(vout_thread_t *vout,
> >>   }
> >>
> >>   /* */
> >> -static void VoutGetDisplayCfg(vout_thread_t *vout, const video_format_t *fmt, vout_display_cfg_t *cfg)
> >> +static void VoutGetDisplayCfg(vout_thread_t *vout, vout_display_cfg_t *cfg)
> >>   {
> >>       /* Load configuration */
> >> -    cfg->viewpoint = fmt->pose;
> >> -
> >>       const int display_width = var_GetInteger(vout, "width");
> >>       const int display_height = var_GetInteger(vout, "height");
> >>       cfg->display.width   = display_width > 0  ? display_width  : 0;
> >> @@ -1955,7 +1953,8 @@ int vout_Request(const vout_configuration_t *cfg, input_thread_t *input)
> >>   #endif
> >>           };
> >>
> >> -        VoutGetDisplayCfg(vout, &original, &sys->display_cfg);
> >> +        VoutGetDisplayCfg(vout, &sys->display_cfg);
> >> +        sys->display_cfg.viewpoint = sys->original.pose;
> >>           vout_SizeWindow(vout, &sys->original, &wcfg.width, &wcfg.height);
> >>
> >>           if (vout_window_Enable(sys->display_cfg.window, &wcfg)) {
> >> --
> >> 2.17.1
> >>
> >> _______________________________________________
> >> vlc-devel mailing list
> >> To unsubscribe or modify your subscription options:
> >> https://mailman.videolan.org/listinfo/vlc-devel
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> > 
> _______________________________________________
> 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