fix video thumbs?
This commit is contained in:
parent
64095d6fed
commit
effede9da1
1 changed files with 9 additions and 5 deletions
|
@ -333,17 +333,21 @@ impl slide_model::SlideModel {
|
|||
slide.video_thumbnail = screenshot_string;
|
||||
let runtime = tokio::runtime::Runtime::new().unwrap();
|
||||
runtime.spawn(async move {
|
||||
let video = ffmpeg::bg_from_video(&path, &screenshot).await;
|
||||
let res = thread.queue(move |mut slide_model|
|
||||
let result = ffmpeg::bg_from_video(&path, &screenshot).await;
|
||||
match result {
|
||||
Ok(_o) => debug!("Success making video background!"),
|
||||
Err(error) => error!(?error, "Error making video background")
|
||||
};
|
||||
let result = thread.queue(move |mut slide_model|
|
||||
slide_model.as_mut().data_changed(
|
||||
&model_index,
|
||||
&model_index,
|
||||
&vector_roles,
|
||||
)
|
||||
);
|
||||
match res {
|
||||
Ok(o) => debug!("success making video background!"),
|
||||
Err(error) => error!(?error, "Error making video background!")
|
||||
match result {
|
||||
Ok(o) => debug!("Success in creating qt_thread"),
|
||||
Err(error) => error!(?error, "Error in creating qt_thread")
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue