RTP payload handler for 16-bit linear audio (L16). More...
#include <rtppayload.h>


Public Member Functions | |
| RtpPayloadL16 (uint32_t sampleRate=48000, int channels=2) | |
| Constructs an L16 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. | |
| void | setPayloadType (uint8_t pt) |
| Sets the RTP payload type number. | |
| int | channels () const |
| Returns the number of audio channels. | |
| uint32_t | sampleRate () const |
| Returns the audio sample rate. | |
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 16-bit linear audio (L16).
Implements packing/unpacking of 16-bit linear PCM audio samples. Samples are in network byte order (big-endian), interleaved by channel.
| RtpPayloadL16::RtpPayloadL16 | ( | uint32_t | sampleRate = 48000, |
| int | channels = 2 |
||
| ) |
Constructs an L16 payload handler.
| sampleRate | Audio sample rate in Hz (default 48000). |
| channels | Number of audio channels (default 2). |
|
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.