完成对enhanced rtmp videocodecid的兼容 (#2718)

请查阅: https://github.com/veovera/enhanced-rtmp/issues/8
This commit is contained in:
夏楚
2023-07-29 23:03:28 +08:00
committed by GitHub
parent bd8ad2eabf
commit 5a2bf8d196
5 changed files with 17 additions and 29 deletions

View File

@@ -301,10 +301,10 @@ CodecId parseVideoRtmpPacket(const uint8_t *data, size_t size, RtmpPacketInfo *i
info->video.frame_type = (RtmpFrameType)(enhanced_header->frame_type);
info->video.pkt_type = (RtmpPacketType)(enhanced_header->pkt_type);
switch (ntohl(enhanced_header->fourcc)) {
case fourcc_av1: info->codec = CodecAV1; break;
case fourcc_vp9: info->codec = CodecVP9; break;
case fourcc_hevc: info->codec = CodecH265; break;
switch ((RtmpVideoCodec)ntohl(enhanced_header->fourcc)) {
case RtmpVideoCodec::fourcc_av1: info->codec = CodecAV1; break;
case RtmpVideoCodec::fourcc_vp9: info->codec = CodecVP9; break;
case RtmpVideoCodec::fourcc_hevc: info->codec = CodecH265; break;
default: WarnL << "Rtmp video codec not supported: " << std::string((char *)data + 1, 4);
}
} else {