| OLD | NEW |
| 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 Loading... |
| 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 std::unique_ptr<base::DictionaryValue> CopyInternalValues() const; | 159 const base::DictionaryValue& GetInternalValues() 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_ |
| OLD | NEW |