use of org.fagu.fmv.core.exec.source.SourceSource in project fmv by f-agu.
the class Append method appendAudioOrVideo.
/**
* @param sourceNum
* @param args
*/
private void appendAudioOrVideo(int sourceNum, String[] args) {
if (args.length != 3) {
getPrinter().println("usage: append <num-source> <start-time> <duration>");
return;
}
try {
Time startTime = Time.parse(args[1]);
Duration duration = Duration.parse(args[2]);
ConcatExecutable concatExecutable = getConcatExecutable();
if (concatExecutable == null) {
return;
}
CutExecutable cutExecutable = new CutExecutable(project, startTime, duration);
cutExecutable.setSource(new SourceSource(project, sourceNum));
concatExecutable.add(cutExecutable);
} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
use of org.fagu.fmv.core.exec.source.SourceSource in project fmv by f-agu.
the class Append method appendImage.
/**
* @param sourceNum
* @param args
*/
private void appendImage(int sourceNum, String[] args) {
if (args.length != 3) {
getPrinter().println("usage: append <num-source> <duration>");
return;
}
Duration duration = Duration.parse(args[1]);
ConcatExecutable concatExecutable = getConcatExecutable();
if (concatExecutable == null) {
return;
}
GenericExecutable genericExecutable = new GenericExecutable(project);
genericExecutable.add(new SourceSource(project, sourceNum));
}
Aggregations