| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 CaptureManager(); | 48 CaptureManager(); |
| 49 virtual ~CaptureManager(); | 49 virtual ~CaptureManager(); |
| 50 | 50 |
| 51 virtual bool StartVideoCapture(VideoCapturer* video_capturer, | 51 virtual bool StartVideoCapture(VideoCapturer* video_capturer, |
| 52 const VideoFormat& desired_format); | 52 const VideoFormat& desired_format); |
| 53 virtual bool StopVideoCapture(VideoCapturer* video_capturer, | 53 virtual bool StopVideoCapture(VideoCapturer* video_capturer, |
| 54 const VideoFormat& format); | 54 const VideoFormat& format); |
| 55 | 55 |
| 56 // Possibly restarts the capturer. If |options| is set to kRequestRestart, |
| 57 // the CaptureManager chooses whether this request can be handled with the |
| 58 // current state or if a restart is actually needed. If |options| is set to |
| 59 // kForceRestart, the capturer is restarted. |
| 60 virtual bool RestartVideoCapture(VideoCapturer* video_capturer, |
| 61 const VideoFormat& previous_format, |
| 62 const VideoFormat& desired_format, |
| 63 RestartOptions options); |
| 64 |
| 56 virtual void AddVideoSink(VideoCapturer* video_capturer, | 65 virtual void AddVideoSink(VideoCapturer* video_capturer, |
| 57 rtc::VideoSinkInterface<VideoFrame>* sink); | 66 rtc::VideoSinkInterface<VideoFrame>* sink); |
| 58 virtual void RemoveVideoSink(VideoCapturer* video_capturer, | 67 virtual void RemoveVideoSink(VideoCapturer* video_capturer, |
| 59 rtc::VideoSinkInterface<VideoFrame>* sink); | 68 rtc::VideoSinkInterface<VideoFrame>* sink); |
| 60 | 69 |
| 61 sigslot::repeater2<VideoCapturer*, CaptureState> SignalCapturerStateChange; | 70 sigslot::repeater2<VideoCapturer*, CaptureState> SignalCapturerStateChange; |
| 62 | 71 |
| 63 private: | 72 private: |
| 64 typedef std::map<VideoCapturer*, VideoCapturerState*> CaptureStates; | 73 typedef std::map<VideoCapturer*, VideoCapturerState*> CaptureStates; |
| 65 | 74 |
| 66 bool IsCapturerRegistered(VideoCapturer* video_capturer) const; | 75 bool IsCapturerRegistered(VideoCapturer* video_capturer) const; |
| 67 bool RegisterVideoCapturer(VideoCapturer* video_capturer); | 76 bool RegisterVideoCapturer(VideoCapturer* video_capturer); |
| 68 void UnregisterVideoCapturer(VideoCapturerState* capture_state); | 77 void UnregisterVideoCapturer(VideoCapturerState* capture_state); |
| 69 | 78 |
| 70 bool StartWithBestCaptureFormat(VideoCapturerState* capture_info, | 79 bool StartWithBestCaptureFormat(VideoCapturerState* capture_info, |
| 71 VideoCapturer* video_capturer); | 80 VideoCapturer* video_capturer); |
| 72 | 81 |
| 73 VideoCapturerState* GetCaptureState(VideoCapturer* video_capturer) const; | 82 VideoCapturerState* GetCaptureState(VideoCapturer* video_capturer) const; |
| 74 | 83 |
| 75 rtc::ThreadChecker thread_checker_; | 84 rtc::ThreadChecker thread_checker_; |
| 76 CaptureStates capture_states_; | 85 CaptureStates capture_states_; |
| 77 }; | 86 }; |
| 78 | 87 |
| 79 } // namespace cricket | 88 } // namespace cricket |
| 80 | 89 |
| 81 #endif // WEBRTC_MEDIA_BASE_CAPTUREMANAGER_H_ | 90 #endif // WEBRTC_MEDIA_BASE_CAPTUREMANAGER_H_ |
| OLD | NEW |