Documentation
¶
Index ¶
- type LogLevel
- type LogSetting
- type RtmpServer
- type StreamCloseHandler
- type StreamData
- type StreamDataHandler
- type StreamDataType
- type StreamMeta
- func (st *StreamMeta) AudioChannels() int
- func (st *StreamMeta) AudioCodec() string
- func (st *StreamMeta) AudioDataRate() int
- func (st *StreamMeta) AudioSampleRate() int
- func (st *StreamMeta) AudioSampleSize() int
- func (st *StreamMeta) Encoder() string
- func (st *StreamMeta) FrameRate() int
- func (st *StreamMeta) Height() int
- func (st *StreamMeta) Stereo() bool
- func (st *StreamMeta) StreamID() int
- func (st *StreamMeta) StreamName() string
- func (st *StreamMeta) URL() string
- func (st *StreamMeta) VideoCodec() string
- func (st *StreamMeta) VideoDataRate() int
- func (st *StreamMeta) Width() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogSetting ¶
LogSetting is the setting for logger
type RtmpServer ¶
type RtmpServer struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer() *RtmpServer
func (*RtmpServer) ConfigLog ¶
func (s *RtmpServer) ConfigLog(setting *LogSetting)
func (*RtmpServer) OnStreamClose ¶
func (s *RtmpServer) OnStreamClose(handler StreamCloseHandler)
func (*RtmpServer) OnStreamData ¶
func (s *RtmpServer) OnStreamData(handler StreamDataHandler)
func (*RtmpServer) Run ¶
func (s *RtmpServer) Run(addr string) error
func (*RtmpServer) Stop ¶
func (s *RtmpServer) Stop()
type StreamCloseHandler ¶
type StreamCloseHandler func(meta *StreamMeta, err error)
type StreamData ¶
type StreamData struct {
Type StreamDataType
Timestamp uint32
Data []byte
}
type StreamDataHandler ¶
type StreamDataHandler func(meta *StreamMeta, data *StreamData) error
type StreamDataType ¶
type StreamDataType int
const ( FlvHeader StreamDataType = iota FlvScript FlvVideo FlvAudio )
type StreamMeta ¶
type StreamMeta struct {
// contains filtered or unexported fields
}
StreamMeta describes stream metadata
func (*StreamMeta) AudioChannels ¶
func (st *StreamMeta) AudioChannels() int
AudioChannels returns number of audio channels
func (*StreamMeta) AudioCodec ¶
func (st *StreamMeta) AudioCodec() string
AudioCodec returns audio codec
func (*StreamMeta) AudioDataRate ¶
func (st *StreamMeta) AudioDataRate() int
AudioDataRate return audio data rate
func (*StreamMeta) AudioSampleRate ¶
func (st *StreamMeta) AudioSampleRate() int
AudioSampleRate returns audio sample rate
func (*StreamMeta) AudioSampleSize ¶
func (st *StreamMeta) AudioSampleSize() int
AudioSampleSize returns audio sample size
func (*StreamMeta) FrameRate ¶
func (st *StreamMeta) FrameRate() int
FrameRate returns video frame rate
func (*StreamMeta) Stereo ¶
func (st *StreamMeta) Stereo() bool
Stereo returns boolean indicating whether the audio is stereo
func (*StreamMeta) StreamName ¶
func (st *StreamMeta) StreamName() string
StreamName returns stream name
func (*StreamMeta) VideoCodec ¶
func (st *StreamMeta) VideoCodec() string
VideoCodec returns video codec fourcc
func (*StreamMeta) VideoDataRate ¶
func (st *StreamMeta) VideoDataRate() int
VideoDataRate returns video data rate
Source Files
¶
Click to show internal directories.
Click to hide internal directories.