OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 virtual ~AndroidVideoCapturerDelegate() {} | 27 virtual ~AndroidVideoCapturerDelegate() {} |
28 // Start capturing. The implementation of the delegate must call | 28 // Start capturing. The implementation of the delegate must call |
29 // AndroidVideoCapturer::OnCapturerStarted with the result of this request. | 29 // AndroidVideoCapturer::OnCapturerStarted with the result of this request. |
30 virtual void Start(int width, int height, int framerate, | 30 virtual void Start(int width, int height, int framerate, |
31 AndroidVideoCapturer* capturer) = 0; | 31 AndroidVideoCapturer* capturer) = 0; |
32 | 32 |
33 // Stops capturing. | 33 // Stops capturing. |
34 // The delegate may not call into AndroidVideoCapturer after this call. | 34 // The delegate may not call into AndroidVideoCapturer after this call. |
35 virtual void Stop() = 0; | 35 virtual void Stop() = 0; |
36 | 36 |
37 // Must returns a JSON string "{{width=xxx, height=xxx, framerate = xxx}}" | 37 virtual std::vector<cricket::VideoFormat> GetSupportedFormats() = 0; |
38 virtual std::string GetSupportedFormats() = 0; | |
39 }; | 38 }; |
40 | 39 |
41 // Android implementation of cricket::VideoCapturer for use with WebRtc | 40 // Android implementation of cricket::VideoCapturer for use with WebRtc |
42 // PeerConnection. | 41 // PeerConnection. |
43 class AndroidVideoCapturer : public cricket::VideoCapturer { | 42 class AndroidVideoCapturer : public cricket::VideoCapturer { |
44 public: | 43 public: |
45 explicit AndroidVideoCapturer( | 44 explicit AndroidVideoCapturer( |
46 const rtc::scoped_refptr<AndroidVideoCapturerDelegate>& delegate); | 45 const rtc::scoped_refptr<AndroidVideoCapturerDelegate>& delegate); |
47 virtual ~AndroidVideoCapturer(); | 46 virtual ~AndroidVideoCapturer(); |
48 | 47 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 82 |
84 class FrameFactory; | 83 class FrameFactory; |
85 FrameFactory* frame_factory_; // Owned by cricket::VideoCapturer. | 84 FrameFactory* frame_factory_; // Owned by cricket::VideoCapturer. |
86 | 85 |
87 cricket::CaptureState current_state_; | 86 cricket::CaptureState current_state_; |
88 }; | 87 }; |
89 | 88 |
90 } // namespace webrtc | 89 } // namespace webrtc |
91 | 90 |
92 #endif // WEBRTC_API_ANDROIDVIDEOCAPTURER_H_ | 91 #endif // WEBRTC_API_ANDROIDVIDEOCAPTURER_H_ |
OLD | NEW |