MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
Data Structures | Namespaces | Functions | Variables
rtmpchunks.h File Reference
#include <map>
#include <string.h>
#include <stdlib.h>
#include <sys/time.h>
#include <string>
#include <arpa/inet.h>
#include "socket.h"

Go to the source code of this file.

Data Structures

class  RTMPStream::Chunk
 Holds a single RTMP chunk, either send or receive direction. More...
 

Namespaces

 FLV
 This namespace holds all FLV-parsing related functionality.
 
 RTMPStream
 Contains all functions and classes needed for RTMP connections.
 

Functions

bool RTMPStream::doHandshake ()
 Does the handshake. Expects handshake_in to be filled, and fills handshake_out. More...
 
std::string & RTMPStream::SendChunk (unsigned int cs_id, unsigned char msg_type_id, unsigned int msg_stream_id, std::string data)
 Packs up a chunk with the given arguments as properties. More...
 
std::string & RTMPStream::SendCTL (unsigned char type, unsigned int data)
 Packs up a chunk for a control message with 1 argument. More...
 
std::string & RTMPStream::SendCTL (unsigned char type, unsigned int data, unsigned char data2)
 Packs up a chunk for a control message with 2 arguments. More...
 
std::string & RTMPStream::SendMedia (unsigned char msg_type_id, unsigned char *data, int len, unsigned int ts)
 Packs up a chunk with media contents. More...
 
std::string & RTMPStream::SendMedia (FLV::Tag &tag)
 Packs up a chunk with media contents. More...
 
std::string & RTMPStream::SendUSR (unsigned char type, unsigned int data)
 Packs up a chunk for a user control message with 1 argument. More...
 
std::string & RTMPStream::SendUSR (unsigned char type, unsigned int data, unsigned int data2)
 Packs up a chunk for a user control message with 2 arguments. More...
 

Variables

unsigned int RTMPStream::chunk_rec_max = 128
 Maximum size for a received chunk. More...
 
unsigned int RTMPStream::chunk_snd_max = 128
 Maximum size for a sent chunk. More...
 
std::string RTMPStream::handshake_in
 This value should be set to the first 1537 bytes received. More...
 
std::string RTMPStream::handshake_out
 This value is the handshake response that is to be sent out. More...
 
timeval RTMPStream::lastrec
 Timestamp of last time data was received. More...
 
std::map< unsigned int, Chunk > RTMPStream::lastrecv
 Holds the last received chunk for every msg_id. More...
 
std::map< unsigned int, Chunk > RTMPStream::lastsend
 Holds the last sent chunk for every msg_id. More...
 
unsigned int RTMPStream::rec_cnt = 0
 Counter for total data received, in bytes. More...
 
unsigned int RTMPStream::rec_window_at = 0
 Current position of the receiving window. More...
 
unsigned int RTMPStream::rec_window_size = 2500000
 Window size for receiving. More...
 
unsigned int RTMPStream::snd_cnt = 0
 Counter for total data sent, in bytes. More...
 
unsigned int RTMPStream::snd_window_at = 0
 Current position of the sending window. More...
 
unsigned int RTMPStream::snd_window_size = 2500000
 Window size for sending. More...