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

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

Issue 2577563002: Add struct traits for base::Value. (Closed)
Patch Set: rebase Created 3 years, 12 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
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 #ifndef MEDIA_BASE_VIDEO_FRAME_METADATA_H_ 5 #ifndef MEDIA_BASE_VIDEO_FRAME_METADATA_H_
6 #define MEDIA_BASE_VIDEO_FRAME_METADATA_H_ 6 #define MEDIA_BASE_VIDEO_FRAME_METADATA_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 bool GetTimeDelta(Key key, base::TimeDelta* value) const WARN_UNUSED_RESULT; 149 bool GetTimeDelta(Key key, base::TimeDelta* value) const WARN_UNUSED_RESULT;
150 bool GetTimeTicks(Key key, base::TimeTicks* value) const WARN_UNUSED_RESULT; 150 bool GetTimeTicks(Key key, base::TimeTicks* value) const WARN_UNUSED_RESULT;
151 151
152 // Returns null if |key| was not present. 152 // Returns null if |key| was not present.
153 const base::Value* GetValue(Key key) const WARN_UNUSED_RESULT; 153 const base::Value* GetValue(Key key) const WARN_UNUSED_RESULT;
154 154
155 // Convenience method that returns true if |key| exists and is set to true. 155 // Convenience method that returns true if |key| exists and is set to true.
156 bool IsTrue(Key key) const WARN_UNUSED_RESULT; 156 bool IsTrue(Key key) const WARN_UNUSED_RESULT;
157 157
158 // For serialization. 158 // For serialization.
159 void MergeInternalValuesInto(base::DictionaryValue* out) const; 159 std::unique_ptr<base::DictionaryValue> CopyInternalValues() const;
160 void MergeInternalValuesFrom(const base::DictionaryValue& in); 160 void MergeInternalValuesFrom(const base::DictionaryValue& in);
161 161
162 // Merges internal values from |metadata_source|. 162 // Merges internal values from |metadata_source|.
163 void MergeMetadataFrom(const VideoFrameMetadata* metadata_source); 163 void MergeMetadataFrom(const VideoFrameMetadata* metadata_source);
164 164
165 private: 165 private:
166 const base::BinaryValue* GetBinaryValue(Key key) const; 166 const base::BinaryValue* GetBinaryValue(Key key) const;
167 167
168 base::DictionaryValue dictionary_; 168 base::DictionaryValue dictionary_;
169 169
170 DISALLOW_COPY_AND_ASSIGN(VideoFrameMetadata); 170 DISALLOW_COPY_AND_ASSIGN(VideoFrameMetadata);
171 }; 171 };
172 172
173 } // namespace media 173 } // namespace media
174 174
175 #endif // MEDIA_BASE_VIDEO_FRAME_METADATA_H_ 175 #endif // MEDIA_BASE_VIDEO_FRAME_METADATA_H_
OLDNEW
« no previous file with comments | « content/renderer/media/video_capture_impl_unittest.cc ('k') | media/base/video_frame_metadata.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698