cleanup
This commit is contained in:
parent
ae461822a8
commit
0834116083
2 changed files with 14 additions and 22 deletions
|
@ -1,8 +1,8 @@
|
|||
use iced::{
|
||||
widget::{image::Handle, Button, Column, Container, Image, Row, Slider, Space, Text},
|
||||
widget::{Button, Column, Container, Row, Slider, Text},
|
||||
Element,
|
||||
};
|
||||
use iced_video_player::{Position, Video, VideoPlayer};
|
||||
use iced_video_player::{Video, VideoPlayer};
|
||||
use std::time::Duration;
|
||||
|
||||
fn main() -> iced::Result {
|
||||
|
@ -23,12 +23,12 @@ struct App {
|
|||
video: Video,
|
||||
position: f64,
|
||||
dragging: bool,
|
||||
thumb: Handle,
|
||||
}
|
||||
|
||||
impl Default for App {
|
||||
fn default() -> Self {
|
||||
let mut video = Video::new(
|
||||
App {
|
||||
video: Video::new(
|
||||
&url::Url::from_file_path(
|
||||
std::path::PathBuf::from(file!())
|
||||
.parent()
|
||||
|
@ -39,17 +39,9 @@ impl Default for App {
|
|||
)
|
||||
.unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
let thumb = video
|
||||
.thumbnails(&[Position::Frame(0)])
|
||||
.unwrap()
|
||||
.pop()
|
||||
.unwrap();
|
||||
App {
|
||||
video,
|
||||
.unwrap(),
|
||||
position: 0.0,
|
||||
dragging: false,
|
||||
thumb,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ use crate::{pipeline::VideoPrimitive, video::Video};
|
|||
use gstreamer as gst;
|
||||
use iced::{
|
||||
advanced::{self, graphics::core::event::Status, layout, widget, Widget},
|
||||
Element, Size,
|
||||
Element,
|
||||
};
|
||||
use iced_wgpu::primitive::Renderer as PrimitiveRenderer;
|
||||
use log::error;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue