[vlc-devel] [PATCH 2/5] core: add a field of view field to video_format_t

Steve Lhomme robux4 at videolabs.io
Thu Nov 10 15:19:57 CET 2016


default to 80°
---
 include/vlc_es.h     | 1 +
 src/input/es_out.c   | 2 ++
 src/misc/es_format.c | 2 ++
 3 files changed, 5 insertions(+)

diff --git a/include/vlc_es.h b/include/vlc_es.h
index bb86b40..4f2b898 100644
--- a/include/vlc_es.h
+++ b/include/vlc_es.h
@@ -322,6 +322,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..1762e79 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 = 80.f;
+
     fmt->b_packetized           = true;
     fmt->i_bitrate              = 0;
     fmt->i_extra                = 0;
-- 
2.10.1



More information about the vlc-devel mailing list