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

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

Issue 2870413004: Detect frames from rotated devices in VideoTrackAdapter on Android. (Closed)
Patch Set: address comment by tommi@ Created 3 years, 7 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: content/renderer/media/media_stream_constraints_util_video_device.cc
diff --git a/content/renderer/media/media_stream_constraints_util_video_device.cc b/content/renderer/media/media_stream_constraints_util_video_device.cc
index 4d11cbdf929c937f03e698845b8e4ea2b2fa0d6c..b26be9811ceb9461b8589644b645462857e7c932 100644
--- a/content/renderer/media/media_stream_constraints_util_video_device.cc
+++ b/content/renderer/media/media_stream_constraints_util_video_device.cc
@@ -175,10 +175,13 @@ VideoCaptureSettings ComputeVideoDeviceCaptureSettings(
media::VideoCaptureParams capture_params;
capture_params.requested_format = candidate.format();
capture_params.power_line_frequency = candidate.power_line_frequency();
+ // With device capture, incoming frames are expected to have the size
+ // specified in the requested capture format.
+ bool expect_source_native_size = true;
auto track_adapter_settings = SelectVideoTrackAdapterSettings(
basic_constraint_set, constrained_format.constrained_resolution(),
constrained_format.constrained_frame_rate(),
- capture_params.requested_format);
+ capture_params.requested_format, expect_source_native_size);
return VideoCaptureSettings(
candidate.device_id(), capture_params, candidate.noise_reduction(),

Powered by Google App Engine
This is Rietveld 408576698