Apply frame filters on Frame::save

This commit is contained in:
Romain Neutron 2013-09-04 19:52:24 +02:00
commit bcf3e5f65a
3 changed files with 10 additions and 5 deletions

View file

@ -97,16 +97,22 @@ class Frame extends AbstractMediaType
'-y', '-ss', (string) $this->timecode,
'-i', $this->pathfile,
'-vframes', '1',
'-f', 'image2', $pathfile
'-f', 'image2'
);
} else {
$commands = array(
'-y', '-i', $this->pathfile,
'-vframes', '1', '-ss', (string) $this->timecode,
'-f', 'image2', $pathfile
'-f', 'image2'
);
}
foreach ($this->filters as $filter) {
$commands = array_merge($commands, $filter->apply($this));
}
$commands = array_merge($commands, array($pathfile));
try {
$this->driver->command($commands);
} catch (ExecutionFailureException $e) {