Documentation ¶
Index ¶
- type RTMPHandler
- func (h *RTMPHandler) Close()
- func (h *RTMPHandler) OnAudio(timestamp uint32, payload io.Reader) error
- func (h *RTMPHandler) OnClose()
- func (h *RTMPHandler) OnCloseCallback(cb func(resourceId string))
- func (h *RTMPHandler) OnPublish(_ *rtmp.StreamContext, timestamp uint32, cmd *rtmpmsg.NetStreamPublish) error
- func (h *RTMPHandler) OnPublishCallback(...)
- func (h *RTMPHandler) OnSetDataFrame(timestamp uint32, data *rtmpmsg.NetStreamSetDataFrame) error
- func (h *RTMPHandler) OnVideo(timestamp uint32, payload io.Reader) error
- func (h *RTMPHandler) SetWriter(w io.WriteCloser) error
- type RTMPRelayHandler
- type RTMPServer
- func (s *RTMPServer) AssociateRelay(resourceId string, token string, w io.WriteCloser) error
- func (s *RTMPServer) CloseHandler(resourceId string)
- func (s *RTMPServer) DissociateRelay(resourceId string) error
- func (s *RTMPServer) Start(conf *config.Config, ...) error
- func (s *RTMPServer) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RTMPHandler ¶
type RTMPHandler struct { rtmp.DefaultHandler // contains filtered or unexported fields }
func NewRTMPHandler ¶
func NewRTMPHandler() *RTMPHandler
func (*RTMPHandler) Close ¶ added in v1.4.0
func (h *RTMPHandler) Close()
func (*RTMPHandler) OnAudio ¶
func (h *RTMPHandler) OnAudio(timestamp uint32, payload io.Reader) error
func (*RTMPHandler) OnClose ¶
func (h *RTMPHandler) OnClose()
func (*RTMPHandler) OnCloseCallback ¶
func (h *RTMPHandler) OnCloseCallback(cb func(resourceId string))
func (*RTMPHandler) OnPublish ¶
func (h *RTMPHandler) OnPublish(_ *rtmp.StreamContext, timestamp uint32, cmd *rtmpmsg.NetStreamPublish) error
func (*RTMPHandler) OnPublishCallback ¶
func (h *RTMPHandler) OnPublishCallback(cb func(streamKey, resourceId string) (*params.Params, *stats.LocalMediaStatsGatherer, error))
func (*RTMPHandler) OnSetDataFrame ¶
func (h *RTMPHandler) OnSetDataFrame(timestamp uint32, data *rtmpmsg.NetStreamSetDataFrame) error
func (*RTMPHandler) OnVideo ¶
func (h *RTMPHandler) OnVideo(timestamp uint32, payload io.Reader) error
func (*RTMPHandler) SetWriter ¶
func (h *RTMPHandler) SetWriter(w io.WriteCloser) error
type RTMPRelayHandler ¶
type RTMPRelayHandler struct {
// contains filtered or unexported fields
}
func NewRTMPRelayHandler ¶
func NewRTMPRelayHandler(rtmpServer *RTMPServer) *RTMPRelayHandler
func (*RTMPRelayHandler) ServeHTTP ¶
func (h *RTMPRelayHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RTMPServer ¶
type RTMPServer struct {
// contains filtered or unexported fields
}
func NewRTMPServer ¶
func NewRTMPServer() *RTMPServer
func (*RTMPServer) AssociateRelay ¶
func (s *RTMPServer) AssociateRelay(resourceId string, token string, w io.WriteCloser) error
func (*RTMPServer) CloseHandler ¶ added in v1.4.0
func (s *RTMPServer) CloseHandler(resourceId string)
func (*RTMPServer) DissociateRelay ¶
func (s *RTMPServer) DissociateRelay(resourceId string) error
func (*RTMPServer) Start ¶
func (s *RTMPServer) Start(conf *config.Config, onPublish func(streamKey, resourceId string) (*params.Params, *stats.LocalMediaStatsGatherer, error)) error
func (*RTMPServer) Stop ¶
func (s *RTMPServer) Stop() error
Click to show internal directories.
Click to hide internal directories.