From 798c9c23a87e5aee6f8df60c9a492c918e952756 Mon Sep 17 00:00:00 2001 From: Kodai Aoyama Date: Wed, 6 Nov 2024 00:01:48 +0900 Subject: [PATCH 1/2] update screencapture-kit --- src-tauri/Cargo.lock | 137 ++++++++++++++++++++++--- src-tauri/Cargo.toml | 6 +- src-tauri/src/module/record_desktop.rs | 99 +++++++++--------- 3 files changed, 172 insertions(+), 70 deletions(-) diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 12e8bac..e8cb09a 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -590,6 +590,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block2" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" +dependencies = [ + "objc2", +] + [[package]] name = "blocking" version = "1.5.1" @@ -893,6 +902,15 @@ dependencies = [ "vob", ] +[[package]] +name = "cgl" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" +dependencies = [ + "libc", +] + [[package]] name = "chrono" version = "0.4.38" @@ -1103,6 +1121,14 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" +[[package]] +name = "core-audio-types-rs" +version = "0.1.0" +source = "git+https://github.com/doom-fish/core-frameworks.git#da192ff073a9157c52fb078ffb66a7edb91ca085" +dependencies = [ + "core-foundation 0.10.0", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -1190,6 +1216,39 @@ dependencies = [ "libc", ] +[[package]] +name = "core-media-rs" +version = "0.1.0" +source = "git+https://github.com/doom-fish/core-frameworks.git#da192ff073a9157c52fb078ffb66a7edb91ca085" +dependencies = [ + "core-audio-types-rs", + "core-foundation 0.10.0", + "core-utils-rs", + "core-video-rs", + "thiserror", +] + +[[package]] +name = "core-utils-rs" +version = "0.1.0" +source = "git+https://github.com/doom-fish/core-frameworks.git#da192ff073a9157c52fb078ffb66a7edb91ca085" +dependencies = [ + "core-foundation 0.10.0", + "four-char-code", +] + +[[package]] +name = "core-video-rs" +version = "0.1.0" +source = "git+https://github.com/doom-fish/core-frameworks.git#da192ff073a9157c52fb078ffb66a7edb91ca085" +dependencies = [ + "core-foundation 0.10.0", + "core-graphics 0.24.0", + "core-utils-rs", + "io-surface", + "thiserror", +] + [[package]] name = "coreaudio-rs" version = "0.10.0" @@ -2392,6 +2451,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "four-char-code" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c661315fd366b2a1f970df7b7cb1a28d2678d49ef4872f7dcc19b4a83150f20b" + [[package]] name = "fs_extra" version = "1.3.0" @@ -3561,6 +3626,19 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "io-surface" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8283575d5f0b2e7447ec0840363879d71c0fa325d4c699d5b45208ea4a51f45e" +dependencies = [ + "cgl", + "core-foundation 0.10.0", + "core-foundation-sys", + "leaky-cow", + "libc", +] + [[package]] name = "ipnet" version = "2.9.0" @@ -3883,6 +3961,21 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" +[[package]] +name = "leak" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd100e01f1154f2908dfa7d02219aeab25d0b9c7fa955164192e3245255a0c73" + +[[package]] +name = "leaky-cow" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40a8225d44241fd324a8af2806ba635fc7c8a7e9a7de4d5cf3ef54e71f5926fc" +dependencies = [ + "leak", +] + [[package]] name = "lebe" version = "0.5.2" @@ -4191,6 +4284,7 @@ version = "0.9.23" dependencies = [ "chrono", "core-graphics 0.24.0", + "core-media-rs", "cpal", "crossbeam-channel", "ct2rs", @@ -5015,6 +5109,28 @@ dependencies = [ "objc_id", ] +[[package]] +name = "objc-sys" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" + +[[package]] +name = "objc2" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" +dependencies = [ + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2-encode" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" + [[package]] name = "objc_exception" version = "0.1.2" @@ -6463,23 +6579,16 @@ checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152" [[package]] name = "screencapturekit" -version = "0.2.7" -source = "git+https://github.com/solaoi/screencapturekit-rs#e4f37692ce04d378262e19d26b56c5cc81af2330" -dependencies = [ - "screencapturekit-sys", -] - -[[package]] -name = "screencapturekit-sys" -version = "0.2.7" -source = "git+https://github.com/solaoi/screencapturekit-rs#e4f37692ce04d378262e19d26b56c5cc81af2330" +version = "0.3.0" +source = "git+https://github.com/doom-fish/screencapturekit-rs?rev=3582a58#3582a58cebf3e49c6ce299288f6571c83dc9bb6c" dependencies = [ - "block", + "block2", + "core-foundation 0.10.0", + "core-graphics 0.24.0", + "core-media-rs", + "core-utils-rs", "dispatch", "objc", - "objc-foundation", - "objc_id", - "once_cell", ] [[package]] diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 26b8337..9ee64be 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -34,9 +34,9 @@ futures-util = "0.3.30" # serve audio urlencoding = "2.1.3" # screencapturekit = "0.2.8" -# fix thread crash -# screencapturekit = { git = "https://github.com/doom-fish/screencapturekit-rs", rev = "8829f70"} -screencapturekit = { git = "https://github.com/solaoi/screencapturekit-rs" } +screencapturekit = { git = "https://github.com/doom-fish/screencapturekit-rs", rev = "3582a58"} +core-media-rs = { git = "https://github.com/doom-fish/core-frameworks.git" } + xcap = "0.0.14" # permission macos-accessibility-client = "0.0.1" diff --git a/src-tauri/src/module/record_desktop.rs b/src-tauri/src/module/record_desktop.rs index 8f3eb63..d112251 100644 --- a/src-tauri/src/module/record_desktop.rs +++ b/src-tauri/src/module/record_desktop.rs @@ -25,33 +25,27 @@ use crossbeam_channel::{unbounded, Receiver, Sender}; use hound::{WavSpec, WavWriter}; use tauri::{api::path::data_dir, AppHandle, Manager}; +use core_media_rs::cm_sample_buffer::CMSampleBuffer; use screencapturekit::{ - cm_sample_buffer::CMSampleBuffer, - sc_content_filter::{InitParams, SCContentFilter}, - sc_error_handler::StreamErrorHandler, - sc_output_handler::{SCStreamOutputType, StreamOutput}, - sc_shareable_content::SCShareableContent, - sc_stream::SCStream, - sc_stream_configuration::SCStreamConfiguration, + shareable_content::SCShareableContent, + stream::{ + configuration::SCStreamConfiguration, content_filter::SCContentFilter, + output_trait::SCStreamOutputTrait, output_type::SCStreamOutputType, SCStream, + }, }; use vosk::Recognizer; use super::{ - chat_online, recognizer::MyRecognizer, sqlite::Sqlite, transcription, transcription_amivoice, transcription_ja, transcription_online, translation_en, translation_ja, translation_ja_high, writer::Writer + chat_online, recognizer::MyRecognizer, sqlite::Sqlite, transcription, transcription_amivoice, + transcription_ja, transcription_online, translation_en, translation_ja, translation_ja_high, + writer::Writer, }; pub struct RecordDesktop { app_handle: AppHandle, } -struct ErrorHandler; -impl StreamErrorHandler for ErrorHandler { - fn on_error(&self) { - println!("Error!"); - } -} - struct StoreAudioHandler { app_handle: AppHandle, recognizer: Weak>, @@ -60,32 +54,34 @@ struct StoreAudioHandler { channels: u16, } -impl StreamOutput for StoreAudioHandler { +impl SCStreamOutputTrait for StoreAudioHandler { fn did_output_sample_buffer(&self, sample: CMSampleBuffer, _of_type: SCStreamOutputType) { - let audio_buffers = sample.sys_ref.get_av_audio_buffer_list(); + let audio_buffers = sample.get_audio_buffer_list(); if audio_buffers.is_err() { println!("Error getting audio buffer list"); } - let bytes = &audio_buffers.unwrap()[0].data; // 最初のチャンネルのデータを選択 + if let Some(buffer) = audio_buffers.unwrap().get(0) { + let bytes = &buffer.data(); - // バッファのデータを直接処理 - let samples: Vec = bytes - .chunks_exact(4) - .map(|chunk| f32::from_le_bytes(chunk.try_into().unwrap())) - .collect(); + // バッファのデータを f32 に変換 + let samples: Vec = bytes + .chunks_exact(4) + .map(|chunk| f32::from_le_bytes(chunk.try_into().unwrap())) + .collect(); - if let Some(recognizer) = self.recognizer.upgrade() { - MyRecognizer::recognize( - self.app_handle.clone(), - &mut recognizer.lock().unwrap(), - &samples, - self.channels, - self.notify_decoding_state_is_finalized_tx.clone(), - true, - ); - } + if let Some(recognizer) = self.recognizer.upgrade() { + MyRecognizer::recognize( + self.app_handle.clone(), + &mut recognizer.lock().unwrap(), + &samples, + self.channels, + self.notify_decoding_state_is_finalized_tx.clone(), + true, + ); + } - Writer::write_input_data::(&samples, &self.writer_clone); + Writer::write_input_data::(&samples, &self.writer_clone); + } } } @@ -102,32 +98,29 @@ impl RecordDesktop { stop_record_rx: Receiver<()>, stop_record_clone_tx: Option>, ) { - let mut current = SCShareableContent::current(); - let display = current.displays.pop().unwrap(); + let display = SCShareableContent::get().unwrap().displays().remove(0); - let channels = 1 as u16; + let channels = 1 as u8; + // the system uses a default sample rate of 48 kHz. + // https://developer.apple.com/documentation/screencapturekit/scstreamconfiguration/3931903-samplerate let sample_rate = 48000; let bits_per_sample = 32; - let config = SCStreamConfiguration { - width: 100, - height: 100, - captures_audio: true, - sample_rate, - channel_count: channels as u32, - excludes_current_process_audio: true, - ..Default::default() - }; - + let config = SCStreamConfiguration::new() + .set_captures_audio(true) + .unwrap() + .set_channel_count(channels) + .unwrap(); + let recognizer = MyRecognizer::build( self.app_handle.clone(), speaker_language.clone(), - config.sample_rate as f32, + sample_rate as f32, ); let recognizer_arc = Arc::new(Mutex::new(recognizer)); let recognizer_weak = Arc::downgrade(&recognizer_arc); let spec = WavSpec { - channels, + channels: channels as u16, sample_rate, bits_per_sample, sample_format: hound::SampleFormat::Float, @@ -145,15 +138,15 @@ impl RecordDesktop { let (notify_decoding_state_is_finalized_tx, notify_decoding_state_is_finalized_rx) = sync_channel(1); let app_handle = self.app_handle.clone(); - let filter = SCContentFilter::new(InitParams::Display(display)); - let mut stream = SCStream::new(filter, config, ErrorHandler); - stream.add_output( + let filter = SCContentFilter::new().with_display_excluding_windows(&display, &[]); + let mut stream = SCStream::new(&filter, &config); + stream.add_output_handler( StoreAudioHandler { app_handle, recognizer: recognizer_weak, notify_decoding_state_is_finalized_tx, writer_clone, - channels, + channels: channels as u16, }, SCStreamOutputType::Audio, ); From daab9186e27f377e98dce8f0cd5509206dc673d7 Mon Sep 17 00:00:00 2001 From: Kodai Aoyama Date: Mon, 30 Dec 2024 14:23:49 +0900 Subject: [PATCH 2/2] update screencapturekit-rs --- src-tauri/Cargo.lock | 252 ++++++++++++++++++++++++------------------- src-tauri/Cargo.toml | 5 +- 2 files changed, 141 insertions(+), 116 deletions(-) diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 05b4cb9..60d17d9 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -203,7 +203,7 @@ dependencies = [ "objc-foundation", "objc_id", "parking_lot", - "thiserror", + "thiserror 1.0.63", "windows-sys 0.48.0", "wl-clipboard-rs", "x11rb", @@ -217,7 +217,7 @@ checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -365,7 +365,7 @@ checksum = "30c5ef0ede93efbf733c1a727f3b6b5a1060bbedd5600183e66f6e4be4af0ec5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -400,7 +400,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -534,7 +534,7 @@ dependencies = [ "bitflags 2.5.0", "cexpr", "clang-sys", - "itertools 0.11.0", + "itertools 0.12.1", "lazy_static", "lazycell", "log", @@ -544,7 +544,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.61", + "syn 2.0.93", "which", ] @@ -656,8 +656,8 @@ dependencies = [ "proc-macro2", "quote", "str_inflector", - "syn 2.0.61", - "thiserror", + "syn 2.0.93", + "thiserror 1.0.63", "try_match", ] @@ -690,7 +690,7 @@ checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -745,7 +745,7 @@ dependencies = [ "cairo-sys-rs", "glib", "libc", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -777,7 +777,7 @@ dependencies = [ "rand_distr", "rayon", "safetensors", - "thiserror", + "thiserror 1.0.63", "ug", "ug-metal", "yoke", @@ -791,7 +791,7 @@ source = "git+https://github.com/EricLBuehler/candle.git?rev=629ec72#629ec72d089 dependencies = [ "metal 0.27.0", "once_cell", - "thiserror", + "thiserror 1.0.63", "tracing", ] @@ -808,7 +808,7 @@ dependencies = [ "rayon", "safetensors", "serde", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -969,7 +969,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -1123,8 +1123,9 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "core-audio-types-rs" -version = "0.1.0" -source = "git+https://github.com/doom-fish/core-frameworks.git#da192ff073a9157c52fb078ffb66a7edb91ca085" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02f7359c779907f80443d2b2d1b5a61182abb6d8ffd43b6fcb87a27c327d845f" dependencies = [ "core-foundation 0.10.0", ] @@ -1218,20 +1219,22 @@ dependencies = [ [[package]] name = "core-media-rs" -version = "0.1.0" -source = "git+https://github.com/doom-fish/core-frameworks.git#da192ff073a9157c52fb078ffb66a7edb91ca085" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e33a8804301de5fc0f705ea1cdea692233c08bdcee8e42abb258f5de3b9a5e7" dependencies = [ "core-audio-types-rs", "core-foundation 0.10.0", "core-utils-rs", "core-video-rs", - "thiserror", + "thiserror 2.0.9", ] [[package]] name = "core-utils-rs" -version = "0.1.0" -source = "git+https://github.com/doom-fish/core-frameworks.git#da192ff073a9157c52fb078ffb66a7edb91ca085" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "068ec1aa07335261033bf610b2868ea9db05353468b72b0045ae469e00d26121" dependencies = [ "core-foundation 0.10.0", "four-char-code", @@ -1239,14 +1242,15 @@ dependencies = [ [[package]] name = "core-video-rs" -version = "0.1.0" -source = "git+https://github.com/doom-fish/core-frameworks.git#da192ff073a9157c52fb078ffb66a7edb91ca085" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7559e93f816c05607068cb0b741d997a47709f4ba70b36a02d335f7136b30c46" dependencies = [ "core-foundation 0.10.0", "core-graphics 0.24.0", "core-utils-rs", "io-surface", - "thiserror", + "thiserror 2.0.9", ] [[package]] @@ -1287,7 +1291,7 @@ dependencies = [ "once_cell", "parking_lot", "stdweb", - "thiserror", + "thiserror 1.0.63", "web-sys", "windows 0.37.0", ] @@ -1433,7 +1437,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -1479,7 +1483,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad291aa74992b9b7a7e88c38acbbf6ad7e107f1d90ee8775b7bc1fc3394f485c" dependencies = [ "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -1506,7 +1510,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -1523,7 +1527,7 @@ checksum = "a1719100f31492cd6adeeab9a0f46cdbc846e615fdb66d7b398aa46ec7fdd06f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -1571,7 +1575,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -1593,7 +1597,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core 0.20.8", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -1772,7 +1776,7 @@ checksum = "d150dea618e920167e5973d70ae6ece4385b7164e0d799fe7c122dd0a5d912ad" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -1783,7 +1787,7 @@ checksum = "2cdc8d50f426189eef89dac62fabfa0abb27d5cc008f25bf4156a0203325becc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -1794,7 +1798,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -1815,7 +1819,7 @@ dependencies = [ "darling 0.20.8", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -1825,7 +1829,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" dependencies = [ "derive_builder_core", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -1915,7 +1919,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -2108,7 +2112,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -2129,7 +2133,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -2427,7 +2431,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -2568,7 +2572,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -2909,7 +2913,7 @@ dependencies = [ "glib", "libc", "once_cell", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -2942,7 +2946,7 @@ dependencies = [ "libc", "once_cell", "smallvec", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -3181,7 +3185,7 @@ dependencies = [ "rand 0.8.5", "serde", "serde_json", - "thiserror", + "thiserror 1.0.63", "ureq", ] @@ -3535,7 +3539,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a84a25dcae3ac487bc24ef280f9e20c79c9b1a3e5e32cbed3041d1c514aa87c" dependencies = [ "byteorder", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -3612,7 +3616,7 @@ checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -3728,7 +3732,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "145ee6f495871a0cde6d49ddfa0d103d07430c449d95b6d92fbfb032d622f0b7" dependencies = [ - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -3741,7 +3745,7 @@ dependencies = [ "combine", "jni-sys", "log", - "thiserror", + "thiserror 1.0.63", "walkdir", ] @@ -3755,7 +3759,7 @@ dependencies = [ "combine", "jni-sys", "log", - "thiserror", + "thiserror 1.0.63", "walkdir", ] @@ -3815,7 +3819,7 @@ dependencies = [ "once_cell", "regex", "serde", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -3919,7 +3923,7 @@ dependencies = [ "jsonptr", "serde", "serde_json", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -4080,7 +4084,7 @@ dependencies = [ "log", "once_cell", "serde", - "thiserror", + "thiserror 1.0.63", "yada", ] @@ -4659,7 +4663,7 @@ dependencies = [ "serde_yaml", "strum", "sysinfo 0.30.13", - "thiserror", + "thiserror 1.0.63", "tokenizers 0.19.1", "tokio", "tokio-rayon", @@ -4717,7 +4721,7 @@ checksum = "a7ce64b975ed4f123575d11afd9491f2e37bbd5813fbfbc0f09ae1fbddea74e0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -4763,7 +4767,7 @@ dependencies = [ "jni-sys", "ndk-sys 0.3.0", "num_enum 0.5.11", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -4777,7 +4781,7 @@ dependencies = [ "ndk-sys 0.4.1+23.1.7779620", "num_enum 0.5.11", "raw-window-handle", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -4986,7 +4990,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -5079,7 +5083,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -5242,7 +5246,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -5537,7 +5541,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -5584,7 +5588,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -5735,7 +5739,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -5780,9 +5784,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.82" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -5803,7 +5807,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd" dependencies = [ "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -6023,7 +6027,7 @@ dependencies = [ "rand_chacha 0.3.1", "simd_helpers", "system-deps 6.2.2", - "thiserror", + "thiserror 1.0.63", "v_frame", "wasm-bindgen", ] @@ -6118,7 +6122,7 @@ checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ "getrandom 0.2.12", "libredox", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -6521,7 +6525,7 @@ dependencies = [ "serde", "serde_json", "tar", - "thiserror", + "thiserror 1.0.63", "tokenizers 0.20.1", "zstd", ] @@ -6556,7 +6560,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -6579,14 +6583,16 @@ checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152" [[package]] name = "screencapturekit" -version = "0.3.0" -source = "git+https://github.com/doom-fish/screencapturekit-rs?rev=3582a58#3582a58cebf3e49c6ce299288f6571c83dc9bb6c" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c586f5b007d68e51565ce1b364ad2a292585a79067aedca178f3afad7f62b94b" dependencies = [ "block2", "core-foundation 0.10.0", "core-graphics 0.24.0", "core-media-rs", "core-utils-rs", + "core-video-rs", "dispatch", "objc", ] @@ -6670,7 +6676,7 @@ dependencies = [ "prost", "prost-derive", "sentencepiece-sys", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -6707,7 +6713,7 @@ checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -6718,7 +6724,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -6751,7 +6757,7 @@ checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -6802,7 +6808,7 @@ dependencies = [ "darling 0.20.8", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -6837,7 +6843,7 @@ checksum = "772ee033c0916d670af7860b6e1ef7d658a4629a6d0b4c8c3e67f09b3765b75d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -7180,7 +7186,7 @@ dependencies = [ "sha2", "smallvec", "sqlformat", - "thiserror", + "thiserror 1.0.63", "time", "tokio", "tokio-stream", @@ -7264,7 +7270,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror", + "thiserror 1.0.63", "time", "tracing", "whoami", @@ -7303,7 +7309,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror", + "thiserror 1.0.63", "time", "tracing", "whoami", @@ -7481,7 +7487,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -7503,9 +7509,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.61" +version = "2.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9" +checksum = "9c786062daee0d6db1132800e623df74274a0a87322d8e183338e01b3d98d058" dependencies = [ "proc-macro2", "quote", @@ -7532,7 +7538,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -7554,7 +7560,7 @@ dependencies = [ "byteorder", "enum-as-inner", "libc", - "thiserror", + "thiserror 1.0.63", "walkdir", ] @@ -7761,7 +7767,7 @@ dependencies = [ "tauri-runtime-wry", "tauri-utils", "tempfile", - "thiserror", + "thiserror 1.0.63", "tokio", "url", "uuid 1.10.0", @@ -7809,7 +7815,7 @@ dependencies = [ "serde_json", "sha2", "tauri-utils", - "thiserror", + "thiserror 1.0.63", "time", "uuid 1.10.0", "walkdir", @@ -7841,7 +7847,7 @@ dependencies = [ "serde", "tauri", "tempfile", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -7855,7 +7861,7 @@ dependencies = [ "serde_json", "sqlx", "tauri", - "thiserror", + "thiserror 1.0.63", "time", "tokio", ] @@ -7871,7 +7877,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -7888,7 +7894,7 @@ dependencies = [ "serde", "serde_json", "tauri-utils", - "thiserror", + "thiserror 1.0.63", "url", "uuid 1.10.0", "webview2-com", @@ -7940,7 +7946,7 @@ dependencies = [ "serde", "serde_json", "serde_with", - "thiserror", + "thiserror 1.0.63", "url", "walkdir", "windows-version", @@ -8020,7 +8026,16 @@ version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.63", +] + +[[package]] +name = "thiserror" +version = "2.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc" +dependencies = [ + "thiserror-impl 2.0.9", ] [[package]] @@ -8031,7 +8046,18 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.93", ] [[package]] @@ -8127,7 +8153,7 @@ dependencies = [ "serde", "serde_json", "spm_precompiled", - "thiserror", + "thiserror 1.0.63", "unicode-normalization-alignments", "unicode-segmentation", "unicode_categories", @@ -8159,7 +8185,7 @@ dependencies = [ "serde", "serde_json", "spm_precompiled", - "thiserror", + "thiserror 1.0.63", "unicode-normalization-alignments", "unicode-segmentation", "unicode_categories", @@ -8192,7 +8218,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -8377,7 +8403,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -8456,7 +8482,7 @@ checksum = "b9c81686f7ab4065ccac3df7a910c4249f8c0f3fb70421d6ddec19b9311f63f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -8486,7 +8512,7 @@ dependencies = [ "num", "serde", "serde_json", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -8500,7 +8526,7 @@ dependencies = [ "objc", "serde", "serde_json", - "thiserror", + "thiserror 1.0.63", "ug", ] @@ -8815,7 +8841,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", "wasm-bindgen-shared", ] @@ -8849,7 +8875,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -9044,7 +9070,7 @@ dependencies = [ "regex", "serde", "serde_json", - "thiserror", + "thiserror 1.0.63", "windows 0.39.0", "windows-bindgen", "windows-metadata", @@ -9275,7 +9301,7 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -9286,7 +9312,7 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -9653,7 +9679,7 @@ dependencies = [ "nix 0.28.0", "os_pipe", "tempfile", - "thiserror", + "thiserror 1.0.63", "tree_magic_mini", "wayland-backend", "wayland-client", @@ -9690,7 +9716,7 @@ dependencies = [ "sha2", "soup2", "tao", - "thiserror", + "thiserror 1.0.63", "url", "webkit2gtk", "webkit2gtk-sys", @@ -9761,7 +9787,7 @@ dependencies = [ "log", "percent-encoding", "sysinfo 0.32.0", - "thiserror", + "thiserror 1.0.63", "windows 0.58.0", "xcb", ] @@ -9813,7 +9839,7 @@ checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", "synstructure", ] @@ -9900,7 +9926,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", ] [[package]] @@ -9920,7 +9946,7 @@ checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.93", "synstructure", ] @@ -9942,7 +9968,7 @@ dependencies = [ "displaydoc", "indexmap 2.2.6", "num_enum 0.7.3", - "thiserror", + "thiserror 1.0.63", ] [[package]] diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 4dc6eeb..62af678 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -33,9 +33,8 @@ tokio = { version = "1", features = ["full"] } futures-util = "0.3.30" # serve audio urlencoding = "2.1.3" -# screencapturekit = "0.2.8" -screencapturekit = { git = "https://github.com/doom-fish/screencapturekit-rs", rev = "3582a58"} -core-media-rs = { git = "https://github.com/doom-fish/core-frameworks.git" } +screencapturekit = "0.3.2" +core-media-rs = "0.3.4" xcap = "0.0.14" # permission