| Index: media/base/video_frame_metadata.cc
|
| diff --git a/media/base/video_frame_metadata.cc b/media/base/video_frame_metadata.cc
|
| index 1fcba0f3adf8168783392331557a904c16930a93..388e001ca84c4d173e40ae14eb24f165374e1dac 100644
|
| --- a/media/base/video_frame_metadata.cc
|
| +++ b/media/base/video_frame_metadata.cc
|
| @@ -42,6 +42,11 @@ void VideoFrameMetadata::SetDouble(Key key, double value) {
|
| dictionary_.SetDoubleWithoutPathExpansion(ToInternalKey(key), value);
|
| }
|
|
|
| +void VideoFrameMetadata::SetRotation(Key key, VideoRotation value) {
|
| + DCHECK_EQ(ROTATION, key);
|
| + dictionary_.SetIntegerWithoutPathExpansion(ToInternalKey(key), value);
|
| +}
|
| +
|
| void VideoFrameMetadata::SetString(Key key, const std::string& value) {
|
| dictionary_.SetWithoutPathExpansion(
|
| ToInternalKey(key),
|
| @@ -92,6 +97,17 @@ bool VideoFrameMetadata::GetDouble(Key key, double* value) const {
|
| return dictionary_.GetDoubleWithoutPathExpansion(ToInternalKey(key), value);
|
| }
|
|
|
| +bool VideoFrameMetadata::GetRotation(Key key, VideoRotation* value) const {
|
| + DCHECK_EQ(ROTATION, key);
|
| + DCHECK(value);
|
| + int int_value;
|
| + const bool rv = dictionary_.GetIntegerWithoutPathExpansion(ToInternalKey(key),
|
| + &int_value);
|
| + if (rv)
|
| + *value = static_cast<VideoRotation>(int_value);
|
| + return rv;
|
| +}
|
| +
|
| bool VideoFrameMetadata::GetString(Key key, std::string* value) const {
|
| DCHECK(value);
|
| const base::BinaryValue* const binary_value = GetBinaryValue(key);
|
|
|