22 #include <boost/cstdint.hpp>
23 #include <boost/shared_ptr.hpp>
24 #include <boost/scoped_ptr.hpp>
32 #define RTMP_DEFAULT_CHUNKSIZE 128
262 inline boost::uint8_t*
271 inline const boost::uint8_t*
284 inline const boost::uint8_t*
344 bool connect(
const URL&
url);
369 void setBufferTime(
size_t time,
int streamID);
417 if (_messageQueue.empty())
return boost::shared_ptr<SimpleBuffer>();
418 boost::shared_ptr<SimpleBuffer>
b = _messageQueue.front();
419 _messageQueue.pop_front();
429 if (_flvQueue.empty())
return boost::shared_ptr<SimpleBuffer>();
430 boost::shared_ptr<SimpleBuffer>
b = _flvQueue.front();
431 _flvQueue.pop_front();
439 int readSocket(boost::uint8_t* dst,
int num);
448 _serverBandwidth = bw;
453 return _serverBandwidth;
485 bool hasPacket(ChannelType
t,
size_t channel)
const;
491 RTMPPacket& getPacket(ChannelType
t,
size_t channel);
506 typedef std::map<size_t, RTMPPacket> ChannelSet;
511 ChannelSet _inChannels;
514 ChannelSet _outChannels;
516 std::deque<boost::shared_ptr<SimpleBuffer> > _messageQueue;
517 std::deque<boost::shared_ptr<SimpleBuffer> > _flvQueue;
520 boost::uint32_t _serverBandwidth;
523 boost::uint32_t _bandwidth;
526 size_t _outChunkSize;
528 boost::scoped_ptr<HandShaker> _handShaker;
538 boost::scoped_ptr<RTMPPacket> _incompletePacket;
An RTMPPacket class contains a full description of an RTMP packet.
Definition: RTMP.h:195
bool isReady(const RTMPPacket &p)
Check if a packet is ready for processing.
Definition: RTMP.h:298
size_t payloadSize(const RTMPPacket &p)
The current size of the space allocated for the message payload.
Definition: RTMP.h:253
boost::uint32_t bandwidth() const
Get our bandwidth.
Definition: RTMP.h:462
boost::uint8_t * data()
Get a pointer to start of data. May be NULL if size==0.
Definition: SimpleBuffer.h:102
int m_mediaChannel
Definition: RTMP.h:467
~RTMPPacket()
Definition: RTMP.h:212
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
PacketSize
The PacketSize specifies the number of fields contained in the header.
Definition: RTMP.h:145
bool sendServerBW(RTMP &r)
Send the server bandwidth.
Definition: RTMP.cpp:406
size_t _bytesIn
Definition: RTMP.h:469
boost::uint32_t serverBandwidth() const
Get the stored server bandwidth.
Definition: RTMP.h:452
boost::shared_ptr< SimpleBuffer > buffer
A buffer with enough storage to write the entire message.
Definition: RTMP.h:220
boost::uint8_t * payloadData(RTMPPacket &p)
Access the payload data section of the buffer.
Definition: RTMP.h:263
bool error() const
Whether the RTMP connection is in error condition.
Definition: RTMP.h:386
Definition: GnashKey.h:161
ControlType
Known control / ping codes.
Definition: RTMP.h:70
A simple IOChannel subclass for reading and writing sockets.
Definition: Socket.h:41
RTMPHeader header
Definition: RTMP.h:214
Definition: klash_part.cpp:330
Definition: GnashKey.h:164
Definition: GnashKey.h:166
bool connected() const
Whether we have a basic connection to a server.
Definition: RTMP.h:379
Channels
The known channels.
Definition: RTMP.h:103
void setBandwidth(boost::uint32_t bw)
Store our bandwidth.
Definition: RTMP.h:457
Definition: GnashKey.h:148
#define DSOEXPORT
Definition: dsodefs.h:55
This class is for handling the RTMP protocol.
Definition: RTMP.h:327
RTMPPacket(size_t reserve=0)
Construct a packet with an optional reserved memory allocation.
Definition: RTMP.cpp:125
void clearPayload(RTMPPacket &p)
Clear the message body and the bytes read of an RTMPPacket.
Definition: RTMP.h:242
boost::uint8_t m_nClientBW2
Definition: RTMP.h:468
Definition: GnashKey.h:162
std::string url
Definition: gnash.cpp:59
PacketType
The known packet types.
Definition: RTMP.h:111
A simple buffer of bytes.
Definition: SimpleBuffer.h:38
size_t bytesRead
Definition: RTMP.h:222
std::ostream & operator<<(std::ostream &o, PacketType p)
Logging assistance for PacketType.
Definition: RTMP.cpp:1205
bool hasPayload(const RTMPPacket &p)
Check whether an RTMPPacket has a payload.
Definition: RTMP.h:231
bool sendCtrl(RTMP &r, ControlType t, unsigned int nObject, unsigned int nTime)
Send a control packet.
Definition: RTMP.cpp:973
boost::shared_ptr< SimpleBuffer > getMessage()
Get an AMF message received from the server.
Definition: RTMP.h:416
const boost::uint8_t * payloadEnd(const RTMPPacket &p)
Get the end of the allocated payload data section of the buffer.
Definition: RTMP.h:285
size_t size() const
Return size of the buffer.
Definition: SimpleBuffer.h:96
size_t _bytesInSent
Definition: RTMP.h:470
Uniform Resource Locator.
Definition: URL.h:34
boost::shared_ptr< SimpleBuffer > getFLVFrame()
Get an FLV packet received from the server.
Definition: RTMP.h:428
bool _error
Definition: AMFConverter.cpp:108
void setServerBandwidth(boost::uint32_t bw)
Store the server bandwidth.
Definition: RTMP.h:447
int _inChunkSize
Definition: RTMP.h:466