FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
php-ffmpeg/provider/StringOutputProvider.php at master · webbrain-one/php-ffmpeg · GitHub
webbrain-one
php-ffmpeg
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
php-ffmpeg
/
provider
/
StringOutputProvider.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
58 lines (48 loc) · 1.45 KB
Breadcrumbs
php-ffmpeg
/
provider
/
StringOutputProvider.php
Copy path
File metadata and controls
58 lines (48 loc) · 1.45 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/**
* StringOutputProvider ffmpeg provider implementation
*
* @author huandzengbing
* @package FFmpegPHP
* @subpackage provider
* @license New BSD
* @version 2.6
*/
namespace
Phpffmpeg
\
provider
;
class
StringOutputProvider
extends
AbstractOutputProvider {
protected
$
_output
;
/**
* Constructor
*
* @param string $ffmpegBinary path to ffmpeg executable
* @param boolean $persistent persistent functionality on/off
*/
public
function
__construct
(
$
ffmpegBinary
=
'
ffmpeg
'
,
$
persistent
=
false
) {
$
this
->
_output
=
''
;
parent
::
__construct
(
$
ffmpegBinary
,
$
persistent
);
}
/**
* Getting parsable output from ffmpeg binary
*
* @return string
*/
public
function
getOutput
() {
// Persistent opening
if
(
$
this
->
persistent
==
true
&&
array_key_exists
(
get_class
(
$
this
).
$
this
->
binary
.
$
this
->
movieFile
,
self
::
$
persistentBuffer
)) {
return
self
::
$
persistentBuffer
[
get_class
(
$
this
).
$
this
->
binary
.
$
this
->
movieFile
];
}
return
$
this
->
_output
;
}
/**
* Setting parsable output
*
* @param string $output
*/
public
function
setOutput
(
$
output
) {
$
this
->
_output
=
$
output
;
// Storing persistent opening
if
(
$
this
->
persistent
==
true
) {
self
::
$
persistentBuffer
[
get_class
(
$
this
).
$
this
->
binary
.
$
this
->
movieFile
] =
$
output
;
}
}
}
Back
|
FazBrowse Home
|
New Git URL