split Main into components, move gif math to backend
This commit is contained in:
@@ -141,6 +141,13 @@ export type EncodeProgress = {
|
||||
percent: number
|
||||
}
|
||||
|
||||
export type GifEstimate = {
|
||||
width: number
|
||||
fps: number
|
||||
height: number
|
||||
dims_label: string
|
||||
}
|
||||
|
||||
export type AudioFailed = string
|
||||
|
||||
export const api = {
|
||||
@@ -154,6 +161,7 @@ export const api = {
|
||||
invoke<void>("start_capture", { request }),
|
||||
pauseCapture: () => invoke<void>("pause_capture"),
|
||||
resumeCapture: () => invoke<void>("resume_capture"),
|
||||
restartAudioCapture: () => invoke<void>("restart_audio_capture"),
|
||||
stopCapture: () => invoke<RecordedClip>("stop_capture"),
|
||||
export: (request: ExportRequest) => invoke<ExportResult>("export", { request }),
|
||||
revealInExplorer: (path: string) => invoke<void>("reveal_in_explorer", { path }),
|
||||
@@ -171,6 +179,18 @@ export const api = {
|
||||
invoke<string[]>("extract_thumbnails", { fps }),
|
||||
renderPreview: (format: Format, fps: number, target_bytes: number, gif_budget_mode?: GifBudgetMode, gif_dither?: GifDither, gif_colors?: number) =>
|
||||
invoke<string>("render_preview", { request: { format, fps, target_bytes, gif_budget_mode, gif_dither, gif_colors } }),
|
||||
estimateGifParams: (input: {
|
||||
format: Format
|
||||
fps: number
|
||||
target_bytes: number
|
||||
gif_budget_mode?: GifBudgetMode
|
||||
gif_dither?: GifDither
|
||||
gif_colors?: number
|
||||
clip_width: number
|
||||
clip_height: number
|
||||
duration_secs: number
|
||||
}) =>
|
||||
invoke<GifEstimate>("estimate_gif_params", { request: input }),
|
||||
renderRawPreview: (timestamp: number) =>
|
||||
invoke<string>("render_raw_preview", { timestamp }),
|
||||
defaultOutputPath: (format: Format) =>
|
||||
|
||||
Reference in New Issue
Block a user