Classes |
struct | rtmp_handshake_head_t |
struct | rtmp_head_t |
struct | rtmp_ping_t |
struct | user_event_t |
Public Types |
enum | encoding_types_e { ENCODE_AMF0 = 0x0,
ENCODE_AMF3 = 0x3,
ENCODE_AMF0 = 0x0,
ENCODE_AMF3 = 0x3
} |
enum | audiocodecs_e {
RAW = 0x0001,
ADPCM = 0x0002,
MP3 = 0x0004,
INTEL = 0x0005,
CELT = 0x0008,
NELLY8 = 0x0020,
NELLY = 0x0040,
G711A = 0x0080,
G711U = 0x0100,
NELLY16 = 0x0200,
AAC = 0x0400,
SPEEX = 0x0800,
DEFAULT_AUDIO_SET = 0x0267,
ALLAUDIO = 0x0fff,
RAW = 0x0001,
ADPCM = 0x0002,
MP3 = 0x0004,
INTEL = 0x0005,
CELT = 0x0008,
NELLY8 = 0x0020,
NELLY = 0x0040,
G711A = 0x0080,
G711U = 0x0100,
NELLY16 = 0x0200,
AAC = 0x0400,
SPEEX = 0x0800,
DEFAULT_AUDIO_SET = 0x0267,
ALLAUDIO = 0x0fff
} |
enum | videocodecs_e {
UNUSED = 0x0001,
JPEG = 0x0002,
SORENSON = 0x4,
ADOBE = 0x0008,
VP6 = 0x0010,
VP6ALPHA = 0x0020,
SCREEN2 = 0x0040,
H264 = 0x0080,
DEFAULT_VIDEO_SET = 0x007c,
ALLVIDEO = 0x00ff,
UNUSED = 0x0001,
JPEG = 0x0002,
SORENSON = 0x4,
ADOBE = 0x0008,
VP6 = 0x0010,
VP6ALPHA = 0x0020,
SCREEN2 = 0x0040,
H264 = 0x0080,
DEFAULT_VIDEO_SET = 0x007c,
ALLVIDEO = 0x00ff
} |
enum | videofunction_e {
SEEK = 0x1,
AMF0 = 0x0,
AMF3 = 0x3,
SEEK = 0x1,
AMF0 = 0x0,
AMF3 = 0x3
} |
enum | content_types_e {
NONE = 0x0,
CHUNK_SIZE = 0x1,
ABORT = 0x2,
BYTES_READ = 0x3,
USER = 0x4,
WINDOW_SIZE = 0x5,
SET_BANDWITH = 0x6,
ROUTE = 0x7,
AUDIO_DATA = 0x8,
VIDEO_DATA = 0x9,
SHARED_OBJ = 0xa,
AMF3_NOTIFY = 0xf,
AMF3_SHARED_OBJ = 0x10,
AMF3_INVOKE = 0x11,
NOTIFY = 0x12,
INVOKE = 0x14,
FLV_DATA = 0x16,
NONE = 0x0,
CHUNK_SIZE = 0x1,
ABORT = 0x2,
BYTES_READ = 0x3,
USER = 0x4,
WINDOW_SIZE = 0x5,
SET_BANDWITH = 0x6,
ROUTE = 0x7,
AUDIO_DATA = 0x8,
VIDEO_DATA = 0x9,
SHARED_OBJ = 0xa,
AMF3_NOTIFY = 0xf,
AMF3_SHARED_OBJ = 0x10,
AMF3_INVOKE = 0x11,
NOTIFY = 0x12,
INVOKE = 0x14,
FLV_DATA = 0x16
} |
enum | user_control_e {
STREAM_START = 0x0,
STREAM_EOF = 0x1,
STREAM_NODATA = 0x2,
STREAM_BUFFER = 0x3,
STREAM_LIVE = 0x4,
STREAM_PING = 0x6,
STREAM_PONG = 0x7,
STREAM_START = 0x0,
STREAM_EOF = 0x1,
STREAM_NODATA = 0x2,
STREAM_BUFFER = 0x3,
STREAM_LIVE = 0x4,
STREAM_PING = 0x6,
STREAM_PONG = 0x7
} |
enum | sharedobj_types_e {
CREATE_OBJ = 0x1,
DELETE_OBJ = 0x2,
REQUEST_CHANGE = 0x3,
CHANGE = 0x4,
SUCCESS_CLIENT = 0x5,
SEND_MESSAGE = 0x6,
STATUS = 0x7,
CLEAR = 0x8,
DELETE_SLOT = 0x9,
REQUEST_DELETE_SLOT = 0xa,
SUCCESS_SERVER = 0xb,
CREATE_OBJ = 0x1,
DELETE_OBJ = 0x2,
REQUEST_CHANGE = 0x3,
CHANGE = 0x4,
SUCCESS_CLIENT = 0x5,
SEND_MESSAGE = 0x6,
STATUS = 0x7,
CLEAR = 0x8,
DELETE_SLOT = 0x9,
REQUEST_DELETE_SLOT = 0xa,
SUCCESS_SERVER = 0xb
} |
enum | rtmp_ping_e {
PING_CLEAR = 0x0,
PING_PLAY = 0x1,
PING_TIME = 0x3,
PING_RESET = 0x4,
PING_CLIENT = 0x6,
PONG_CLIENT = 0x7,
PING_CLEAR = 0x0,
PING_PLAY = 0x1,
PING_TIME = 0x3,
PING_RESET = 0x4,
PING_CLIENT = 0x6,
PONG_CLIENT = 0x7
} |
enum | rtmp_op_e {
STREAM_PLAY,
STREAM_PAUSE,
STREAM_PUBLISH,
STREAM_STOP,
STREAM_SEEK,
STREAM_PLAY,
STREAM_PAUSE,
STREAM_PUBLISH,
STREAM_STOP,
STREAM_SEEK
} |
enum | rtmp_state_t {
RTMP_STATE_HANDSHAKE_SEND,
RTMP_STATE_HANDSHAKE_RECV,
RTMP_STATE_HANDSHAKE_ACK,
RTMP_STATE_CONNECT,
RTMP_STATE_NETCONNECT,
RTMP_STATE_NETSTREAM,
RTMP_STATE_HEADER,
RTMP_STATE_DONE,
RTMP_STATE_HANDSHAKE_SEND,
RTMP_STATE_HANDSHAKE_RECV,
RTMP_STATE_HANDSHAKE_ACK,
RTMP_STATE_CONNECT,
RTMP_STATE_NETCONNECT,
RTMP_STATE_NETSTREAM,
RTMP_STATE_HEADER,
RTMP_STATE_DONE
} |
enum | rtmp_error_t {
RTMP_ERR_UNDEF,
RTMP_ERR_NOTFOUND,
RTMP_ERR_PERM,
RTMP_ERR_DISKFULL,
RTMP_ERR_ILLEGAL,
RTMP_ERR_UNKNOWNID,
RTMP_ERR_EXISTS,
RTMP_ERR_NOSUCHUSER,
RTMP_ERR_TIMEOUT,
RTMP_ERR_NORESPONSE,
RTMP_ERR_UNDEF,
RTMP_ERR_NOTFOUND,
RTMP_ERR_PERM,
RTMP_ERR_DISKFULL,
RTMP_ERR_ILLEGAL,
RTMP_ERR_UNKNOWNID,
RTMP_ERR_EXISTS,
RTMP_ERR_NOSUCHUSER,
RTMP_ERR_TIMEOUT,
RTMP_ERR_NORESPONSE
} |
enum | rtmp_headersize_e {
HEADER_12 = 0x0,
HEADER_8 = 0x40,
HEADER_4 = 0x80,
HEADER_1 = 0xc0,
HEADER_12 = 0x0,
HEADER_8 = 0x40,
HEADER_4 = 0x80,
HEADER_1 = 0xc0
} |
enum | encoding_types_e { ENCODE_AMF0 = 0x0,
ENCODE_AMF3 = 0x3,
ENCODE_AMF0 = 0x0,
ENCODE_AMF3 = 0x3
} |
enum | audiocodecs_e {
RAW = 0x0001,
ADPCM = 0x0002,
MP3 = 0x0004,
INTEL = 0x0005,
CELT = 0x0008,
NELLY8 = 0x0020,
NELLY = 0x0040,
G711A = 0x0080,
G711U = 0x0100,
NELLY16 = 0x0200,
AAC = 0x0400,
SPEEX = 0x0800,
DEFAULT_AUDIO_SET = 0x0267,
ALLAUDIO = 0x0fff,
RAW = 0x0001,
ADPCM = 0x0002,
MP3 = 0x0004,
INTEL = 0x0005,
CELT = 0x0008,
NELLY8 = 0x0020,
NELLY = 0x0040,
G711A = 0x0080,
G711U = 0x0100,
NELLY16 = 0x0200,
AAC = 0x0400,
SPEEX = 0x0800,
DEFAULT_AUDIO_SET = 0x0267,
ALLAUDIO = 0x0fff
} |
enum | videocodecs_e {
UNUSED = 0x0001,
JPEG = 0x0002,
SORENSON = 0x4,
ADOBE = 0x0008,
VP6 = 0x0010,
VP6ALPHA = 0x0020,
SCREEN2 = 0x0040,
H264 = 0x0080,
DEFAULT_VIDEO_SET = 0x007c,
ALLVIDEO = 0x00ff,
UNUSED = 0x0001,
JPEG = 0x0002,
SORENSON = 0x4,
ADOBE = 0x0008,
VP6 = 0x0010,
VP6ALPHA = 0x0020,
SCREEN2 = 0x0040,
H264 = 0x0080,
DEFAULT_VIDEO_SET = 0x007c,
ALLVIDEO = 0x00ff
} |
enum | videofunction_e {
SEEK = 0x1,
AMF0 = 0x0,
AMF3 = 0x3,
SEEK = 0x1,
AMF0 = 0x0,
AMF3 = 0x3
} |
enum | content_types_e {
NONE = 0x0,
CHUNK_SIZE = 0x1,
ABORT = 0x2,
BYTES_READ = 0x3,
USER = 0x4,
WINDOW_SIZE = 0x5,
SET_BANDWITH = 0x6,
ROUTE = 0x7,
AUDIO_DATA = 0x8,
VIDEO_DATA = 0x9,
SHARED_OBJ = 0xa,
AMF3_NOTIFY = 0xf,
AMF3_SHARED_OBJ = 0x10,
AMF3_INVOKE = 0x11,
NOTIFY = 0x12,
INVOKE = 0x14,
FLV_DATA = 0x16,
NONE = 0x0,
CHUNK_SIZE = 0x1,
ABORT = 0x2,
BYTES_READ = 0x3,
USER = 0x4,
WINDOW_SIZE = 0x5,
SET_BANDWITH = 0x6,
ROUTE = 0x7,
AUDIO_DATA = 0x8,
VIDEO_DATA = 0x9,
SHARED_OBJ = 0xa,
AMF3_NOTIFY = 0xf,
AMF3_SHARED_OBJ = 0x10,
AMF3_INVOKE = 0x11,
NOTIFY = 0x12,
INVOKE = 0x14,
FLV_DATA = 0x16
} |
enum | user_control_e {
STREAM_START = 0x0,
STREAM_EOF = 0x1,
STREAM_NODATA = 0x2,
STREAM_BUFFER = 0x3,
STREAM_LIVE = 0x4,
STREAM_PING = 0x6,
STREAM_PONG = 0x7,
STREAM_START = 0x0,
STREAM_EOF = 0x1,
STREAM_NODATA = 0x2,
STREAM_BUFFER = 0x3,
STREAM_LIVE = 0x4,
STREAM_PING = 0x6,
STREAM_PONG = 0x7
} |
enum | sharedobj_types_e {
CREATE_OBJ = 0x1,
DELETE_OBJ = 0x2,
REQUEST_CHANGE = 0x3,
CHANGE = 0x4,
SUCCESS_CLIENT = 0x5,
SEND_MESSAGE = 0x6,
STATUS = 0x7,
CLEAR = 0x8,
DELETE_SLOT = 0x9,
REQUEST_DELETE_SLOT = 0xa,
SUCCESS_SERVER = 0xb,
CREATE_OBJ = 0x1,
DELETE_OBJ = 0x2,
REQUEST_CHANGE = 0x3,
CHANGE = 0x4,
SUCCESS_CLIENT = 0x5,
SEND_MESSAGE = 0x6,
STATUS = 0x7,
CLEAR = 0x8,
DELETE_SLOT = 0x9,
REQUEST_DELETE_SLOT = 0xa,
SUCCESS_SERVER = 0xb
} |
enum | rtmp_ping_e {
PING_CLEAR = 0x0,
PING_PLAY = 0x1,
PING_TIME = 0x3,
PING_RESET = 0x4,
PING_CLIENT = 0x6,
PONG_CLIENT = 0x7,
PING_CLEAR = 0x0,
PING_PLAY = 0x1,
PING_TIME = 0x3,
PING_RESET = 0x4,
PING_CLIENT = 0x6,
PONG_CLIENT = 0x7
} |
enum | rtmp_op_e {
STREAM_PLAY,
STREAM_PAUSE,
STREAM_PUBLISH,
STREAM_STOP,
STREAM_SEEK,
STREAM_PLAY,
STREAM_PAUSE,
STREAM_PUBLISH,
STREAM_STOP,
STREAM_SEEK
} |
enum | rtmp_state_t {
RTMP_STATE_HANDSHAKE_SEND,
RTMP_STATE_HANDSHAKE_RECV,
RTMP_STATE_HANDSHAKE_ACK,
RTMP_STATE_CONNECT,
RTMP_STATE_NETCONNECT,
RTMP_STATE_NETSTREAM,
RTMP_STATE_HEADER,
RTMP_STATE_DONE,
RTMP_STATE_HANDSHAKE_SEND,
RTMP_STATE_HANDSHAKE_RECV,
RTMP_STATE_HANDSHAKE_ACK,
RTMP_STATE_CONNECT,
RTMP_STATE_NETCONNECT,
RTMP_STATE_NETSTREAM,
RTMP_STATE_HEADER,
RTMP_STATE_DONE
} |
enum | rtmp_error_t {
RTMP_ERR_UNDEF,
RTMP_ERR_NOTFOUND,
RTMP_ERR_PERM,
RTMP_ERR_DISKFULL,
RTMP_ERR_ILLEGAL,
RTMP_ERR_UNKNOWNID,
RTMP_ERR_EXISTS,
RTMP_ERR_NOSUCHUSER,
RTMP_ERR_TIMEOUT,
RTMP_ERR_NORESPONSE,
RTMP_ERR_UNDEF,
RTMP_ERR_NOTFOUND,
RTMP_ERR_PERM,
RTMP_ERR_DISKFULL,
RTMP_ERR_ILLEGAL,
RTMP_ERR_UNKNOWNID,
RTMP_ERR_EXISTS,
RTMP_ERR_NOSUCHUSER,
RTMP_ERR_TIMEOUT,
RTMP_ERR_NORESPONSE
} |
enum | rtmp_headersize_e {
HEADER_12 = 0x0,
HEADER_8 = 0x40,
HEADER_4 = 0x80,
HEADER_1 = 0xc0,
HEADER_12 = 0x0,
HEADER_8 = 0x40,
HEADER_4 = 0x80,
HEADER_1 = 0xc0
} |
typedef std::map< const char
*, cygnal::Element > | AMFProperties |
typedef std::deque< CQue * > | queues_t |
typedef std::map< const char
*, cygnal::Element > | AMFProperties |
typedef std::deque< CQue * > | queues_t |
Public Member Functions |
| RTMP () |
virtual | ~RTMP () |
boost::shared_ptr< rtmp_head_t > | decodeHeader (boost::uint8_t *header) |
boost::shared_ptr< rtmp_head_t > | decodeHeader (cygnal::Buffer &data) |
boost::shared_ptr< cygnal::Buffer > | encodeHeader (int amf_index, rtmp_headersize_e head_size, size_t total_size, content_types_e type, RTMPMsg::rtmp_source_e routing) |
boost::shared_ptr< cygnal::Buffer > | encodeHeader (int amf_index, rtmp_headersize_e head_size) |
| \ Each RTMP header consists of the following:
|
void | addProperty (cygnal::Element &el) |
void | addProperty (char *name, cygnal::Element &el) |
void | addProperty (std::string &name, cygnal::Element &el) |
cygnal::Element & | getProperty (const std::string &name) |
int | headerSize (boost::uint8_t header) |
rtmp_head_t * | getHeader () |
int | getHeaderSize () |
int | getTotalSize () |
RTMPMsg::rtmp_source_e | getRouting () |
int | getChannel () |
int | getPacketSize () |
int | getMysteryWord () |
boost::shared_ptr< RTMPMsg > | decodeMsgBody (boost::uint8_t *data, size_t size) |
boost::shared_ptr< RTMPMsg > | decodeMsgBody (cygnal::Buffer &buf) |
virtual boost::shared_ptr
< rtmp_ping_t > | decodePing (boost::uint8_t *data) |
boost::shared_ptr< rtmp_ping_t > | decodePing (cygnal::Buffer &buf) |
virtual boost::shared_ptr
< user_event_t > | decodeUserControl (boost::uint8_t *data) |
boost::shared_ptr< user_event_t > | decodeUserControl (cygnal::Buffer &buf) |
virtual boost::shared_ptr
< cygnal::Buffer > | encodeUserControl (user_control_e, boost::uint32_t data) |
virtual boost::shared_ptr
< cygnal::Buffer > | encodeChunkSize (int size) |
virtual void | decodeChunkSize () |
virtual boost::shared_ptr
< cygnal::Buffer > | encodeBytesRead () |
virtual void | decodeBytesRead () |
virtual boost::shared_ptr
< cygnal::Buffer > | encodeServer () |
virtual void | decodeServer () |
virtual boost::shared_ptr
< cygnal::Buffer > | encodeClient () |
virtual void | decodeClient () |
virtual boost::shared_ptr
< cygnal::Buffer > | encodeAudioData () |
virtual void | decodeAudioData () |
virtual boost::shared_ptr
< cygnal::Buffer > | encodeVideoData () |
virtual void | decodeVideoData () |
virtual boost::shared_ptr
< cygnal::Buffer > | encodeNotify () |
virtual void | decodeNotify () |
virtual boost::shared_ptr
< cygnal::Buffer > | encodeSharedObj () |
virtual void | decodeSharedObj () |
virtual boost::shared_ptr
< cygnal::Buffer > | encodeInvoke () |
virtual void | decodeInvoke () |
boost::shared_ptr< cygnal::Buffer > | recvMsg () |
boost::shared_ptr< cygnal::Buffer > | recvMsg (int fd) |
bool | sendMsg (cygnal::Buffer &data) |
bool | sendMsg (int channel, rtmp_headersize_e head_size, size_t total_size, content_types_e type, RTMPMsg::rtmp_source_e routing, cygnal::Buffer &data) |
bool | sendMsg (int fd, int channel, rtmp_headersize_e head_size, size_t total_size, content_types_e type, RTMPMsg::rtmp_source_e routing, cygnal::Buffer &data) |
bool | sendMsg (int channel, rtmp_headersize_e head_size, size_t total_size, content_types_e type, RTMPMsg::rtmp_source_e routing, boost::uint8_t *data, size_t size) |
bool | sendMsg (int fd, int channel, rtmp_headersize_e head_size, size_t total_size, content_types_e type, RTMPMsg::rtmp_source_e routing, boost::uint8_t *data, size_t size) |
boost::shared_ptr< queues_t > | split (cygnal::Buffer &buf) |
boost::shared_ptr< queues_t > | split (boost::uint8_t *data, size_t size) |
CQue & | operator[] (size_t x) |
boost::uint32_t | getTime () |
void | dump () |
| RTMP () |
virtual | ~RTMP () |
boost::shared_ptr< rtmp_head_t > | decodeHeader (boost::uint8_t *header) |
boost::shared_ptr< rtmp_head_t > | decodeHeader (cygnal::Buffer &data) |
boost::shared_ptr< cygnal::Buffer > | encodeHeader (int amf_index, rtmp_headersize_e head_size, size_t total_size, content_types_e type, RTMPMsg::rtmp_source_e routing) |
boost::shared_ptr< cygnal::Buffer > | encodeHeader (int amf_index, rtmp_headersize_e head_size) |
void | addProperty (cygnal::Element &el) |
void | addProperty (char *name, cygnal::Element &el) |
void | addProperty (std::string &name, cygnal::Element &el) |
cygnal::Element & | getProperty (const std::string &name) |
int | headerSize (boost::uint8_t header) |
rtmp_head_t * | getHeader () |
int | getHeaderSize () |
int | getTotalSize () |
RTMPMsg::rtmp_source_e | getRouting () |
int | getChannel () |
int | getPacketSize () |
int | getMysteryWord () |
boost::shared_ptr< RTMPMsg > | decodeMsgBody (boost::uint8_t *data, size_t size) |
boost::shared_ptr< RTMPMsg > | decodeMsgBody (cygnal::Buffer &buf) |
virtual boost::shared_ptr
< rtmp_ping_t > | decodePing (boost::uint8_t *data) |
boost::shared_ptr< rtmp_ping_t > | decodePing (cygnal::Buffer &buf) |
virtual boost::shared_ptr
< user_event_t > | decodeUserControl (boost::uint8_t *data) |
boost::shared_ptr< user_event_t > | decodeUserControl (cygnal::Buffer &buf) |
virtual boost::shared_ptr
< cygnal::Buffer > | encodeUserControl (user_control_e, boost::uint32_t data) |
virtual boost::shared_ptr
< cygnal::Buffer > | encodeChunkSize (int size) |
virtual void | decodeChunkSize () |
virtual boost::shared_ptr
< cygnal::Buffer > | encodeBytesRead () |
virtual void | decodeBytesRead () |
virtual boost::shared_ptr
< cygnal::Buffer > | encodeServer () |
virtual void | decodeServer () |
virtual boost::shared_ptr
< cygnal::Buffer > | encodeClient () |
virtual void | decodeClient () |
virtual boost::shared_ptr
< cygnal::Buffer > | encodeAudioData () |
virtual void | decodeAudioData () |
virtual boost::shared_ptr
< cygnal::Buffer > | encodeVideoData () |
virtual void | decodeVideoData () |
virtual boost::shared_ptr
< cygnal::Buffer > | encodeNotify () |
virtual void | decodeNotify () |
virtual boost::shared_ptr
< cygnal::Buffer > | encodeSharedObj () |
virtual void | decodeSharedObj () |
virtual boost::shared_ptr
< cygnal::Buffer > | encodeInvoke () |
virtual void | decodeInvoke () |
boost::shared_ptr< cygnal::Buffer > | recvMsg () |
boost::shared_ptr< cygnal::Buffer > | recvMsg (int fd) |
bool | sendMsg (cygnal::Buffer &data) |
bool | sendMsg (int channel, rtmp_headersize_e head_size, size_t total_size, content_types_e type, RTMPMsg::rtmp_source_e routing, cygnal::Buffer &data) |
bool | sendMsg (int fd, int channel, rtmp_headersize_e head_size, size_t total_size, content_types_e type, RTMPMsg::rtmp_source_e routing, cygnal::Buffer &data) |
bool | sendMsg (int channel, rtmp_headersize_e head_size, size_t total_size, content_types_e type, RTMPMsg::rtmp_source_e routing, boost::uint8_t *data, size_t size) |
bool | sendMsg (int fd, int channel, rtmp_headersize_e head_size, size_t total_size, content_types_e type, RTMPMsg::rtmp_source_e routing, boost::uint8_t *data, size_t size) |
boost::shared_ptr< queues_t > | split (cygnal::Buffer &buf) |
boost::shared_ptr< queues_t > | split (boost::uint8_t *data, size_t size) |
CQue & | operator[] (size_t x) |
boost::uint32_t | getTime () |
void | dump () |
Protected Attributes |
AMFProperties | _properties |
cygnal::Buffer * | _handshake |
rtmp_head_t | _header |
int | _packet_size |
int | _mystery_word |
size_t | _chunksize [MAX_AMF_INDEXES] |
size_t | _lastsize [MAX_AMF_INDEXES] |
std::vector< size_t > | _bodysize |
std::vector< content_types_e > | _type |
int | _timeout |
CQue | _queues [MAX_AMF_INDEXES] |
cygnal::Buffer | _buffer |
rtmp_handshake_head_t | _handshake_header |