Add support for the Projection element
It's a part of the Google Spatial Media V2 spec: https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md Change-Id: I52f05e34b19239af09774da2f88eb584a0bfa628
This commit is contained in:
@@ -217,6 +217,18 @@ std::ostream& operator<<(std::ostream& os, Id id) {
|
||||
return os << "LuminanceMax";
|
||||
case Id::kLuminanceMin:
|
||||
return os << "LuminanceMin";
|
||||
case Id::kProjection:
|
||||
return os << "Projection";
|
||||
case Id::kProjectionType:
|
||||
return os << "kProjectionType";
|
||||
case Id::kProjectionPrivate:
|
||||
return os << "kProjectionPrivate";
|
||||
case Id::kProjectionPoseYaw:
|
||||
return os << "kProjectionPoseYaw";
|
||||
case Id::kProjectionPosePitch:
|
||||
return os << "kProjectionPosePitch";
|
||||
case Id::kProjectionPoseRoll:
|
||||
return os << "ProjectionPoseRoll";
|
||||
case Id::kAudio:
|
||||
return os << "Audio";
|
||||
case Id::kSamplingFrequency:
|
||||
@@ -441,6 +453,19 @@ std::ostream& operator<<(std::ostream& os, Primaries value) {
|
||||
}
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, ProjectionType value) {
|
||||
switch (value) {
|
||||
case ProjectionType::kRectangular:
|
||||
return os << "0 (rectangular)";
|
||||
case ProjectionType::kEquirectangular:
|
||||
return os << "1 (equirectangular)";
|
||||
case ProjectionType::kCubeMap:
|
||||
return os << "2 (cube map)";
|
||||
default:
|
||||
return PrintUnknownEnumValue(os, value);
|
||||
}
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, FlagInterlaced value) {
|
||||
switch (value) {
|
||||
case FlagInterlaced::kUnspecified:
|
||||
@@ -684,6 +709,7 @@ class DemoCallback : public Callback {
|
||||
PrintOptionalElement("AspectRatioType", video.aspect_ratio_type);
|
||||
PrintOptionalElement("FrameRate", video.frame_rate);
|
||||
PrintMasterElement("Colour", video.colour);
|
||||
PrintMasterElement("Projection", video.projection);
|
||||
}
|
||||
|
||||
void PrintMasterElement(const Colour& colour) {
|
||||
@@ -725,6 +751,14 @@ class DemoCallback : public Callback {
|
||||
PrintOptionalElement("LuminanceMin", mastering_metadata.luminance_min);
|
||||
}
|
||||
|
||||
void PrintMasterElement(const Projection& projection) {
|
||||
PrintMandatoryElement("ProjectionType", projection.type);
|
||||
PrintOptionalElement("ProjectionPrivate", projection.projection_private);
|
||||
PrintMandatoryElement("ProjectionPoseYaw", projection.pose_yaw);
|
||||
PrintMandatoryElement("ProjectionPosePitch", projection.pose_pitch);
|
||||
PrintMandatoryElement("ProjectionPoseRoll", projection.pose_roll);
|
||||
}
|
||||
|
||||
void PrintMasterElement(const Audio& audio) {
|
||||
PrintMandatoryElement("SamplingFrequency", audio.sampling_frequency);
|
||||
PrintOptionalElement("OutputSamplingFrequency", audio.output_frequency);
|
||||
|
||||
Reference in New Issue
Block a user