[vlc-devel] [PATCH 4/4] demux: mkv: add support for new spatial projection elements
Stève Lhomme
robux4 at videolabs.io
Tue Dec 6 10:23:25 CET 2016
On Tue, Dec 6, 2016 at 10:13 AM, Steve Lhomme <robux4 at videolabs.io> wrote:
> ---
> modules/demux/mkv/matroska_segment_parse.cpp | 45 ++++++++++++++++++++++++++++
> 1 file changed, 45 insertions(+)
>
> diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
> index 50a8eb3..78bc9d5 100644
> --- a/modules/demux/mkv/matroska_segment_parse.cpp
> +++ b/modules/demux/mkv/matroska_segment_parse.cpp
> @@ -526,6 +526,51 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
> /* FIXME: i_display_* allows you to not only set DAR, but also a zoom factor.
> we do not support this atm */
> }
> +#if LIBMATROSKA_VERSION >= 0x010406
> + E_CASE( KaxVideoProjection, proj )
> + {
> + debug( vars, "Track Video Projection" ) ;
> +
> + mkv_track_t *tk = vars.tk;
> +
> + tk->i_projection_type = 0;
> + tk->f_pose_yaw = tk->f_pose_pitch = tk->f_pose_roll = 0.0;
Oops, I forgot to clean this.
> + vars.level += 1;
> + dispatcher.iterate (proj.begin (), proj.end (), Payload( vars ) );
> + vars.level -= 1;
> + }
> + E_CASE( KaxVideoProjectionType, fint )
> + {
> + switch (static_cast<uint8>( fint ))
> + {
> + case 0:
> + vars.tk->fmt.video.projection_mode = PROJECTION_MODE_RECTANGULAR;
> + break;
> + case 1:
> + vars.tk->fmt.video.projection_mode = PROJECTION_MODE_EQUIRECTANGULAR;
> + break;
> + case 2:
> + vars.tk->fmt.video.projection_mode = PROJECTION_MODE_CUBEMAP_LAYOUT_STANDARD;
> + break;
> + default:
> + debug( vars, "Track Video Projection %u not supported", static_cast<uint8>( fint ) ) ;
> + break;
> + }
> + }
> + E_CASE( KaxVideoProjectionPoseYaw, pose )
> + {
> + vars.tk->fmt.video.pose.f_yaw_degrees = static_cast<float>( pose );
> + }
> + E_CASE( KaxVideoProjectionPosePitch, pose )
> + {
> + vars.tk->fmt.video.pose.f_pitch_degrees = static_cast<float>( pose );
> + }
> + E_CASE( KaxVideoProjectionPoseRoll, pose )
> + {
> + vars.tk->fmt.video.pose.f_roll_degrees = static_cast<float>( pose );
> + }
> +#endif
> E_CASE( KaxVideoFlagInterlaced, fint ) // UNUSED
> {
> debug( vars, "Track Video Interlaced=%u", static_cast<uint8>( fint ) ) ;
> --
> 2.10.1
>
More information about the vlc-devel
mailing list