最近在学习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的更多相关文章

  1. webrtc初识

    最近由于项目的需求,开始接触了webrtc这个东西.没想到这东西的门槛还是蛮高的,接下来分享一下我所踩过的坑,希望对以后初次接触这个东西的人有所帮助. webrtc官网 第一步当然是看官方主页了(ww ...

  2. 基于webrtc的资源释放问题(二)

    基于webrtc的资源释放问题(二) ——建立连接的过程中意外中断 应用背景: 我们在打电话的时候会不会遇到这种情况?打电话的时候未接通之前挂掉了电话,或者在接通之后建立的连接的过程中挂掉电话? 特别 ...

  3. WebRTC之带宽控制部分学习(1) ------基本demo的介绍

    转自:http://blog.csdn.net/u013160228/article/details/46392037 WebRTC的代码真是非常之大啊,下载以及编译了我好几天才搞完..... 可以看 ...

  4. 2015GitWebRTC编译实录12

    2015.07.20 libjingle_peerconnection 编译通过[1382/1600 ] CXX obj/talk/app /webrtc/libjingle_peerconnecti ...

  5. webrtc教程

    cdsn博客不支持word文件,所以这里显示不完全.可到本人资源中下载word文档: v0.3:http://download.csdn.net/detail/kl222/6961491 v0.1:h ...

  6. webrtc学习笔记2(Android端demo代码结构)

    最近正在修改webrtc的Android端demo和服务器交互的内容,介绍一下demo的大体结构吧,以便能快速回忆. 环境:Android5.0以上.libjingle_peerconnection_ ...

  7. Android Studio xcode单步调试 WebRTC Android & iOS

    mac环境 如何在 Android Studio 里单步调试 WebRTC Android 的 native 代码. WebRTC 代码下载 depot tools 是 chromium 代码库管理工 ...

  8. webRTC peerconnection_client demo创建VS工程

    编译了webRTC Windows源码之后,想使用编译出来的库写一个demo出来,但是又不知到怎么下手.就想通过源码中带的示例peerconnection_client和peerconnection_ ...

  9. WebRTC 视频对话

    今天聊一下WebRTC.很多开发者,可能会觉得有些陌生,或者直接感觉繁杂.因为WebRTC在iOS上的应用,只是编译都让人很是头痛.这些话,到此为止,以防让了解者失去信心.我们只传播正能量,再多的困难 ...

随机推荐

  1. 获取客户端真实ip

    // 获取客户端真实ip() protected function getIP() { global $ip; if (getenv("HTTP_CLIENT_IP")) $ip ...

  2. shodan:黑客搜索引擎

    Shodan是msfconsole创始人与几个爱好技术的黑客开发的一款黑客搜索引擎,被称为可怕的搜索引擎,详细介绍见百度百科 网站地址:www.shodan.io 免费注册一账号,无账号的话,默认只显 ...

  3. PHP后门新玩法:一款猥琐的PHP后门分析

    0x00 背景 近日,360网站卫士安全团队近期捕获一个基于PHP实现的webshell样本,其巧妙的代码动态生成方式,猥琐的自身页面伪装手法,让我们在分析这个样本的过程中感受到相当多的乐趣.接下来就 ...

  4. 【HDU4585 Shaolin】map的经典运用

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4585 题意大意:很多人想进少林寺,少林寺最开始只有一个和尚,每个人有有一个武力值,若这个人想进少林,必 ...

  5. php课程---面向对象

    面向对象:一:定义类 class Dog { var $name; var $age; var $pinzhong; function Jiao() { echo "{$this->n ...

  6. Json的语法及使用方法

    Json的语法及使用方法 Json(JavaScript Object Notation)对象表示标识,是一种轻量级的数据交换语言,比XML更容易解析,独立于语言和平台. 语法规则: 对象用{}保存 ...

  7. angularJs模糊查询

    html代码 <!DOCTYPE html><html> <head> <meta charset="UTF-8"> <tit ...

  8. unity assert server 与 cache server

    Asset server 其实就是unity提供的版本控制工具,不过我们都转到P4V了,上午尝试了一下,如果小团队使用还是不错的,使用过程大致如下,具体的还是要大伙去官网看喽 服务器安装文件下载: h ...

  9. mysqli_multi_query($link, $sql_w);

    $sql_w = 'INSERT INTO w1 (wint) VALUES (55);'; $sql_w .= 'INSERT INTO w1 (wint) VALUES (505);'; var_ ...

  10. Web标准和搜索引擎优化技术

    1.Web标准不是某一个标准,而是一系列标准的集合.出来网页内容之外,网页主要由三部分组成:结构(Structure).表现(Presenttation)和行为(Behavior).对应的标准也分三方 ...