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

Side by Side Diff: chromecast/renderer/media/video_pipeline_proxy.h

Issue 1875623002: Convert //chromecast from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CHROMECAST_RENDERER_MEDIA_VIDEO_PIPELINE_PROXY_H_ 5 #ifndef CHROMECAST_RENDERER_MEDIA_VIDEO_PIPELINE_PROXY_H_
6 #define CHROMECAST_RENDERER_MEDIA_VIDEO_PIPELINE_PROXY_H_ 6 #define CHROMECAST_RENDERER_MEDIA_VIDEO_PIPELINE_PROXY_H_
7 7
8 #include <memory>
8 #include <vector> 9 #include <vector>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/threading/thread_checker.h" 14 #include "base/threading/thread_checker.h"
15 #include "media/base/pipeline_status.h" 15 #include "media/base/pipeline_status.h"
16 16
17 namespace base { 17 namespace base {
18 class SingleThreadTaskRunner; 18 class SingleThreadTaskRunner;
19 class SharedMemory; 19 class SharedMemory;
20 } 20 }
21 21
22 namespace media { 22 namespace media {
23 class VideoDecoderConfig; 23 class VideoDecoderConfig;
24 } 24 }
25 25
26 namespace chromecast { 26 namespace chromecast {
27 namespace media { 27 namespace media {
28 class AvStreamerProxy; 28 class AvStreamerProxy;
29 class CodedFrameProvider; 29 class CodedFrameProvider;
30 class MediaChannelProxy; 30 class MediaChannelProxy;
31 struct VideoPipelineClient; 31 struct VideoPipelineClient;
32 class VideoPipelineProxyInternal; 32 class VideoPipelineProxyInternal;
33 33
34 class VideoPipelineProxy { 34 class VideoPipelineProxy {
35 public: 35 public:
36 VideoPipelineProxy(scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, 36 VideoPipelineProxy(scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
37 scoped_refptr<MediaChannelProxy> media_channel_proxy); 37 scoped_refptr<MediaChannelProxy> media_channel_proxy);
38 ~VideoPipelineProxy(); 38 ~VideoPipelineProxy();
39 39
40 void Initialize(const std::vector<::media::VideoDecoderConfig>& configs, 40 void Initialize(const std::vector<::media::VideoDecoderConfig>& configs,
41 scoped_ptr<CodedFrameProvider> frame_provider, 41 std::unique_ptr<CodedFrameProvider> frame_provider,
42 const ::media::PipelineStatusCB& status_cb); 42 const ::media::PipelineStatusCB& status_cb);
43 void StartFeeding(); 43 void StartFeeding();
44 void Flush(const base::Closure& done_cb); 44 void Flush(const base::Closure& done_cb);
45 void Stop(); 45 void Stop();
46 46
47 void SetClient(const VideoPipelineClient& video_client); 47 void SetClient(const VideoPipelineClient& video_client);
48 48
49 private: 49 private:
50 base::ThreadChecker thread_checker_; 50 base::ThreadChecker thread_checker_;
51 51
52 void OnAvPipeCreated( 52 void OnAvPipeCreated(const std::vector<::media::VideoDecoderConfig>& configs,
53 const std::vector<::media::VideoDecoderConfig>& configs, 53 const ::media::PipelineStatusCB& status_cb,
54 const ::media::PipelineStatusCB& status_cb, 54 std::unique_ptr<base::SharedMemory> shared_memory);
55 scoped_ptr<base::SharedMemory> shared_memory);
56 void OnPipeWrite(); 55 void OnPipeWrite();
57 void OnPipeRead(); 56 void OnPipeRead();
58 57
59 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; 58 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
60 59
61 // |proxy_| main goal is to convert function calls to IPC messages. 60 // |proxy_| main goal is to convert function calls to IPC messages.
62 scoped_ptr<VideoPipelineProxyInternal> proxy_; 61 std::unique_ptr<VideoPipelineProxyInternal> proxy_;
63 62
64 scoped_ptr<AvStreamerProxy> video_streamer_; 63 std::unique_ptr<AvStreamerProxy> video_streamer_;
65 64
66 base::WeakPtr<VideoPipelineProxy> weak_this_; 65 base::WeakPtr<VideoPipelineProxy> weak_this_;
67 base::WeakPtrFactory<VideoPipelineProxy> weak_factory_; 66 base::WeakPtrFactory<VideoPipelineProxy> weak_factory_;
68 67
69 DISALLOW_COPY_AND_ASSIGN(VideoPipelineProxy); 68 DISALLOW_COPY_AND_ASSIGN(VideoPipelineProxy);
70 }; 69 };
71 70
72 } // namespace media 71 } // namespace media
73 } // namespace chromecast 72 } // namespace chromecast
74 73
75 #endif // CHROMECAST_RENDERER_MEDIA_VIDEO_PIPELINE_PROXY_H_ 74 #endif // CHROMECAST_RENDERER_MEDIA_VIDEO_PIPELINE_PROXY_H_
OLDNEW
« no previous file with comments | « chromecast/renderer/media/media_pipeline_proxy.cc ('k') | chromecast/renderer/media/video_pipeline_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698