feat: add bitrate visualization with file analysis

Add comprehensive bitrate data extraction and visualization capabilities:
- Implement analyze_files command for file candidacy detection
- Add extract_bitrate_data command using ffprobe
- Create BitrateData, BitrateFrame, File, and FileCandidacy types with TS bindings
- Update App to fetch and display bitrate data from dropped files
- Refactor DropOverlay to use new file analysis system
- Configure Graph component for packet size visualization
- Simplify drag-drop flow to trigger on drop event only
This commit is contained in:
Ryan Walters
2025-10-24 00:30:35 -05:00
parent 22d73fabfd
commit 9645e1b6b5
7 changed files with 390 additions and 327 deletions

View File

@@ -3,7 +3,11 @@ import type { StreamResult } from "@/bindings/StreamResult";
import type { StreamDetail } from "@/bindings/StreamDetail";
import type { StreamResultError } from "@/bindings/StreamResultError";
import type { MediaType } from "@/bindings/MediaType";
export type { StreamResult, StreamDetail, StreamResultError, MediaType };
import type { File } from "@/bindings/File";
import type { FileCandidacy } from "@/bindings/FileCandidacy";
import type { BitrateData } from "@/bindings/BitrateData";
import type { BitrateFrame } from "@/bindings/BitrateFrame";
export type { StreamResult, StreamDetail, StreamResultError, MediaType, File, FileCandidacy, BitrateData, BitrateFrame };
// Tauri invoke wrapper
import { invoke } from "@tauri-apps/api/core";
@@ -21,5 +25,13 @@ export const commands = {
if (e instanceof Error) throw e;
else return { status: "error", error: e as any };
}
},
async analyzeFiles(paths: string[]): Promise<File[]> {
return await invoke<File[]>("analyze_files", { paths });
},
async extractBitrateData(path: string): Promise<BitrateData> {
return await invoke<BitrateData>("extract_bitrate_data", { path });
}
};