Search in sources :

Example 1 with OperationListener

use of org.fagu.fmv.ffmpeg.operation.OperationListener in project fmv by f-agu.

the class AutoRotate method beforeAddAround.

// *******************************************
/**
 * @see org.fagu.fmv.ffmpeg.filter.FilterCombined#beforeAddAround(org.fagu.fmv.ffmpeg.operation.Operation,
 *      org.fagu.fmv.ffmpeg.filter.FilterNaming)
 */
@Override
protected void beforeAddAround(Operation<?, ?> operation, FilterNaming filterNaming) {
    super.beforeAddAround(operation, filterNaming);
    operation.addListener(new OperationListener() {

        @Override
        public void eventPreToArguments(Operation<?, ?> operation) {
            upgrade(operation);
        }
    });
}
Also used : OperationListener(org.fagu.fmv.ffmpeg.operation.OperationListener)

Example 2 with OperationListener

use of org.fagu.fmv.ffmpeg.operation.OperationListener in project fmv by f-agu.

the class FFUtils method builder.

/**
 * @param project
 * @return
 */
public static FFMPEGExecutorBuilder builder(Project project) {
    FFMPEGExecutorBuilder builder = FFMPEGExecutorBuilder.create();
    builder.hideBanner();
    if (project.getProperty(Properties.SHOW_COMMAND_LINE)) {
        builder.addListener(new OperationListener() {

            /**
             * @see org.fagu.fmv.ffmpeg.operation.OperationListenerAdaptor#eventCreate(org.fagu.fmv.ffmpeg.executor.FFExecutor)
             */
            @Override
            public void eventCreate(FFExecutor<?> ffExecutor) {
                try {
                    System.out.println(ffExecutor.getCommandLine());
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
    }
    return builder;
}
Also used : FFMPEGExecutorBuilder(org.fagu.fmv.ffmpeg.executor.FFMPEGExecutorBuilder) OperationListener(org.fagu.fmv.ffmpeg.operation.OperationListener)

Aggregations

OperationListener (org.fagu.fmv.ffmpeg.operation.OperationListener)2 FFMPEGExecutorBuilder (org.fagu.fmv.ffmpeg.executor.FFMPEGExecutorBuilder)1