[vlc-devel] [PATCH 12/16] vout: add vout_display_UpdateViewpoint

Thomas Guillem thomas at gllm.fr
Wed Nov 9 18:33:06 CET 2016


vout_display_UpdateViewpoint is used to change the currently used viewpoint for
the associated vout-display. As the documentation suggest, it allows for both
absolute and relative updates.

Signed-off-by: Thomas Guillem <thomas at gllm.fr>
---
 include/vlc_vout_display.h | 12 +++++++++++-
 src/libvlccore.sym         |  1 +
 src/video_output/display.c |  7 +++++++
 3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index e1efe00..d2b8e31 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -468,6 +468,16 @@ VLC_API void vout_display_PlacePicture(vout_display_place_t *place, const video_
  */
 VLC_API void vout_display_SendMouseMovedDisplayCoordinates(vout_display_t *vd, video_orientation_t orient_display, int m_x, int m_y,
                                                            vout_display_place_t *place);
-
+/**
+ * Update the viewpoint from vout_display_t. This can be called the vout event
+ * thread or from the manage callback.
+ *
+ * \param vd vout_display_t.
+ * \param viewpoint the new viewpoint to apply
+ * \param if true, the viewpoint will be applied absolutely
+ */
+VLC_API void vout_display_UpdateViewpoint(vout_display_t *vd,
+                                          const vlc_viewpoint_t *viewpoint,
+                                          bool absolute);
 /** @} */
 #endif /* VLC_VOUT_DISPLAY_H */
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index c110b66..c5c983b 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -734,6 +734,7 @@ vout_window_Delete
 vout_display_GetDefaultDisplaySize
 vout_display_PlacePicture
 vout_display_SendMouseMovedDisplayCoordinates
+vout_display_UpdateViewpoint
 vout_GetViewpoint
 vout_UpdateViewpoint
 xml_Create
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 52f533d..17b6205 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -322,6 +322,13 @@ void vout_display_SendMouseMovedDisplayCoordinates(vout_display_t *vd, video_ori
     }
 }
 
+void vout_display_UpdateViewpoint(vout_display_t *vd,
+                                  const vlc_viewpoint_t *viewpoint,
+                                  bool absolute)
+{
+    vout_UpdateDisplayViewpoint(vd, viewpoint, absolute);
+}
+
 struct vout_display_owner_sys_t {
     vout_thread_t   *vout;
     bool            is_wrapper;  /* Is the current display a wrapper */
-- 
2.9.3



More information about the vlc-devel mailing list