Documentation ¶
Overview ¶
Package driver define driver operation. all sub-cards' driver should be in this package
Index ¶
- Constants
- Variables
- func GetWorkerName(w Worker) string
- func GetWorkerWorkerID(w Worker) int
- func GetWorkerWorkerIP(w Worker) net.IP
- func IsWorkerDec(w Worker) bool
- func IsWorkerEnc(w Worker) bool
- func RPC(url string, cmd string, args interface{}, reply interface{}) error
- func SetDecodeSes(w Worker, sess *Session) error
- func SetEncodeSes(w Worker, sess *Session) error
- func SetWorkerRunning(w Worker, r bool) error
- func SetWorkerSettings(w Worker, s map[string]interface{}) error
- type C9830
- type C9830Worker
- type Card
- type CtlCmd
- type Decoder
- type Dummy
- type DummyWorker
- type Encoder
- type LocalD
- type LocalDWorker
- type LocalE
- type LocalEWorker
- type Pipe
- type PipeSvr
- type RTSPIn
- type RTSPInWorker
- type Session
- type StatusMonitor
- type TCBin
- type TCBinWorker
- type Worker
Constants ¶
const ( CtlCmdStart = iota CtlCmdStop CtlCmdName CtlCmdIP CtlCmdWorkerID CtlCmdSetting )
CtlCmd ID style const
const ( PipeRTSPIN = iota PipeEncoder )
Pipe ID
const C9830TranscoderName string = "C9830"
C9830TranscoderName is the sub-card's name
const DummyName string = "Dummy"
DummyName is the sub-card's name
const LocalDecoderName string = "local_decoder"
LocalDecoderName is the sub-card's name
const LocalEncoderName string = "local_encoder"
LocalEncoderName is the sub-card's name
const RTSPInName string = "RTSPIn"
RTSPInName is the sub-card's name
const TranscoderBinName string = "TransCoder"
TranscoderBinName is the sub-card's name
Variables ¶
var Pipes [2]*PipeSvr
Pipes global service
var (
TransURL = fmt.Sprintf("http://%s/goform/form_data", comm.AppCfg.TransitSvr)
)
TransURL stores url for transit
Functions ¶
func GetWorkerWorkerIP ¶
GetWorkerWorkerIP get Worker's Slot
func SetDecodeSes ¶
SetDecodeSes set Session to Decode
func SetEncodeSes ¶
SetEncodeSes set Session to Encoder
func SetWorkerRunning ¶
SetWorkerRunning set Running status
func SetWorkerSettings ¶
SetWorkerSettings set Running status
Types ¶
type C9830 ¶
type C9830 struct { // Card Slot Slot int // Card IP IP net.IP URL string // contains filtered or unexported fields }
C9830 is the main struct for sub-card
type C9830Worker ¶
type C9830Worker struct {
// contains filtered or unexported fields
}
C9830Worker is the main struct for sub-card's Worker
func (*C9830Worker) Control ¶
func (w *C9830Worker) Control(c CtlCmd, arg interface{}) interface{}
Control method
type Dummy ¶
Dummy is the main struct for sub-card
type DummyWorker ¶
type DummyWorker struct { // SlotID here Slot int // WorkerID here WorkerID int // IP here IP net.IP }
DummyWorker is the main struct for sub-card's Worker
func (*DummyWorker) Control ¶
func (w *DummyWorker) Control(c CtlCmd, arg interface{}) interface{}
Control do quering and setting, like querying version, setting paramenters. Return nil if ont all CtlCmd is supported
type LocalDWorker ¶
type LocalDWorker struct {
// contains filtered or unexported fields
}
LocalDWorker is the main struct for sub-card's Worker
func (*LocalDWorker) Control ¶
func (w *LocalDWorker) Control(c CtlCmd, arg interface{}) interface{}
Control method
type LocalEWorker ¶
type LocalEWorker struct {
// contains filtered or unexported fields
}
LocalEWorker is the main struct for sub-card's Worker
func (*LocalEWorker) Control ¶
func (w *LocalEWorker) Control(c CtlCmd, arg interface{}) interface{}
Control method
type PipeSvr ¶
type PipeSvr struct { // IP is the Svr IP IP net.IP // Prefix to identity services Prefix int // contains filtered or unexported fields }
PipeSvr alloc Pipe
type RTSPIn ¶
type RTSPIn struct { // Card Slot Slot int // Card IP IP net.IP URL string // contains filtered or unexported fields }
RTSPIn is the main struct for sub-card
type RTSPInWorker ¶
type RTSPInWorker struct {
// contains filtered or unexported fields
}
RTSPInWorker is the main struct for sub-card's Worker
func (*RTSPInWorker) Control ¶
func (w *RTSPInWorker) Control(c CtlCmd, arg interface{}) interface{}
Control method
type StatusMonitor ¶
StatusMonitor struct for monitoring worker status
func (*StatusMonitor) GetStatus ¶
func (sm *StatusMonitor) GetStatus() bool
GetStatus return current status
func (*StatusMonitor) StartMonitor ¶
func (sm *StatusMonitor) StartMonitor(w Worker)
StartMonitor start goroutine
func (*StatusMonitor) StopMonitor ¶
func (sm *StatusMonitor) StopMonitor()
StopMonitor send signal to stop goroutine
type TCBinWorker ¶
type TCBinWorker struct {
// contains filtered or unexported fields
}
TCBinWorker is the main struct for sub-card's Worker
func (*TCBinWorker) Control ¶
func (w *TCBinWorker) Control(c CtlCmd, arg interface{}) interface{}
Control method