Module messages

Source
Expand description

§The RTMP Messages

After handshake, both are required to negotiate what are needed for sending/receiving. Currently, following messages are used in negotiation:

Every message has headers. See sheave_core::messages::headers about them.

§User Control

User Control messages are additional informations for starting streaming. These consist of following format:

FieldLength (in bytes)Description
Event Type2A marker which indicates a kind of data sent.
Event DataVariousActual data of this message.

§Events

Currently, following events are used:

§Command

Command messages are contained basic informations actually required to negotiate. These encodes/decodes into/from [the Action Message Format 0]. These consist of following format:

FieldAMF TypeDescription
Command NameStringThe command which is currently negotiated.
Transaction IDNumberA number which indicates a step of this negotiation.
Setting DataVariousActually negotiated data.

Furthermore commands have following patterns:

  • NetConnection
  • NetStream

§NetConnection

NetConnection commands are defined as following messages:

§NetStream

NetStream commands are defined as following messages:

§Any data

After negotiation, the server receives actual audio/video data from clients. However also FLV metadata is received as the AMF (v0). The message what contains FLV metadata is called @setDataFrame. This consists of following format:

FieldAMF TypeDescription
Command Name (probably)String"@setDataFrame"
Setting DataVariousIn this case, see ScriptDataTag.

Modules§

amf
The Action Message Formats
headers
The Chunk Headers

Structs§

Acknowledgement
The message to tell that some message length has exceeded the server-side bandwidth range. Note this must be input the total message length in receiving. (it’s not bytes received.)
Audio
ChunkSize
Tells a size to chunk its stream to the partner.
CommandError
The response message that some command failed.
Connect
The command to exchange an information about application using.
ConnectResult
The response message for Connect requests.
CreateStream
The command to request emitting a message ID to a server.
CreateStreamResult
The response message for CreateStream requests.
DeleteStream
The command to request to delete its message ID.
FcPublish
The command to tell a path to the server.
FcSubscribe
The command to tell the topic path.
FcUnpublish
This command is same as FcPublish except this requests to delete the topic path.
GetStreamLength
The command to tell the topic path. (e.g. something file name)
GetStreamLengthResult
The response message for GetStreamLength requests.
InconsistentCommand
An error that some command name differs you expect.
InconsistentEventType
An error that some event type differs you expect.
InvalidPublishingType
An error that some publishing type differs you expect.
NegativeChunkSize
An error that some chunk size is negative.
OnFcPublish
The response message for FcPublish requests.
OnStatus
The response message for Publish requests.
PeerBandwidth
The message to tell the client-side bandwidth. This has 2 ways of comparision by which field you specifies.
Play
The command to tell playing information.
PlaylistReady
The response message for SetPlaylist requests.
Publish
The command to tell publishing information.
PublishingFailure
An error that publishing has failed by something cause.
ReleaseStream
The command to tell some path to the server.
ReleaseStreamResult
The response message for ReleaseStream requests.
SetBufferLength
The event to tell that its stream will be buffered, to the server.
SetDataFrame
The message to handle something data.
SetPlaylist
The command to tell the Playlist of streams.
StreamBegin
The event to tell that the stream is ready to a client.
Video
WindowAcknowledgementSize
The message to tell the bandwidth limit as a receiver side.

Enums§

Channel
The IDs which are assigned every roles of chunks. This is mainly used for the BasicHeader’s chunk ID.
EventType
The IDs which are types of user control messages.
LimitType
Representation of the limit type field in the PeerBandwidth message.
PlayMode
Representation of the way to subscribe its stream.

Traits§

ChunkData
Uniforms chunk data by a channel numbers and a message type.
Command
UserControl
Uniforms user control messages by an event type.

Functions§

inconsistent_command
A utility function of constructing an InconsistentCommand error.
inconsistent_event_type
A utility function of constructing an InconsistentEventType error.
invalid_publishing_type
A utility function of constructing an InvalidPublishingType error.
negative_chunk_size
A utility function of constructing a NegativeChunkSize error.
publishing_failure
A utility function of constructing a PublishingFailure error.