RTP payload handler for RFC 2435 JPEG (Motion JPEG). More...
#include <rtppayload.h>


Public Member Functions | |
| RtpPayloadJpeg (int width, int height, int quality=85) | |
| Constructs a JPEG payload handler. | |
| uint8_t | payloadType () const override |
| Returns the RTP payload type number. | |
| uint32_t | clockRate () const override |
| Returns the RTP timestamp clock rate in Hz. | |
| RtpPacket::List | pack (const void *mediaData, size_t size) override |
| Fragments media data into RTP payload packets. | |
| Buffer | unpack (const RtpPacket::List &packets) override |
| Reassembles RTP payload packets into media data. | |
| int | width () const |
| Returns the image width. | |
| int | height () const |
| Returns the image height. | |
| int | quality () const |
| Returns the quality parameter. | |
| void | setQuality (int q) |
| Sets the quality parameter. | |
Public Member Functions inherited from RtpPayload | |
| virtual | ~RtpPayload ()=default |
| Destructor. | |
| virtual size_t | maxPayloadSize () const |
| Returns the maximum payload size per packet. | |
Additional Inherited Members | |
Protected Member Functions inherited from RtpPayload | |
| RtpPayload ()=default | |
| Default constructor (protected; use a concrete subclass). | |
RTP payload handler for RFC 2435 JPEG (Motion JPEG).
Implements packing/unpacking of JPEG-compressed video frames as defined by RFC 2435. Each packet carries an 8-byte JPEG header followed by a fragment of the JPEG data.
| RtpPayloadJpeg::RtpPayloadJpeg | ( | int | width, |
| int | height, | ||
| int | quality = 85 |
||
| ) |
|
inlineoverridevirtual |
Returns the RTP timestamp clock rate in Hz.
Implements RtpPayload.
|
overridevirtual |
Fragments media data into RTP payload packets.
Each returned RtpPacket includes space for the 12-byte RTP header at the start, followed by any payload-specific header, followed by the media data fragment. All returned packets share a single Buffer::Ptr.
| mediaData | Pointer to the media data. |
| size | Size of the media data in bytes. |
Implements RtpPayload.
|
inlineoverridevirtual |
Returns the RTP payload type number.
Implements RtpPayload.
|
overridevirtual |
Reassembles RTP payload packets into media data.
| packets | The list of packets to reassemble. |
Implements RtpPayload.