core: move viewpoint to vlc_viewpoint.h
authorThomas Guillem <thomas@gllm.fr>
Mon, 24 Jul 2017 13:10:49 +0000 (15:10 +0200)
committerThomas Guillem <thomas@gllm.fr>
Tue, 25 Jul 2017 14:40:51 +0000 (16:40 +0200)
12 files changed:
include/vlc_es.h
include/vlc_viewpoint.h [new file with mode: 0644]
include/vlc_vout.h
include/vlc_vout_display.h
lib/media_player_internal.h
modules/audio_filter/channel_mixer/spatialaudio.cpp
modules/control/hotkeys.c
modules/video_output/opengl/vout_helper.c
src/Makefile.am
src/audio_output/aout_internal.h
src/input/input_internal.h
src/video_output/control.h

index 19bea66..0d1088f 100644 (file)
@@ -27,6 +27,7 @@
 #include <vlc_common.h>
 #include <vlc_fourcc.h>
 #include <vlc_text_style.h>
+#include <vlc_viewpoint.h>
 
 /**
  * \file
@@ -314,10 +315,6 @@ typedef enum video_chroma_location_t
     CHROMA_LOCATION_BOTTOM_CENTER,
 } video_chroma_location_t;
 
-#define FIELD_OF_VIEW_DEGREES_DEFAULT  80.f
-#define FIELD_OF_VIEW_DEGREES_MAX 150.f
-#define FIELD_OF_VIEW_DEGREES_MIN 20.f
-
 /**
  * video format description
  */
diff --git a/include/vlc_viewpoint.h b/include/vlc_viewpoint.h
new file mode 100644 (file)
index 0000000..8c1b739
--- /dev/null
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * vlc_viewpoint.h: viewpoint struct and helpers
+ *****************************************************************************
+ * Copyright (C) 2017 VLC authors and VideoLAN
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef VLC_VIEWPOINT_H_
+#define VLC_VIEWPOINT_H_ 1
+
+#include <vlc_common.h>
+
+/**
+ * \defgroup output Output
+ * \ingroup output
+ *
+ * @{
+ * \file
+ * Video and audio viewpoint struct and helpers
+ */
+
+#define FIELD_OF_VIEW_DEGREES_DEFAULT  80.f
+#define FIELD_OF_VIEW_DEGREES_MAX 150.f
+#define FIELD_OF_VIEW_DEGREES_MIN 20.f
+
+/**
+ * Viewpoints
+ */
+struct vlc_viewpoint_t {
+    float yaw;   /* yaw in degrees */
+    float pitch; /* pitch in degrees */
+    float roll;  /* roll in degrees */
+    float fov;   /* field of view in degrees */
+};
+
+static inline void vlc_viewpoint_init( vlc_viewpoint_t *p_vp )
+{
+    p_vp->yaw = p_vp->pitch = p_vp->roll = 0.0f;
+    p_vp->fov = FIELD_OF_VIEW_DEGREES_DEFAULT;
+}
+
+/**@}*/
+
+#endif /* VLC_VIEWPOINT_H_ */
index 3dd50b1..fd43f79 100644 (file)
@@ -82,22 +82,6 @@ struct vout_thread_t {
 #define VOUT_ALIGN_BOTTOM       0x0008
 #define VOUT_ALIGN_VMASK        0x000C
 
-/**
- * Viewpoints
- */
-struct vlc_viewpoint_t {
-    float yaw;   /* yaw in degrees */
-    float pitch; /* pitch in degrees */
-    float roll;  /* roll in degrees */
-    float fov;   /* field of view in degrees */
-};
-
-static inline void vlc_viewpoint_init( vlc_viewpoint_t *p_vp )
-{
-    p_vp->yaw = p_vp->pitch = p_vp->roll = 0.0f;
-    p_vp->fov = FIELD_OF_VIEW_DEGREES_DEFAULT;
-}
-
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
index 39dbfb9..4e243e4 100644 (file)
@@ -32,6 +32,7 @@
 #include <vlc_mouse.h>
 #include <vlc_vout.h>
 #include <vlc_vout_window.h>
+#include <vlc_viewpoint.h>
 
 /**
  * \defgroup video_display Video output display
index c67ddba..a8475c6 100644 (file)
@@ -32,7 +32,7 @@
 #include <vlc/vlc.h>
 #include <vlc/libvlc_media.h>
 #include <vlc_input.h>
-#include <vlc_vout.h>
+#include <vlc_viewpoint.h>
 
 #include "../modules/audio_filter/equalizer_presets.h"
 
index a04ab9d..d386259 100644 (file)
@@ -34,7 +34,7 @@
 #include <vlc_plugin.h>
 #include <vlc_aout.h>
 #include <vlc_filter.h>
-#include <vlc_vout.h>
+#include <vlc_viewpoint.h>
 #include <vlc_keys.h>
 
 #include <new>
index fc26268..a3ddfd9 100644 (file)
@@ -36,7 +36,7 @@
 #include <vlc_interface.h>
 #include <vlc_input.h>
 #include <vlc_aout.h>
-#include <vlc_vout.h>
+#include <vlc_viewpoint.h>
 #include <vlc_vout_osd.h>
 #include <vlc_playlist.h>
 #include <vlc_keys.h>
index 075b1c2..5c35ade 100644 (file)
@@ -38,6 +38,7 @@
 #include <vlc_opengl.h>
 #include <vlc_memory.h>
 #include <vlc_vout.h>
+#include <vlc_viewpoint.h>
 
 #include "vout_helper.h"
 #include "internal.h"
index fac26a3..1ddb528 100644 (file)
@@ -95,6 +95,7 @@ pluginsinclude_HEADERS = \
        ../include/vlc_tls.h \
        ../include/vlc_url.h \
        ../include/vlc_variables.h \
+       ../include/vlc_viewpoint.h \
        ../include/vlc_vlm.h \
        ../include/vlc_video_splitter.h \
        ../include/vlc_vout.h \
index c90eb6a..2852b6f 100644 (file)
@@ -25,7 +25,7 @@
 # define LIBVLC_AOUT_INTERNAL_H 1
 
 # include <vlc_atomic.h>
-# include <vlc_vout.h> /* for vlc_viewpoint_t */
+# include <vlc_viewpoint.h>
 
 /* Max input rate factor (1/4 -> 4) */
 # define AOUT_MAX_INPUT_RATE (4)
index 87da2a6..2d53840 100644 (file)
@@ -29,7 +29,7 @@
 #include <vlc_access.h>
 #include <vlc_demux.h>
 #include <vlc_input.h>
-#include <vlc_vout.h>
+#include <vlc_viewpoint.h>
 #include <libvlc.h>
 #include "input_interface.h"
 #include "misc/interrupt.h"
index f49208a..04a66e9 100644 (file)
@@ -25,6 +25,7 @@
 #define LIBVLC_VOUT_INTERNAL_CONTROL_H
 
 #include <vlc_vout_window.h>
+#include <vlc_viewpoint.h>
 
 /* */
 enum {