一、相关类介绍
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