21 #ifndef GV_RTPJPEGPACKET__H
22 #define GV_RTPJPEGPACKET__H
61 std::string
reason()
const ;
64 std::string
str()
const ;
69 unsigned int ts()
const ;
72 unsigned long fo()
const ;
75 unsigned int type()
const ;
88 unsigned int q()
const ;
95 unsigned int dx()
const ;
98 unsigned int dy()
const ;
101 unsigned int ri()
const ;
104 unsigned int rc()
const ;
114 typedef std::insert_iterator<std::vector<char> > iterator_t ;
137 static unsigned int make_word(
const char * p ) ;
138 static unsigned long make_dword(
unsigned long ,
unsigned long ,
unsigned long ,
unsigned long ) ;
141 std::string m_reason ;
std::string reason() const
Returns the reason if in-valid().
unsigned int dx() const
Returns the image width in pixels, not MCUs, ie. including the x8.
An RTP payload parser for the jpeg payload type.
unsigned long fo() const
Returns the fragment offset.
unsigned int type_base() const
Returns type() with the special bit reset.
bool type_has_restart_markers() const
Returns true if type() indicates the presence of a restart marker header.
unsigned int payloadOffset() const
Returns payload().offset.
unsigned int ts() const
Returns the "type-specific" value.
bool q_is_special() const
Returns true if q() indicates in-band quantisation tables.
std::string str() const
Returns a summary of the packet header for debugging purposes.
static iterator_t generateHeader(iterator_t out, const RtpJpegPacket &, int fudge=0)
Generates the start of a JFIF buffer; the rest of the JFIF buffer is a simple copy of all the payload...
A descriptor for the payload within an RTP JPEG packet.
unsigned int ri() const
Returns the restart interval (JFIF DRI).
bool type_is_dynamic() const
Returns true if type() indicates that the type is defined out-of-band by the session setup process...
RtpJpegPacket(const char *begin, const char *end)
Constructor taking in an RTP payload with Payload Type of JPEG/90000.
static size_t smallest()
The smallest parsable packet.
const char * payloadBegin() const
Returns payload().begin.
bool valid() const
Returns true if a valid packet.
const char * payloadEnd() const
Returns payload().end.
unsigned int q() const
Returns the Q value.
Payload payload() const
Returns the JPEG entropy-coded image scan data, using pointers into the buffer that was passed in to ...
unsigned int rc() const
Returns the restart count.
size_t payloadSize() const
Returns payload().size.
unsigned int dy() const
Returns the image height in pixels, not MCUs, ie. including the x8.
unsigned int type() const
Returns the type.