爱技术爱生活
这个作者很懒,什么都没留下…
展开
-
libvpx的编译过程
libvpx编译过程:wget https://github.com/webmproject/libvpx/archive/v1.6.1.zipunzip libvpx-1.6.1.zipcd libvpx-1.6.1/./configure --prefix=/home/v/workspace/libvpx-1.6.1/build_lib --enable-realtime-only --enable-pic --enable-error-concealment --enable-examp..原创 2020-11-21 21:33:15 · 1249 阅读 · 0 评论 -
ffmpeg 4.2编译出现recompile with -fPIC问题
编译ffmpeg的libavcodec库时出现如下报错:/usr/bin/ld: libavcodec/mqc.o: relocation R_X86_64_32 against `.rodata’ can not be used when making a shared object; recompile with -fPIClibavcodec/mqc.o: error adding symbols: Bad valuecollect2: error: ld returned 1 exit st原创 2020-11-21 21:09:45 · 1749 阅读 · 1 评论 -
Licode入门学习:DtlsSocket源码分析
DtlsSocket::DtlsSocket(DtlsSocketContext* socketContext, enum SocketType type): mSocketContext(socketContext), mSocketType(type), mHandshakeCompleted(false) { ELOG_DEBUG("Creating Dtls Socket"); mSocketCont...原创 2020-09-02 15:17:53 · 416 阅读 · 0 评论 -
Licode入门学习: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...原创 2020-09-02 15:16:28 · 278 阅读 · 0 评论 -
Licode入门学习: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', ...原创 2020-09-02 15:12:32 · 221 阅读 · 0 评论 -
Licode入门学习: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...原创 2020-09-02 15:08:45 · 272 阅读 · 0 评论 -
Licode入门学习: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.原创 2020-09-02 15:06:57 · 565 阅读 · 0 评论 -
Licode入门学习:DtlsTransport源码分析
对DtlsTransport源码分析:TimeoutChecker::TimeoutChecker(DtlsTransport* transport, dtls::DtlsSocketContext* ctx) : transport_(transport), socket_context_(ctx), check_seconds_(kInitialSecsPerTimeoutCheck), max_checks_(kMaxTimeoutChecks), schedul原创 2020-09-01 16:07:24 · 609 阅读 · 0 评论 -
Licode入门学习: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原创 2020-08-31 15:57:46 · 2111 阅读 · 1 评论 -
Licode入门学习:OneToManyProcessor源码分析
对OneToManyProcessor模块分析: DEFINE_LOGGER(OneToManyProcessor, "OneToManyProcessor"); // OneToManyProcessor的构造函数 OneToManyProcessor::OneToManyProcessor() : feedbackSink_{nullptr} { ELOG_DEBUG("OneToManyProcessor constructor"); } // OneToMan.原创 2020-08-28 14:54:06 · 417 阅读 · 0 评论 -
Licode入门学习:MediaStream源码分析(三)
MediaStream有点难懂的部分:// pipeline_读取传进来的packetvoid MediaStream::onTransportData(std::shared_ptr<DataPacket> incoming_packet, Transport *transport) { if ((audio_sink_ == nullptr && video_sink_ == nullptr && fb_sink_ == nullptr)) {原创 2020-08-27 17:58:13 · 329 阅读 · 0 评论 -
Licode入门学习:MediaStream源码分析(二)
继续对MediaStream进行分析:// 初始化log_stats,统计状态信息void MediaStream::initializeStats() { log_stats_->getNode().insertStat("streamId", StringStat{getId()}); log_stats_->getNode().insertStat("audioBitrate", CumulativeStat{0}); log_stats_->getNode().原创 2020-08-27 16:09:31 · 309 阅读 · 0 评论 -
Licode入门学习: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原创 2020-08-27 15:47:01 · 528 阅读 · 0 评论 -
Licode入门学习: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原创 2020-08-26 18:03:28 · 401 阅读 · 0 评论 -
Licode入门学习: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.原创 2020-08-26 17:12:57 · 284 阅读 · 0 评论 -
Licode入门学习:WebRtcConnection源码分析(一)
licode的核心WebRtcConnection模块,起到拉流的作用DEFINE_LOGGER(WebRtcConnection, "WebRtcConnection");// webRtcConnection的构造函数// 参数worker,io_worker,conection_id, ice_config, rtp_mappings, ext_mappings,listenerWebRtcConnection::WebRtcConnection(std::shared_ptr<原创 2020-08-26 15:52:49 · 561 阅读 · 0 评论 -
Licode入门学习: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原创 2020-08-15 15:23:00 · 517 阅读 · 0 评论