licode 源码分析(四) pipeline

一、相关类介绍

licode中的pipeline 内部是一个保存PipelineContext的vector,有IN(输入)、OUT(输出)、BOTH(输入输出)三种类型。

 std::vector<PipelineContext*> inCtxs_;
 std::vector<PipelineContext*> outCtxs_;
 Both 类型对应ContextImpl

 pipeline中的类基本都是模板类,下面看下怎么添加到vector中的:

template <class H>
PipelineBase& PipelineBase::addFront(std::shared_ptr<H> handler) {
  typedef typename ContextType<H>::type Context;
  return addHelper(
      std::make_shared<Context>(shared_from_this(), std::move(handler)),
      true);
}

addFront的参数是流处理的一些handler,比如RtcpProcesso

猜你喜欢

转载自blog.csdn.net/lcalqf/article/details/108363048
今日推荐