Documentation ¶
Overview ¶
The agent package provides the agent level feature for oryx, for example, the rtmp agent to publish and play.
Index ¶
- Variables
- func IsControlError(err error) bool
- func NewDupAgent(ctx core.Context) core.Agent
- func NewRtmp(ctx core.Context, wc core.WorkerContainer) (agent core.OpenCloser)
- type AgentManager
- func (v *AgentManager) Close()
- func (v *AgentManager) NewRtmpPlayAgent(ctx core.Context, conn *protocol.RtmpConnection, wc core.WorkerContainer) (play core.Agent, err error)
- func (v *AgentManager) NewRtmpPublishAgent(ctx core.Context, conn *protocol.RtmpConnection, wc core.WorkerContainer) (pub core.Agent, err error)
- type DupAgent
- func (v *DupAgent) Close() (err error)
- func (v *DupAgent) Flow(source core.Agent) (err error)
- func (v *DupAgent) Open() (err error)
- func (v *DupAgent) Pump() (err error)
- func (v *DupAgent) Tie(sink core.Agent) (err error)
- func (v *DupAgent) TiedSink() (sink core.Agent)
- func (v *DupAgent) UnFlow(source core.Agent) (err error)
- func (v *DupAgent) UnTie(sink core.Agent) (err error)
- func (v *DupAgent) Write(m core.Message) (err error)
- type Jitter
- type JitterAlgorithm
- type Rtmp
- type RtmpPlayAgent
- func (v *RtmpPlayAgent) Close() (err error)
- func (v *RtmpPlayAgent) Flow(source core.Agent) (err error)
- func (v *RtmpPlayAgent) Open() (err error)
- func (v *RtmpPlayAgent) Pump() (err error)
- func (v *RtmpPlayAgent) Tie(sink core.Agent) (err error)
- func (v *RtmpPlayAgent) TiedSink() (sink core.Agent)
- func (v *RtmpPlayAgent) UnFlow(source core.Agent) (err error)
- func (v *RtmpPlayAgent) UnTie(sink core.Agent) (err error)
- func (v *RtmpPlayAgent) Write(m core.Message) (err error)
- type RtmpPublishAgent
- func (v *RtmpPublishAgent) Close() (err error)
- func (v *RtmpPublishAgent) Flow(source core.Agent) (err error)
- func (v *RtmpPublishAgent) Open() (err error)
- func (v *RtmpPublishAgent) Pump() (err error)
- func (v *RtmpPublishAgent) Tie(sink core.Agent) (err error)
- func (v *RtmpPublishAgent) TiedSink() (sink core.Agent)
- func (v *RtmpPublishAgent) UnFlow(source core.Agent) (err error)
- func (v *RtmpPublishAgent) UnTie(sink core.Agent) (err error)
- func (v *RtmpPublishAgent) Write(m core.Message) (err error)
Constants ¶
This section is empty.
Variables ¶
var AgentBusyError = errors.New("agent is busy")
when agent is busy.
var AgentControlRepublishError = errors.New("agent republish")
for flash or fmle to republish stream.
var AgentNotSupportError = errors.New("agent not support")
when agent not support source or sink.
Functions ¶
func NewRtmp ¶
func NewRtmp(ctx core.Context, wc core.WorkerContainer) (agent core.OpenCloser)
Types ¶
type AgentManager ¶
type AgentManager struct {
// contains filtered or unexported fields
}
var Manager *AgentManager
func NewManager ¶
func NewManager(ctx core.Context) *AgentManager
func (*AgentManager) Close ¶
func (v *AgentManager) Close()
func (*AgentManager) NewRtmpPlayAgent ¶
func (v *AgentManager) NewRtmpPlayAgent(ctx core.Context, conn *protocol.RtmpConnection, wc core.WorkerContainer) (play core.Agent, err error)
func (*AgentManager) NewRtmpPublishAgent ¶
func (v *AgentManager) NewRtmpPublishAgent(ctx core.Context, conn *protocol.RtmpConnection, wc core.WorkerContainer) (pub core.Agent, err error)
type Jitter ¶
type Jitter struct {
// contains filtered or unexported fields
}
time jitter detect and correct, to ensure the stream is monotonically.
type JitterAlgorithm ¶
type JitterAlgorithm uint8
the time jitter algorithm: 1. full, to ensure stream start at zero, and ensure stream monotonically increasing. 2. zero, only ensure sttream start at zero, ignore timestamp jitter. 3. off, disable the time jitter algorithm, like atc.
const ( Full JitterAlgorithm = iota + 1 Zero Off )
type Rtmp ¶
type Rtmp struct {
// contains filtered or unexported fields
}
the rtmp publish or play agent, to listen at RTMP(tcp://1935) and recv data from RTMP publisher or player, when identified the client type, redirect to the specified agent.
func (*Rtmp) OnReloadGlobal ¶
interface ReloadHandler
func (*Rtmp) OnReloadVhost ¶
type RtmpPlayAgent ¶
type RtmpPlayAgent struct {
// contains filtered or unexported fields
}
rtmp play agent, to serve the player or edge.
func NewRtmpPlayAgent ¶
func NewRtmpPlayAgent(ctx core.Context, conn *protocol.RtmpConnection, wc core.WorkerContainer) *RtmpPlayAgent
func (*RtmpPlayAgent) Close ¶
func (v *RtmpPlayAgent) Close() (err error)
func (*RtmpPlayAgent) Open ¶
func (v *RtmpPlayAgent) Open() (err error)
func (*RtmpPlayAgent) Pump ¶
func (v *RtmpPlayAgent) Pump() (err error)
func (*RtmpPlayAgent) TiedSink ¶
func (v *RtmpPlayAgent) TiedSink() (sink core.Agent)
type RtmpPublishAgent ¶
type RtmpPublishAgent struct {
// contains filtered or unexported fields
}
rtmp publish agent, to serve the FMLE or flash publisher/encoder.
func NewRtmpPublishAgent ¶
func NewRtmpPublishAgent(ctx core.Context, conn *protocol.RtmpConnection, wc core.WorkerContainer) *RtmpPublishAgent
func (*RtmpPublishAgent) Close ¶
func (v *RtmpPublishAgent) Close() (err error)
func (*RtmpPublishAgent) Open ¶
func (v *RtmpPublishAgent) Open() (err error)
func (*RtmpPublishAgent) Pump ¶
func (v *RtmpPublishAgent) Pump() (err error)
func (*RtmpPublishAgent) TiedSink ¶
func (v *RtmpPublishAgent) TiedSink() (sink core.Agent)