webrtc打开和关闭摄像头

打开摄像头:关闭摄像头:
分类: 其他 发布时间: 10-26 18:01 阅读次数: 0

webrtc打开和关闭麦克风

打开麦克风:关闭麦克风:
分类: 其他 发布时间: 10-26 18:01 阅读次数: 0

Licode服务与启动过程分析

licode需要手动启动的服务有四个,这四个服务之间通过mq相互调用和通信nuve.js,用于资源管理、数据库管理#!/usr/bin/env bashset -eSCRIPT=`pwd`/$0FILENAME=`basename $SCRIPT`PATHNAME=`dirname $SCRIPT`ROOT=$PATHNAME/..NVM_CHECK="$ROOT"/scripts/checkNvm.shCURRENT_DIR=`pwd`. $NVM_CHECKcd $P
分类: 其他 发布时间: 10-26 18:01 阅读次数: 0

WebRtcConnection源码分析(一)

licode的核心WebRtcConnection模块,起到拉流的作用DEFINE_LOGGER(WebRtcConnection, "WebRtcConnection");// webRtcConnection的构造函数// 参数worker,io_worker,conection_id, ice_config, rtp_mappings, ext_mappings,listenerWebRtcConnection::WebRtcConnection(std::shared_ptr<
分类: 其他 发布时间: 10-26 18:01 阅读次数: 0

WebRtcConnection源码分析(二)

// 设置远端sdp信息boost::future<void> WebRtcConnection::setRemoteSdpInfo( std::shared_ptr<SdpInfo> sdp) { std::weak_ptr<WebRtcConnection> weak_this = shared_from_this(); auto task_promise = std::make_shared<boost::promise<void&g.
分类: 其他 发布时间: 10-26 18:01 阅读次数: 0

WebRtcConnection源码分析(三)

WebRtcConnection源码分析,分析每个函数的作用// 异步加入远端candidateboost::future<void> WebRtcConnection::addRemoteCandidate(std::string mid, int mLineIndex, std::string sdp) { return asyncTask([mid, mLineIndex, sdp] (std::shared_ptr<WebRtcConnection> connec
分类: 其他 发布时间: 10-26 18:01 阅读次数: 0

MediaStream源码分析(一)

针对MediaStream进行分析:// MediaStream构造函数MediaStream::MediaStream(std::shared_ptr<Worker> worker, std::shared_ptr<WebRtcConnection> connection, const std::string& media_stream_id, const std::string& media_stream_label, bool is_pu
分类: 其他 发布时间: 10-26 18:01 阅读次数: 0

MediaStream源码分析(二)

继续对MediaStream进行分析:// 初始化log_stats,统计状态信息void MediaStream::initializeStats() { log_stats_->getNode().insertStat("streamId", StringStat{getId()}); log_stats_->getNode().insertStat("audioBitrate", CumulativeStat{0}); log_stats_->getNode().
分类: 其他 发布时间: 10-26 18:01 阅读次数: 0

MediaStream源码分析(三)

MediaStream有点难懂的部分:// pipeline_读取传进来的packetvoid MediaStream::onTransportData(std::shared_ptr<DataPacket> incoming_packet, Transport *transport) { if ((audio_sink_ == nullptr && video_sink_ == nullptr && fb_sink_ == nullptr)) {
分类: 其他 发布时间: 10-26 18:01 阅读次数: 0

ffmpeg遇到Non-monotonous DTS in output stream的问题

在执行命令行:./ffmpeg -f concat -safe 0 -i filelist.txt out.mp4遇到如下问题,得到的文件音频某一段没有声音:[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963852, current: 36597661; changing to 36963853. This may result in incorrect timestamps in t
分类: 其他 发布时间: 10-26 18:01 阅读次数: 0

OneToManyProcessor源码分析

对OneToManyProcessor模块分析: DEFINE_LOGGER(OneToManyProcessor, "OneToManyProcessor"); // OneToManyProcessor的构造函数 OneToManyProcessor::OneToManyProcessor() : feedbackSink_{nullptr} { ELOG_DEBUG("OneToManyProcessor constructor"); } // OneToMan.
分类: 其他 发布时间: 10-26 18:01 阅读次数: 0

windows dump分析步骤

windbg调试步骤:1、指定pdb路径:SRV*C:\symbols*http://msdl.microsoft.com/download/symbols;PDB目录2、加载dump文件3、切换上下文:.ecxr4、查看堆栈:kp5、分析:!analyze -vvs2015调试步骤:首先把dump文件放到软件安装目录下1、设定符号路径2、运行3、崩溃中断4、浏览源文件...
分类: 其他 发布时间: 10-26 18:01 阅读次数: 0

libnice调用流程分析

libnice常用函数调用流程:#include <agent.h>guint stream_id;gchar buffer[] = "hello world!";gchar *ufrag = NULL, *pwd = NULL;gchar *remote_ufrag, *remote_pwd;GSList *lcands = NULL;// Create a nice agent, passing in the global default GMainContext.N
分类: 其他 发布时间: 10-26 18:01 阅读次数: 0

DtlsTransport源码分析

对DtlsTransport源码分析:TimeoutChecker::TimeoutChecker(DtlsTransport* transport, dtls::DtlsSocketContext* ctx) : transport_(transport), socket_context_(ctx), check_seconds_(kInitialSecsPerTimeoutCheck), max_checks_(kMaxTimeoutChecks), schedul
分类: 其他 发布时间: 10-26 18:01 阅读次数: 0

LibNiceConnection源码分析

void cb_nice_recv(NiceAgent* agent, guint stream_id, guint component_id, guint len, gchar* buf, gpointer user_data) { if (user_data == NULL || len == 0) { return; } LibNiceConnection* nicecon = reinterpret_cast<LibNiceConnection*>(user.
分类: 其他 发布时间: 10-26 18:01 阅读次数: 0

NicerConnection源码分析

static bool nicer_initialized = false;static std::mutex nicer_initialization_mutex;static int nr_ice_crypto_openssl_random_bytes(UCHAR *buf, int len) { RAND_bytes(buf, len); return 0;}static int nr_ice_crypto_openssl_hmac_sha1(UCHAR *key, int...
分类: 其他 发布时间: 10-26 18:01 阅读次数: 0

SrtpChannel源码分析

bool SrtpChannel::initialized = false;boost::mutex SrtpChannel::sessionMutex_;constexpr int kKeyStringLength = 32;uint8_t nibble_to_hex_char(uint8_t nibble) { char buf[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ...
分类: 其他 发布时间: 10-26 18:01 阅读次数: 0

DtlsSocketContext源码分析

const char* DtlsSocketContext::DefaultSrtpProfile = "SRTP_AES128_CM_SHA1_80";X509 *DtlsSocketContext::mCert = nullptr;EVP_PKEY *DtlsSocketContext::privkey = nullptr;static const int KEY_LENGTH = 1024;static std::mutex* array_mutex;DEFINE_LO...
分类: 其他 发布时间: 10-26 18:01 阅读次数: 0

DtlsSocket源码分析

DtlsSocket::DtlsSocket(DtlsSocketContext* socketContext, enum SocketType type): mSocketContext(socketContext), mSocketType(type), mHandshakeCompleted(false) { ELOG_DEBUG("Creating Dtls Socket"); mSocketCont...
分类: 其他 发布时间: 10-26 18:01 阅读次数: 0

swift学习笔记1

import Cocoavar someInts:[Int] = [10, 20, 30]for index in someInts { print( "index 的值为 \(index)")}for index in 2...10 { print("\(index) 乘于 5 为:\(index * 5)")}// 使用字符串字面量var stringA = "Hello, World!"print( stringA )// String 实例化var s.
分类: 其他 发布时间: 10-26 18:01 阅读次数: 0