Module constants

Module constants 

Source
Expand description

RTMP protocol constants

Reference: Adobe RTMP Specification (December 2012) Reference: RFC 7425 - Adobe’s RTMP (Informational)

Constants§

BANDWIDTH_LIMIT_DYNAMIC
Dynamic - can be hard or soft depending on prior state
BANDWIDTH_LIMIT_HARD
Hard limit - peer should limit output to this bandwidth
BANDWIDTH_LIMIT_SOFT
Soft limit - peer can exceed if it has excess bandwidth
CHUNK_FMT_0
Type 0: Full header (11 bytes) - timestamp, length, type, stream ID
CHUNK_FMT_1
Type 1: No stream ID (7 bytes) - timestamp delta, length, type
CHUNK_FMT_2
Type 2: No stream ID, length, type (3 bytes) - timestamp delta only
CHUNK_FMT_3
Type 3: No header (0 bytes) - use previous chunk’s values
CMD_CALL
CMD_CLOSE
CMD_CONNECT
CMD_CREATE_STREAM
CMD_DELETE_STREAM
CMD_ERROR
CMD_FC_PUBLISH
CMD_FC_UNPUBLISH
CMD_ON_FC_PUBLISH
CMD_ON_FC_UNPUBLISH
CMD_ON_METADATA
CMD_ON_STATUS
Status notification
CMD_PAUSE
CMD_PLAY
CMD_PLAY2
CMD_PUBLISH
CMD_RECEIVE_AUDIO
CMD_RECEIVE_VIDEO
CMD_RELEASE_STREAM
CMD_RESULT
Internal response commands
CMD_SEEK
CMD_SET_DATA_FRAME
CSID_AUDIO
Audio data
CSID_COMMAND
Command messages (connect, createStream, etc.)
CSID_PROTOCOL_CONTROL
Protocol control messages (Set Chunk Size, Abort, etc.)
CSID_VIDEO
Video data
DEFAULT_BUFFER_LENGTH
Default buffer length in milliseconds
DEFAULT_CHUNK_SIZE
Default chunk size (per RTMP spec)
DEFAULT_PEER_BANDWIDTH
Default peer bandwidth (2.5 MB)
DEFAULT_WINDOW_ACK_SIZE
Default window acknowledgement size (2.5 MB)
EXTENDED_TIMESTAMP_THRESHOLD
Extended timestamp threshold Timestamps >= this value require extended timestamp field
HANDSHAKE_SIZE
Handshake packet sizes
MAX_CHUNK_SIZE
Maximum chunk size allowed
MAX_MESSAGE_SIZE
Maximum message size (sanity limit)
MSG_ABORT
Abort Message (2) - protocol control
MSG_ACKNOWLEDGEMENT
Acknowledgement (3) - protocol control
MSG_AGGREGATE
Aggregate Message (22)
MSG_AUDIO
Audio Message (8)
MSG_COMMAND_AMF0
AMF0 Command Message (20) - connect, play, publish, etc.
MSG_COMMAND_AMF3
AMF3 Command Message (17)
MSG_DATA_AMF0
AMF0 Data Message (18) - @setDataFrame, onMetaData
MSG_DATA_AMF3
AMF3 Data Message (15) - @setDataFrame with AMF3
MSG_SET_CHUNK_SIZE
Set Chunk Size (1) - protocol control
MSG_SET_PEER_BANDWIDTH
Set Peer Bandwidth (6) - protocol control
MSG_SHARED_OBJECT_AMF0
AMF0 Shared Object (19)
MSG_SHARED_OBJECT_AMF3
AMF3 Shared Object (16)
MSG_USER_CONTROL
User Control Message (4) - protocol control
MSG_VIDEO
Video Message (9)
MSG_WINDOW_ACK_SIZE
Window Acknowledgement Size (5) - protocol control
NC_CONNECT_CLOSED
NC_CONNECT_FAILED
NC_CONNECT_REJECTED
NC_CONNECT_SUCCESS
NS_PAUSE_NOTIFY
NS_PLAY_RESET
NS_PLAY_START
NS_PLAY_STOP
NS_PLAY_STREAM_NOT_FOUND
NS_PUBLISH_BAD_NAME
NS_PUBLISH_START
NS_UNPAUSE_NOTIFY
RECOMMENDED_CHUNK_SIZE
Recommended chunk size for efficiency (reduces header overhead)
RTMP_PORT
Default RTMP port
RTMP_VERSION
RTMP version number (always 3 for standard RTMP)
UC_PING_REQUEST
Ping Request - server pings client
UC_PING_RESPONSE
Ping Response - client responds to ping
UC_SET_BUFFER_LENGTH
Set Buffer Length - client tells server buffer size
UC_STREAM_BEGIN
Stream Begin - server sends when stream becomes functional
UC_STREAM_DRY
Stream Dry - no more data available
UC_STREAM_EOF
Stream EOF - server sends when playback ends
UC_STREAM_IS_RECORDED
Stream Is Recorded - stream is recorded