Gnash
0.8.10
|
An RTMPPacket class contains a full description of an RTMP packet. More...
#include <RTMP.h>
Public Member Functions | |
RTMPPacket (size_t reserve=0) | |
Construct a packet with an optional reserved memory allocation. | |
RTMPPacket (const RTMPPacket &other) | |
Copy constructor. | |
~RTMPPacket () | |
Public Attributes | |
RTMPHeader | header |
boost::shared_ptr< SimpleBuffer > | buffer |
A buffer with enough storage to write the entire message. | |
size_t | bytesRead |
An RTMPPacket class contains a full description of an RTMP packet.
This comprises: header information an AMF payload. An RTMPPacket may be copied without a large penalty. This is to allow storage in the RTMP client's channels.
gnash::rtmp::RTMPPacket::RTMPPacket | ( | size_t | reserve = 0 | ) | [explicit] |
Construct a packet with an optional reserved memory allocation.
reserve | The amount of space in bytes to reserve for the message body. This can save reallocations when appending AMF data. Space for the header is always reserved and is not affected by this parameter. |
References buffer, and gnash::rtmp::RTMPHeader::headerSize.
gnash::rtmp::RTMPPacket::RTMPPacket | ( | const RTMPPacket & | other | ) |
Copy constructor.
Creates an identical RTMPPacket with shared ownership of the buffer.
gnash::rtmp::RTMPPacket::~RTMPPacket | ( | ) | [inline] |
boost::shared_ptr<SimpleBuffer> gnash::rtmp::RTMPPacket::buffer |
A buffer with enough storage to write the entire message.
This always includes at least the header. Storage for the message payload is added as necessary.
Referenced by RTMPPacket(), gnash::rtmp::RTMP::handlePacket(), gnash::rtmp::sendServerBW(), gnash::rtmp::sendCtrl(), gnash::rtmp::hasPayload(), gnash::rtmp::clearPayload(), gnash::rtmp::payloadSize(), gnash::rtmp::payloadData(), and gnash::rtmp::payloadEnd().
Referenced by gnash::rtmp::clearPayload(), and gnash::rtmp::isReady().