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

Unified Diff: webrtc/api/videocapturertracksource.cc

Issue 1842073002: Change VideoSourceInterface::needs_denoising() to return rtc::Optional<bool> (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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/api/videocapturertracksource.cc
diff --git a/webrtc/api/videocapturertracksource.cc b/webrtc/api/videocapturertracksource.cc
index 1e9e35382c93e49b3d3f2da786b6048988d1f02f..0543dff3f383f628f102535b1c3e84d90ca930ee 100644
--- a/webrtc/api/videocapturertracksource.cc
+++ b/webrtc/api/videocapturertracksource.cc
@@ -240,10 +240,11 @@ const cricket::VideoFormat& GetBestCaptureFormat(
// Return false if the key is mandatory, and the value is invalid.
bool ExtractOption(const MediaConstraintsInterface* all_constraints,
const std::string& key,
- bool* option) {
+ rtc::Optional<bool>* option) {
size_t mandatory = 0;
- *option = false;
- if (FindConstraint(all_constraints, key, option, &mandatory)) {
+ bool value;
+ if (FindConstraint(all_constraints, key, &value, &mandatory)) {
+ *option = rtc::Optional<bool>(value);
return true;
}
@@ -288,8 +289,7 @@ VideoCapturerTrackSource::VideoCapturerTrackSource(
: VideoTrackSource(capturer, worker_thread, remote),
signaling_thread_(rtc::Thread::Current()),
video_capturer_(capturer),
- started_(false),
- needs_denoising_(false) {
+ started_(false) {
video_capturer_->SignalStateChange.connect(
this, &VideoCapturerTrackSource::OnStateChange);
}

Powered by Google App Engine
This is Rietveld 408576698