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

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

Issue 391703002: Implement ConstraintNotSatisfiedError for getusermedia (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add bug id and reviewer Created 6 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 "base/callback.h" 8 #include "base/callback.h"
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
11 #include "base/threading/thread_checker.h" 11 #include "base/threading/thread_checker.h"
12 #include "content/common/media/video_capture.h" 12 #include "content/common/media/video_capture.h"
13 #include "content/renderer/media/media_stream_video_source.h" 13 #include "content/renderer/media/media_stream_video_source.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 // VideoCapturerDelegate is a delegate used by MediaStreamVideoCapturerSource 17 // VideoCapturerDelegate is a delegate used by MediaStreamVideoCapturerSource
18 // for local video capturer. It uses VideoCaptureImplManager to start / stop 18 // for local video capturer. It uses VideoCaptureImplManager to start / stop
19 // and receive I420 frames from Chrome's video capture implementation. 19 // and receive I420 frames from Chrome's video capture implementation.
20 // 20 //
21 // This is a render thread only object. 21 // This is a render thread only object.
22 class CONTENT_EXPORT VideoCapturerDelegate 22 class CONTENT_EXPORT VideoCapturerDelegate
23 : public base::RefCountedThreadSafe<VideoCapturerDelegate> { 23 : public base::RefCountedThreadSafe<VideoCapturerDelegate> {
24 public: 24 public:
25 typedef base::Callback<void(bool running)> RunningCallback; 25 typedef base::Callback<void(content::MediaStreamRequestResult result)>
26 RunningCallback;
26 27
27 explicit VideoCapturerDelegate( 28 explicit VideoCapturerDelegate(
28 const StreamDeviceInfo& device_info); 29 const StreamDeviceInfo& device_info);
29 30
30 // Collects the formats that can currently be used. 31 // Collects the formats that can currently be used.
31 // |max_requested_height| and |max_requested_width| is used by Tab and Screen 32 // |max_requested_height| and |max_requested_width| is used by Tab and Screen
32 // capture to decide what resolution to generate. 33 // capture to decide what resolution to generate.
33 // |callback| is triggered when the formats have been collected. 34 // |callback| is triggered when the formats have been collected.
34 virtual void GetCurrentSupportedFormats( 35 virtual void GetCurrentSupportedFormats(
35 int max_requested_width, 36 int max_requested_width,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 private: 115 private:
115 // The delegate that provides video frames. 116 // The delegate that provides video frames.
116 scoped_refptr<VideoCapturerDelegate> delegate_; 117 scoped_refptr<VideoCapturerDelegate> delegate_;
117 118
118 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoCapturerSource); 119 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoCapturerSource);
119 }; 120 };
120 121
121 } // namespace content 122 } // namespace content
122 123
123 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_ 124 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698