Converts between RtpMpegPacket and binary (network byte order) RTP MPEG packet.
More...
#include <RtpMpegPacketSerializer.h>
Converts between RtpMpegPacket and binary (network byte order) RTP MPEG packet.
◆ RtpMpegPacketSerializer()
| inet::rtp::RtpMpegPacketSerializer::RtpMpegPacketSerializer |
( |
| ) |
|
|
inline |
24 : FieldsChunkSerializer() {}
◆ deserialize()
Deserializes a chunk from a stream by reading the bytes at the current position of the stream.
The current stream position is updated according to the length of the returned chunk.
Implements inet::FieldsChunkSerializer.
38 auto rtpMpegHeader = makeShared<RtpMpegHeader>();
52 rtpMpegHeader->setPayloadLength(stream.readUint16Be());
53 rtpMpegHeader->setPictureType(stream.readUint16Be());
◆ serialize()
| void inet::rtp::RtpMpegPacketSerializer::serialize |
( |
MemoryOutputStream & |
stream, |
|
|
const Ptr< const Chunk > & |
chunk |
|
) |
| const |
|
overrideprotectedvirtual |
Serializes a chunk into a stream by writing all bytes representing the chunk at the end of the stream.
Implements inet::FieldsChunkSerializer.
18 const auto& rtpMpegHeader = staticPtrCast<const RtpMpegHeader>(chunk);
32 stream.writeUint16Be(rtpMpegHeader->getPayloadLength());
33 stream.writeUint16Be(rtpMpegHeader->getPictureType());
The documentation for this class was generated from the following files: