Skip to content

Commit

Permalink
mkvparser_sample: Add support for Projection element.
Browse files Browse the repository at this point in the history
Part of the Spherical Video V2 draft specification:
https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md

Change-Id: I06d8e55d197fcf106b91d8d795ef85163ef5c2d5
  • Loading branch information
tomfinegan committed Aug 29, 2016
1 parent 41e814a commit 9a3f2b5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions mkvparser_sample.cc
Expand Up @@ -298,6 +298,25 @@ int main(int argc, char* argv[]) {
}
}
}

const mkvparser::Projection* const projection =
pVideoTrack->GetProjection();
if (projection) {
printf("\t\tVideo Projection:\n");
if (projection->type != mkvparser::Projection::kTypeNotPresent)
printf("\t\t\tProjectionType: %d\n",
static_cast<int>(projection->type));
if (projection->private_data) {
printf("\t\t\tProjectionPrivate: %u bytes\n",
static_cast<unsigned int>(projection->private_data_length));
}
if (projection->pose_yaw != mkvparser::Projection::kValueNotPresent)
printf("\t\t\tProjectionPoseYaw: %f\n", projection->pose_yaw);
if (projection->pose_pitch != mkvparser::Projection::kValueNotPresent)
printf("\t\t\tProjectionPosePitch: %f\n", projection->pose_pitch);
if (projection->pose_roll != mkvparser::Projection::kValueNotPresent)
printf("\t\t\tProjectionPosePitch: %f\n", projection->pose_roll);
}
}

if (trackType == mkvparser::Track::kAudio) {
Expand Down

0 comments on commit 9a3f2b5

Please sign in to comment.