Documentation ¶
Overview ¶
Package rtmp provides RTMP connectivity.
Index ¶
- func FromStream(stream *stream.Stream, reader stream.Reader, conn *Conn, nconn net.Conn, ...) error
- func ToStream(r *Reader, stream **stream.Stream) ([]*description.Media, error)
- type Conn
- type OnDataAC3Func
- type OnDataAV1Func
- type OnDataG711Func
- type OnDataH26xFunc
- type OnDataLPCMFunc
- type OnDataMPEG1AudioFunc
- type OnDataMPEG4AudioFunc
- type OnDataOpusFunc
- type OnDataVP9Func
- type Reader
- func (r *Reader) OnDataAC3(track *format.AC3, cb OnDataAC3Func)
- func (r *Reader) OnDataAV1(track *format.AV1, cb OnDataAV1Func)
- func (r *Reader) OnDataG711(track *format.G711, cb OnDataG711Func)
- func (r *Reader) OnDataH264(track *format.H264, cb OnDataH26xFunc)
- func (r *Reader) OnDataH265(track *format.H265, cb OnDataH26xFunc)
- func (r *Reader) OnDataLPCM(track *format.LPCM, cb OnDataLPCMFunc)
- func (r *Reader) OnDataMPEG1Audio(track *format.MPEG1Audio, cb OnDataMPEG1AudioFunc)
- func (r *Reader) OnDataMPEG4Audio(track *format.MPEG4Audio, cb OnDataMPEG4AudioFunc)
- func (r *Reader) OnDataOpus(track *format.Opus, cb OnDataOpusFunc)
- func (r *Reader) OnDataVP9(track *format.VP9, cb OnDataVP9Func)
- func (r *Reader) Read() error
- func (r *Reader) Tracks() []format.Format
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is a RTMP connection.
func NewClientConn ¶
NewClientConn initializes a client-side connection.
func NewServerConn ¶
NewServerConn initializes a server-side connection.
func (*Conn) BytesReceived ¶
BytesReceived returns the number of bytes received.
type OnDataAC3Func ¶ added in v1.11.0
OnDataAC3Func is the prototype of the callback passed to OnDataAC3().
type OnDataAV1Func ¶
OnDataAV1Func is the prototype of the callback passed to OnDataAV1().
type OnDataG711Func ¶ added in v1.4.2
OnDataG711Func is the prototype of the callback passed to OnDataG711().
type OnDataH26xFunc ¶
OnDataH26xFunc is the prototype of the callback passed to OnDataH26x().
type OnDataLPCMFunc ¶ added in v1.4.2
OnDataLPCMFunc is the prototype of the callback passed to OnDataLPCM().
type OnDataMPEG1AudioFunc ¶
OnDataMPEG1AudioFunc is the prototype of the callback passed to OnDataMPEG1Audio().
type OnDataMPEG4AudioFunc ¶
OnDataMPEG4AudioFunc is the prototype of the callback passed to OnDataMPEG4Audio().
type OnDataOpusFunc ¶ added in v1.11.0
OnDataOpusFunc is the prototype of the callback passed to OnDataOpus().
type OnDataVP9Func ¶
OnDataVP9Func is the prototype of the callback passed to OnDataVP9().
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader is a wrapper around Conn that provides utilities to demux incoming data.
func (*Reader) OnDataAC3 ¶ added in v1.11.0
func (r *Reader) OnDataAC3(track *format.AC3, cb OnDataAC3Func)
OnDataAC3 sets a callback that is called when AC-3 data is received.
func (*Reader) OnDataAV1 ¶
func (r *Reader) OnDataAV1(track *format.AV1, cb OnDataAV1Func)
OnDataAV1 sets a callback that is called when AV1 data is received.
func (*Reader) OnDataG711 ¶ added in v1.4.2
func (r *Reader) OnDataG711(track *format.G711, cb OnDataG711Func)
OnDataG711 sets a callback that is called when G711 data is received.
func (*Reader) OnDataH264 ¶
func (r *Reader) OnDataH264(track *format.H264, cb OnDataH26xFunc)
OnDataH264 sets a callback that is called when H264 data is received.
func (*Reader) OnDataH265 ¶
func (r *Reader) OnDataH265(track *format.H265, cb OnDataH26xFunc)
OnDataH265 sets a callback that is called when H265 data is received.
func (*Reader) OnDataLPCM ¶ added in v1.4.2
func (r *Reader) OnDataLPCM(track *format.LPCM, cb OnDataLPCMFunc)
OnDataLPCM sets a callback that is called when LPCM data is received.
func (*Reader) OnDataMPEG1Audio ¶
func (r *Reader) OnDataMPEG1Audio(track *format.MPEG1Audio, cb OnDataMPEG1AudioFunc)
OnDataMPEG1Audio sets a callback that is called when MPEG-1 Audio data is received.
func (*Reader) OnDataMPEG4Audio ¶
func (r *Reader) OnDataMPEG4Audio(track *format.MPEG4Audio, cb OnDataMPEG4AudioFunc)
OnDataMPEG4Audio sets a callback that is called when MPEG-4 Audio data is received.
func (*Reader) OnDataOpus ¶ added in v1.11.0
func (r *Reader) OnDataOpus(track *format.Opus, cb OnDataOpusFunc)
OnDataOpus sets a callback that is called when Opus data is received.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer is a wrapper around Conn that provides utilities to mux outgoing data.
func (*Writer) WriteMPEG1Audio ¶
func (w *Writer) WriteMPEG1Audio(pts time.Duration, h *mpeg1audio.FrameHeader, frame []byte) error
WriteMPEG1Audio writes MPEG-1 Audio data.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package amf0 contains an AMF0 decoder and encoder.
|
Package amf0 contains an AMF0 decoder and encoder. |
Package bytecounter contains a reader/writer that allows to count bytes.
|
Package bytecounter contains a reader/writer that allows to count bytes. |
Package chunk implements RTMP chunks.
|
Package chunk implements RTMP chunks. |
Package h264conf contains a H264 configuration parser.
|
Package h264conf contains a H264 configuration parser. |
Package handshake contains the RTMP handshake mechanism.
|
Package handshake contains the RTMP handshake mechanism. |
Package message contains a RTMP message reader/writer.
|
Package message contains a RTMP message reader/writer. |
Package rawmessage contains a RTMP raw message reader/writer.
|
Package rawmessage contains a RTMP raw message reader/writer. |