Search in sources :

Example 1 with CutExecutable

use of org.fagu.fmv.core.exec.executable.CutExecutable 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();
    }
}
Also used : ConcatExecutable(org.fagu.fmv.core.exec.executable.ConcatExecutable) Time(org.fagu.fmv.utils.time.Time) Duration(org.fagu.fmv.utils.time.Duration) SourceSource(org.fagu.fmv.core.exec.source.SourceSource) CutExecutable(org.fagu.fmv.core.exec.executable.CutExecutable)

Aggregations

ConcatExecutable (org.fagu.fmv.core.exec.executable.ConcatExecutable)1 CutExecutable (org.fagu.fmv.core.exec.executable.CutExecutable)1 SourceSource (org.fagu.fmv.core.exec.source.SourceSource)1 Duration (org.fagu.fmv.utils.time.Duration)1 Time (org.fagu.fmv.utils.time.Time)1