webrtc代码走读十二(启动camera)

一、init camera

1)调用栈

wWinMain
->MainWnd::WndProc
->MainWnd::OnMessage
->MainWnd::OnDefaultAction    
->Conductor::ConnectToPeer
->Conductor::InitializePeerConnection
->Conductor::AddStreams
->Conductor::OpenVideoCaptureDevice
->WebRtcVideoDeviceCapturerFactory::Create
->WebRtcVideoCapturer::Init
->WebRtcVcmFactory::Create
->VideoCaptureFactory::Create
->videocapturemodule::VideoCaptureImpl::Create
->videocapturemodule::VideoCaptureDS::Init

2)具体实现

Conductor::OpenVideoCaptureDevice()

webrtc代码走读十二(启动camera)_第1张图片

WebRtcVideoDeviceCapturerFactory::Create

webrtc代码走读十二(启动camera)_第2张图片

二、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    
->videocapturemodule::VideoCaptureDS::StartCapture

webrtc代码走读十二(启动camera)_第3张图片

三、get camera data

1)调用栈

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

 

 

 

 

你可能感兴趣的:(webrtc,webrtc代码走读)