21 #ifndef GV_RTPAVCPACKET__H
22 #define GV_RTPAVCPACKET__H
33 class RtpAvcPacketStream ;
72 RtpAvcPacket(
const unsigned char * begin ,
const unsigned char * end ) ;
81 const char *
reason()
const ;
87 std::string
str(
bool more =
false )
const ;
90 unsigned int type()
const ;
95 unsigned int nri()
const ;
150 static unsigned int make_word(
const unsigned char * p ) ;
151 static unsigned long make_dword(
unsigned long ,
unsigned long ,
unsigned long ,
unsigned long ) ;
152 unsigned int payloadOffset()
const ;
155 const unsigned char * m_p ;
186 bool contiguous()
const ;
191 unsigned long m_timestamp ;
192 std::vector<unsigned int> m_seq_list ;
193 std::string m_buffer ;
194 std::deque<std::string> m_list ;
const char * payloadBegin() const
Returns the RTP-AVC payload pointer, but the first byte may be wrong so use payloadFirst() to overwri...
static size_t smallest()
The smallest parsable packet.
A class that accumulates RTP-AVC packets and serves up AVC NALUs.
bool type_is_single() const
Returns true if type() is SINGLE_NALU_x.
std::string nalu()
Extracts a NALU.
unsigned int type() const
Returns the RTP-AVC packet type, matching the Type enum.
bool valid() const
Returns true if a valid packet.
bool fu_start() const
Returns true for the first FU packet in the fragmented NALU.
bool more() const
Returns true if NALUs are available.
const char * payloadEnd() const
Returns the RTP-AVC payload end pointer.
RtpAvcPacket(const unsigned char *begin, const unsigned char *end)
Constructor taking in an RTP payload with Payload Type of H264/90000.
bool type_is_picture_parameter_set() const
Returns true if type() is SINGLE_NALU_8.
bool add(const RtpPacket &)
Adds a packet.
unsigned int nri() const
Returns the NALU nal_ref_idc value, in the range 0..3.
An RTP packet parser, as per RFC 3550 (section 5).
unsigned int fu_type() const
Returns the type of the fragmented NALU.
RtpAvcPacketStream()
Default constructor.
An RTP payload parser for the "H264" payload type.
char payloadFirst() const
Returns the first RTP-AVC payload byte.
std::string str(bool more=false) const
Returns a summary of the packet header for debugging purposes.
const char * reason() const
Returns the in-valid() reason, or nullptr.
bool type_is_fu() const
Returns true if type() is FU_A or FU_B.
bool fu_end() const
Returns true for the last FU packet in the fragmented NALU.
size_t payloadSize() const
Returns the RTP-AVC payload size.
bool type_is_sequence_parameter_set() const
Returns true if type() is SINGLE_NALU_7.