agent

package
v0.0.0-...-2c58ee7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

The agent package provides the agent level feature for oryx, for example, the rtmp agent to publish and play.

Index

Constants

This section is empty.

Variables

View Source
var AgentBusyError = errors.New("agent is busy")

when agent is busy.

View Source
var AgentControlRepublishError = errors.New("agent republish")

for flash or fmle to republish stream.

View Source
var AgentNotSupportError = errors.New("agent not support")

when agent not support source or sink.

Functions

func IsControlError

func IsControlError(err error) bool

whether control error object.

func NewDupAgent

func NewDupAgent(ctx core.Context) core.Agent

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 DupAgent

type DupAgent struct {
	// contains filtered or unexported fields
}

func (*DupAgent) Close

func (v *DupAgent) Close() (err error)

func (*DupAgent) Flow

func (v *DupAgent) Flow(source core.Agent) (err error)

func (*DupAgent) Open

func (v *DupAgent) Open() (err error)

func (*DupAgent) Pump

func (v *DupAgent) Pump() (err error)

func (*DupAgent) Tie

func (v *DupAgent) Tie(sink core.Agent) (err error)

func (*DupAgent) TiedSink

func (v *DupAgent) TiedSink() (sink core.Agent)

func (*DupAgent) UnFlow

func (v *DupAgent) UnFlow(source core.Agent) (err error)

func (*DupAgent) UnTie

func (v *DupAgent) UnTie(sink core.Agent) (err error)

func (*DupAgent) Write

func (v *DupAgent) Write(m core.Message) (err error)

type Jitter

type Jitter struct {
	// contains filtered or unexported fields
}

time jitter detect and correct, to ensure the stream is monotonically.

func NewJitter

func NewJitter(ctx core.Context) *Jitter

func (*Jitter) Correct

func (v *Jitter) Correct(ts uint64, ag JitterAlgorithm) uint64

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) Close

func (v *Rtmp) Close() (err error)

func (*Rtmp) OnReloadGlobal

func (v *Rtmp) OnReloadGlobal(scope int, cc, pc *core.Config) (err error)

interface ReloadHandler

func (*Rtmp) OnReloadVhost

func (v *Rtmp) OnReloadVhost(vhost string, scope int, cc, pc *core.Config) (err error)

func (*Rtmp) Open

func (v *Rtmp) Open() (err error)

interface core.Agent

type RtmpPlayAgent

type RtmpPlayAgent struct {
	// contains filtered or unexported fields
}

rtmp play agent, to serve the player or edge.

func (*RtmpPlayAgent) Close

func (v *RtmpPlayAgent) Close() (err error)

func (*RtmpPlayAgent) Flow

func (v *RtmpPlayAgent) Flow(source core.Agent) (err error)

func (*RtmpPlayAgent) Open

func (v *RtmpPlayAgent) Open() (err error)

func (*RtmpPlayAgent) Pump

func (v *RtmpPlayAgent) Pump() (err error)

func (*RtmpPlayAgent) Tie

func (v *RtmpPlayAgent) Tie(sink core.Agent) (err error)

func (*RtmpPlayAgent) TiedSink

func (v *RtmpPlayAgent) TiedSink() (sink core.Agent)

func (*RtmpPlayAgent) UnFlow

func (v *RtmpPlayAgent) UnFlow(source core.Agent) (err error)

func (*RtmpPlayAgent) UnTie

func (v *RtmpPlayAgent) UnTie(sink core.Agent) (err error)

func (*RtmpPlayAgent) Write

func (v *RtmpPlayAgent) Write(m core.Message) (err error)

type RtmpPublishAgent

type RtmpPublishAgent struct {
	// contains filtered or unexported fields
}

rtmp publish agent, to serve the FMLE or flash publisher/encoder.

func (*RtmpPublishAgent) Close

func (v *RtmpPublishAgent) Close() (err error)

func (*RtmpPublishAgent) Flow

func (v *RtmpPublishAgent) Flow(source core.Agent) (err error)

func (*RtmpPublishAgent) Open

func (v *RtmpPublishAgent) Open() (err error)

func (*RtmpPublishAgent) Pump

func (v *RtmpPublishAgent) Pump() (err error)

func (*RtmpPublishAgent) Tie

func (v *RtmpPublishAgent) Tie(sink core.Agent) (err error)

func (*RtmpPublishAgent) TiedSink

func (v *RtmpPublishAgent) TiedSink() (sink core.Agent)

func (*RtmpPublishAgent) UnFlow

func (v *RtmpPublishAgent) UnFlow(source core.Agent) (err error)

func (*RtmpPublishAgent) UnTie

func (v *RtmpPublishAgent) UnTie(sink core.Agent) (err error)

func (*RtmpPublishAgent) Write

func (v *RtmpPublishAgent) Write(m core.Message) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL