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

Side by Side Diff: content/renderer/pepper/pepper_media_stream_video_track_host.cc

Issue 2972553002: Remove MediaStreamVideoSource::GetCurrentSupportedFormats() (Closed)
Patch Set: remove extra use in media_stream_video_capturer_source_unittest.cc Created 3 years, 5 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/pepper/pepper_media_stream_video_track_host.h" 5 #include "content/renderer/pepper/pepper_media_stream_video_track_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 } 407 }
408 408
409 class PepperMediaStreamVideoTrackHost::VideoSource final 409 class PepperMediaStreamVideoTrackHost::VideoSource final
410 : public MediaStreamVideoSource { 410 : public MediaStreamVideoSource {
411 public: 411 public:
412 explicit VideoSource(base::WeakPtr<PepperMediaStreamVideoTrackHost> host) 412 explicit VideoSource(base::WeakPtr<PepperMediaStreamVideoTrackHost> host)
413 : host_(std::move(host)) {} 413 : host_(std::move(host)) {}
414 414
415 ~VideoSource() final { StopSourceImpl(); } 415 ~VideoSource() final { StopSourceImpl(); }
416 416
417 void GetCurrentSupportedFormats(
418 int max_requested_width, int max_requested_height,
419 double max_requested_frame_rate,
420 const VideoCaptureDeviceFormatsCB& callback) final {
421 media::VideoCaptureFormats formats;
422 if (host_) {
423 formats.push_back(media::VideoCaptureFormat(
424 host_->plugin_frame_size_,
425 kDefaultOutputFrameRate,
426 ToPixelFormat(host_->plugin_frame_format_)));
427 }
428 callback.Run(formats);
429 }
430
431 void StartSourceImpl( 417 void StartSourceImpl(
432 const media::VideoCaptureFormat& format, 418 const media::VideoCaptureFormat& format,
433 const blink::WebMediaConstraints& constraints, 419 const blink::WebMediaConstraints& constraints,
434 const VideoCaptureDeliverFrameCB& frame_callback) final { 420 const VideoCaptureDeliverFrameCB& frame_callback) final {
435 if (host_) { 421 if (host_) {
436 host_->frame_deliverer_ = 422 host_->frame_deliverer_ =
437 new FrameDeliverer(io_task_runner(), frame_callback); 423 new FrameDeliverer(io_task_runner(), frame_callback);
438 } 424 }
439 } 425 }
440 426
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 } 530 }
545 531
546 void PepperMediaStreamVideoTrackHost::OnTrackStarted( 532 void PepperMediaStreamVideoTrackHost::OnTrackStarted(
547 MediaStreamSource* source, 533 MediaStreamSource* source,
548 MediaStreamRequestResult result, 534 MediaStreamRequestResult result,
549 const blink::WebString& result_name) { 535 const blink::WebString& result_name) {
550 DVLOG(3) << "OnTrackStarted result: " << result; 536 DVLOG(3) << "OnTrackStarted result: " << result;
551 } 537 }
552 538
553 } // namespace content 539 } // namespace content
OLDNEW
« 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