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

Unified Diff: chrome/renderer/media/cast_receiver_session.cc

Issue 2787773002: Add GetPreferredFormats method to media::VideoCapturerSource. (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
Index: chrome/renderer/media/cast_receiver_session.cc
diff --git a/chrome/renderer/media/cast_receiver_session.cc b/chrome/renderer/media/cast_receiver_session.cc
index 8ede36e5d9112d0e83c76331db28a1d5385c2c6e..e9fed966ae339a74715cb249dabeb8725b80e4d9 100644
--- a/chrome/renderer/media/cast_receiver_session.cc
+++ b/chrome/renderer/media/cast_receiver_session.cc
@@ -44,11 +44,7 @@ class CastReceiverSession::VideoCapturerSource
explicit VideoCapturerSource(
const scoped_refptr<CastReceiverSession> cast_receiver_session);
protected:
- void GetCurrentSupportedFormats(
- int max_requested_width,
- int max_requested_height,
- double max_requested_frame_rate,
- const VideoCaptureDeviceFormatsCB& callback) override;
+ media::VideoCaptureFormats GetPreferredFormats() override;
void StartCapture(const media::VideoCaptureParams& params,
const VideoCaptureDeliverFrameCB& frame_callback,
const RunningCallback& running_callback) override;
@@ -127,15 +123,12 @@ CastReceiverSession::VideoCapturerSource::VideoCapturerSource(
: cast_receiver_session_(cast_receiver_session) {
}
-void CastReceiverSession::VideoCapturerSource::GetCurrentSupportedFormats(
- int max_requested_width,
- int max_requested_height,
- double max_requested_frame_rate,
- const VideoCaptureDeviceFormatsCB& callback) {
- std::vector<media::VideoCaptureFormat> formats;
+media::VideoCaptureFormats
+CastReceiverSession::VideoCapturerSource::GetPreferredFormats() {
+ media::VideoCaptureFormats formats;
if (cast_receiver_session_->format_.IsValid())
formats.push_back(cast_receiver_session_->format_);
- callback.Run(formats);
+ return formats;
}
void CastReceiverSession::VideoCapturerSource::StartCapture(
« no previous file with comments | « no previous file | content/renderer/media/media_stream_video_capturer_source.cc » ('j') | media/capture/video_capturer_source.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698