mirror of
https://github.com/Xevion/byte-me.git
synced 2025-12-10 06:06:44 -06:00
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:
@@ -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 });
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user