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

Side by Side Diff: chromecast/renderer/media/media_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_MEDIA_PIPELINE_PROXY_H_ 5 #ifndef CHROMECAST_RENDERER_MEDIA_MEDIA_PIPELINE_PROXY_H_
6 #define CHROMECAST_RENDERER_MEDIA_MEDIA_PIPELINE_PROXY_H_ 6 #define CHROMECAST_RENDERER_MEDIA_MEDIA_PIPELINE_PROXY_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
12 #include "base/threading/thread_checker.h" 13 #include "base/threading/thread_checker.h"
13 #include "chromecast/media/cma/pipeline/load_type.h" 14 #include "chromecast/media/cma/pipeline/load_type.h"
14 #include "chromecast/media/cma/pipeline/media_pipeline_client.h" 15 #include "chromecast/media/cma/pipeline/media_pipeline_client.h"
15 #include "media/base/audio_decoder_config.h" 16 #include "media/base/audio_decoder_config.h"
16 #include "media/base/serial_runner.h" 17 #include "media/base/serial_runner.h"
17 #include "media/base/video_decoder_config.h" 18 #include "media/base/video_decoder_config.h"
18 19
19 namespace base { 20 namespace base {
20 class SingleThreadTaskRunner; 21 class SingleThreadTaskRunner;
(...skipping 12 matching lines...) Expand all
33 MediaPipelineProxy(int render_frame_id, 34 MediaPipelineProxy(int render_frame_id,
34 scoped_refptr<base::SingleThreadTaskRunner> task_runner, 35 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
35 LoadType load_type); 36 LoadType load_type);
36 ~MediaPipelineProxy(); 37 ~MediaPipelineProxy();
37 38
38 void SetClient(const MediaPipelineClient& client); 39 void SetClient(const MediaPipelineClient& client);
39 void SetCdm(int cdm_id); 40 void SetCdm(int cdm_id);
40 AudioPipelineProxy* GetAudioPipeline() const; 41 AudioPipelineProxy* GetAudioPipeline() const;
41 VideoPipelineProxy* GetVideoPipeline() const; 42 VideoPipelineProxy* GetVideoPipeline() const;
42 void InitializeAudio(const ::media::AudioDecoderConfig& config, 43 void InitializeAudio(const ::media::AudioDecoderConfig& config,
43 scoped_ptr<CodedFrameProvider> frame_provider, 44 std::unique_ptr<CodedFrameProvider> frame_provider,
44 const ::media::PipelineStatusCB& status_cb); 45 const ::media::PipelineStatusCB& status_cb);
45 void InitializeVideo(const std::vector<::media::VideoDecoderConfig>& configs, 46 void InitializeVideo(const std::vector<::media::VideoDecoderConfig>& configs,
46 scoped_ptr<CodedFrameProvider> frame_provider, 47 std::unique_ptr<CodedFrameProvider> frame_provider,
47 const ::media::PipelineStatusCB& status_cb); 48 const ::media::PipelineStatusCB& status_cb);
48 void StartPlayingFrom(base::TimeDelta time); 49 void StartPlayingFrom(base::TimeDelta time);
49 void Flush(const base::Closure& flush_cb); 50 void Flush(const base::Closure& flush_cb);
50 void Stop(); 51 void Stop();
51 void SetPlaybackRate(double playback_rate); 52 void SetPlaybackRate(double playback_rate);
52 53
53 private: 54 private:
54 void OnProxyFlushDone(const base::Closure& flush_cb, 55 void OnProxyFlushDone(const base::Closure& flush_cb,
55 ::media::PipelineStatus status); 56 ::media::PipelineStatus status);
56 57
57 base::ThreadChecker thread_checker_; 58 base::ThreadChecker thread_checker_;
58 59
59 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; 60 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
60 61
61 const int render_frame_id_; 62 const int render_frame_id_;
62 63
63 // CMA channel to convey IPC messages. 64 // CMA channel to convey IPC messages.
64 scoped_refptr<MediaChannelProxy> const media_channel_proxy_; 65 scoped_refptr<MediaChannelProxy> const media_channel_proxy_;
65 66
66 scoped_ptr<MediaPipelineProxyInternal> proxy_; 67 std::unique_ptr<MediaPipelineProxyInternal> proxy_;
67 68
68 bool has_audio_; 69 bool has_audio_;
69 bool has_video_; 70 bool has_video_;
70 scoped_ptr<AudioPipelineProxy> audio_pipeline_; 71 std::unique_ptr<AudioPipelineProxy> audio_pipeline_;
71 scoped_ptr<VideoPipelineProxy> video_pipeline_; 72 std::unique_ptr<VideoPipelineProxy> video_pipeline_;
72 scoped_ptr< ::media::SerialRunner> pending_flush_callbacks_; 73 std::unique_ptr<::media::SerialRunner> pending_flush_callbacks_;
73 74
74 base::WeakPtr<MediaPipelineProxy> weak_this_; 75 base::WeakPtr<MediaPipelineProxy> weak_this_;
75 base::WeakPtrFactory<MediaPipelineProxy> weak_factory_; 76 base::WeakPtrFactory<MediaPipelineProxy> weak_factory_;
76 77
77 DISALLOW_COPY_AND_ASSIGN(MediaPipelineProxy); 78 DISALLOW_COPY_AND_ASSIGN(MediaPipelineProxy);
78 }; 79 };
79 80
80 } // namespace media 81 } // namespace media
81 } // namespace chromecast 82 } // namespace chromecast
82 83
83 #endif // CHROMECAST_RENDERER_MEDIA_MEDIA_PIPELINE_PROXY_H_ 84 #endif // CHROMECAST_RENDERER_MEDIA_MEDIA_PIPELINE_PROXY_H_
OLDNEW
« no previous file with comments | « chromecast/renderer/media/media_channel_proxy.cc ('k') | chromecast/renderer/media/media_pipeline_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698