Update iced_video_player
This commit is contained in:
parent
94b643b453
commit
93db103a0c
3 changed files with 239 additions and 208 deletions
431
Cargo.lock
generated
431
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
2
justfile
2
justfile
|
|
@ -57,7 +57,7 @@ check-json: (check '--message-format=json')
|
||||||
dev *args:
|
dev *args:
|
||||||
cargo fmt
|
cargo fmt
|
||||||
cargo build --profile release-with-debug
|
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
|
# Profile memory usage with heaptrack
|
||||||
heaptrack:
|
heaptrack:
|
||||||
|
|
|
||||||
14
src/main.rs
14
src/main.rs
|
|
@ -24,7 +24,7 @@ use std::{
|
||||||
any::TypeId,
|
any::TypeId,
|
||||||
collections::HashMap,
|
collections::HashMap,
|
||||||
ffi::{CStr, CString},
|
ffi::{CStr, CString},
|
||||||
fs, process,
|
fs, process, thread,
|
||||||
time::{Duration, Instant},
|
time::{Duration, Instant},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -558,6 +558,11 @@ impl Application for App {
|
||||||
tokio::task::spawn_blocking(move || {
|
tokio::task::spawn_blocking(move || {
|
||||||
match gst_pbutils::MissingPluginMessage::parse(&element) {
|
match gst_pbutils::MissingPluginMessage::parse(&element) {
|
||||||
Ok(missing_plugin) => {
|
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();
|
let mut install_ctx = gst_pbutils::InstallPluginsContext::new();
|
||||||
install_ctx
|
install_ctx
|
||||||
.set_desktop_id(&format!("{}.desktop", Self::APP_ID));
|
.set_desktop_id(&format!("{}.desktop", Self::APP_ID));
|
||||||
|
|
@ -567,7 +572,14 @@ impl Application for App {
|
||||||
&[&install_detail],
|
&[&install_detail],
|
||||||
Some(&install_ctx),
|
Some(&install_ctx),
|
||||||
);
|
);
|
||||||
|
//TODO: why does the sync function return with install-in-progress?
|
||||||
log::info!("plugin install status: {}", status);
|
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!(
|
log::info!(
|
||||||
"gstreamer registry update: {:?}",
|
"gstreamer registry update: {:?}",
|
||||||
gst::Registry::update()
|
gst::Registry::update()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue