Unverified 提交 a655e7fc authored 作者: José Luis Millán's avatar José Luis Millán 提交者: GitHub

Issue 865 (#866)

* SimpleConsumer: Only process Opus codec

Fixes #865.

The rest of video codec processing is meant for Simulcast & SVC.

* Update CHANGELOG
上级 18aed78c
# Changelog
### 3.10.3
* `SimpleConsumer`: Fix. Only process Opus codec (PR #865).
### 3.10.2
* Fix release contents by including meson_options.txt (PR #863).
......
......@@ -30,16 +30,17 @@ namespace RTC
// Create RtpStreamSend instance for sending a single stream to the remote.
CreateRtpStream();
RTC::Codecs::EncodingContext::Params params;
// Create the encoding context if needed.
this->encodingContext.reset(RTC::Codecs::Tools::GetEncodingContext(mediaCodec->mimeType, params));
// Create the encoding context for Opus.
if (
mediaCodec->mimeType.type == RTC::RtpCodecMimeType::Type::AUDIO &&
(mediaCodec->mimeType.subtype == RTC::RtpCodecMimeType::Subtype::OPUS ||
mediaCodec->mimeType.subtype == RTC::RtpCodecMimeType::Subtype::MULTIOPUS))
{
RTC::Codecs::EncodingContext::Params params;
this->encodingContext.reset(
RTC::Codecs::Tools::GetEncodingContext(mediaCodec->mimeType, params));
auto jsonIgnoreDtx = data.find("ignoreDtx");
if (jsonIgnoreDtx != data.end() && jsonIgnoreDtx->is_boolean())
......@@ -269,10 +270,9 @@ namespace RTC
bool marker;
// Process the payload if needed. Drop packet if necessary.
if (!packet->ProcessPayload(this->encodingContext.get(), marker))
if (this->encodingContext && !packet->ProcessPayload(this->encodingContext.get(), marker))
{
MS_DEBUG_TAG(
rtp,
MS_DEBUG_DEV(
"discarding packet [ssrc:%" PRIu32 ", seq:%" PRIu16 ", ts:%" PRIu32 "]",
packet->GetSsrc(),
packet->GetSequenceNumber(),
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论