Update iced_video_player

This commit is contained in:
Jeremy Soller 2024-12-30 12:57:03 -07:00
parent 94b643b453
commit 93db103a0c
No known key found for this signature in database
GPG key ID: D02FD439211AF56F
3 changed files with 239 additions and 208 deletions

431
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -57,7 +57,7 @@ check-json: (check '--message-format=json')
dev *args:
cargo fmt
cargo build --profile release-with-debug
RUST_BACKTRACE=1 RUST_LOG=cosmic_player=debug target/release-with-debug/cosmic-player {{args}}
RUST_BACKTRACE=1 RUST_LOG=cosmic_player=debug,iced_video_player=debug target/release-with-debug/cosmic-player {{args}}
# Profile memory usage with heaptrack
heaptrack:

View file

@ -24,7 +24,7 @@ use std::{
any::TypeId,
collections::HashMap,
ffi::{CStr, CString},
fs, process,
fs, process, thread,
time::{Duration, Instant},
};
@ -558,6 +558,11 @@ impl Application for App {
tokio::task::spawn_blocking(move || {
match gst_pbutils::MissingPluginMessage::parse(&element) {
Ok(missing_plugin) => {
// Wait for any prior installations to finish
while gst_pbutils::missing_plugins::install_plugins_installation_in_progress() {
thread::sleep(Duration::from_millis(250));
}
let mut install_ctx = gst_pbutils::InstallPluginsContext::new();
install_ctx
.set_desktop_id(&format!("{}.desktop", Self::APP_ID));
@ -567,7 +572,14 @@ impl Application for App {
&[&install_detail],
Some(&install_ctx),
);
//TODO: why does the sync function return with install-in-progress?
log::info!("plugin install status: {}", status);
// Wait for installation to finish
while gst_pbutils::missing_plugins::install_plugins_installation_in_progress() {
thread::sleep(Duration::from_millis(250));
}
log::info!(
"gstreamer registry update: {:?}",
gst::Registry::update()