libjingle_peerconnection
最近在学习libjingle_peeconnection的代码
不知道应该如何写起,就先从类和各种数据结构列起吧
PeerConnectionFactory:
在创建PeerConnectionFactory的实例的时候会创建两个thread ( signaling_thread_ 和 worker_thread_ 类型为rtc::Thread),目前还不知道有和作用,两者的关系
class PeerConnectionFactory : public PeerConnectionFactoryInterface,
public rtc::MessageHandler {
public:
virtual void SetOptions(const Options& options) {
options_ = options;
}
virtual rtc::scoped_refptr<PeerConnectionInterface>
CreatePeerConnection(
const PeerConnectionInterface::RTCConfiguration& configuration,
const MediaConstraintsInterface* constraints,
PortAllocatorFactoryInterface* allocator_factory,
DTLSIdentityServiceInterface* dtls_identity_service,
PeerConnectionObserver* observer);
bool Initialize();
virtual rtc::scoped_refptr<MediaStreamInterface>
CreateLocalMediaStream(const std::string& label);
virtual rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource(
const MediaConstraintsInterface* constraints);
virtual rtc::scoped_refptr<VideoSourceInterface> CreateVideoSource(
cricket::VideoCapturer* capturer,
const MediaConstraintsInterface* constraints);
virtual rtc::scoped_refptr<VideoTrackInterface>
CreateVideoTrack(const std::string& id,
VideoSourceInterface* video_source);
virtual rtc::scoped_refptr<AudioTrackInterface>
CreateAudioTrack(const std::string& id,
AudioSourceInterface* audio_source);
virtual bool StartAecDump(rtc::PlatformFile file);
virtual cricket::ChannelManager* channel_manager();
virtual rtc::Thread* signaling_thread();
virtual rtc::Thread* worker_thread();
const Options& options() const { return options_; }
protected:
PeerConnectionFactory();
PeerConnectionFactory(
rtc::Thread* worker_thread,
rtc::Thread* signaling_thread,
AudioDeviceModule* default_adm,
cricket::WebRtcVideoEncoderFactory* video_encoder_factory,
cricket::WebRtcVideoDecoderFactory* video_decoder_factory);
virtual ~PeerConnectionFactory();
private:
bool Initialize_s();
void Terminate_s();
rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource_s(
const MediaConstraintsInterface* constraints);
rtc::scoped_refptr<VideoSourceInterface> CreateVideoSource_s(
cricket::VideoCapturer* capturer,
const MediaConstraintsInterface* constraints);
rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection_s(
const PeerConnectionInterface::RTCConfiguration& configuration,
const MediaConstraintsInterface* constraints,
PortAllocatorFactoryInterface* allocator_factory,
DTLSIdentityServiceInterface* dtls_identity_service,
PeerConnectionObserver* observer);
bool StartAecDump_s(rtc::PlatformFile file);
// Implements rtc::MessageHandler.
void OnMessage(rtc::Message* msg);
bool owns_ptrs_;
rtc::Thread* signaling_thread_;
rtc::Thread* worker_thread_;
Options options_;
rtc::scoped_refptr<PortAllocatorFactoryInterface> allocator_factory_;
// External Audio device used for audio playback.
rtc::scoped_refptr<AudioDeviceModule> default_adm_;
rtc::scoped_ptr<cricket::ChannelManager> channel_manager_;
// External Video encoder factory. This can be NULL if the client has not
// injected any. In that case, video engine will use the internal SW encoder.
rtc::scoped_ptr<cricket::WebRtcVideoEncoderFactory>
video_encoder_factory_;
// External Video decoder factory. This can be NULL if the client has not
// injected any. In that case, video engine will use the internal SW decoder.
rtc::scoped_ptr<cricket::WebRtcVideoDecoderFactory>
video_decoder_factory_;
};
libjingle_peerconnection的更多相关文章
- webrtc初识
最近由于项目的需求,开始接触了webrtc这个东西.没想到这东西的门槛还是蛮高的,接下来分享一下我所踩过的坑,希望对以后初次接触这个东西的人有所帮助. webrtc官网 第一步当然是看官方主页了(ww ...
- 基于webrtc的资源释放问题(二)
基于webrtc的资源释放问题(二) ——建立连接的过程中意外中断 应用背景: 我们在打电话的时候会不会遇到这种情况?打电话的时候未接通之前挂掉了电话,或者在接通之后建立的连接的过程中挂掉电话? 特别 ...
- WebRTC之带宽控制部分学习(1) ------基本demo的介绍
转自:http://blog.csdn.net/u013160228/article/details/46392037 WebRTC的代码真是非常之大啊,下载以及编译了我好几天才搞完..... 可以看 ...
- 2015GitWebRTC编译实录12
2015.07.20 libjingle_peerconnection 编译通过[1382/1600 ] CXX obj/talk/app /webrtc/libjingle_peerconnecti ...
- webrtc教程
cdsn博客不支持word文件,所以这里显示不完全.可到本人资源中下载word文档: v0.3:http://download.csdn.net/detail/kl222/6961491 v0.1:h ...
- webrtc学习笔记2(Android端demo代码结构)
最近正在修改webrtc的Android端demo和服务器交互的内容,介绍一下demo的大体结构吧,以便能快速回忆. 环境:Android5.0以上.libjingle_peerconnection_ ...
- Android Studio xcode单步调试 WebRTC Android & iOS
mac环境 如何在 Android Studio 里单步调试 WebRTC Android 的 native 代码. WebRTC 代码下载 depot tools 是 chromium 代码库管理工 ...
- webRTC peerconnection_client demo创建VS工程
编译了webRTC Windows源码之后,想使用编译出来的库写一个demo出来,但是又不知到怎么下手.就想通过源码中带的示例peerconnection_client和peerconnection_ ...
- WebRTC 视频对话
今天聊一下WebRTC.很多开发者,可能会觉得有些陌生,或者直接感觉繁杂.因为WebRTC在iOS上的应用,只是编译都让人很是头痛.这些话,到此为止,以防让了解者失去信心.我们只传播正能量,再多的困难 ...
随机推荐
- OSI七层&TCP&IP协议
OSI七层: OSI七层与ICP/IP概念层的对应: ICP/IP概念层上的网络设备: IP(Internet Protocol网际协议):计算机之间的通信 IP(网络协议)位于网络层,作用是把各种数 ...
- 求最大连续bit数
描述 功能: 求一个byte数字对应的二进制数字中1的最大连续数,例如3的二进制为00000011,最大连续2个1 输入: 一个byte型的数字 输出: 无 返回: 对应的二进制数 ...
- BizTalk开发系列(二十七) 异常管理中的数据编码
在BizTalk的异常管理解决方案中.大部分是通过订阅相关的升级属性来接收消息,并在自定义的流程或发送端口进行处理.但不管怎样,一般会定义统一的 错误消息Schema,这样不仅可以让我们通过异常信息快 ...
- 解决thrift: ···No such file or directory问题
感谢Anker分享:error while loading shared libraries: xxx.so.x" 错误的原因和解决办法 今天在装thrift的时候遇到一个这样的问题: ro ...
- rabbitmq之partitions
集群为了保证数据一致性,在同步数据的同时也会通过节点之间的心跳通信来保证对方存活.那如果集群节点通信异常会发生什么,系统如何保障正常提供服务,使用何种策略回复呢? rabbitmq提供的处理脑裂的方法 ...
- iOS摄像头和相册-UIImagePickerController常用操作
在一些应用中,我们需要用到iOS设备的摄像头进行拍照,视频.并且从相册中选取我们需要的图片或者视频. 关于iOS摄像头和相册的应用,可以使用UIImagePickerController类来完成控制. ...
- Rewrite服务器和robots文件屏蔽动态页面
Rewrite服务器使用robots文件屏蔽动态页面.
- SSD果然劲爆!
前两周入手了一块浦科特128G盘,不说多了,有图为证 以前把机械盘放在主硬盘位的时候,鲁大师显示是SATA II接口,现在把SSD放在主硬盘位,显示居然是SATA III接口了,看上面测试,确实是II ...
- 原生js下拉菜单
var oDiv = document.getElementById("sunav"); var oLi = oDiv.getElementsByClassName("s ...
- ubuntu /etc/network/interfaces 中配置虚拟链路
ubuntu /etc/network/interfaces 中配置虚拟链路 平常做一些关于网络的测试时,像一些需要在二层上运行的功能,一个网卡不足够的情况下,可使用 ip link 工具加一些虚拟的 ...