OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROMECAST_MEDIA_CMA_PIPELINE_VIDEO_PIPELINE_DEVICE_CLIENT_IMPL_H_ |
| 6 #define CHROMECAST_MEDIA_CMA_PIPELINE_VIDEO_PIPELINE_DEVICE_CLIENT_IMPL_H_ |
| 7 |
| 8 #include "base/callback.h" |
| 9 #include "base/memory/ref_counted.h" |
| 10 #include "chromecast/public/media/media_component_device.h" |
| 11 #include "chromecast/public/media/video_pipeline_device.h" |
| 12 |
| 13 namespace base { |
| 14 class SingleThreadTaskRunner; |
| 15 } |
| 16 |
| 17 namespace chromecast { |
| 18 namespace media { |
| 19 |
| 20 // Helper for implementing VideoPipelineDevice::VideoClient with |
| 21 // a base::Callback. |
| 22 class VideoPipelineDeviceClientImpl : public VideoPipelineDevice::VideoClient { |
| 23 public: |
| 24 typedef base::Callback<void(const Size&)> SizeChangeCB; |
| 25 |
| 26 VideoPipelineDeviceClientImpl(const SizeChangeCB& size_change_cb); |
| 27 ~VideoPipelineDeviceClientImpl() override; |
| 28 |
| 29 void OnNaturalSizeChanged(const Size& size) override; |
| 30 |
| 31 private: |
| 32 SizeChangeCB size_change_cb_; |
| 33 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 34 }; |
| 35 |
| 36 } // namespace media |
| 37 } // namespace chromecast |
| 38 |
| 39 #endif // CHROMECAST_MEDIA_CMA_PIPELINE_VIDEO_PIPELINE_DEVICE_CLIENT_IMPL_H_ |
OLD | NEW |