SetLocalDescription
2016-11-09 08:55:35 0 举报
`SetLocalDescription`是一个在WebRTC通信中常用的方法,主要用于设置本地的音视频描述。这个描述包含了音频和视频的详细信息,如编码格式、采样率等。当本地设备捕获到音视频数据后,会生成一个描述,然后通过`SetLocalDescription`方法设置到本地。同时,这个描述也会被发送到远端设备,远端设备会根据这个描述来解码音视频数据。如果本地设备和远端设备的描述不一致,那么音视频就无法正常播放。因此,`SetLocalDescription`方法对于保证音视频通话的顺利进行非常重要。
作者其他创作
大纲/内容
int WebRtcVoiceEngine::CreateVoEChannel()
只用到了content-name
BaseChannel
ChannelOwner ChannelManager::CreateChannelInternal(const Config& config)
AudioCodingModule* AudioCodingModule::Create(const Config& config)
lamda表达式,音视频分开处理
VoiceChannel
将编码信息存在basechannel中
bool WebRtcVoiceMediaChannel::AddSendStream(const StreamParams& sp)
create
ChannelManager
voice_channels_:VoiceChannels media_engine_:MediaEngineInterface*//与引擎层相关联
2.视频
session - channel - engine - modulestream & track
会更新PeerConnection里的std::vectorrtc::scoped_refptr senders_; TrackInfos local_audio_tracks_; TrackInfos local_video_tracks_;
bool WebRtcSession::CreateChannels(const SessionDescription* desc)
ChannelOwner ChannelManager::CreateChannel(const Config& external_config)
bool WebRtcSession::CreateVoiceChannel(const cricket::ContentInfo* content)
创建channel,有transport和media rtc::scoped_ptr voice_channel_;cricket::ChannelManager* channel_manager_;
1.音频
int WebRtcVoiceMediaChannel::CreateVoEChannel()
WebRtcSession
voice_channel_:VoiceChannel*channel_manager_:ChannelManager* media_controller_:MediaControllerInterface* transport_controller_:TransportControlleraudio_options_:AudioOptions
CreateChannels(const cricket::SessionDescription* desc):bool CreateVoiceChannel(const cricket::ContentInfo* content):bool
TransportChannel
bool WebRtcVideoChannel2::AddSendStream(const StreamParams& sp)
int VoEBaseImpl::CreateChannel(const Config& config)
0 条评论
下一页