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;
|
slide.video_thumbnail = screenshot_string;
|
||||||
let runtime = tokio::runtime::Runtime::new().unwrap();
|
let runtime = tokio::runtime::Runtime::new().unwrap();
|
||||||
runtime.spawn(async move {
|
runtime.spawn(async move {
|
||||||
let video = ffmpeg::bg_from_video(&path, &screenshot).await;
|
let result = ffmpeg::bg_from_video(&path, &screenshot).await;
|
||||||
let res = thread.queue(move |mut slide_model|
|
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(
|
slide_model.as_mut().data_changed(
|
||||||
&model_index,
|
&model_index,
|
||||||
&model_index,
|
&model_index,
|
||||||
&vector_roles,
|
&vector_roles,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
match res {
|
match result {
|
||||||
Ok(o) => debug!("success making video background!"),
|
Ok(o) => debug!("Success in creating qt_thread"),
|
||||||
Err(error) => error!(?error, "Error making video background!")
|
Err(error) => error!(?error, "Error in creating qt_thread")
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue