Versions in this module Expand all Collapse all v0 v0.0.1 Dec 31, 2021 Changes in this version + const ABORT_MESSAGE + const ACKNOWLEDGEMENT + const AUDIO_MESSAGE + const C0_LEN + const C1_LEN + const C2_LEN + const CALL + const CLOSE + const CLOSE_STREAM + const COMMAND_MESSAGE_AMF0 + const COMMAND_MESSAGE_AMF3 + const CONNECT + const CREATE_STREAM + const DATA_MESSAGE_AMF0 + const DATA_MESSAGE_AMF3 + const DELETE_STREAM + const FCPUBLISH + const FCUNPUBLISH + const ON_STATUS + const PAUSE + const PLAY + const PLAY2 + const PUBLISH + const RECEIVE_AUDIO + const RECEIVE_VIDEO + const RELEASE_STREAM + const S0_LEN + const S1_LEN + const S2_LEN + const SEEK + const SET_CHUNK_SIZE + const SET_PEER_BANDWIDTH + const SHARE_OBJECT_MESSAGE_AMF0 + const SHARE_OBJECT_MESSAGE_AMF3 + const USER_CONTROL_MESSAGE + const VIDEO_MESSAGE + const WINDOW_ACKNOWLEDGEMENT_SIZE + var FMSKey = []byte + var FPkey = []byte + func HandshakeClient(rtmp *RTMP) (err error) + func HandshakeServer(rtmp *RTMP) (err error) + func NewServer(address string, apps ...string) (s *server) + func ParseMessage(rtmp *RTMP) (err error) + type AbortMessage struct + ChunkStreamID int + func NewAbortMessage(mb MessageBase, fields ...interface{}) (am *AbortMessage) + func (scsm *AbortMessage) Do() error + func (scsm *AbortMessage) Parse() (err error) + func (scsm *AbortMessage) Send() error + type AcknowledgeMessage struct + SequenceNumber int + func NewAcknowledgeMessage(mb MessageBase, fields ...interface{}) (am *AcknowledgeMessage) + func (scsm *AcknowledgeMessage) Do() error + func (scsm *AcknowledgeMessage) Parse() (err error) + func (scsm *AcknowledgeMessage) Send() error + type App struct + func NewApp(appName string) *App + func (app *App) Load(roomID string) *Room + func (app *App) Store(roomID string, room *Room) + type AudioCodec float64 + const SUPPORT_SND_AAC + const SUPPORT_SND_ADPCM + const SUPPORT_SND_ALL + const SUPPORT_SND_G711A + const SUPPORT_SND_G711U + const SUPPORT_SND_INTEL + const SUPPORT_SND_MP3 + const SUPPORT_SND_NELLY + const SUPPORT_SND_NELLY16 + const SUPPORT_SND_NELLY8 + const SUPPORT_SND_NONE + const SUPPORT_SND_SPEEX + const SUPPORT_SND_UNUSED + type AudioMessage struct + func NewAudioMessage(mb MessageBase, fields ...interface{}) (am *AudioMessage) + func (am *AudioMessage) Do() (err error) + func (am *AudioMessage) Parse() (err error) + func (am *AudioMessage) Send() (err error) + type Chunk struct + Payload []byte + func NewChunk(messageType MessageType, messageLength uint32, messageTime uint32, ...) (chunk *Chunk) + func ParseChunk(rtmp *RTMP, message Message) (cp *Chunk, err error) + func (chunk *Chunk) Send(rtmp *RTMP) (err error) + type ChunkBasicHeader struct + CsID uint32 + Fmt MessageHeaderType + type ChunkMessageHeader struct + MessageLength uint32 + MessageStreamID uint32 + MessageTimeDelta uint32 + MessageTimeStamp uint32 + MessageType MessageType + type CommandMessage struct + CommandName string + CommandObject ConnectReqCommandObject + Duration float64 + PublishingName string + PublishingType string + Reset bool + Start float64 + StreamName string + TranscationID int + func NewCommandMessage(mb MessageBase, fields ...interface{}) (cm *CommandMessage) + func (cm *CommandMessage) Do() (err error) + func (cm *CommandMessage) Parse() (err error) + func (cm *CommandMessage) Send() (err error) + type CommandMessageResponse struct + CommandName string + CommandObject ConnectRespCommandObject + CommandRespName string + StreamID uint32 + TranscationID int + func (cmr *CommandMessageResponse) Send() (err error) + type ConnectReqCommandObject struct + App string + AudioCodecs AudioCodec + Capabilities float64 + FlashVer string + Fpad bool + ObjectEncoding float64 + PageURL string + SwfURL string + TcURL string + Type string + VideoCodecs VideoCodec + VideoFunction VideoFunction + type ConnectRespCommandObject struct + Capabilities float64 + Code string + Description string + FmsVer string + Level string + ObjectEncoding float64 + type DataMessage struct + func NewDataMessage(mb MessageBase, fields ...interface{}) (dm *DataMessage) + func (dm *DataMessage) Do() (err error) + func (dm *DataMessage) Parse() (err error) + func (dm *DataMessage) Send() (err error) + type EventType uint16 + const PingRequest + const PingResponse + const SetBufferLength + const StreamBegin + const StreamDry + const StreamEOF + const StreamIsRecorded + type HandshakeMode int + const COMPLEX1 + const COMPLEX2 + const SIMPLE + type LimitType uint8 + const DYNAMIC + const HARD + const SOFT + type Message interface + Append func(*Chunk) + Do func() error + Done func() bool + GetInfo func() *MessageBase + Parse func() error + Remain func() uint32 + Send func() error + Update func(uint32) + type MessageBase struct + func (mb *MessageBase) Append(chunk *Chunk) + func (mb *MessageBase) Done() bool + func (mb *MessageBase) GetInfo() *MessageBase + func (mb *MessageBase) Remain() uint32 + func (mb *MessageBase) Update(time uint32) + type MessageHeaderType uint8 + const FMT0 + const FMT1 + const FMT2 + const FMT3 + type MessageType uint8 + type Peer struct + type RTMP struct + func NewRTMP(conn net.Conn, peer string, server *server) (rtmp *RTMP) + func (rtmp *RTMP) HandlerClient() + func (rtmp *RTMP) HandlerServer() + type Room struct + GOP *broadcast.Broadcast + Publisher *RTMP + RoomID string + func NewRoom(rtmp *RTMP, roomID string) *Room + func (room *Room) FLVJoin(writer easyio.EasyWriter) + func (room *Room) HLSJoin(writer easyio.EasyWriter) + func (room *Room) RTMPJoin(rtmp *RTMP) + type SetChunkSizeMessage struct + NewChunkSize uint32 + func NewSetChunkSizeMessage(mb MessageBase, fields ...interface{}) (scsm *SetChunkSizeMessage) + func (scsm *SetChunkSizeMessage) Do() error + func (scsm *SetChunkSizeMessage) Parse() (err error) + func (scsm *SetChunkSizeMessage) Send() error + type SetPeerBandWidthMessage struct + AcknowledgementWindowSize uint32 + LimitType LimitType + func NewSetPeerBandWidthMessage(mb MessageBase, fields ...interface{}) (spbwm *SetPeerBandWidthMessage) + func (spbwm *SetPeerBandWidthMessage) Do() (err error) + func (spbwm *SetPeerBandWidthMessage) Parse() (err error) + func (spbwm *SetPeerBandWidthMessage) Send() (err error) + type UserControlMessage struct + EventData []byte + EventType EventType + func NewUserControlMessage(mb MessageBase, fields ...interface{}) (ucm *UserControlMessage) + func (ucm *UserControlMessage) Do() (err error) + func (ucm *UserControlMessage) Parse() (err error) + func (ucm *UserControlMessage) Send() (err error) + type VideoCodec float64 + const SUPPORT_VID_ALL + const SUPPORT_VID_H264 + const SUPPORT_VID_HOMEBREW + const SUPPORT_VID_HOMEBREWV + const SUPPORT_VID_JPEG + const SUPPORT_VID_SORENSON + const SUPPORT_VID_UNUSE + const SUPPORT_VID_VP6 + const SUPPORT_VID_VP6ALPHA + type VideoFunction float64 + const SUPPORT_VID_CLIENT_SEEK + type VideoMessage struct + func NewVideoMessage(mb MessageBase, fields ...interface{}) (vm *VideoMessage) + func (vm *VideoMessage) Do() (err error) + func (vm *VideoMessage) Parse() (err error) + func (vm *VideoMessage) Send() (err error) + type WindowAcknowledgeSizeMessage struct + AcknowledgementWindowSize uint32 + func NewWindowAcknowledgeSizeMessage(mb MessageBase, fields ...interface{}) (wasm *WindowAcknowledgeSizeMessage) + func (wasm *WindowAcknowledgeSizeMessage) Do() (err error) + func (wasm *WindowAcknowledgeSizeMessage) Parse() (err error) + func (wasm *WindowAcknowledgeSizeMessage) Send() (err error)