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

Side by Side Diff: content/renderer/media_capture_from_element/html_video_element_capturer_source.h

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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CONTENT_RENDERER_MEDIA_CAPTURE_FROM_ELEMENT_HTML_VIDEO_ELEMENT_CAPTURER_ SOURCE_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_CAPTURE_FROM_ELEMENT_HTML_VIDEO_ELEMENT_CAPTURER_ SOURCE_H_
6 #define CONTENT_RENDERER_MEDIA_CAPTURE_FROM_ELEMENT_HTML_VIDEO_ELEMENT_CAPTURER_ SOURCE_H_ 6 #define CONTENT_RENDERER_MEDIA_CAPTURE_FROM_ELEMENT_HTML_VIDEO_ELEMENT_CAPTURER_ SOURCE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/threading/thread_checker.h" 10 #include "base/threading/thread_checker.h"
(...skipping 30 matching lines...) Expand all
41 CreateFromWebMediaPlayerImpl( 41 CreateFromWebMediaPlayerImpl(
42 blink::WebMediaPlayer* player, 42 blink::WebMediaPlayer* player,
43 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner); 43 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner);
44 44
45 HtmlVideoElementCapturerSource( 45 HtmlVideoElementCapturerSource(
46 const base::WeakPtr<blink::WebMediaPlayer>& player, 46 const base::WeakPtr<blink::WebMediaPlayer>& player,
47 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner); 47 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner);
48 ~HtmlVideoElementCapturerSource() override; 48 ~HtmlVideoElementCapturerSource() override;
49 49
50 // media::VideoCapturerSource Implementation. 50 // media::VideoCapturerSource Implementation.
51 void GetCurrentSupportedFormats( 51 media::VideoCaptureFormats GetPreferredFormats() override;
52 int max_requested_width,
53 int max_requested_height,
54 double max_requested_frame_rate,
55 const VideoCaptureDeviceFormatsCB& callback) override;
56 void StartCapture(const media::VideoCaptureParams& params, 52 void StartCapture(const media::VideoCaptureParams& params,
57 const VideoCaptureDeliverFrameCB& new_frame_callback, 53 const VideoCaptureDeliverFrameCB& new_frame_callback,
58 const RunningCallback& running_callback) override; 54 const RunningCallback& running_callback) override;
59 void StopCapture() override; 55 void StopCapture() override;
60 56
61 private: 57 private:
62 // This method includes collecting data from the WebMediaPlayer and converting 58 // This method includes collecting data from the WebMediaPlayer and converting
63 // it into a format suitable for MediaStreams. 59 // it into a format suitable for MediaStreams.
64 void sendNewFrame(); 60 void sendNewFrame();
65 61
(...skipping 17 matching lines...) Expand all
83 79
84 // Used on main render thread to schedule future capture events. 80 // Used on main render thread to schedule future capture events.
85 base::WeakPtrFactory<HtmlVideoElementCapturerSource> weak_factory_; 81 base::WeakPtrFactory<HtmlVideoElementCapturerSource> weak_factory_;
86 82
87 DISALLOW_COPY_AND_ASSIGN(HtmlVideoElementCapturerSource); 83 DISALLOW_COPY_AND_ASSIGN(HtmlVideoElementCapturerSource);
88 }; 84 };
89 85
90 } // namespace content 86 } // namespace content
91 87
92 #endif // CONTENT_RENDERER_MEDIA_CAPTURE_FROM_ELEMENT_HTML_VIDEO_ELEMENT_CAPTUR ER_SOURCE_H_ 88 #endif // CONTENT_RENDERER_MEDIA_CAPTURE_FROM_ELEMENT_HTML_VIDEO_ELEMENT_CAPTUR ER_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698