| 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 "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "base/threading/thread_checker.h" | 11 #include "base/threading/thread_checker.h" |
| 12 #include "chromecast/media/cma/pipeline/video_pipeline.h" | 12 #include "chromecast/media/cma/pipeline/video_pipeline.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/stream_id.h" | 14 #include "chromecast/public/media/stream_id.h" |
| 15 | 15 #include "chromecast/public/media/video_pipeline_device.h" |
| 16 namespace gfx { | |
| 17 class Size; | |
| 18 } | |
| 19 | 16 |
| 20 namespace media { | 17 namespace media { |
| 21 class AudioDecoderConfig; | 18 class AudioDecoderConfig; |
| 22 class VideoDecoderConfig; | 19 class VideoDecoderConfig; |
| 23 } | 20 } |
| 24 | 21 |
| 25 namespace chromecast { | 22 namespace chromecast { |
| 23 struct Size; |
| 26 namespace media { | 24 namespace media { |
| 27 class AvPipelineImpl; | 25 class AvPipelineImpl; |
| 28 class BrowserCdmCast; | 26 class BrowserCdmCast; |
| 29 class BufferingState; | 27 class BufferingState; |
| 30 class CodedFrameProvider; | 28 class CodedFrameProvider; |
| 31 class VideoPipelineDevice; | 29 class VideoPipelineDevice; |
| 32 | 30 |
| 33 class VideoPipelineImpl : public VideoPipeline { | 31 class VideoPipelineImpl : public VideoPipeline { |
| 34 public: | 32 public: |
| 35 // |buffering_controller| can be NULL. | 33 // |buffering_controller| can be NULL. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 52 void Flush(const ::media::PipelineStatusCB& status_cb); | 50 void Flush(const ::media::PipelineStatusCB& status_cb); |
| 53 void Stop(); | 51 void Stop(); |
| 54 | 52 |
| 55 // Update the playback statistics for this video stream. | 53 // Update the playback statistics for this video stream. |
| 56 void UpdateStatistics(); | 54 void UpdateStatistics(); |
| 57 | 55 |
| 58 // VideoPipeline implementation. | 56 // VideoPipeline implementation. |
| 59 void SetClient(const VideoPipelineClient& client) override; | 57 void SetClient(const VideoPipelineClient& client) override; |
| 60 | 58 |
| 61 private: | 59 private: |
| 60 class DeviceClientImpl; |
| 61 friend class DeviceClientImpl; |
| 62 |
| 62 void OnFlushDone(const ::media::PipelineStatusCB& status_cb); | 63 void OnFlushDone(const ::media::PipelineStatusCB& status_cb); |
| 63 void OnUpdateConfig(StreamId id, | 64 void OnUpdateConfig(StreamId id, |
| 64 const ::media::AudioDecoderConfig& audio_config, | 65 const ::media::AudioDecoderConfig& audio_config, |
| 65 const ::media::VideoDecoderConfig& video_config); | 66 const ::media::VideoDecoderConfig& video_config); |
| 66 void OnNaturalSizeChanged(const gfx::Size& size); | 67 void OnNaturalSizeChanged(const Size& size); |
| 67 | 68 |
| 68 VideoPipelineDevice* video_device_; | 69 VideoPipelineDevice* video_device_; |
| 69 | 70 |
| 70 scoped_ptr<AvPipelineImpl> av_pipeline_impl_; | 71 scoped_ptr<AvPipelineImpl> av_pipeline_impl_; |
| 71 VideoPipelineClient video_client_; | 72 VideoPipelineClient video_client_; |
| 72 | 73 |
| 73 ::media::PipelineStatistics previous_stats_; | 74 ::media::PipelineStatistics previous_stats_; |
| 74 | 75 |
| 75 base::WeakPtr<VideoPipelineImpl> weak_this_; | 76 base::WeakPtr<VideoPipelineImpl> weak_this_; |
| 76 base::WeakPtrFactory<VideoPipelineImpl> weak_factory_; | 77 base::WeakPtrFactory<VideoPipelineImpl> weak_factory_; |
| 77 | 78 |
| 78 DISALLOW_COPY_AND_ASSIGN(VideoPipelineImpl); | 79 DISALLOW_COPY_AND_ASSIGN(VideoPipelineImpl); |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 } // namespace media | 82 } // namespace media |
| 82 } // namespace chromecast | 83 } // namespace chromecast |
| 83 | 84 |
| 84 #endif // CHROMECAST_MEDIA_CMA_BASE_VIDEO_PIPELINE_IMPL_H_ | 85 #endif // CHROMECAST_MEDIA_CMA_BASE_VIDEO_PIPELINE_IMPL_H_ |
| OLD | NEW |