提交 3afea4f1 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

RtpStream: add temporalLayers to params

上级 c93781f3
......@@ -53,7 +53,7 @@
"eslint-plugin-jest": "^22.4.1",
"gulp": "^4.0.0",
"gulp-clang-format": "^1.0.27",
"jest": "^24.5.0",
"jest": "^24.6.0",
"jest-tobetype": "^1.2.2",
"opn-cli": "^4.0.0"
},
......
......@@ -48,6 +48,7 @@ namespace RTC
bool useFir{ false };
bool useInBandFec{ false };
bool useDtx{ false };
uint8_t temporalLayers{ 0 };
};
public:
......@@ -66,6 +67,7 @@ namespace RTC
virtual void SetRtx(uint8_t payloadType, uint32_t ssrc);
uint32_t GetRtxSsrc() const;
uint8_t GetRtxPayloadType() const;
uint8_t GetTemporalLayers() const;
virtual bool ReceivePacket(RTC::RtpPacket* packet);
virtual void Pause() = 0;
virtual void Resume() = 0;
......@@ -176,6 +178,11 @@ namespace RTC
return this->params.rtxPayloadType;
}
inline uint8_t RtpStream::GetTemporalLayers() const
{
return this->params.temporalLayers;
}
inline uint32_t RtpStream::GetRate(uint64_t now)
{
return this->transmissionCounter.GetRate(now) + this->retransmissionCounter.GetRate(now);
......
......@@ -282,6 +282,7 @@ namespace RTC
params.mimeType = mediaCodec->mimeType;
params.clockRate = mediaCodec->clockRate;
params.cname = this->rtpParameters.rtcp.cname;
params.temporalLayers = encoding.temporalLayers;
// Check in band FEC in codec parameters.
if (mediaCodec->parameters.HasInteger("useinbandfec") && mediaCodec->parameters.GetInteger("useinbandfec") == 1)
......
......@@ -703,6 +703,7 @@ namespace RTC
params.clockRate = mediaCodec.clockRate;
params.rid = encoding.rid;
params.cname = this->rtpParameters.rtcp.cname;
params.temporalLayers = encoding.temporalLayers;
// Check in band FEC in codec parameters.
if (mediaCodec.parameters.HasInteger("useinbandfec") && mediaCodec.parameters.GetInteger("useinbandfec") == 1)
......
......@@ -323,5 +323,6 @@ namespace RTC
jsonObject["useFir"] = this->useFir;
jsonObject["useInBandFec"] = this->useInBandFec;
jsonObject["useDtx"] = this->useDtx;
jsonObject["temporalLayers"] = this->temporalLayers;
}
} // namespace RTC
......@@ -527,6 +527,7 @@ namespace RTC
params.mimeType = mediaCodec->mimeType;
params.clockRate = mediaCodec->clockRate;
params.cname = this->rtpParameters.rtcp.cname;
params.temporalLayers = encoding.temporalLayers;
// Check in band FEC in codec parameters.
if (mediaCodec->parameters.HasInteger("useinbandfec") && mediaCodec->parameters.GetInteger("useinbandfec") == 1)
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论