Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(519)

Unified Diff: remoting/protocol/webrtc_video_capturer_adapter.h

Issue 1571543002: Implement missing features in WebrtcVideoStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
};
« no previous file with comments | « remoting/protocol/webrtc_connection_to_client.cc ('k') | remoting/protocol/webrtc_video_capturer_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698