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

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

Issue 2334683002: Add method cricket::VideoCapturer::NeedsDenoising, use in VideoCapturerTrackSource. (Closed)
Patch Set: TODO comment explaining the NeedsDenoising hack. 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
« no previous file with comments | « webrtc/api/videocapturertracksource_unittest.cc ('k') | webrtc/media/base/videocapturer.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 026bf80a7b15f0f83f94bf66a9fe52eb23bc7cd5..8ba56f1e6f1971ee1e27aefcd823316598ff818d 100644
--- a/webrtc/media/base/fakevideocapturer.h
+++ b/webrtc/media/base/fakevideocapturer.h
@@ -123,7 +123,7 @@ class FakeVideoCapturer : public cricket::VideoCapturer {
sigslot::signal1<FakeVideoCapturer*> SignalDestroyed;
- virtual cricket::CaptureState Start(const cricket::VideoFormat& format) {
+ cricket::CaptureState Start(const cricket::VideoFormat& format) override {
cricket::VideoFormat supported;
if (GetBestCaptureFormat(format, &supported)) {
SetCaptureFormat(&supported);
@@ -132,14 +132,17 @@ class FakeVideoCapturer : public cricket::VideoCapturer {
SetCaptureState(cricket::CS_RUNNING);
return cricket::CS_RUNNING;
}
- virtual void Stop() {
+ 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) {
+ bool IsRunning() override { return running_; }
+ 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 +154,16 @@ class FakeVideoCapturer : public cricket::VideoCapturer {
webrtc::VideoRotation GetRotation() { return rotation_; }
+ void SetNeedsDenoising(rtc::Optional<bool> needs_denoising) {
+ needs_denoising_ = 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_;
};
« no previous file with comments | « webrtc/api/videocapturertracksource_unittest.cc ('k') | webrtc/media/base/videocapturer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698