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

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

Issue 2334683002: Add method cricket::VideoCapturer::NeedsDenoising, use in VideoCapturerTrackSource. (Closed)
Patch Set: Add tests for needs_denoising. Created 4 years, 3 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: webrtc/media/base/fakevideocapturer.h
diff --git a/webrtc/media/base/fakevideocapturer.h b/webrtc/media/base/fakevideocapturer.h
index 026bf80a7b15f0f83f94bf66a9fe52eb23bc7cd5..ae6d498a8a271f937a21320aca9320d8a64d35ba 100644
--- a/webrtc/media/base/fakevideocapturer.h
+++ b/webrtc/media/base/fakevideocapturer.h
@@ -123,7 +123,8 @@ class FakeVideoCapturer : public cricket::VideoCapturer {
sigslot::signal1<FakeVideoCapturer*> SignalDestroyed;
- virtual cricket::CaptureState Start(const cricket::VideoFormat& format) {
+ virtual cricket::CaptureState Start(
pbos-webrtc 2016/09/13 14:02:09 remove virtual (e.g. only use override and not vir
nisse-webrtc 2016/09/13 14:24:05 Done, all occurances in this class.
+ const cricket::VideoFormat& format) override {
cricket::VideoFormat supported;
if (GetBestCaptureFormat(format, &supported)) {
SetCaptureFormat(&supported);
@@ -132,14 +133,17 @@ class FakeVideoCapturer : public cricket::VideoCapturer {
SetCaptureState(cricket::CS_RUNNING);
return cricket::CS_RUNNING;
}
- virtual void Stop() {
+ virtual void Stop() override {
running_ = false;
SetCaptureFormat(NULL);
SetCaptureState(cricket::CS_STOPPED);
}
- virtual bool IsRunning() { return running_; }
- virtual bool IsScreencast() const { return is_screencast_; }
- bool GetPreferredFourccs(std::vector<uint32_t>* fourccs) {
+ virtual bool IsRunning() override { return running_; }
+ virtual bool IsScreencast() const override { return is_screencast_; }
+ rtc::Optional<bool> NeedsDenoising() const override {
+ return needs_denoising_;
+ }
+ bool GetPreferredFourccs(std::vector<uint32_t>* fourccs) override {
fourccs->push_back(cricket::FOURCC_I420);
fourccs->push_back(cricket::FOURCC_MJPG);
return true;
@@ -151,11 +155,16 @@ class FakeVideoCapturer : public cricket::VideoCapturer {
webrtc::VideoRotation GetRotation() { return rotation_; }
+ void SetNeedsDenoising(bool needs_denoising) {
pbos-webrtc 2016/09/13 14:02:09 Nit: Imo this should take a rtc::Optional<bool> as
nisse-webrtc 2016/09/13 14:24:05 Done.
+ needs_denoising_ = rtc::Optional<bool>(needs_denoising);
+ }
+
private:
bool running_;
int64_t initial_timestamp_;
int64_t next_timestamp_;
const bool is_screencast_;
+ rtc::Optional<bool> needs_denoising_;
webrtc::VideoRotation rotation_;
};

Powered by Google App Engine
This is Rietveld 408576698