process

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

Close close all pipelines

func DelPipeline

func DelPipeline(id string)

DelPipeline delete pub

func InitPipeline

func InitPipeline(c Config)

InitPipeline .

func InitRTP

func InitRTP(port int, kcpKey, kcpSalt string) error

InitRTP rtp port

Types

type Config

type Config struct {
	SampleBuilder       samples.BuilderConfig
	GetDefaultElements  getDefaultElementsFn
	GetTogglableElement getTogglableElementFn
}

Config for pipeline

type Element added in v0.4.5

type Element interface {
	Type() string
	Write(*samples.Sample) error
	Attach(Element) error
	Read() <-chan *samples.Sample
	Close()
}

Element interface

type Pipeline

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

Pipeline constructs a processing graph

+--->element
|

pub--->pubCh-->sampleBuilder-->elementCh---+--->element

|
+--->element

func GetPipeline

func GetPipeline(id string) *Pipeline

GetPipeline get pipeline from map

func NewPipeline

func NewPipeline(id string, pub transport.Transport) *Pipeline

NewPipeline return a new Pipeline

func (*Pipeline) AddElement

func (p *Pipeline) AddElement(einfo proto.ElementInfo)

AddElement add a element to pipeline

func (*Pipeline) Alive

func (p *Pipeline) Alive() bool

Alive return router status

func (*Pipeline) Close

func (p *Pipeline) Close()

Close release all

func (*Pipeline) DelElement

func (p *Pipeline) DelElement(id string)

DelElement del node by id

func (*Pipeline) GetElement

func (p *Pipeline) GetElement(id string) Element

GetElement get a node by id

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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