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

Side by Side Diff: media/base/android/ndk_media_codec_bridge.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, 7 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/android/media_task_runner.h ('k') | media/base/android/provision_fetcher.h » ('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_ANDROID_NDK_MEDIA_CODEC_BRIDGE_H_ 5 #ifndef MEDIA_BASE_ANDROID_NDK_MEDIA_CODEC_BRIDGE_H_
6 #define MEDIA_BASE_ANDROID_NDK_MEDIA_CODEC_BRIDGE_H_ 6 #define MEDIA_BASE_ANDROID_NDK_MEDIA_CODEC_BRIDGE_H_
7 7
8 #include <media/NdkMediaCodec.h> 8 #include <media/NdkMediaCodec.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
11 11
12 #include <memory>
13
12 #include "base/macros.h" 14 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/time/time.h" 15 #include "base/time/time.h"
15 #include "media/base/android/media_codec_bridge.h" 16 #include "media/base/android/media_codec_bridge.h"
16 #include "media/base/media_export.h" 17 #include "media/base/media_export.h"
17 #include "ui/gfx/geometry/size.h" 18 #include "ui/gfx/geometry/size.h"
18 19
19 namespace media { 20 namespace media {
20 21
21 class MEDIA_EXPORT NdkMediaCodecBridge : public MediaCodecBridge { 22 class MEDIA_EXPORT NdkMediaCodecBridge : public MediaCodecBridge {
22 public: 23 public:
23 ~NdkMediaCodecBridge() override; 24 ~NdkMediaCodecBridge() override;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 protected: 66 protected:
66 NdkMediaCodecBridge(const std::string& mime, 67 NdkMediaCodecBridge(const std::string& mime,
67 bool is_secure, 68 bool is_secure,
68 MediaCodecDirection direction); 69 MediaCodecDirection direction);
69 70
70 private: 71 private:
71 struct AMediaCodecDeleter { 72 struct AMediaCodecDeleter {
72 inline void operator()(AMediaCodec* ptr) const { AMediaCodec_delete(ptr); } 73 inline void operator()(AMediaCodec* ptr) const { AMediaCodec_delete(ptr); }
73 }; 74 };
74 75
75 scoped_ptr<AMediaCodec, AMediaCodecDeleter> media_codec_; 76 std::unique_ptr<AMediaCodec, AMediaCodecDeleter> media_codec_;
76 77
77 DISALLOW_COPY_AND_ASSIGN(NdkMediaCodecBridge); 78 DISALLOW_COPY_AND_ASSIGN(NdkMediaCodecBridge);
78 }; 79 };
79 80
80 } // namespace media 81 } // namespace media
81 82
82 #endif // MEDIA_BASE_ANDROID_NDK_MEDIA_CODEC_BRIDGE_H_ 83 #endif // MEDIA_BASE_ANDROID_NDK_MEDIA_CODEC_BRIDGE_H_
OLDNEW
« no previous file with comments | « media/base/android/media_task_runner.h ('k') | media/base/android/provision_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698