Version 0.3
This commit is contained in:
parent
0d69145ec3
commit
ad3a5af623
130 changed files with 7283 additions and 2627 deletions
40
src/FFMpeg/Driver/FFMpegDriver.php
Normal file
40
src/FFMpeg/Driver/FFMpegDriver.php
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of PHP-FFmpeg.
|
||||
*
|
||||
* (c) Alchemy <info@alchemy.fr>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace FFMpeg\Driver;
|
||||
|
||||
use Alchemy\BinaryDriver\AbstractBinary;
|
||||
use Alchemy\BinaryDriver\Configuration;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class FFMpegDriver extends AbstractBinary
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'ffmpeg';
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an FFMpegDriver.
|
||||
*
|
||||
* @param LoggerInterface $logger
|
||||
* @param array|Configuration $configuration
|
||||
*
|
||||
* @return FFMpegDriver
|
||||
*/
|
||||
public static function create(LoggerInterface $logger, $configuration)
|
||||
{
|
||||
return static::load(array('avconv', 'ffmpeg'), $logger, $configuration);
|
||||
}
|
||||
}
|
||||
47
src/FFMpeg/Driver/FFProbeDriver.php
Normal file
47
src/FFMpeg/Driver/FFProbeDriver.php
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of PHP-FFmpeg.
|
||||
*
|
||||
* (c) Alchemy <info@alchemy.fr>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace FFMpeg\Driver;
|
||||
|
||||
use Alchemy\BinaryDriver\AbstractBinary;
|
||||
use Alchemy\BinaryDriver\Configuration;
|
||||
use Alchemy\BinaryDriver\ConfigurationInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class FFProbeDriver extends AbstractBinary
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'ffprobe';
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an FFProbeDriver
|
||||
*
|
||||
* @param array|ConfigurationInterface $configuration
|
||||
* @param LoggerInterface $logger
|
||||
*
|
||||
* @return FFProbeDriver
|
||||
*/
|
||||
public static function create($configuration, LoggerInterface $logger = null)
|
||||
{
|
||||
if (!$configuration instanceof ConfigurationInterface) {
|
||||
$configuration = new Configuration($configuration);
|
||||
}
|
||||
|
||||
$binaries = $configuration->get('ffprobe.binaries', array('avprobe', 'ffprobe'));
|
||||
|
||||
return static::load($binaries, $logger, $configuration);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue