Esempio n. 1
0
 /**
  * Return a list of supported codecs from the current system.
  *
  * @return
  */
 public ArrayList<CodecEnum> getNodeCapabilities(FFmpeg module) {
   FFmpegReader reader = new FFmpegReader();
   ArrayList<String> args = new ArrayList<>();
   args.add(module.getPath());
   args.add("-encoders");
   try {
     reader.read(args, this, false);
   } catch (MissingThirdPartyException e) {
     e.printStackTrace();
   }
   return codecs;
 }
Esempio n. 2
0
 @Override
 protected void start() {
   this.cancelling = false;
   listener.taskStarted(task);
   boolean success = false;
   createDirs();
   ArrayList<String> args = getArgs(task);
   try {
     success = ffMpegWrapper.read(args, this, true) && moveFile();
   } catch (MissingThirdPartyException e) {
     e.printStackTrace();
   } finally {
     destroyTempFolder();
     if (success) {
       listener.taskCompleted(task);
     } else if (cancelling) {
       listener.taskCancelled(task);
     } else {
       listener.taskFailed(task);
     }
   }
 };
Esempio n. 3
0
 @Override
 public void stop() {
   super.stop();
   ffMpegWrapper.stop();
 }