OLD | NEW |
---|---|
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(MediaStreamRequestResult result)> RunningCallback; |
26 | 26 |
27 explicit VideoCapturerDelegate( | 27 explicit VideoCapturerDelegate( |
28 const StreamDeviceInfo& device_info); | 28 const StreamDeviceInfo& device_info); |
miu
2014/07/30 19:37:23
Since you're modifying this file, can you put this
jiajia.qin
2014/07/31 13:43:00
Done.
| |
29 | 29 |
30 // Collects the formats that can currently be used. | 30 // Collects the formats that can currently be used. |
31 // |max_requested_height| and |max_requested_width| is used by Tab and Screen | 31 // |max_requested_height| and |max_requested_width| is used by Tab and Screen |
32 // capture to decide what resolution to generate. | 32 // capture to decide what resolution to generate. |
33 // |callback| is triggered when the formats have been collected. | 33 // |callback| is triggered when the formats have been collected. |
34 virtual void GetCurrentSupportedFormats( | 34 virtual void GetCurrentSupportedFormats( |
35 int max_requested_width, | 35 int max_requested_width, |
36 int max_requested_height, | 36 int max_requested_height, |
37 const VideoCaptureDeviceFormatsCB& callback); | 37 const VideoCaptureDeviceFormatsCB& callback); |
38 | 38 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
113 private: | 113 private: |
114 // The delegate that provides video frames. | 114 // The delegate that provides video frames. |
115 scoped_refptr<VideoCapturerDelegate> delegate_; | 115 scoped_refptr<VideoCapturerDelegate> delegate_; |
116 | 116 |
117 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoCapturerSource); | 117 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoCapturerSource); |
118 }; | 118 }; |
119 | 119 |
120 } // namespace content | 120 } // namespace content |
121 | 121 |
122 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_ | 122 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_ |
OLD | NEW |