chore: thumbnails and patches
This commit is contained in:
parent
6c401d7030
commit
00395d27dc
5 changed files with 786 additions and 1053 deletions
10
src/video.rs
10
src/video.rs
|
|
@ -4,7 +4,7 @@ use iced_video_player::{
|
|||
gst_app, gst_pbutils,
|
||||
};
|
||||
|
||||
use cosmic::app::{Command, message};
|
||||
use cosmic::{action, app::Task};
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct VideoSettings {
|
||||
|
|
@ -14,7 +14,7 @@ pub struct VideoSettings {
|
|||
pub fn new_video(
|
||||
url: &url::Url,
|
||||
settings: VideoSettings,
|
||||
) -> Result<Video, cosmic::Command<cosmic::app::Message<super::Message>>> {
|
||||
) -> Result<Video, cosmic::Task<cosmic::Action<super::Message>>> {
|
||||
//TODO: this code came from iced_video_player::Video::new and has been modified to stop the pipeline on error
|
||||
//TODO: remove unwraps and enable playback of files with only audio.
|
||||
gst::init().unwrap();
|
||||
|
|
@ -68,8 +68,8 @@ pub fn new_video(
|
|||
match msg.view() {
|
||||
gst::MessageView::Element(element) => {
|
||||
if gst_pbutils::MissingPluginMessage::is(&element) {
|
||||
commands.push(Command::perform(
|
||||
async { message::app(super::Message::MissingPlugin(msg)) },
|
||||
commands.push(Task::perform(
|
||||
async { action::app(super::Message::MissingPlugin(msg)) },
|
||||
|x| x,
|
||||
));
|
||||
// Do one codec install at a time
|
||||
|
|
@ -80,7 +80,7 @@ pub fn new_video(
|
|||
}
|
||||
}
|
||||
pipeline.set_state(gst::State::Null).unwrap();
|
||||
Err(Command::batch(commands))
|
||||
Err(Task::batch(commands))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue