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

Side by Side Diff: ppapi/proxy/video_encoder_resource.h

Issue 1864293002: Convert //ppapi to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more nullptr 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 | « ppapi/proxy/video_decoder_resource.cc ('k') | ppapi/proxy/video_encoder_resource.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 PPAPI_PROXY_VIDEO_ENCODER_RESOURCE_H_ 5 #ifndef PPAPI_PROXY_VIDEO_ENCODER_RESOURCE_H_
6 #define PPAPI_PROXY_VIDEO_ENCODER_RESOURCE_H_ 6 #define PPAPI_PROXY_VIDEO_ENCODER_RESOURCE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
11 #include <memory>
11 12
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/scoped_vector.h" 15 #include "base/memory/scoped_vector.h"
16 #include "ppapi/proxy/connection.h" 16 #include "ppapi/proxy/connection.h"
17 #include "ppapi/proxy/plugin_resource.h" 17 #include "ppapi/proxy/plugin_resource.h"
18 #include "ppapi/shared_impl/media_stream_buffer_manager.h" 18 #include "ppapi/shared_impl/media_stream_buffer_manager.h"
19 #include "ppapi/shared_impl/resource.h" 19 #include "ppapi/shared_impl/resource.h"
20 #include "ppapi/thunk/ppb_video_encoder_api.h" 20 #include "ppapi/thunk/ppb_video_encoder_api.h"
21 21
22 namespace base { 22 namespace base {
23 class SharedMemory; 23 class SharedMemory;
24 } 24 }
(...skipping 12 matching lines...) Expand all
37 public thunk::PPB_VideoEncoder_API, 37 public thunk::PPB_VideoEncoder_API,
38 public ppapi::MediaStreamBufferManager::Delegate { 38 public ppapi::MediaStreamBufferManager::Delegate {
39 public: 39 public:
40 VideoEncoderResource(Connection connection, PP_Instance instance); 40 VideoEncoderResource(Connection connection, PP_Instance instance);
41 ~VideoEncoderResource() override; 41 ~VideoEncoderResource() override;
42 42
43 thunk::PPB_VideoEncoder_API* AsPPB_VideoEncoder_API() override; 43 thunk::PPB_VideoEncoder_API* AsPPB_VideoEncoder_API() override;
44 44
45 private: 45 private:
46 struct ShmBuffer { 46 struct ShmBuffer {
47 ShmBuffer(uint32_t id, scoped_ptr<base::SharedMemory> shm); 47 ShmBuffer(uint32_t id, std::unique_ptr<base::SharedMemory> shm);
48 ~ShmBuffer(); 48 ~ShmBuffer();
49 49
50 // Index of the buffer in the ScopedVector. Buffers have the same id in 50 // Index of the buffer in the ScopedVector. Buffers have the same id in
51 // the plugin and the host. 51 // the plugin and the host.
52 uint32_t id; 52 uint32_t id;
53 scoped_ptr<base::SharedMemory> shm; 53 std::unique_ptr<base::SharedMemory> shm;
54 }; 54 };
55 55
56 struct BitstreamBuffer { 56 struct BitstreamBuffer {
57 BitstreamBuffer(uint32_t id, uint32_t size, bool key_frame); 57 BitstreamBuffer(uint32_t id, uint32_t size, bool key_frame);
58 ~BitstreamBuffer(); 58 ~BitstreamBuffer();
59 59
60 // Index of the buffer in the ScopedVector. Same as ShmBuffer::id. 60 // Index of the buffer in the ScopedVector. Same as ShmBuffer::id.
61 uint32_t id; 61 uint32_t id;
62 uint32_t size; 62 uint32_t size;
63 bool key_frame; 63 bool key_frame;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 scoped_refptr<TrackedCallback> get_bitstream_buffer_callback_; 159 scoped_refptr<TrackedCallback> get_bitstream_buffer_callback_;
160 PP_BitstreamBuffer* get_bitstream_buffer_data_; 160 PP_BitstreamBuffer* get_bitstream_buffer_data_;
161 161
162 DISALLOW_COPY_AND_ASSIGN(VideoEncoderResource); 162 DISALLOW_COPY_AND_ASSIGN(VideoEncoderResource);
163 }; 163 };
164 164
165 } // namespace proxy 165 } // namespace proxy
166 } // namespace ppapi 166 } // namespace ppapi
167 167
168 #endif // PPAPI_PROXY_VIDEO_ENCODER_RESOURCE_H_ 168 #endif // PPAPI_PROXY_VIDEO_ENCODER_RESOURCE_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/video_decoder_resource.cc ('k') | ppapi/proxy/video_encoder_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698