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

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

Issue 1906423005: Replace scoped_ptr with std::unique_ptr in //media/base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-media-base: android Created 4 years, 8 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.h ('k') | media/base/video_frame_metadata.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 #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 <string> 9 #include <string>
9 10
10 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "media/base/media_export.h" 15 #include "media/base/media_export.h"
16 16
17 namespace media { 17 namespace media {
18 18
19 class MEDIA_EXPORT VideoFrameMetadata { 19 class MEDIA_EXPORT VideoFrameMetadata {
20 public: 20 public:
21 enum Key { 21 enum Key {
22 // Sources of VideoFrames use this marker to indicate that the associated 22 // Sources of VideoFrames use this marker to indicate that the associated
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 void Clear() { dictionary_.Clear(); } 117 void Clear() { dictionary_.Clear(); }
118 118
119 // Setters. Overwrites existing value, if present. 119 // Setters. Overwrites existing value, if present.
120 void SetBoolean(Key key, bool value); 120 void SetBoolean(Key key, bool value);
121 void SetInteger(Key key, int value); 121 void SetInteger(Key key, int value);
122 void SetDouble(Key key, double value); 122 void SetDouble(Key key, double value);
123 void SetString(Key key, const std::string& value); 123 void SetString(Key key, const std::string& value);
124 void SetTimeDelta(Key key, const base::TimeDelta& value); 124 void SetTimeDelta(Key key, const base::TimeDelta& value);
125 void SetTimeTicks(Key key, const base::TimeTicks& value); 125 void SetTimeTicks(Key key, const base::TimeTicks& value);
126 void SetValue(Key key, scoped_ptr<base::Value> value); 126 void SetValue(Key key, std::unique_ptr<base::Value> value);
127 127
128 // Getters. Returns true if |key| is present, and its value has been set. 128 // Getters. Returns true if |key| is present, and its value has been set.
129 bool GetBoolean(Key key, bool* value) const WARN_UNUSED_RESULT; 129 bool GetBoolean(Key key, bool* value) const WARN_UNUSED_RESULT;
130 bool GetInteger(Key key, int* value) const WARN_UNUSED_RESULT; 130 bool GetInteger(Key key, int* value) const WARN_UNUSED_RESULT;
131 bool GetDouble(Key key, double* value) const WARN_UNUSED_RESULT; 131 bool GetDouble(Key key, double* value) const WARN_UNUSED_RESULT;
132 bool GetString(Key key, std::string* value) const WARN_UNUSED_RESULT; 132 bool GetString(Key key, std::string* value) const WARN_UNUSED_RESULT;
133 bool GetTimeDelta(Key key, base::TimeDelta* value) const WARN_UNUSED_RESULT; 133 bool GetTimeDelta(Key key, base::TimeDelta* value) const WARN_UNUSED_RESULT;
134 bool GetTimeTicks(Key key, base::TimeTicks* value) const WARN_UNUSED_RESULT; 134 bool GetTimeTicks(Key key, base::TimeTicks* value) const WARN_UNUSED_RESULT;
135 135
136 // Returns null if |key| was not present. 136 // Returns null if |key| was not present.
(...skipping 13 matching lines...) Expand all
150 const base::BinaryValue* GetBinaryValue(Key key) const; 150 const base::BinaryValue* GetBinaryValue(Key key) const;
151 151
152 base::DictionaryValue dictionary_; 152 base::DictionaryValue dictionary_;
153 153
154 DISALLOW_COPY_AND_ASSIGN(VideoFrameMetadata); 154 DISALLOW_COPY_AND_ASSIGN(VideoFrameMetadata);
155 }; 155 };
156 156
157 } // namespace media 157 } // namespace media
158 158
159 #endif // MEDIA_BASE_VIDEO_FRAME_METADATA_H_ 159 #endif // MEDIA_BASE_VIDEO_FRAME_METADATA_H_
OLDNEW
« no previous file with comments | « media/base/video_frame.h ('k') | media/base/video_frame_metadata.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698