Constants

TimeOut

TimeOut = 86400

one day

Properties

$name

$name : 

Type

$process

$process : 

Type

— Process

$config

$config : 

Type

— Configuration

$logger

$logger : 

Type

— LoggerInterface

$binary

$binary : 

Type

$listeners

$listeners : 

Type

— ListenerInterface[]

$input

$input : 

构造输入部分命令

Type

— PushInput

Methods

__construct()

__construct(array  $configuration = array(), \Psr\Log\LoggerInterface|null  $logger = null) 

PushVideo constructor.

Parameters

array $configuration
\Psr\Log\LoggerInterface|null $logger

create()

create(  $configuration = array(), \Psr\Log\LoggerInterface  $logger = null) 

Parameters

$configuration
\Psr\Log\LoggerInterface $logger

getProcess()

getProcess() : \Symfony\Component\Process\Process

Returns

\Symfony\Component\Process\Process

command()

command(  $command) : string

Parameters

$command

Returns

string

stop()

stop() 

停止执行

getExitCode()

getExitCode() 

getCommandLine()

getCommandLine() : string

获取推流命令最终形式

Returns

string

getExitCodeText()

getExitCodeText() 

getErrorOutput()

getErrorOutput() 

getOutput()

getOutput() 

isSuccessful()

isSuccessful() 

clear()

clear() 

setInput()

setInput(\FFMpegPush\PushInput  $input) : $this

Parameters

\FFMpegPush\PushInput $input

Returns

$this

setFormat()

setFormat(mixed  $format) : $this

Parameters

mixed $format

Returns

$this

setOutput()

setOutput(mixed  $output) : $this

Parameters

mixed $output

Returns

$this

onProgress()

onProgress(callable  $listener) 

监听推流进度

Parameters

callable $listener

getPushInfo()

getPushInfo() : \FFMpegPush\PushInfo

获取此时推流的一些状态值

Returns

\FFMpegPush\PushInfo

initProcess()

initProcess(  $command) : \Symfony\Component\Process\Process

Parameters

$command

Returns

\Symfony\Component\Process\Process

buildCallback()

buildCallback(  $listeners) : \Closure

Parameters

$listeners

Returns

\Closure