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

Unified Diff: content/renderer/media/media_stream_constraints_util_video_device.h

Issue 2711783008: Support the googNoiseReduction constraint in SelectSettings for video-device capture. (Closed)
Patch Set: remove redundant braces Created 3 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 | « no previous file | content/renderer/media/media_stream_constraints_util_video_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_stream_constraints_util_video_device.h
diff --git a/content/renderer/media/media_stream_constraints_util_video_device.h b/content/renderer/media/media_stream_constraints_util_video_device.h
index af55fdc9c994f40a6d9fa9c4db29b7b63d0f1471..71a19254db745f9e1984e52c4df6f49a0aae41c5 100644
--- a/content/renderer/media/media_stream_constraints_util_video_device.h
+++ b/content/renderer/media/media_stream_constraints_util_video_device.h
@@ -11,6 +11,7 @@
#include "content/common/content_export.h"
#include "content/common/media/media_devices.mojom.h"
#include "media/capture/video_capture_types.h"
+#include "third_party/webrtc/base/optional.h"
namespace blink {
class WebString;
@@ -34,6 +35,7 @@ struct CONTENT_EXPORT VideoDeviceCaptureCapabilities {
// Each field is independent of each other.
std::vector<::mojom::VideoInputDeviceCapabilitiesPtr> device_capabilities;
std::vector<media::PowerLineFrequency> power_line_capabilities;
+ std::vector<rtc::Optional<bool>> noise_reduction_capabilities;
};
struct CONTENT_EXPORT VideoDeviceCaptureSourceSelectionResult {
@@ -69,6 +71,7 @@ struct CONTENT_EXPORT VideoDeviceCaptureSourceSelectionResult {
std::string device_id;
::mojom::FacingMode facing_mode;
media::VideoCaptureParams capture_params;
+ rtc::Optional<bool> noise_reduction;
};
// This function performs source and source-settings selection based on
@@ -130,9 +133,9 @@ struct CONTENT_EXPORT VideoDeviceCaptureSourceSelectionResult {
// ideal value and thus has worse fitness according to step 2, even if C3's
// native fitness is better than C1's and C2's.
// 5. C1 is better than C2 if its settings are closer to certain default
-// settings that include the device ID, power-line frequency, resolution, and
-// frame rate, in that order. Note that there is no default facing mode or
-// aspect ratio.
+// settings that include the device ID, power-line frequency, noise
+// reduction, resolution, and frame rate, in that order. Note that there is
+// no default facing mode or aspect ratio.
VideoDeviceCaptureSourceSelectionResult CONTENT_EXPORT
SelectVideoDeviceCaptureSourceSettings(
const VideoDeviceCaptureCapabilities& capabilities,
« no previous file with comments | « no previous file | content/renderer/media/media_stream_constraints_util_video_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698