libvlc: merge libvlc_video_viewpoint_t and libvlc_video_track_t.pose
authorThomas Guillem <thomas@gllm.fr>
Tue, 25 Jul 2017 07:02:59 +0000 (09:02 +0200)
committerThomas Guillem <thomas@gllm.fr>
Tue, 25 Jul 2017 14:40:51 +0000 (16:40 +0200)
include/vlc/libvlc_media.h
include/vlc/libvlc_media_player.h
lib/media.c

index 01e571c..383f366 100644 (file)
@@ -192,6 +192,19 @@ typedef enum libvlc_video_projection_t
     libvlc_video_projection_cubemap_layout_standard = 0x100,
 } libvlc_video_projection_t;
 
+/**
+ * Viewpoint
+ *
+ * \warning allocate using libvlc_video_new_viewpoint()
+ */
+typedef struct libvlc_video_viewpoint_t
+{
+    float f_yaw;           /**< view point yaw in degrees  ]-180;180] */
+    float f_pitch;         /**< view point pitch in degrees  ]-90;90] */
+    float f_roll;          /**< view point roll in degrees ]-180;180] */
+    float f_field_of_view; /**< field of view in degrees ]0;180[ (default 80.)*/
+} libvlc_video_viewpoint_t;
+
 typedef struct libvlc_video_track_t
 {
     unsigned    i_height;
@@ -203,12 +216,7 @@ typedef struct libvlc_video_track_t
 
     libvlc_video_orient_t       i_orientation;
     libvlc_video_projection_t   i_projection;
-    struct {
-        float f_yaw_degrees;    /**< View point yaw in degrees ]-180;180] */
-        float f_pitch_degrees;  /**< View point pitch in degrees ]-90;90] */
-        float f_roll_degrees;   /**< View point roll in degrees ]-180;180] */
-        float f_fov_degrees;    /**< View point fov in degrees ]0;180[ */
-    } pose; /**< Initial view point */
+    libvlc_video_viewpoint_t    pose; /**< Initial view point */
 } libvlc_video_track_t;
 
 typedef struct libvlc_subtitle_track_t
index 160cdfb..78caed0 100644 (file)
@@ -1177,19 +1177,6 @@ LIBVLC_API char *libvlc_video_get_aspect_ratio( libvlc_media_player_t *p_mi );
  */
 LIBVLC_API void libvlc_video_set_aspect_ratio( libvlc_media_player_t *p_mi, const char *psz_aspect );
 
-/**
- * Viewpoint for video outputs
- *
- * \warning allocate using libvlc_video_new_viewpoint()
- */
-typedef struct libvlc_video_viewpoint_t
-{
-    float f_yaw;           /**< view point yaw in degrees  ]-180;180] */
-    float f_pitch;         /**< view point pitch in degrees  ]-90;90] */
-    float f_roll;          /**< view point roll in degrees ]-180;180] */
-    float f_field_of_view; /**< field of view in degrees ]0;180[ (default 80.)*/
-} libvlc_video_viewpoint_t;
-
 /**
  * Create a video viewpoint structure.
  *
index 419e483..30e5bd5 100644 (file)
@@ -1025,10 +1025,10 @@ libvlc_media_tracks_get( libvlc_media_t *p_md, libvlc_media_track_t *** pp_es )
                     ( p_es->video.projection_mode == PROJECTION_MODE_CUBEMAP_LAYOUT_STANDARD ) );
             p_mes->video->i_projection = (int) p_es->video.projection_mode;
 
-            p_mes->video->pose.f_yaw_degrees = p_es->video.pose.yaw;
-            p_mes->video->pose.f_pitch_degrees = p_es->video.pose.pitch;
-            p_mes->video->pose.f_roll_degrees = p_es->video.pose.roll;
-            p_mes->video->pose.f_fov_degrees = p_es->video.pose.fov;
+            p_mes->video->pose.f_yaw = p_es->video.pose.yaw;
+            p_mes->video->pose.f_pitch = p_es->video.pose.pitch;
+            p_mes->video->pose.f_roll = p_es->video.pose.roll;
+            p_mes->video->pose.f_field_of_view = p_es->video.pose.fov;
             break;
         case AUDIO_ES:
             p_mes->i_type = libvlc_track_audio;