2026-09-21 11:10:20 -04:00
|
|
|
import { invoke } from '@tauri-apps/api/core';
|
|
|
|
|
|
2026-09-21 10:57:43 -04:00
|
|
|
export interface ThumbnailSpritesheet {
|
|
|
|
|
filePath: string;
|
|
|
|
|
startIndex: number;
|
|
|
|
|
count: number;
|
|
|
|
|
thumbWidth: number;
|
|
|
|
|
thumbHeight: number;
|
|
|
|
|
columns: number;
|
|
|
|
|
intervalSeconds: number;
|
|
|
|
|
}
|
2026-09-21 11:10:20 -04:00
|
|
|
|
|
|
|
|
export async function extractKeyframes(filePath: string): Promise<number[]> {
|
|
|
|
|
return invoke<number[]>('extract_keyframes', { filePath });
|
|
|
|
|
}
|
2026-09-21 11:12:36 -04:00
|
|
|
|
|
|
|
|
export async function extractWaveform(
|
|
|
|
|
filePath: string,
|
|
|
|
|
sampleCount: number
|
|
|
|
|
): Promise<number[]> {
|
|
|
|
|
return invoke<number[]>('extract_waveform', { filePath, sampleCount });
|
|
|
|
|
}
|