[vlc-commits] demux: mkv: add support for new spatial projection elements
Steve Lhomme
git at videolan.org
Wed Feb 8 15:08:11 CET 2017
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Tue Dec 6 10:27:29 2016 +0100| [dabb50419a9c29ce016c7e43aee294551da2dc02] | committer: Jean-Baptiste Kempf
demux: mkv: add support for new spatial projection elements
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dabb50419a9c29ce016c7e43aee294551da2dc02
---
modules/demux/mkv/matroska_segment_parse.cpp | 40 ++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index d424966..0f96ffa 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -526,6 +526,46 @@ 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" ) ;
+
+ 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 ) ) ;
More information about the vlc-commits
mailing list