summaryrefslogtreecommitdiffstats
path: root/content/renderer
diff options
context:
space:
mode:
authormiu <miu@chromium.org>2015-05-09 15:17:15 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-09 22:17:45 +0000
commitf79202747a089a00f653e5827409c779395bda70 (patch)
treed2818030a1838573579d94e5727cb29786855b88 /content/renderer
parent238eaa368547ea4a87f5ea605c927e9013d3da92 (diff)
downloadchromium_src-f79202747a089a00f653e5827409c779395bda70.zip
chromium_src-f79202747a089a00f653e5827409c779395bda70.tar.gz
chromium_src-f79202747a089a00f653e5827409c779395bda70.tar.bz2
New resolution change policies for desktop and tab capture.
This change replaces the "fixed" versus "variable" resolution change policies with a 3-tier set: fixed, variable with fixed aspect ratio, and variable at any aspect ratio. This allows users of the desktop and tab capture APIs to specify minimum and maximum resolutions, and from those, a resolution change policy is determined. The policy is used by the desktop and tab capture implementation to activate or disable sender-side letterboxing of screen-capture content. BUG=473336 NOPRESUBMIT=true NOTRY=true Review URL: https://codereview.chromium.org/1124263004 Cr-Commit-Position: refs/heads/master@{#329056}
Diffstat (limited to 'content/renderer')
-rw-r--r--content/renderer/media/media_stream_video_capture_source_unittest.cc103
-rw-r--r--content/renderer/media/media_stream_video_capturer_source.cc140
-rw-r--r--content/renderer/media/media_stream_video_capturer_source.h1
-rw-r--r--content/renderer/media/media_stream_video_source.cc10
-rw-r--r--content/renderer/media/media_stream_video_source.h23
-rw-r--r--content/renderer/media/mock_media_stream_video_source.cc1
-rw-r--r--content/renderer/media/mock_media_stream_video_source.h1
-rw-r--r--content/renderer/media/webrtc/media_stream_remote_video_source.cc1
-rw-r--r--content/renderer/media/webrtc/media_stream_remote_video_source.h1
-rw-r--r--content/renderer/media/webrtc/video_destination_handler.cc1
-rw-r--r--content/renderer/media/webrtc/video_destination_handler.h1
-rw-r--r--content/renderer/pepper/pepper_media_stream_video_track_host.cc1
-rw-r--r--content/renderer/pepper/pepper_media_stream_video_track_host.h1
13 files changed, 263 insertions, 22 deletions
diff --git a/content/renderer/media/media_stream_video_capture_source_unittest.cc b/content/renderer/media/media_stream_video_capture_source_unittest.cc
index ceec813..7995437 100644
--- a/content/renderer/media/media_stream_video_capture_source_unittest.cc
+++ b/content/renderer/media/media_stream_video_capture_source_unittest.cc
@@ -66,12 +66,15 @@ class MediaStreamVideoCapturerSourceTest : public testing::Test {
webkit_source_id_ = webkit_source_.id();
}
+ MockMediaConstraintFactory* constraint_factory() {
+ return &constraint_factory_;
+ }
+
blink::WebMediaStreamTrack StartSource() {
- MockMediaConstraintFactory factory;
bool enabled = true;
// CreateVideoTrack will trigger OnConstraintsApplied.
return MediaStreamVideoTrack::CreateVideoTrack(
- source_, factory.CreateWebMediaConstraints(),
+ source_, constraint_factory_.CreateWebMediaConstraints(),
base::Bind(
&MediaStreamVideoCapturerSourceTest::OnConstraintsApplied,
base::Unretained(this)),
@@ -100,16 +103,28 @@ class MediaStreamVideoCapturerSourceTest : public testing::Test {
MockVideoCapturerDelegate* delegate_; // owned by |source|.
blink::WebString webkit_source_id_;
bool source_stopped_;
+ MockMediaConstraintFactory constraint_factory_;
};
-TEST_F(MediaStreamVideoCapturerSourceTest, TabCaptureAllowResolutionChange) {
+TEST_F(MediaStreamVideoCapturerSourceTest, TabCaptureFixedResolutionByDefault) {
StreamDeviceInfo device_info;
device_info.device.type = MEDIA_TAB_VIDEO_CAPTURE;
InitWithDeviceInfo(device_info);
+ // No constraints are being provided to the implementation, so expect only
+ // default values.
+ media::VideoCaptureParams expected_params;
+ expected_params.requested_format.frame_size.SetSize(
+ MediaStreamVideoSource::kDefaultWidth,
+ MediaStreamVideoSource::kDefaultHeight);
+ expected_params.requested_format.frame_rate =
+ MediaStreamVideoSource::kDefaultFrameRate;
+ expected_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420;
+ expected_params.resolution_change_policy =
+ media::RESOLUTION_POLICY_FIXED_RESOLUTION;
+
EXPECT_CALL(mock_delegate(), StartCapture(
- testing::Field(&media::VideoCaptureParams::resolution_change_policy,
- media::RESOLUTION_POLICY_DYNAMIC_WITHIN_LIMIT),
+ expected_params,
testing::_,
testing::_,
testing::_)).Times(1);
@@ -119,14 +134,88 @@ TEST_F(MediaStreamVideoCapturerSourceTest, TabCaptureAllowResolutionChange) {
}
TEST_F(MediaStreamVideoCapturerSourceTest,
- DesktopCaptureAllowResolutionChange) {
+ DesktopCaptureAllowAnyResolutionChangeByDefault) {
StreamDeviceInfo device_info;
device_info.device.type = MEDIA_DESKTOP_VIDEO_CAPTURE;
InitWithDeviceInfo(device_info);
+ // No constraints are being provided to the implementation, so expect only
+ // default values.
+ media::VideoCaptureParams expected_params;
+ expected_params.requested_format.frame_size.SetSize(
+ MediaStreamVideoSource::kDefaultWidth,
+ MediaStreamVideoSource::kDefaultHeight);
+ expected_params.requested_format.frame_rate =
+ MediaStreamVideoSource::kDefaultFrameRate;
+ expected_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420;
+ expected_params.resolution_change_policy =
+ media::RESOLUTION_POLICY_ANY_WITHIN_LIMIT;
+
+ EXPECT_CALL(mock_delegate(), StartCapture(
+ expected_params,
+ testing::_,
+ testing::_,
+ testing::_)).Times(1);
+ blink::WebMediaStreamTrack track = StartSource();
+ // When the track goes out of scope, the source will be stopped.
+ EXPECT_CALL(mock_delegate(), StopCapture());
+}
+
+TEST_F(MediaStreamVideoCapturerSourceTest,
+ TabCaptureConstraintsImplyFixedAspectRatio) {
+ StreamDeviceInfo device_info;
+ device_info.device.type = MEDIA_TAB_VIDEO_CAPTURE;
+ InitWithDeviceInfo(device_info);
+
+ // Specify max and min size constraints that have the same ~16:9 aspect ratio.
+ constraint_factory()->AddMandatory(MediaStreamVideoSource::kMaxWidth, 1920);
+ constraint_factory()->AddMandatory(MediaStreamVideoSource::kMaxHeight, 1080);
+ constraint_factory()->AddMandatory(MediaStreamVideoSource::kMinWidth, 854);
+ constraint_factory()->AddMandatory(MediaStreamVideoSource::kMinHeight, 480);
+ constraint_factory()->AddMandatory(MediaStreamVideoSource::kMaxFrameRate,
+ 60.0);
+
+ media::VideoCaptureParams expected_params;
+ expected_params.requested_format.frame_size.SetSize(1920, 1080);
+ expected_params.requested_format.frame_rate = 60.0;
+ expected_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420;
+ expected_params.resolution_change_policy =
+ media::RESOLUTION_POLICY_FIXED_ASPECT_RATIO;
+
EXPECT_CALL(mock_delegate(), StartCapture(
testing::Field(&media::VideoCaptureParams::resolution_change_policy,
- media::RESOLUTION_POLICY_DYNAMIC_WITHIN_LIMIT),
+ media::RESOLUTION_POLICY_FIXED_ASPECT_RATIO),
+ testing::_,
+ testing::_,
+ testing::_)).Times(1);
+ blink::WebMediaStreamTrack track = StartSource();
+ // When the track goes out of scope, the source will be stopped.
+ EXPECT_CALL(mock_delegate(), StopCapture());
+}
+
+TEST_F(MediaStreamVideoCapturerSourceTest,
+ TabCaptureConstraintsImplyAllowingAnyResolutionChange) {
+ StreamDeviceInfo device_info;
+ device_info.device.type = MEDIA_TAB_VIDEO_CAPTURE;
+ InitWithDeviceInfo(device_info);
+
+ // Specify max and min size constraints with different aspect ratios.
+ constraint_factory()->AddMandatory(MediaStreamVideoSource::kMaxWidth, 1920);
+ constraint_factory()->AddMandatory(MediaStreamVideoSource::kMaxHeight, 1080);
+ constraint_factory()->AddMandatory(MediaStreamVideoSource::kMinWidth, 0);
+ constraint_factory()->AddMandatory(MediaStreamVideoSource::kMinHeight, 0);
+ constraint_factory()->AddMandatory(MediaStreamVideoSource::kMaxFrameRate,
+ 60.0);
+
+ media::VideoCaptureParams expected_params;
+ expected_params.requested_format.frame_size.SetSize(1920, 1080);
+ expected_params.requested_format.frame_rate = 60.0;
+ expected_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420;
+ expected_params.resolution_change_policy =
+ media::RESOLUTION_POLICY_ANY_WITHIN_LIMIT;
+
+ EXPECT_CALL(mock_delegate(), StartCapture(
+ expected_params,
testing::_,
testing::_,
testing::_)).Times(1);
diff --git a/content/renderer/media/media_stream_video_capturer_source.cc b/content/renderer/media/media_stream_video_capturer_source.cc
index 1c905cc..f2c1fd0 100644
--- a/content/renderer/media/media_stream_video_capturer_source.cc
+++ b/content/renderer/media/media_stream_video_capturer_source.cc
@@ -7,11 +7,16 @@
#include "base/bind.h"
#include "base/callback_helpers.h"
#include "base/location.h"
+#include "content/public/common/media_stream_request.h"
+#include "content/renderer/media/media_stream_constraints_util.h"
#include "content/renderer/media/video_capture_impl_manager.h"
#include "content/renderer/render_thread_impl.h"
#include "media/base/bind_to_current_loop.h"
+#include "media/base/limits.h"
#include "media/base/video_frame.h"
+namespace content {
+
namespace {
// Resolutions used if the source doesn't support capability enumeration.
@@ -32,9 +37,135 @@ const int kVideoFrameRates[] = {30, 60};
// Hard upper-bound frame rate for tab/desktop capture.
const double kMaxScreenCastFrameRate = 120.0;
-} // namespace
+// Returns true if the value for width or height is reasonable.
+bool DimensionValueIsValid(int x) {
+ return x > 0 && x <= media::limits::kMaxDimension;
+}
-namespace content {
+// Returns true if the value for frame rate is reasonable.
+bool FrameRateValueIsValid(double frame_rate) {
+ return (frame_rate > (1.0 / 60.0)) && // Lower-bound: One frame per minute.
+ (frame_rate <= media::limits::kMaxFramesPerSecond);
+}
+
+// Returns true if the aspect ratio of |a| and |b| are equivalent to two
+// significant digits.
+bool AreNearlyEquivalentInAspectRatio(const gfx::Size& a, const gfx::Size& b) {
+ DCHECK(!a.IsEmpty());
+ DCHECK(!b.IsEmpty());
+ const int aspect_ratio_a = (100 * a.width()) / a.height();
+ const int aspect_ratio_b = (100 * b.width()) / b.height();
+ return aspect_ratio_a == aspect_ratio_b;
+}
+
+// Interprets the properties in |constraints| to override values in |params| and
+// determine the resolution change policy.
+void SetScreenCastParamsFromConstraints(
+ const blink::WebMediaConstraints& constraints,
+ MediaStreamType type,
+ media::VideoCaptureParams* params) {
+ // The default resolution change policies for tab versus desktop capture are
+ // the way they are for legacy reasons.
+ if (type == MEDIA_TAB_VIDEO_CAPTURE) {
+ params->resolution_change_policy =
+ media::RESOLUTION_POLICY_FIXED_RESOLUTION;
+ } else if (type == MEDIA_DESKTOP_VIDEO_CAPTURE) {
+ params->resolution_change_policy =
+ media::RESOLUTION_POLICY_ANY_WITHIN_LIMIT;
+ } else {
+ NOTREACHED();
+ }
+
+ // If the maximum frame resolution was provided in the constraints, use it if
+ // either: 1) none has been set yet; or 2) the maximum specificed is smaller
+ // than the current setting.
+ int width = 0;
+ int height = 0;
+ gfx::Size desired_max_frame_size;
+ if (GetConstraintValueAsInteger(constraints,
+ MediaStreamVideoSource::kMaxWidth,
+ &width) &&
+ GetConstraintValueAsInteger(constraints,
+ MediaStreamVideoSource::kMaxHeight,
+ &height) &&
+ DimensionValueIsValid(width) &&
+ DimensionValueIsValid(height)) {
+ desired_max_frame_size.SetSize(width, height);
+ if (params->requested_format.frame_size.IsEmpty() ||
+ desired_max_frame_size.width() <
+ params->requested_format.frame_size.width() ||
+ desired_max_frame_size.height() <
+ params->requested_format.frame_size.height()) {
+ params->requested_format.frame_size = desired_max_frame_size;
+ }
+ }
+
+ // Set the default frame resolution if none was provided.
+ if (params->requested_format.frame_size.IsEmpty()) {
+ params->requested_format.frame_size.SetSize(
+ MediaStreamVideoSource::kDefaultWidth,
+ MediaStreamVideoSource::kDefaultHeight);
+ }
+
+ // If the maximum frame rate was provided, use it if either: 1) none has been
+ // set yet; or 2) the maximum specificed is smaller than the current setting.
+ double frame_rate = 0.0;
+ if (GetConstraintValueAsDouble(constraints,
+ MediaStreamVideoSource::kMaxFrameRate,
+ &frame_rate) &&
+ FrameRateValueIsValid(frame_rate)) {
+ if (params->requested_format.frame_rate <= 0.0f ||
+ frame_rate < params->requested_format.frame_rate) {
+ params->requested_format.frame_rate = frame_rate;
+ }
+ }
+
+ // Set the default frame rate if none was provided.
+ if (params->requested_format.frame_rate <= 0.0f) {
+ params->requested_format.frame_rate =
+ MediaStreamVideoSource::kDefaultFrameRate;
+ }
+
+ // If the minimum frame resolution was provided, compare it to the maximum
+ // frame resolution to determine the intended resolution change policy.
+ if (!desired_max_frame_size.IsEmpty() &&
+ GetConstraintValueAsInteger(constraints,
+ MediaStreamVideoSource::kMinWidth,
+ &width) &&
+ GetConstraintValueAsInteger(constraints,
+ MediaStreamVideoSource::kMinHeight,
+ &height) &&
+ width <= desired_max_frame_size.width() &&
+ height <= desired_max_frame_size.height()) {
+ if (width == desired_max_frame_size.width() &&
+ height == desired_max_frame_size.height()) {
+ // Constraints explicitly require a single frame resolution.
+ params->resolution_change_policy =
+ media::RESOLUTION_POLICY_FIXED_RESOLUTION;
+ } else if (DimensionValueIsValid(width) &&
+ DimensionValueIsValid(height) &&
+ AreNearlyEquivalentInAspectRatio(gfx::Size(width, height),
+ desired_max_frame_size)) {
+ // Constraints only mention a single aspect ratio.
+ params->resolution_change_policy =
+ media::RESOLUTION_POLICY_FIXED_ASPECT_RATIO;
+ } else {
+ // Constraints specify a minimum resolution that is smaller than the
+ // maximum resolution and has a different aspect ratio (possibly even
+ // 0x0). This indicates any frame resolution and aspect ratio is
+ // acceptable.
+ params->resolution_change_policy =
+ media::RESOLUTION_POLICY_ANY_WITHIN_LIMIT;
+ }
+ }
+
+ DVLOG(1) << "SetScreenCastParamsFromConstraints: "
+ << params->requested_format.ToString()
+ << " with resolution change policy "
+ << params->resolution_change_policy;
+}
+
+} // namespace
VideoCapturerDelegate::VideoCapturerDelegate(
const StreamDeviceInfo& device_info)
@@ -246,13 +377,14 @@ void MediaStreamVideoCapturerSource::GetCurrentSupportedFormats(
void MediaStreamVideoCapturerSource::StartSourceImpl(
const media::VideoCaptureFormat& format,
+ const blink::WebMediaConstraints& constraints,
const VideoCaptureDeliverFrameCB& frame_callback) {
media::VideoCaptureParams new_params;
new_params.requested_format = format;
if (device_info().device.type == MEDIA_TAB_VIDEO_CAPTURE ||
device_info().device.type == MEDIA_DESKTOP_VIDEO_CAPTURE) {
- new_params.resolution_change_policy =
- media::RESOLUTION_POLICY_DYNAMIC_WITHIN_LIMIT;
+ SetScreenCastParamsFromConstraints(
+ constraints, device_info().device.type, &new_params);
}
delegate_->StartCapture(
new_params,
diff --git a/content/renderer/media/media_stream_video_capturer_source.h b/content/renderer/media/media_stream_video_capturer_source.h
index f95dd59..3722b9d 100644
--- a/content/renderer/media/media_stream_video_capturer_source.h
+++ b/content/renderer/media/media_stream_video_capturer_source.h
@@ -97,6 +97,7 @@ class CONTENT_EXPORT MediaStreamVideoCapturerSource
void StartSourceImpl(
const media::VideoCaptureFormat& format,
+ const blink::WebMediaConstraints& constraints,
const VideoCaptureDeliverFrameCB& frame_callback) override;
void StopSourceImpl() override;
diff --git a/content/renderer/media/media_stream_video_source.cc b/content/renderer/media/media_stream_video_source.cc
index 6e50121..c4b0c22 100644
--- a/content/renderer/media/media_stream_video_source.cc
+++ b/content/renderer/media/media_stream_video_source.cc
@@ -464,8 +464,10 @@ void MediaStreamVideoSource::OnSupportedFormats(
DCHECK_EQ(RETRIEVING_CAPABILITIES, state_);
supported_formats_ = formats;
+ blink::WebMediaConstraints fulfilled_constraints;
if (!FindBestFormatWithConstraints(supported_formats_,
- &current_format_)) {
+ &current_format_,
+ &fulfilled_constraints)) {
SetReadyState(blink::WebMediaStreamSource::ReadyStateEnded);
// This object can be deleted after calling FinalizeAddTrack. See comment
// in the header file.
@@ -478,12 +480,14 @@ void MediaStreamVideoSource::OnSupportedFormats(
StartSourceImpl(
current_format_,
+ fulfilled_constraints,
base::Bind(&VideoTrackAdapter::DeliverFrameOnIO, track_adapter_));
}
bool MediaStreamVideoSource::FindBestFormatWithConstraints(
const media::VideoCaptureFormats& formats,
- media::VideoCaptureFormat* best_format) {
+ media::VideoCaptureFormat* best_format,
+ blink::WebMediaConstraints* fulfilled_constraints) {
DCHECK(CalledOnValidThread());
// Find the first constraints that we can fulfill.
for (const auto& request : requested_constraints_) {
@@ -494,6 +498,7 @@ bool MediaStreamVideoSource::FindBestFormatWithConstraints(
// no mandatory constraints have been specified. That just means that
// we will start with whatever format is native to the source.
if (formats.empty() && !HasMandatoryConstraints(requested_constraints)) {
+ *fulfilled_constraints = requested_constraints;
*best_format = media::VideoCaptureFormat();
return true;
}
@@ -502,6 +507,7 @@ bool MediaStreamVideoSource::FindBestFormatWithConstraints(
FilterFormats(requested_constraints, formats, &unsatisfied_constraint);
if (filtered_formats.size() > 0) {
// A request with constraints that can be fulfilled.
+ *fulfilled_constraints = requested_constraints;
GetBestCaptureFormat(filtered_formats,
requested_constraints,
best_format);
diff --git a/content/renderer/media/media_stream_video_source.h b/content/renderer/media/media_stream_video_source.h
index 3e2cbff..496bb85 100644
--- a/content/renderer/media/media_stream_video_source.h
+++ b/content/renderer/media/media_stream_video_source.h
@@ -70,7 +70,7 @@ class CONTENT_EXPORT MediaStreamVideoSource
static const char kMinAspectRatio[]; // minAspectRatio
static const char kMaxAspectRatio[]; // maxAspectRatio
static const char kMaxWidth[]; // maxWidth
- static const char kMinWidth[]; // minWidthOnCaptureFormats
+ static const char kMinWidth[]; // minWidth
static const char kMaxHeight[]; // maxHeight
static const char kMinHeight[]; // minHeight
static const char kMaxFrameRate[]; // maxFrameRate
@@ -107,12 +107,15 @@ class CONTENT_EXPORT MediaStreamVideoSource
double max_requested_frame_rate,
const VideoCaptureDeviceFormatsCB& callback) = 0;
- // An implementation must start capture frames using the resolution in
- // |params|. When the source has started or the source failed to start
- // OnStartDone must be called. An implementation must call
- // |frame_callback| on the IO thread with the captured frames.
+ // An implementation must start capturing frames using the requested
+ // |format|. The fulfilled |constraints| are provided as additional context,
+ // and may be used to modify the behavior of the source. When the source has
+ // started or the source failed to start OnStartDone must be called. An
+ // implementation must call |frame_callback| on the IO thread with the
+ // captured frames.
virtual void StartSourceImpl(
const media::VideoCaptureFormat& format,
+ const blink::WebMediaConstraints& constraints,
const VideoCaptureDeliverFrameCB& frame_callback) = 0;
void OnStartDone(MediaStreamRequestResult result);
@@ -133,12 +136,14 @@ class CONTENT_EXPORT MediaStreamVideoSource
private:
void OnSupportedFormats(const media::VideoCaptureFormats& formats);
- // Finds the first constraints in |requested_constraints_| that can be
- // fulfilled. |best_format| is set to the video resolution that can be
- // fulfilled.
+ // Finds the first WebMediaConstraints in |requested_constraints_| that allows
+ // the use of one of the |formats|. |best_format| and |fulfilled_constraints|
+ // are set to the results of this search-and-match operation. Returns false
+ // if no WebMediaConstraints allow the use any of the |formats|.
bool FindBestFormatWithConstraints(
const media::VideoCaptureFormats& formats,
- media::VideoCaptureFormat* best_format);
+ media::VideoCaptureFormat* best_format,
+ blink::WebMediaConstraints* fulfilled_constraints);
// Trigger all cached callbacks from AddTrack. AddTrack is successful
// if the capture delegate has started and the constraints provided in
diff --git a/content/renderer/media/mock_media_stream_video_source.cc b/content/renderer/media/mock_media_stream_video_source.cc
index b99e4c3..cf9f685 100644
--- a/content/renderer/media/mock_media_stream_video_source.cc
+++ b/content/renderer/media/mock_media_stream_video_source.cc
@@ -63,6 +63,7 @@ void MockMediaStreamVideoSource::GetCurrentSupportedFormats(
void MockMediaStreamVideoSource::StartSourceImpl(
const media::VideoCaptureFormat& format,
+ const blink::WebMediaConstraints& constraints,
const VideoCaptureDeliverFrameCB& frame_callback) {
DCHECK(frame_callback_.is_null());
format_ = format;
diff --git a/content/renderer/media/mock_media_stream_video_source.h b/content/renderer/media/mock_media_stream_video_source.h
index d00a5fe..f912601 100644
--- a/content/renderer/media/mock_media_stream_video_source.h
+++ b/content/renderer/media/mock_media_stream_video_source.h
@@ -58,6 +58,7 @@ class MockMediaStreamVideoSource : public MediaStreamVideoSource {
const VideoCaptureDeviceFormatsCB& callback) override;
void StartSourceImpl(
const media::VideoCaptureFormat& format,
+ const blink::WebMediaConstraints& constraints,
const VideoCaptureDeliverFrameCB& frame_callback) override;
void StopSourceImpl() override;
diff --git a/content/renderer/media/webrtc/media_stream_remote_video_source.cc b/content/renderer/media/webrtc/media_stream_remote_video_source.cc
index a151647..9fa3e5d 100644
--- a/content/renderer/media/webrtc/media_stream_remote_video_source.cc
+++ b/content/renderer/media/webrtc/media_stream_remote_video_source.cc
@@ -139,6 +139,7 @@ void MediaStreamRemoteVideoSource::GetCurrentSupportedFormats(
void MediaStreamRemoteVideoSource::StartSourceImpl(
const media::VideoCaptureFormat& format,
+ const blink::WebMediaConstraints& constraints,
const VideoCaptureDeliverFrameCB& frame_callback) {
DCHECK(CalledOnValidThread());
DCHECK(!delegate_.get());
diff --git a/content/renderer/media/webrtc/media_stream_remote_video_source.h b/content/renderer/media/webrtc/media_stream_remote_video_source.h
index 5a42b8f..5607cd5 100644
--- a/content/renderer/media/webrtc/media_stream_remote_video_source.h
+++ b/content/renderer/media/webrtc/media_stream_remote_video_source.h
@@ -36,6 +36,7 @@ class CONTENT_EXPORT MediaStreamRemoteVideoSource
void StartSourceImpl(
const media::VideoCaptureFormat& format,
+ const blink::WebMediaConstraints& constraints,
const VideoCaptureDeliverFrameCB& frame_callback) override;
void StopSourceImpl() override;
diff --git a/content/renderer/media/webrtc/video_destination_handler.cc b/content/renderer/media/webrtc/video_destination_handler.cc
index 2e3c8b1..febc4e0 100644
--- a/content/renderer/media/webrtc/video_destination_handler.cc
+++ b/content/renderer/media/webrtc/video_destination_handler.cc
@@ -91,6 +91,7 @@ void PpFrameWriter::GetCurrentSupportedFormats(
void PpFrameWriter::StartSourceImpl(
const media::VideoCaptureFormat& format,
+ const blink::WebMediaConstraints& constraints,
const VideoCaptureDeliverFrameCB& frame_callback) {
DCHECK(CalledOnValidThread());
DCHECK(!delegate_.get());
diff --git a/content/renderer/media/webrtc/video_destination_handler.h b/content/renderer/media/webrtc/video_destination_handler.h
index b2cf0bf..c71ae69 100644
--- a/content/renderer/media/webrtc/video_destination_handler.h
+++ b/content/renderer/media/webrtc/video_destination_handler.h
@@ -56,6 +56,7 @@ class CONTENT_EXPORT PpFrameWriter
const VideoCaptureDeviceFormatsCB& callback) override;
void StartSourceImpl(
const media::VideoCaptureFormat& format,
+ const blink::WebMediaConstraints& constraints,
const VideoCaptureDeliverFrameCB& frame_callback) override;
void StopSourceImpl() override;
diff --git a/content/renderer/pepper/pepper_media_stream_video_track_host.cc b/content/renderer/pepper/pepper_media_stream_video_track_host.cc
index 258ee56..14c6731 100644
--- a/content/renderer/pepper/pepper_media_stream_video_track_host.cc
+++ b/content/renderer/pepper/pepper_media_stream_video_track_host.cc
@@ -433,6 +433,7 @@ void PepperMediaStreamVideoTrackHost::GetCurrentSupportedFormats(
void PepperMediaStreamVideoTrackHost::StartSourceImpl(
const media::VideoCaptureFormat& format,
+ const blink::WebMediaConstraints& constraints,
const VideoCaptureDeliverFrameCB& frame_callback) {
output_started_ = true;
frame_deliverer_ = new FrameDeliverer(io_message_loop(), frame_callback);
diff --git a/content/renderer/pepper/pepper_media_stream_video_track_host.h b/content/renderer/pepper/pepper_media_stream_video_track_host.h
index 74455ee..b0c7f67 100644
--- a/content/renderer/pepper/pepper_media_stream_video_track_host.h
+++ b/content/renderer/pepper/pepper_media_stream_video_track_host.h
@@ -67,6 +67,7 @@ class PepperMediaStreamVideoTrackHost : public PepperMediaStreamTrackHostBase,
void StartSourceImpl(
const media::VideoCaptureFormat& format,
+ const blink::WebMediaConstraints& constraints,
const VideoCaptureDeliverFrameCB& frame_callback) override;
void StopSourceImpl() override;