OLD | NEW |
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 "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 class CodedFrameProvider; | 29 class CodedFrameProvider; |
30 class VideoPipelineProxyInternal; | 30 class VideoPipelineProxyInternal; |
31 class MediaChannelProxy; | 31 class MediaChannelProxy; |
32 | 32 |
33 class VideoPipelineProxy : public VideoPipeline { | 33 class VideoPipelineProxy : public VideoPipeline { |
34 public: | 34 public: |
35 VideoPipelineProxy(scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, | 35 VideoPipelineProxy(scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, |
36 scoped_refptr<MediaChannelProxy> media_channel_proxy); | 36 scoped_refptr<MediaChannelProxy> media_channel_proxy); |
37 ~VideoPipelineProxy() override; | 37 ~VideoPipelineProxy() override; |
38 | 38 |
39 void Initialize(const ::media::VideoDecoderConfig& config, | 39 void Initialize(const std::vector<::media::VideoDecoderConfig>& configs, |
40 scoped_ptr<CodedFrameProvider> frame_provider, | 40 scoped_ptr<CodedFrameProvider> frame_provider, |
41 const ::media::PipelineStatusCB& status_cb); | 41 const ::media::PipelineStatusCB& status_cb); |
42 void StartFeeding(); | 42 void StartFeeding(); |
43 void Flush(const base::Closure& done_cb); | 43 void Flush(const base::Closure& done_cb); |
44 void Stop(); | 44 void Stop(); |
45 | 45 |
46 // VideoPipeline implementation. | 46 // VideoPipeline implementation. |
47 void SetClient(const VideoPipelineClient& video_client) override; | 47 void SetClient(const VideoPipelineClient& video_client) override; |
48 | 48 |
49 private: | 49 private: |
50 base::ThreadChecker thread_checker_; | 50 base::ThreadChecker thread_checker_; |
51 | 51 |
52 void OnAvPipeCreated( | 52 void OnAvPipeCreated( |
53 const ::media::VideoDecoderConfig& config, | 53 const std::vector<::media::VideoDecoderConfig>& configs, |
54 const ::media::PipelineStatusCB& status_cb, | 54 const ::media::PipelineStatusCB& status_cb, |
55 scoped_ptr<base::SharedMemory> shared_memory); | 55 scoped_ptr<base::SharedMemory> shared_memory); |
56 void OnPipeWrite(); | 56 void OnPipeWrite(); |
57 void OnPipeRead(); | 57 void OnPipeRead(); |
58 | 58 |
59 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; | 59 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
60 | 60 |
61 // |proxy_| main goal is to convert function calls to IPC messages. | 61 // |proxy_| main goal is to convert function calls to IPC messages. |
62 scoped_ptr<VideoPipelineProxyInternal> proxy_; | 62 scoped_ptr<VideoPipelineProxyInternal> proxy_; |
63 | 63 |
64 scoped_ptr<AvStreamerProxy> video_streamer_; | 64 scoped_ptr<AvStreamerProxy> video_streamer_; |
65 | 65 |
66 base::WeakPtr<VideoPipelineProxy> weak_this_; | 66 base::WeakPtr<VideoPipelineProxy> weak_this_; |
67 base::WeakPtrFactory<VideoPipelineProxy> weak_factory_; | 67 base::WeakPtrFactory<VideoPipelineProxy> weak_factory_; |
68 | 68 |
69 DISALLOW_COPY_AND_ASSIGN(VideoPipelineProxy); | 69 DISALLOW_COPY_AND_ASSIGN(VideoPipelineProxy); |
70 }; | 70 }; |
71 | 71 |
72 } // namespace media | 72 } // namespace media |
73 } // namespace chromecast | 73 } // namespace chromecast |
74 | 74 |
75 #endif // CHROMECAST_RENDERER_MEDIA_VIDEO_PIPELINE_PROXY_H_ | 75 #endif // CHROMECAST_RENDERER_MEDIA_VIDEO_PIPELINE_PROXY_H_ |
OLD | NEW |