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

Unified Diff: content/renderer/media_capture_from_element/html_video_element_capturer_source.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: content/renderer/media_capture_from_element/html_video_element_capturer_source.cc
diff --git a/content/renderer/media_capture_from_element/html_video_element_capturer_source.cc b/content/renderer/media_capture_from_element/html_video_element_capturer_source.cc
index bbbb3faba0521b67c01ace0fdd3526ce3e32030c..8aa4e8500d091ef5c47a3fe86242066c58be2e9b 100644
--- a/content/renderer/media_capture_from_element/html_video_element_capturer_source.cc
+++ b/content/renderer/media_capture_from_element/html_video_element_capturer_source.cc
@@ -55,15 +55,8 @@ HtmlVideoElementCapturerSource::~HtmlVideoElementCapturerSource() {
DCHECK(thread_checker_.CalledOnValidThread());
}
-void HtmlVideoElementCapturerSource::GetCurrentSupportedFormats(
- int max_requested_width,
- int max_requested_height,
- double max_requested_frame_rate,
- const VideoCaptureDeviceFormatsCB& callback) {
- DVLOG(2) << __func__ << "{ max_requested_height = " << max_requested_height
- << "}) { max_requested_width = " << max_requested_width
- << "}) { max_requested_frame_rate = " << max_requested_frame_rate
- << "})";
+media::VideoCaptureFormats
+HtmlVideoElementCapturerSource::GetPreferredFormats() {
DCHECK(thread_checker_.CalledOnValidThread());
// WebMediaPlayer has a setRate() but can't be read back.
@@ -75,7 +68,7 @@ void HtmlVideoElementCapturerSource::GetCurrentSupportedFormats(
media::PIXEL_FORMAT_I420);
media::VideoCaptureFormats formats;
formats.push_back(format);
- callback.Run(formats);
+ return formats;
}
void HtmlVideoElementCapturerSource::StartCapture(

Powered by Google App Engine
This is Rietveld 408576698