add ipc comms for runFFmpegCmd
This commit is contained in:
parent
1131a4dbc8
commit
756b04750e
|
@ -1 +1,10 @@
|
||||||
export { runFFmpegCmd } from '../services/ffmpeg';
|
import { ipcRenderer } from 'electron';
|
||||||
|
import { ElectronFile } from '../types';
|
||||||
|
|
||||||
|
export function runFFmpegCmd(
|
||||||
|
cmd: string[],
|
||||||
|
inputFile: ElectronFile,
|
||||||
|
outputFileName: string
|
||||||
|
) {
|
||||||
|
return ipcRenderer.invoke('run-ffmpeg-cmd', cmd, inputFile, outputFileName);
|
||||||
|
}
|
||||||
|
|
|
@ -20,6 +20,8 @@ import {
|
||||||
skipAppVersion,
|
skipAppVersion,
|
||||||
updateAndRestart,
|
updateAndRestart,
|
||||||
} from '../services/appUpdater';
|
} from '../services/appUpdater';
|
||||||
|
import { runFFmpegCmd } from '../services/ffmpeg';
|
||||||
|
import { ElectronFile } from '../types';
|
||||||
|
|
||||||
export default function setupIpcComs(
|
export default function setupIpcComs(
|
||||||
tray: Tray,
|
tray: Tray,
|
||||||
|
@ -125,4 +127,11 @@ export default function setupIpcComs(
|
||||||
ipcMain.handle('get-app-version', () => {
|
ipcMain.handle('get-app-version', () => {
|
||||||
return getAppVersion();
|
return getAppVersion();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ipcMain.handle(
|
||||||
|
'run-ffmpeg-cmd',
|
||||||
|
(_, cmd: string[], inputFile: ElectronFile, outputFileName: string) => {
|
||||||
|
return runFFmpegCmd(cmd, inputFile, outputFileName);
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue