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

Unified Diff: content/renderer/pepper/pepper_media_stream_video_track_host.cc

Issue 2790823002: Spec compliant video constraints for getUserMedia behind flag. (Closed)
Patch Set: rebase Created 3 years, 8 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 | « content/renderer/media_recorder/video_track_recorder_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_media_stream_video_track_host.cc
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 bbded169a288bbc254843f120c2534356fd0a6f5..3daeb5a4fecf1b0fe251be83da9ce19c4130d857 100644
--- a/content/renderer/pepper/pepper_media_stream_video_track_host.cc
+++ b/content/renderer/pepper/pepper_media_stream_video_track_host.cc
@@ -443,6 +443,17 @@ class PepperMediaStreamVideoTrackHost::VideoSource final
}
private:
+ base::Optional<media::VideoCaptureFormat> GetCurrentFormatImpl()
+ const override {
+ DCHECK(!IsOldVideoConstraints());
+ if (host_) {
+ return media::VideoCaptureFormat(
+ host_->plugin_frame_size_, kDefaultOutputFrameRate,
+ ToPixelFormat(host_->plugin_frame_format_));
+ }
+ return base::Optional<media::VideoCaptureFormat>();
+ }
+
const base::WeakPtr<PepperMediaStreamVideoTrackHost> host_;
DISALLOW_COPY_AND_ASSIGN(VideoSource);
@@ -522,14 +533,11 @@ void PepperMediaStreamVideoTrackHost::InitBlinkTrack() {
webkit_source.setExtraData(source); // Takes ownership of |source|.
const bool enabled = true;
- blink::WebMediaConstraints constraints;
- constraints.initialize();
track_ = MediaStreamVideoTrack::CreateVideoTrack(
- source, constraints,
- base::Bind(
- &PepperMediaStreamVideoTrackHost::OnTrackStarted,
- base::Unretained(this)),
- enabled);
+ source,
+ base::Bind(&PepperMediaStreamVideoTrackHost::OnTrackStarted,
+ base::Unretained(this)),
+ enabled);
// Note: The call to CreateVideoTrack() returned a track that holds a
// ref-counted reference to |webkit_source| (and, implicitly, |source|).
}
« no previous file with comments | « content/renderer/media_recorder/video_track_recorder_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698