OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 // Possibly restarts the capturer. If |options| is set to kRequestRestart, | 73 // Possibly restarts the capturer. If |options| is set to kRequestRestart, |
74 // the CaptureManager chooses whether this request can be handled with the | 74 // the CaptureManager chooses whether this request can be handled with the |
75 // current state or if a restart is actually needed. If |options| is set to | 75 // current state or if a restart is actually needed. If |options| is set to |
76 // kForceRestart, the capturer is restarted. | 76 // kForceRestart, the capturer is restarted. |
77 virtual bool RestartVideoCapture(VideoCapturer* video_capturer, | 77 virtual bool RestartVideoCapture(VideoCapturer* video_capturer, |
78 const VideoFormat& previous_format, | 78 const VideoFormat& previous_format, |
79 const VideoFormat& desired_format, | 79 const VideoFormat& desired_format, |
80 RestartOptions options); | 80 RestartOptions options); |
81 | 81 |
82 virtual bool AddVideoRenderer(VideoCapturer* video_capturer, | 82 virtual void AddVideoSink(VideoCapturer* video_capturer, |
83 VideoRenderer* video_renderer); | 83 rtc::VideoSinkInterface<VideoFrame>* sink); |
84 virtual bool RemoveVideoRenderer(VideoCapturer* video_capturer, | 84 virtual void RemoveVideoSink(VideoCapturer* video_capturer, |
85 VideoRenderer* video_renderer); | 85 rtc::VideoSinkInterface<VideoFrame>* sink); |
86 | 86 |
87 sigslot::repeater2<VideoCapturer*, CaptureState> SignalCapturerStateChange; | 87 sigslot::repeater2<VideoCapturer*, CaptureState> SignalCapturerStateChange; |
88 | 88 |
89 private: | 89 private: |
90 typedef std::map<VideoCapturer*, VideoCapturerState*> CaptureStates; | 90 typedef std::map<VideoCapturer*, VideoCapturerState*> CaptureStates; |
91 | 91 |
92 bool IsCapturerRegistered(VideoCapturer* video_capturer) const; | 92 bool IsCapturerRegistered(VideoCapturer* video_capturer) const; |
93 bool RegisterVideoCapturer(VideoCapturer* video_capturer); | 93 bool RegisterVideoCapturer(VideoCapturer* video_capturer); |
94 void UnregisterVideoCapturer(VideoCapturerState* capture_state); | 94 void UnregisterVideoCapturer(VideoCapturerState* capture_state); |
95 | 95 |
96 bool StartWithBestCaptureFormat(VideoCapturerState* capture_info, | 96 bool StartWithBestCaptureFormat(VideoCapturerState* capture_info, |
97 VideoCapturer* video_capturer); | 97 VideoCapturer* video_capturer); |
98 | 98 |
99 VideoCapturerState* GetCaptureState(VideoCapturer* video_capturer) const; | 99 VideoCapturerState* GetCaptureState(VideoCapturer* video_capturer) const; |
100 CaptureRenderAdapter* GetAdapter(VideoCapturer* video_capturer) const; | 100 CaptureRenderAdapter* GetAdapter(VideoCapturer* video_capturer) const; |
101 | 101 |
102 rtc::ThreadChecker thread_checker_; | 102 rtc::ThreadChecker thread_checker_; |
103 CaptureStates capture_states_; | 103 CaptureStates capture_states_; |
104 }; | 104 }; |
105 | 105 |
106 } // namespace cricket | 106 } // namespace cricket |
107 | 107 |
108 #endif // TALK_MEDIA_BASE_CAPTUREMANAGER_H_ | 108 #endif // TALK_MEDIA_BASE_CAPTUREMANAGER_H_ |
OLD | NEW |