| Index: remoting/protocol/webrtc_video_capturer_adapter.h
|
| diff --git a/remoting/protocol/webrtc_video_capturer_adapter.h b/remoting/protocol/webrtc_video_capturer_adapter.h
|
| index 3c5375b439f18b93917193eff22f8a8c1799e4b0..b9f487c744b06e79743254b6d8b9434a95af22e1 100644
|
| --- a/remoting/protocol/webrtc_video_capturer_adapter.h
|
| +++ b/remoting/protocol/webrtc_video_capturer_adapter.h
|
| @@ -12,6 +12,7 @@
|
|
|
| #include "base/macros.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "base/memory/weak_ptr.h"
|
| #include "base/threading/thread_checker.h"
|
| #include "base/timer/timer.h"
|
| #include "third_party/libjingle/source/talk/media/base/videocapturer.h"
|
| @@ -42,10 +43,15 @@ namespace protocol {
|
| class WebrtcVideoCapturerAdapter : public cricket::VideoCapturer,
|
| public webrtc::DesktopCapturer::Callback {
|
| public:
|
| + typedef base::Callback<void(const webrtc::DesktopSize& size)> SizeCallback;
|
| +
|
| explicit WebrtcVideoCapturerAdapter(
|
| scoped_ptr<webrtc::DesktopCapturer> capturer);
|
| ~WebrtcVideoCapturerAdapter() override;
|
|
|
| + void SetSizeCallback(const SizeCallback& size_callback);
|
| + base::WeakPtr<WebrtcVideoCapturerAdapter> GetWeakPtr();
|
| +
|
| // cricket::VideoCapturer implementation.
|
| bool GetBestCaptureFormat(const cricket::VideoFormat& desired,
|
| cricket::VideoFormat* best_format) override;
|
| @@ -70,6 +76,8 @@ class WebrtcVideoCapturerAdapter : public cricket::VideoCapturer,
|
|
|
| scoped_ptr<webrtc::DesktopCapturer> desktop_capturer_;
|
|
|
| + SizeCallback size_callback_;
|
| +
|
| // Timer to call CaptureNextFrame().
|
| scoped_ptr<base::RepeatingTimer> capture_timer_;
|
|
|
| @@ -79,6 +87,8 @@ class WebrtcVideoCapturerAdapter : public cricket::VideoCapturer,
|
|
|
| bool capture_pending_ = false;
|
|
|
| + base::WeakPtrFactory<WebrtcVideoCapturerAdapter> weak_factory_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(WebrtcVideoCapturerAdapter);
|
| };
|
|
|
|
|