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

Unified Diff: webrtc/media/base/fakevideocapturer.h

Issue 1711763003: New flag is_screencast in VideoOptions. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix OnLoadUpdate is_screencast check. Don't set FakeVideoCapturer into screencast mode in the video… Created 4 years, 10 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
« no previous file with comments | « webrtc/api/videosource_unittest.cc ('k') | webrtc/media/base/mediachannel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/base/fakevideocapturer.h
diff --git a/webrtc/media/base/fakevideocapturer.h b/webrtc/media/base/fakevideocapturer.h
index 415862b96e991dabc4e2f98ccdafe6f86fc26361..89dcf652f1480a3558d91837ee9eca08a14e8ba8 100644
--- a/webrtc/media/base/fakevideocapturer.h
+++ b/webrtc/media/base/fakevideocapturer.h
@@ -29,11 +29,11 @@ namespace cricket {
// Fake video capturer that allows the test to manually pump in frames.
class FakeVideoCapturer : public cricket::VideoCapturer {
public:
- FakeVideoCapturer()
+ FakeVideoCapturer(bool is_screencast)
: running_(false),
initial_unix_timestamp_(time(NULL) * rtc::kNumNanosecsPerSec),
next_timestamp_(rtc::kNumNanosecsPerMillisec),
- is_screencast_(false),
+ is_screencast_(is_screencast),
rotation_(webrtc::kVideoRotation_0) {
#ifdef HAVE_WEBRTC_VIDEO
set_frame_factory(new cricket::WebRtcVideoFrameFactory());
@@ -52,6 +52,8 @@ class FakeVideoCapturer : public cricket::VideoCapturer {
cricket::VideoFormat::FpsToInterval(60), cricket::FOURCC_I420));
ResetSupportedFormats(formats);
}
+ FakeVideoCapturer() : FakeVideoCapturer(false) {}
+
~FakeVideoCapturer() {
SignalDestroyed(this);
}
@@ -136,9 +138,6 @@ class FakeVideoCapturer : public cricket::VideoCapturer {
SetCaptureState(cricket::CS_STOPPED);
}
virtual bool IsRunning() { return running_; }
- void SetScreencast(bool is_screencast) {
- is_screencast_ = is_screencast;
- }
virtual bool IsScreencast() const { return is_screencast_; }
bool GetPreferredFourccs(std::vector<uint32_t>* fourccs) {
fourccs->push_back(cricket::FOURCC_I420);
@@ -156,7 +155,7 @@ class FakeVideoCapturer : public cricket::VideoCapturer {
bool running_;
int64_t initial_unix_timestamp_;
int64_t next_timestamp_;
- bool is_screencast_;
+ const bool is_screencast_;
webrtc::VideoRotation rotation_;
};
« no previous file with comments | « webrtc/api/videosource_unittest.cc ('k') | webrtc/media/base/mediachannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698