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

Side by Side Diff: content/renderer/media/media_stream_video_capturer_source.h

Issue 2964003002: Remove support for old getUserMedia video constraints algorithm. (Closed)
Patch Set: rebase and address hbos@ comments 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
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 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 14 matching lines...) Expand all
25 // WebMediaStreamSource. Objects of this class are created and live on main 25 // WebMediaStreamSource. Objects of this class are created and live on main
26 // Render thread. Objects can be constructed either by indicating a |device| to 26 // Render thread. Objects can be constructed either by indicating a |device| to
27 // look for, or by plugging in a |source| constructed elsewhere. 27 // look for, or by plugging in a |source| constructed elsewhere.
28 class CONTENT_EXPORT MediaStreamVideoCapturerSource 28 class CONTENT_EXPORT MediaStreamVideoCapturerSource
29 : public MediaStreamVideoSource, 29 : public MediaStreamVideoSource,
30 public RenderFrameObserver { 30 public RenderFrameObserver {
31 public: 31 public:
32 MediaStreamVideoCapturerSource( 32 MediaStreamVideoCapturerSource(
33 const SourceStoppedCallback& stop_callback, 33 const SourceStoppedCallback& stop_callback,
34 std::unique_ptr<media::VideoCapturerSource> source); 34 std::unique_ptr<media::VideoCapturerSource> source);
35 // TODO(guidou): Remove this constructor. http://crbug.com/706408
36 MediaStreamVideoCapturerSource(const SourceStoppedCallback& stop_callback,
37 const StreamDeviceInfo& device_info,
38 RenderFrame* render_frame);
39 MediaStreamVideoCapturerSource( 35 MediaStreamVideoCapturerSource(
40 const SourceStoppedCallback& stop_callback, 36 const SourceStoppedCallback& stop_callback,
41 const StreamDeviceInfo& device_info, 37 const StreamDeviceInfo& device_info,
42 const media::VideoCaptureParams& capture_params, 38 const media::VideoCaptureParams& capture_params,
43 RenderFrame* render_frame); 39 RenderFrame* render_frame);
44 ~MediaStreamVideoCapturerSource() override; 40 ~MediaStreamVideoCapturerSource() override;
45 41
46 private: 42 private:
47 friend class CanvasCaptureHandlerTest; 43 friend class CanvasCaptureHandlerTest;
48 friend class MediaStreamVideoCapturerSourceTest; 44 friend class MediaStreamVideoCapturerSourceTest;
(...skipping 15 matching lines...) Expand all
64 void StopSourceImpl() override; 60 void StopSourceImpl() override;
65 base::Optional<media::VideoCaptureFormat> GetCurrentFormatImpl() 61 base::Optional<media::VideoCaptureFormat> GetCurrentFormatImpl()
66 const override; 62 const override;
67 63
68 // RenderFrameObserver implementation. 64 // RenderFrameObserver implementation.
69 void OnDestruct() final {} 65 void OnDestruct() final {}
70 66
71 // Method to bind as RunningCallback in VideoCapturerSource::StartCapture(). 67 // Method to bind as RunningCallback in VideoCapturerSource::StartCapture().
72 void OnRunStateChanged(bool is_running); 68 void OnRunStateChanged(bool is_running);
73 69
74 const char* GetPowerLineFrequencyForTesting() const;
75
76 // The source that provides video frames. 70 // The source that provides video frames.
77 const std::unique_ptr<media::VideoCapturerSource> source_; 71 const std::unique_ptr<media::VideoCapturerSource> source_;
78 72
79 // Indicates whether the capture is in starting. It is set to true by 73 // Indicates whether the capture is in starting. It is set to true by
80 // StartSourceImpl() when starting the capture, and is reset after starting 74 // StartSourceImpl() when starting the capture, and is reset after starting
81 // is completed. 75 // is completed.
82 bool is_capture_starting_ = false; 76 bool is_capture_starting_ = false;
83 77
84 media::VideoCaptureParams capture_params_; 78 media::VideoCaptureParams capture_params_;
85 79
86 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoCapturerSource); 80 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoCapturerSource);
87 }; 81 };
88 82
89 } // namespace content 83 } // namespace content
90 84
91 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_ 85 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_center.cc ('k') | content/renderer/media/media_stream_video_capturer_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698