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_MEDIA_CMA_BASE_VIDEO_PIPELINE_IMPL_H_ | 5 #ifndef CHROMECAST_MEDIA_CMA_BASE_VIDEO_PIPELINE_IMPL_H_ |
6 #define CHROMECAST_MEDIA_CMA_BASE_VIDEO_PIPELINE_IMPL_H_ | 6 #define CHROMECAST_MEDIA_CMA_BASE_VIDEO_PIPELINE_IMPL_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/scoped_ptr.h" | |
12 #include "chromecast/media/cma/pipeline/av_pipeline_impl.h" | 12 #include "chromecast/media/cma/pipeline/av_pipeline_impl.h" |
13 #include "chromecast/media/cma/pipeline/video_pipeline_client.h" | 13 #include "chromecast/media/cma/pipeline/video_pipeline_client.h" |
14 #include "chromecast/public/media/media_pipeline_backend.h" | 14 #include "chromecast/public/media/media_pipeline_backend.h" |
15 #include "chromecast/public/media/stream_id.h" | 15 #include "chromecast/public/media/stream_id.h" |
16 #include "media/base/pipeline_status.h" | 16 #include "media/base/pipeline_status.h" |
17 | 17 |
18 namespace media { | 18 namespace media { |
19 class AudioDecoderConfig; | 19 class AudioDecoderConfig; |
20 class VideoDecoderConfig; | 20 class VideoDecoderConfig; |
21 } | 21 } |
22 | 22 |
23 namespace chromecast { | 23 namespace chromecast { |
24 struct Size; | 24 struct Size; |
25 namespace media { | 25 namespace media { |
26 class CodedFrameProvider; | 26 class CodedFrameProvider; |
27 | 27 |
28 class VideoPipelineImpl : public AvPipelineImpl { | 28 class VideoPipelineImpl : public AvPipelineImpl { |
29 public: | 29 public: |
30 VideoPipelineImpl(MediaPipelineBackend::VideoDecoder* decoder, | 30 VideoPipelineImpl(MediaPipelineBackend::VideoDecoder* decoder, |
31 const VideoPipelineClient& client); | 31 const VideoPipelineClient& client); |
32 ~VideoPipelineImpl() override; | 32 ~VideoPipelineImpl() override; |
33 | 33 |
34 ::media::PipelineStatus Initialize( | 34 ::media::PipelineStatus Initialize( |
35 const std::vector<::media::VideoDecoderConfig>& configs, | 35 const std::vector<::media::VideoDecoderConfig>& configs, |
36 scoped_ptr<CodedFrameProvider> frame_provider); | 36 std::unique_ptr<CodedFrameProvider> frame_provider); |
37 | 37 |
38 // AvPipelineImpl implementation: | 38 // AvPipelineImpl implementation: |
39 void UpdateStatistics() override; | 39 void UpdateStatistics() override; |
40 | 40 |
41 private: | 41 private: |
42 // AvPipelineImpl implementation: | 42 // AvPipelineImpl implementation: |
43 void OnVideoResolutionChanged(const Size& size) override; | 43 void OnVideoResolutionChanged(const Size& size) override; |
44 void OnUpdateConfig(StreamId id, | 44 void OnUpdateConfig(StreamId id, |
45 const ::media::AudioDecoderConfig& audio_config, | 45 const ::media::AudioDecoderConfig& audio_config, |
46 const ::media::VideoDecoderConfig& video_config) override; | 46 const ::media::VideoDecoderConfig& video_config) override; |
47 | 47 |
48 MediaPipelineBackend::VideoDecoder* const video_decoder_; | 48 MediaPipelineBackend::VideoDecoder* const video_decoder_; |
49 const VideoPipelineClient::NaturalSizeChangedCB natural_size_changed_cb_; | 49 const VideoPipelineClient::NaturalSizeChangedCB natural_size_changed_cb_; |
50 | 50 |
51 DISALLOW_COPY_AND_ASSIGN(VideoPipelineImpl); | 51 DISALLOW_COPY_AND_ASSIGN(VideoPipelineImpl); |
52 }; | 52 }; |
53 | 53 |
54 } // namespace media | 54 } // namespace media |
55 } // namespace chromecast | 55 } // namespace chromecast |
56 | 56 |
57 #endif // CHROMECAST_MEDIA_CMA_BASE_VIDEO_PIPELINE_IMPL_H_ | 57 #endif // CHROMECAST_MEDIA_CMA_BASE_VIDEO_PIPELINE_IMPL_H_ |
OLD | NEW |