JFIF x x C C " } !1AQa "q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w !1AQ aq"2B #3Rbr{
File "RebuildsCommands.php"
Full Path: /home2/yvrgircc/public_html/ariseskilltech.com/vendor/pbmedia/laravel-ffmpeg/src/FFMpeg/RebuildsCommands.php
File size: 1.17 KB
MIME-type: text/x-php
Charset: utf-8
<?php
namespace ProtoneMedia\LaravelFFMpeg\FFMpeg;
use FFMpeg\Format\FormatInterface;
use Illuminate\Support\Collection;
trait RebuildsCommands
{
use InteractsWithBeforeSavingCallbacks;
use InteractsWithHttpHeaders;
/**
* Builds the command using the underlying library and then
* prepends the input with the headers.
*
* @param \FFMpeg\Format\FormatInterface $format
* @param string $outputPathfile
* @return array
*/
protected function buildCommand(FormatInterface $format, $outputPathfile)
{
$command = parent::buildCommand($format, $outputPathfile);
$command = $this->rebuildCommandWithHeaders($command);
$command = $this->rebuildCommandWithCallbacks($command);
return $command;
}
private function rebuildCommandWithHeaders($command)
{
if (empty($this->headers)) {
return $command;
}
return Collection::make($command)->map(function ($command) {
return static::mergeBeforePathInput(
$command,
$this->getPathfile(),
static::compileHeaders($this->headers)
);
})->all();
}
}