Files
crossdesk/src/rtp/rtp_packetizer/rtp_packetizer.cpp
2025-02-07 17:42:05 +08:00

17 lines
558 B
C++

#include "rtp_packetizer.h"
#include "rtp_packetizer_av1.h"
#include "rtp_packetizer_generic.h"
#include "rtp_packetizer_h264.h"
std::unique_ptr<RtpPacketizer> RtpPacketizer::Create(uint32_t payload_type,
uint32_t ssrc) {
switch (payload_type) {
case rtp::PAYLOAD_TYPE::H264:
return std::make_unique<RtpPacketizerH264>(ssrc);
case rtp::PAYLOAD_TYPE::AV1:
return std::make_unique<RtpPacketizerAv1>(ssrc);
default:
return std::make_unique<RtpPacketizerGeneric>(ssrc);
}
}