[vlc-commits] display: pass a vlc_viewpoint_t directly to VOUT_DISPLAY_CHANGE_VIEWPOINT
Steve Lhomme
git at videolan.org
Wed Aug 26 08:54:55 CEST 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Aug 24 15:44:25 2020 +0200| [970e0d576682c46bf48fdba885cc6dd790133809] | committer: Steve Lhomme
display: pass a vlc_viewpoint_t directly to VOUT_DISPLAY_CHANGE_VIEWPOINT
No need to pass the whole display config.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=970e0d576682c46bf48fdba885cc6dd790133809
---
include/vlc_vout_display.h | 2 +-
modules/video_output/caopengllayer.m | 2 +-
modules/video_output/ios.m | 2 +-
modules/video_output/macosx.m | 2 +-
modules/video_output/opengl/display.c | 2 +-
modules/video_output/win32/direct3d11.c | 4 ++--
modules/video_output/win32/glwin32.c | 2 +-
src/video_output/display.c | 2 +-
8 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index b6282b052b..2a0b593a13 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -218,7 +218,7 @@ enum vout_display_query {
/**
* Notifies a change of VR/360° viewpoint.
*/
- VOUT_DISPLAY_CHANGE_VIEWPOINT, /* const vout_display_cfg_t *p_cfg */
+ VOUT_DISPLAY_CHANGE_VIEWPOINT, /* const vlc_viewpoint_t * */
};
/**
diff --git a/modules/video_output/caopengllayer.m b/modules/video_output/caopengllayer.m
index 08e88f42aa..0dafcec000 100644
--- a/modules/video_output/caopengllayer.m
+++ b/modules/video_output/caopengllayer.m
@@ -347,7 +347,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
return VLC_EGENERIC;
ret = vout_display_opengl_SetViewpoint(sys->vgl,
- &va_arg (ap, const vout_display_cfg_t* )->viewpoint);
+ va_arg(ap, const vlc_viewpoint_t*));
OpenglUnlock(sys->gl);
return ret;
}
diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index 6fbeaa49af..80b75147c7 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -273,7 +273,7 @@ static int Control(vout_display_t *vd, int query, va_list ap)
case VOUT_DISPLAY_CHANGE_VIEWPOINT:
return vout_display_opengl_SetViewpoint(glsys->vgl,
- &va_arg (ap, const vout_display_cfg_t* )->viewpoint);
+ va_arg(ap, const vlc_viewpoint_t*));
case VOUT_DISPLAY_RESET_PICTURES:
vlc_assert_unreachable ();
diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index a1bee8fb12..15d0c30577 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -387,7 +387,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
case VOUT_DISPLAY_CHANGE_VIEWPOINT:
return vout_display_opengl_SetViewpoint (sys->vgl,
- &va_arg (ap, const vout_display_cfg_t* )->viewpoint);
+ va_arg(ap, const vlc_viewpoint_t*));
case VOUT_DISPLAY_RESET_PICTURES:
vlc_assert_unreachable ();
diff --git a/modules/video_output/opengl/display.c b/modules/video_output/opengl/display.c
index f4e46f6f33..2db08ccc03 100644
--- a/modules/video_output/opengl/display.c
+++ b/modules/video_output/opengl/display.c
@@ -255,7 +255,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
}
case VOUT_DISPLAY_CHANGE_VIEWPOINT:
return vout_display_opengl_SetViewpoint (sys->vgl,
- &va_arg (ap, const vout_display_cfg_t* )->viewpoint);
+ va_arg(ap, const vlc_viewpoint_t*));
default:
msg_Err (vd, "Unknown request %d", query);
}
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index a5cf488c4e..5affcf3068 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -494,10 +494,10 @@ static int Control(vout_display_t *vd, int query, va_list args)
if (query == VOUT_DISPLAY_CHANGE_VIEWPOINT)
{
- const vout_display_cfg_t *cfg = va_arg(args, const vout_display_cfg_t*);
+ const vlc_viewpoint_t *viewpoint = va_arg(args, const vlc_viewpoint_t*);
if ( sys->picQuad.pVertexShaderConstants )
{
- SetQuadVSProjection( vd, &sys->picQuad, &cfg->viewpoint );
+ SetQuadVSProjection( vd, &sys->picQuad, viewpoint );
res = VLC_SUCCESS;
}
}
diff --git a/modules/video_output/win32/glwin32.c b/modules/video_output/win32/glwin32.c
index 4ccfd3dae8..7397d7e9bb 100644
--- a/modules/video_output/win32/glwin32.c
+++ b/modules/video_output/win32/glwin32.c
@@ -79,7 +79,7 @@ static int Control(vout_display_t *vd, int query, va_list args)
if (query == VOUT_DISPLAY_CHANGE_VIEWPOINT)
return vout_display_opengl_SetViewpoint(sys->vgl,
- &va_arg (args, const vout_display_cfg_t* )->viewpoint);
+ va_arg(args, const vlc_viewpoint_t*));
return CommonControl(vd, &sys->area, &sys->sys, query, args);
}
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 8fd444168d..0112425ac1 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -726,7 +726,7 @@ void vout_SetDisplayViewpoint(vout_display_t *vd,
osys->cfg.viewpoint = *p_viewpoint;
if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_VIEWPOINT,
- &osys->cfg)) {
+ &osys->cfg.viewpoint)) {
msg_Err(vd, "Failed to change Viewpoint");
osys->cfg.viewpoint = old_vp;
}
More information about the vlc-commits
mailing list