Versions in this module Expand all Collapse all v0 v0.0.2 Aug 24, 2023 v0.0.1 Aug 23, 2023 Changes in this version + const CHUNK_CHANNEL_AUDIO + const CHUNK_CHANNEL_CMD + const CHUNK_CHANNEL_META + const CHUNK_CHANNEL_NET_STREAM + const CHUNK_CHANNEL_USE_CTRL + const CHUNK_CHANNEL_VIDEO + const DEFAULT_ACK_SIZE + const DEFAULT_CHUNK_SIZE + const FIX_CHUNK_SIZE + const HANDSHAKE_COMPLEX_SCHEMA0 + const HANDSHAKE_COMPLEX_SCHEMA1 + const HANDSHAKE_DIGEST_SIZE + const HANDSHAKE_FIX_SIZE + const HANDSHAKE_OFFSET_SIZE + const HANDSHAKE_SCHEMA0_OFFSET + const HANDSHAKE_SCHEMA1_OFFSET + const HANDSHAKE_SCHEMA_SIZE + const HANDSHAKE_SIZE + const LimitType_DYNAMIC + const LimitType_HARD + const LimitType_SOFT + const PUBLISHING_APPEND + const PUBLISHING_LIVE + const PUBLISHING_RECORD + const PingRequest + const PingResponse + const SetBufferLength + const StreamBegin + const StreamDry + const StreamEOF + const StreamIsRecorded + var ChunkType [4]byte = [4]byte + var EndObj []byte = []byte + var NullItem []byte = []byte + func WithAudioMuxer(muxer flv.AVTagMuxer) func(*RtmpClient) + func WithChunkSize(chunkSize uint32) func(*RtmpClient) + func WithComplexHandshake() func(*RtmpClient) + func WithComplexHandshakeSchema(schema int) func(*RtmpClient) + func WithEnablePublish() func(*RtmpClient) + func WithWndAckSize(ackSize uint32) func(*RtmpClient) + type AMF0_DATA_TYPE int + const AMF0_AVMPLUS_OBJECT + const AMF0_BOOLEAN + const AMF0_DATE + const AMF0_ECMA_ARRAY + const AMF0_LONG_STRING + const AMF0_MOVIECLIP + const AMF0_NULL + const AMF0_NUMBER + const AMF0_OBJECT + const AMF0_OBJECT_END + const AMF0_RECORDSET + const AMF0_REFERENCE + const AMF0_STRICT_ARRAY + const AMF0_STRING + const AMF0_TYPED_OBJECT + const AMF0_UNDEFINED + const AMF0_UNSUPPORTED + const AMF0_XML_DOCUMENT + type HandShakeState int + const CLIENT_S0 + const CLIENT_S1 + const CLIENT_S2 + const HANDSHAKE_DONE + const SERVER_C0 + const SERVER_C1 + const SERVER_C2 + type MessageType int + const ABORT_MESSAGE + const ACKNOWLEDGEMENT + const AUDIO + const Aggregate + const Command_AMF0 + const Command_AMF3 + const Metadata_AMF0 + const Metadata_AMF3 + const SET_CHUNK_SIZE + const SET_PEER_BW + const SharedObject_AMF0 + const SharedObject_AMF3 + const USER_CONTROL + const VIDEO + const WND_ACK_SIZE + type NetStreamStatusCode string + type OnError func(code, describe string) + type OnFrame func(cid codec.CodecID, pts, dts uint32, frame []byte) + type OnPlay func(app, streamName string, start, duration float64, reset bool) StatusCode + type OnPublish func(app, streamName string) StatusCode + type OnReleaseStream func(app, streamName string) + type OnStateChange func(newState RtmpState) + type OnStatus func(code, level, describe string) + type OutputCB func([]byte) error + type ParserState int + const S_BASIC_HEAD + const S_EXTEND_TS + const S_MSG_HEAD + const S_PAYLOAD + type RtmpClient struct + func NewRtmpClient(options ...func(*RtmpClient)) *RtmpClient + func (cli *RtmpClient) GetState() RtmpState + func (cli *RtmpClient) Input(data []byte) error + func (cli *RtmpClient) OnError(onerror OnError) + func (cli *RtmpClient) OnFrame(onframe OnFrame) + func (cli *RtmpClient) OnStateChange(stateChange OnStateChange) + func (cli *RtmpClient) OnStatus(onstatus OnStatus) + func (cli *RtmpClient) SetOutput(output OutputCB) + func (cli *RtmpClient) Start(url string) + func (cli *RtmpClient) WriteAudio(cid codec.CodecID, frame []byte, pts, dts uint32) error + func (cli *RtmpClient) WriteFrame(cid codec.CodecID, frame []byte, pts, dts uint32) error + func (cli *RtmpClient) WriteVideo(cid codec.CodecID, frame []byte, pts, dts uint32) error + type RtmpConnectCmd int + const CLOSE + const CONNECT + const CREATE_STREAM + const GET_STREAM_LENGTH + type RtmpParserState int + const HandShake + const ReadChunk + type RtmpServerHandle struct + func NewRtmpServerHandle(options ...func(*RtmpServerHandle)) *RtmpServerHandle + func (server *RtmpServerHandle) GetApp() string + func (server *RtmpServerHandle) GetState() RtmpState + func (server *RtmpServerHandle) GetStreamName() string + func (server *RtmpServerHandle) Input(data []byte) error + func (server *RtmpServerHandle) OnFrame(onframe OnFrame) + func (server *RtmpServerHandle) OnPlay(onPlay OnPlay) + func (server *RtmpServerHandle) OnPublish(onPub OnPublish) + func (server *RtmpServerHandle) OnRelease(onRelease OnReleaseStream) + func (server *RtmpServerHandle) OnStateChange(stateChange OnStateChange) + func (server *RtmpServerHandle) SetOutput(output OutputCB) + func (server *RtmpServerHandle) WriteAudio(cid codec.CodecID, frame []byte, pts, dts uint32) error + func (server *RtmpServerHandle) WriteFrame(cid codec.CodecID, frame []byte, pts, dts uint32) error + func (server *RtmpServerHandle) WriteVideo(cid codec.CodecID, frame []byte, pts, dts uint32) error + type RtmpState int + const STATE_HANDSHAKEING + const STATE_HANDSHAKE_DONE + const STATE_RTMP_CONNECTING + const STATE_RTMP_PLAY_FAILED + const STATE_RTMP_PLAY_START + const STATE_RTMP_PUBLISH_FAILED + const STATE_RTMP_PUBLISH_START + type StatusCode string + const NETCONNECT_CONNECT_CLOSED + const NETCONNECT_CONNECT_FAILED + const NETCONNECT_CONNECT_REJECTED + const NETCONNECT_CONNECT_SUCCESS + const NETSTREAM_CONNECT_CLOSED + const NETSTREAM_CONNECT_FAILED + const NETSTREAM_CONNECT_REJECTED + const NETSTREAM_CONNECT_SUCCESSS + const NETSTREAM_PAUSE_NOTIFY + const NETSTREAM_PLAY_FAILED + const NETSTREAM_PLAY_NOTFOUND + const NETSTREAM_PLAY_RESET + const NETSTREAM_PLAY_START + const NETSTREAM_PLAY_STOP + const NETSTREAM_PUBLISH_START + const NETSTREAM_RECORD_FAILED + const NETSTREAM_RECORD_START + const NETSTREAM_RECORD_STOP + const NETSTREAM_SEEK_FAILED + const NETSTREAM_SEEK_NOTIFY + const NETSTREAM_UNPAUSE_NOTIFY + func (c StatusCode) Description() StatusLevel + func (c StatusCode) Level() StatusLevel + type StatusLevel string + const LEVEL_ERROR + const LEVEL_STATUS + const LEVEL_WARN + type UserEvent struct