[vlc-commits] core: add a field of view field to video_format_t

Steve Lhomme git at videolan.org
Mon Nov 14 16:23:22 CET 2016


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Thu Nov 10 14:03:21 2016 +0100| [e48e1aa8bc02d1181f1adac890b6a6f6ef52f853] | committer: Thomas Guillem

core: add a field of view field to video_format_t

default to 80°

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e48e1aa8bc02d1181f1adac890b6a6f6ef52f853
---

 include/vlc_es.h     | 3 +++
 src/input/es_out.c   | 2 ++
 src/misc/es_format.c | 2 ++
 3 files changed, 7 insertions(+)

diff --git a/include/vlc_es.h b/include/vlc_es.h
index bb86b40..11d3795 100644
--- a/include/vlc_es.h
+++ b/include/vlc_es.h
@@ -282,6 +282,8 @@ typedef enum video_chroma_location_t
     CHROMA_LOCATION_BOTTOM_CENTER,
 } video_chroma_location_t;
 
+#define DEFAULT_FIELD_OF_VIEW_DEGREES  80.f
+
 /**
  * video format description
  */
@@ -322,6 +324,7 @@ struct video_format_t
     float f_pose_yaw_degrees;      /**< view point yaw in degrees ]-180;180] */
     float f_pose_pitch_degrees;    /**< view point pitch in degrees ]-90;90] */
     float f_pose_roll_degrees;    /**< view point roll in degrees ]-180;180] */
+    float f_pose_fov_degrees;         /**< view point fov in degrees ]0;180[ */
     uint32_t i_cubemap_padding; /**< padding in pixels of the cube map faces */
 };
 
diff --git a/src/input/es_out.c b/src/input/es_out.c
index b049be4..9ba50b4 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -3096,6 +3096,8 @@ static void EsOutUpdateInfo( es_out_t *out, es_out_id_t *es, const es_format_t *
                                   fmt->video.f_pose_pitch_degrees );
            info_category_AddInfo( p_cat, _("Roll"), "%.2f",
                                   fmt->video.f_pose_roll_degrees );
+           info_category_AddInfo( p_cat, _("Field of view"), "%.2f",
+                                  fmt->video.f_pose_fov_degrees );
        }
        break;
 
diff --git a/src/misc/es_format.c b/src/misc/es_format.c
index d646e78..ded0646 100644
--- a/src/misc/es_format.c
+++ b/src/misc/es_format.c
@@ -454,6 +454,8 @@ void es_format_Init( es_format_t *fmt,
     memset( &fmt->video, 0, sizeof(video_format_t) );
     memset( &fmt->subs, 0, sizeof(subs_format_t) );
 
+    fmt->video.f_pose_fov_degrees = DEFAULT_FIELD_OF_VIEW_DEGREES;
+
     fmt->b_packetized           = true;
     fmt->i_bitrate              = 0;
     fmt->i_extra                = 0;



More information about the vlc-commits mailing list