Lines Matching refs:video_capturer
44 static VideoCapturerState* Create(VideoCapturer* video_capturer);
49 VideoFormat GetHighestFormat(VideoCapturer* video_capturer) const;
59 return adapter()->video_capturer(); in GetVideoCapturer()
91 VideoCapturerState* VideoCapturerState::Create(VideoCapturer* video_capturer) { in Create() argument
92 CaptureRenderAdapter* adapter = CaptureRenderAdapter::Create(video_capturer); in Create()
129 VideoCapturer* video_capturer) const { in GetHighestFormat()
183 bool CaptureManager::StartVideoCapture(VideoCapturer* video_capturer, in StartVideoCapture() argument
189 if (!video_capturer) { in StartVideoCapture()
192 VideoCapturerState* capture_state = GetCaptureState(video_capturer); in StartVideoCapture()
203 if (!RegisterVideoCapturer(video_capturer)) { in StartVideoCapture()
206 capture_state = GetCaptureState(video_capturer); in StartVideoCapture()
209 if (!StartWithBestCaptureFormat(capture_state, video_capturer)) { in StartVideoCapture()
216 bool CaptureManager::StopVideoCapture(VideoCapturer* video_capturer, in StopVideoCapture() argument
219 VideoCapturerState* capture_state = GetCaptureState(video_capturer); in StopVideoCapture()
235 VideoCapturer* video_capturer, in RestartVideoCapture() argument
240 if (!IsCapturerRegistered(video_capturer)) { in RestartVideoCapture()
245 if (!StartVideoCapture(video_capturer, desired_format)) { in RestartVideoCapture()
251 if (!StopVideoCapture(video_capturer, previous_format)) { in RestartVideoCapture()
255 StopVideoCapture(video_capturer, desired_format); in RestartVideoCapture()
261 VideoCapturerState* capture_state = GetCaptureState(video_capturer); in RestartVideoCapture()
265 capture_state->GetHighestFormat(video_capturer); in RestartVideoCapture()
267 if (video_capturer->GetBestCaptureFormat(highest_asked_format, in RestartVideoCapture()
269 if (!video_capturer->Restart(capture_format)) { in RestartVideoCapture()
290 bool CaptureManager::AddVideoRenderer(VideoCapturer* video_capturer, in AddVideoRenderer() argument
293 if (!video_capturer || !video_renderer) { in AddVideoRenderer()
296 CaptureRenderAdapter* adapter = GetAdapter(video_capturer); in AddVideoRenderer()
303 bool CaptureManager::RemoveVideoRenderer(VideoCapturer* video_capturer, in RemoveVideoRenderer() argument
306 if (!video_capturer || !video_renderer) { in RemoveVideoRenderer()
309 CaptureRenderAdapter* adapter = GetAdapter(video_capturer); in RemoveVideoRenderer()
316 bool CaptureManager::IsCapturerRegistered(VideoCapturer* video_capturer) const { in IsCapturerRegistered()
318 return GetCaptureState(video_capturer) != NULL; in IsCapturerRegistered()
321 bool CaptureManager::RegisterVideoCapturer(VideoCapturer* video_capturer) { in RegisterVideoCapturer() argument
324 VideoCapturerState::Create(video_capturer); in RegisterVideoCapturer()
328 capture_states_[video_capturer] = capture_state; in RegisterVideoCapturer()
329 SignalCapturerStateChange.repeat(video_capturer->SignalStateChange); in RegisterVideoCapturer()
336 VideoCapturer* video_capturer = capture_state->GetVideoCapturer(); in UnregisterVideoCapturer() local
337 capture_states_.erase(video_capturer); in UnregisterVideoCapturer()
351 SignalCapturerStateChange.stop(video_capturer->SignalStateChange); in UnregisterVideoCapturer()
352 if (video_capturer->IsRunning()) { in UnregisterVideoCapturer()
353 video_capturer->Stop(); in UnregisterVideoCapturer()
354 SignalCapturerStateChange(video_capturer, CS_STOPPED); in UnregisterVideoCapturer()
359 VideoCapturerState* capture_state, VideoCapturer* video_capturer) { in StartWithBestCaptureFormat() argument
362 capture_state->GetHighestFormat(video_capturer); in StartWithBestCaptureFormat()
364 if (!video_capturer->GetBestCaptureFormat(highest_asked_format, in StartWithBestCaptureFormat()
371 video_capturer->GetSupportedFormats(); in StartWithBestCaptureFormat()
382 return video_capturer->StartCapturing(capture_format); in StartWithBestCaptureFormat()
386 VideoCapturer* video_capturer) const { in GetCaptureState()
388 CaptureStates::const_iterator iter = capture_states_.find(video_capturer); in GetCaptureState()
396 VideoCapturer* video_capturer) const { in GetAdapter()
398 VideoCapturerState* capture_state = GetCaptureState(video_capturer); in GetAdapter()