From 6119ac9c53cc361da016c0999e46e7df8dd9c284 Mon Sep 17 00:00:00 2001 From: rayjay <526528945@qq.com> Date: Thu, 28 Mar 2024 11:21:23 +0800 Subject: [PATCH] =?UTF-8?q?rtp=E6=8E=A8=E6=B5=81=E5=A2=9E=E5=8A=A0PCM?= =?UTF-8?q?=E9=9F=B3=E9=A2=91=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtp/GB28181Process.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Rtp/GB28181Process.cpp b/src/Rtp/GB28181Process.cpp index 29c9704f..37756dd5 100644 --- a/src/Rtp/GB28181Process.cpp +++ b/src/Rtp/GB28181Process.cpp @@ -102,6 +102,16 @@ bool GB28181Process::inputRtp(bool, const char *data, size_t data_len) { _rtp_decoder[pt] = Factory::getRtpDecoderByCodecId(track->getCodecId()); break; } + case Rtsp::PT_L16_Mono: { + //L16 + ref = std::make_shared(16000, [this](RtpPacket::Ptr rtp) { onRtpSorted(std::move(rtp)); }); + auto track = Factory::getTrackByCodecId(CodecL16, 16000, 1, 16); + CHECK(track); + track->setIndex(pt); + _interface->addTrack(track); + _rtp_decoder[pt] = Factory::getRtpDecoderByCodecId(track->getCodecId()); + break; + } default: { if (pt == opus_pt) { // opus负载