Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function createProgressListener(MediaTypeInterface $media, FFProbe $ffprobe, $pass, $total)
 {
     $format = $this;
     $listener = new AudioProgressListener($ffprobe, $media->getPathfile(), $pass, $total);
     $listener->on('progress', function () use($media, $format) {
         $format->emit('progress', array_merge(array($media, $format), func_get_args()));
     });
     return array($listener);
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function createProgressListener(MediaTypeInterface $media, FFProbe $ffprobe, $pass, $total)
 {
     $format = $this;
     $listeners = array(new VideoProgressListener($ffprobe, $media->getPathfile(), $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;
 }