mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 12:45:35 +08:00
[feat] rewrite rtp module
This commit is contained in:
45
src/rtp/rtp_packetizer/rtp_packetizer_h264.h
Normal file
45
src/rtp/rtp_packetizer/rtp_packetizer_h264.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* @Author: DI JUNKUN
|
||||
* @Date: 2025-01-22
|
||||
* Copyright (c) 2025 by DI JUNKUN, All Rights Reserved.
|
||||
*/
|
||||
|
||||
#ifndef _RTP_PACKETIZER_H264_H_
|
||||
#define _RTP_PACKETIZER_H264_H_
|
||||
|
||||
#include "rtp_packetizer.h"
|
||||
|
||||
class RtpPacketizerH264 : public RtpPacketizer {
|
||||
public:
|
||||
RtpPacketizerH264();
|
||||
|
||||
virtual ~RtpPacketizerH264();
|
||||
|
||||
std::vector<RtpPacket> Build(uint8_t* payload,
|
||||
uint32_t payload_size) override;
|
||||
|
||||
private:
|
||||
bool RtpPacketizerH264::EncodeH264Fua(RtpPacket& rtp_packet, uint8_t* payload,
|
||||
size_t payload_size);
|
||||
|
||||
private:
|
||||
uint8_t version_;
|
||||
bool has_padding_;
|
||||
bool has_extension_;
|
||||
uint32_t csrc_count_;
|
||||
bool marker_;
|
||||
uint32_t payload_type_;
|
||||
uint16_t sequence_number_;
|
||||
uint64_t timestamp_;
|
||||
uint32_t ssrc_;
|
||||
std::vector<uint32_t> csrcs_;
|
||||
uint16_t profile_;
|
||||
uint16_t extension_profile_;
|
||||
uint16_t extension_len_;
|
||||
uint8_t* extension_data_;
|
||||
|
||||
private:
|
||||
std::vector<uint8_t> rtp_packet_frame_;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user