Gnash  0.8.11dev
Public Member Functions | Public Attributes | List of all members
gnash::rtmp::RTMPPacket Struct Reference

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. More...
 
 RTMPPacket (const RTMPPacket &other)
 Copy constructor. More...
 
 ~RTMPPacket ()
 

Public Attributes

RTMPHeader header
 
std::shared_ptr< SimpleBufferbuffer
 A buffer with enough storage to write the entire message. More...
 
size_t bytesRead
 

Detailed Description

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.

Constructor & Destructor Documentation

§ RTMPPacket() [1/2]

gnash::rtmp::RTMPPacket::RTMPPacket ( size_t  reserve = 0)
explicit

Construct a packet with an optional reserved memory allocation.

Parameters
reserveThe 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.

§ RTMPPacket() [2/2]

gnash::rtmp::RTMPPacket::RTMPPacket ( const RTMPPacket other)

Copy constructor.

Creates an identical RTMPPacket with shared ownership of the buffer.

References gnash::rtmp::RTMPHeader::headerSize.

§ ~RTMPPacket()

gnash::rtmp::RTMPPacket::~RTMPPacket ( )
inline

Member Data Documentation

§ buffer

std::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 gnash::rtmp::RTMP::call(), gnash::rtmp::clearPayload(), gnash::rtmp::RTMP::handlePacket(), gnash::rtmp::hasPayload(), gnash::rtmp::payloadData(), gnash::rtmp::payloadEnd(), gnash::rtmp::payloadSize(), RTMPPacket(), gnash::rtmp::sendCtrl(), and gnash::rtmp::sendServerBW().

§ bytesRead

size_t gnash::rtmp::RTMPPacket::bytesRead

§ header

RTMPHeader gnash::rtmp::RTMPPacket::header

The documentation for this struct was generated from the following files: