Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(441)

Side by Side Diff: media/base/video_frame_metadata.cc

Issue 1752243002: Modifying video_frame.cc to copy all metadata values, instead of only END_OF_STREAM, and updating u… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/base/video_frame_metadata.h ('k') | media/base/video_frame_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/base/video_frame_metadata.h" 5 #include "media/base/video_frame_metadata.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 void VideoFrameMetadata::MergeInternalValuesInto( 138 void VideoFrameMetadata::MergeInternalValuesInto(
139 base::DictionaryValue* out) const { 139 base::DictionaryValue* out) const {
140 out->MergeDictionary(&dictionary_); 140 out->MergeDictionary(&dictionary_);
141 } 141 }
142 142
143 void VideoFrameMetadata::MergeInternalValuesFrom( 143 void VideoFrameMetadata::MergeInternalValuesFrom(
144 const base::DictionaryValue& in) { 144 const base::DictionaryValue& in) {
145 dictionary_.MergeDictionary(&in); 145 dictionary_.MergeDictionary(&in);
146 } 146 }
147 147
148 void VideoFrameMetadata::MergeMetadataFrom(
DaleCurtis 2016/03/03 21:44:51 After this lands there are a few places you can cl
tguilbert 2016/03/03 23:40:28 Will do!
149 const VideoFrameMetadata* metadata_source) {
150 base::DictionaryValue temp_metadata_values;
151 metadata_source->MergeInternalValuesInto(&temp_metadata_values);
152 MergeInternalValuesFrom(temp_metadata_values);
watk 2016/03/03 22:54:33 I think you can simplify this to: dictionary_.Mer
tguilbert 2016/03/03 23:40:28 Done.
153 }
154
148 const base::BinaryValue* VideoFrameMetadata::GetBinaryValue(Key key) const { 155 const base::BinaryValue* VideoFrameMetadata::GetBinaryValue(Key key) const {
149 const base::Value* internal_value = nullptr; 156 const base::Value* internal_value = nullptr;
150 if (dictionary_.GetWithoutPathExpansion(ToInternalKey(key), 157 if (dictionary_.GetWithoutPathExpansion(ToInternalKey(key),
151 &internal_value) && 158 &internal_value) &&
152 internal_value->GetType() == base::Value::TYPE_BINARY) { 159 internal_value->GetType() == base::Value::TYPE_BINARY) {
153 return static_cast<const base::BinaryValue*>(internal_value); 160 return static_cast<const base::BinaryValue*>(internal_value);
154 } 161 }
155 return nullptr; 162 return nullptr;
156 } 163 }
157 164
158 } // namespace media 165 } // namespace media
OLDNEW
« no previous file with comments | « media/base/video_frame_metadata.h ('k') | media/base/video_frame_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698