修复对象同名导致的bug

This commit is contained in:
ziyue
2021-07-16 15:54:43 +08:00
parent 8548753c28
commit 892b2d2ef9
3 changed files with 21 additions and 35 deletions

View File

@@ -11,6 +11,7 @@
#if defined(ENABLE_RTPPROXY)
#include "PSEncoder.h"
#include "Extension/H264.h"
#include "Rtsp/RtspMuxer.h"
namespace mediakit{
PSEncoder::PSEncoder() {
@@ -147,24 +148,6 @@ void PSEncoder::inputFrame(const Frame::Ptr &frame) {
}
}
////////////////////////////////////////////////////////////////////////////////////////////////
class RingDelegateHelper : public RingDelegate<RtpPacket::Ptr> {
public:
typedef function<void(RtpPacket::Ptr in, bool is_key)> onRtp;
~RingDelegateHelper() override{}
RingDelegateHelper(onRtp on_rtp){
_on_rtp = std::move(on_rtp);
}
void onWrite(RtpPacket::Ptr in, bool is_key) override{
_on_rtp(std::move(in), is_key);
}
private:
onRtp _on_rtp;
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
PSEncoderImp::PSEncoderImp(uint32_t ssrc, uint8_t payload_type) {