for webapi startsendrtp can send raw rtp

This commit is contained in:
xgj
2022-04-01 18:28:09 +08:00
parent d5b8613858
commit 61625f458f
11 changed files with 205 additions and 18 deletions

View File

@@ -14,6 +14,7 @@
#if defined(ENABLE_RTPPROXY)
#include "PSEncoder.h"
#include "RawEncoder.h"
#include "Extension/CommonRtp.h"
namespace mediakit{
@@ -47,6 +48,16 @@ protected:
void onRTP(toolkit::Buffer::Ptr rtp) override;
};
class RtpCacheRaw : public RtpCache, public RawEncoderImp{
public:
RtpCacheRaw(onFlushed cb, uint32_t ssrc, uint8_t payload_type = 96,bool sendAudio = true) : RtpCache(std::move(cb)), RawEncoderImp(ssrc, payload_type,sendAudio) {};
~RtpCacheRaw() override = default;
protected:
void onRTP(toolkit::Buffer::Ptr rtp) override;
};
}//namespace mediakit
#endif//ENABLE_RTPPROXY
#endif //ZLMEDIAKIT_RTPCACHE_H