1. 程式人生 > >webrtc程式碼走讀六(啟動camera)——待整理

webrtc程式碼走讀六(啟動camera)——待整理

一、init camera

1)呼叫棧

MainWnd::WndProc()
->MainWnd::OnMessage()     
->MainWnd::OnDefaultAction()    
->Conductor::ConnectToPeer()     
->Conductor::InitializePeerConnection()
->Conductor::AddStreams()
->Conductor::OpenVideoCaptureDevice()
->WebRtcVideoCapturer::Init

2)具體實現

Conductor::OpenVideoCaptureDevice()

WebRtcVideoDeviceCapturerFactory::Create

二、start camera

1)呼叫棧

MainWnd::WndProc()
->MainWnd::OnMessage()     
->MainWnd::OnDefaultAction()    
->Conductor::ConnectToPeer()     
->Conductor::InitializePeerConnection()
->Conductor::AddStreams()
->PeerConnectionFactory::CreateVideoSource
->VideoCapturerTrackSource::Create
->VideoCapturerTrackSource::Initialize
->VideoCapturer::StartCapturing
->WebRtcVideoCapturer::Start

三、get camera data

1)呼叫棧

videocapturemodule::CaptureInputPin::Receive()
->videocapturemodule::CaptureSinkFilter::ProcessCapturedFrame()
->videocapturemodule::VideoCaptureImpl::IncomingFrame()     
->videocapturemodule::VideoCaptureImpl::DeliverCapturedFrame()     
->WebRtcVideoCapturer::OnFrame()