Example #1
0
 /**
  * {@inheritdoc}
  */
 public function createProgressListener(MediaTypeInterface $media, FFProbe $ffprobe, $pass, $total)
 {
     $format = $this;
     $listeners = array(new VideoProgressListener($ffprobe, $media->getFilePath(), $pass, $total));
     foreach ($listeners as $listener) {
         $listener->on('progress', function () use($format, $media) {
             $format->emit('progress', array_merge(array($media, $format), func_get_args()));
         });
     }
     return $listeners;
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function createProgressListener(MediaTypeInterface $media, FFProbe $ffprobe, $pass, $total)
 {
     $format = $this;
     $listener = new AudioProgressListener($ffprobe, $media->getFilePath(), $pass, $total);
     $listener->on('progress', function () use($media, $format) {
         $format->emit('progress', array_merge(array($media, $format), func_get_args()));
     });
     return array($listener);
 }