VideoTools
|
An RTP payload parser for the jpeg payload type. More...
#include <gvrtpjpegpacket.h>
Classes | |
struct | Payload |
A descriptor for the payload within an RTP JPEG packet. More... | |
Public Types | |
typedef std::insert_iterator < std::vector< char > > | iterator_t |
Public Member Functions | |
RtpJpegPacket (const char *begin, const char *end) | |
Constructor taking in an RTP payload with Payload Type of JPEG/90000. More... | |
bool | valid () const |
Returns true if a valid packet. | |
std::string | reason () const |
Returns the reason if in-valid(). | |
std::string | str () const |
Returns a summary of the packet header for debugging purposes. More... | |
unsigned int | ts () const |
Returns the "type-specific" value. | |
unsigned long | fo () const |
Returns the fragment offset. | |
unsigned int | type () const |
Returns the type. | |
bool | type_is_dynamic () const |
Returns true if type() indicates that the type is defined out-of-band by the session setup process. More... | |
bool | type_has_restart_markers () const |
Returns true if type() indicates the presence of a restart marker header. | |
unsigned int | type_base () const |
Returns type() with the special bit reset. | |
unsigned int | q () const |
Returns the Q value. More... | |
bool | q_is_special () const |
Returns true if q() indicates in-band quantisation tables. | |
unsigned int | dx () const |
Returns the image width in pixels, not MCUs, ie. including the x8. | |
unsigned int | dy () const |
Returns the image height in pixels, not MCUs, ie. including the x8. | |
unsigned int | ri () const |
Returns the restart interval (JFIF DRI). | |
unsigned int | rc () const |
Returns the restart count. | |
Payload | payload () const |
Returns the JPEG entropy-coded image scan data, using pointers into the buffer that was passed in to the constructor. More... | |
unsigned int | payloadOffset () const |
Returns payload().offset. | |
size_t | payloadSize () const |
Returns payload().size. | |
const char * | payloadBegin () const |
Returns payload().begin. | |
const char * | payloadEnd () const |
Returns payload().end. | |
Static Public Member Functions | |
static size_t | smallest () |
The smallest parsable packet. | |
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 payloads that make up the frame. More... | |
An RTP payload parser for the jpeg payload type.
Definition at line 37 of file gvrtpjpegpacket.h.
Gv::RtpJpegPacket::RtpJpegPacket | ( | const char * | begin, |
const char * | end | ||
) |
Constructor taking in an RTP payload with Payload Type of JPEG/90000.
The data should start with the RTP JPEG header defined in RFC-2435 section 3.1 and end with the JPEG entropy-coded scan data (see section 3.1.9). Precondition: (end-begin) >= smallest().
Definition at line 33 of file gvrtpjpegpacket.cpp.
|
static |
Generates the start of a JFIF buffer; the rest of the JFIF buffer is a simple copy of all the payloads that make up the frame.
The JFIF output is emited via a vector back-insert iterator and the iterator's final value is retured.
Definition at line 589 of file gvrtpjpegpacket.cpp.
Gv::RtpJpegPacket::Payload Gv::RtpJpegPacket::payload | ( | ) | const |
Returns the JPEG entropy-coded image scan data, using pointers into the buffer that was passed in to the constructor.
Use generateHeader() to create a fully-fledged JFIF structure that can be passed to Gr::JpegReader.
Definition at line 162 of file gvrtpjpegpacket.cpp.
unsigned int Gv::RtpJpegPacket::q | ( | ) | const |
Returns the Q value.
Values of 128 or more indicate that the packet holds in-band quantisation tables.
Definition at line 127 of file gvrtpjpegpacket.cpp.
std::string Gv::RtpJpegPacket::str | ( | ) | const |
Returns a summary of the packet header for debugging purposes.
header...
Definition at line 85 of file gvrtpjpegpacket.cpp.
bool Gv::RtpJpegPacket::type_is_dynamic | ( | ) | const |
Returns true if type() indicates that the type is defined out-of-band by the session setup process.
Definition at line 112 of file gvrtpjpegpacket.cpp.