mirror of
https://gitlab.freedesktop.org/dabrain34/GstPipelineStudio.git
synced 2024-11-21 16:41:03 +00:00
player: use default value
This commit is contained in:
parent
671fd8ffd2
commit
c60fbf8342
1 changed files with 4 additions and 3 deletions
|
@ -26,10 +26,11 @@ use std::fmt::Write as _;
|
||||||
use std::ops;
|
use std::ops;
|
||||||
use std::rc::{Rc, Weak};
|
use std::rc::{Rc, Weak};
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Default, Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
pub enum PipelineState {
|
pub enum PipelineState {
|
||||||
Playing,
|
Playing,
|
||||||
Paused,
|
Paused,
|
||||||
|
#[default]
|
||||||
Stopped,
|
Stopped,
|
||||||
Error,
|
Error,
|
||||||
}
|
}
|
||||||
|
@ -40,7 +41,7 @@ impl fmt::Display for PipelineState {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone, Default)]
|
||||||
pub struct Player(Rc<PlayerInner>);
|
pub struct Player(Rc<PlayerInner>);
|
||||||
|
|
||||||
// Deref into the contained struct to make usage a bit more ergonomic
|
// Deref into the contained struct to make usage a bit more ergonomic
|
||||||
|
@ -83,7 +84,7 @@ fn gst_log_handler(
|
||||||
GPS_GST_LOG!("{}", log_message);
|
GPS_GST_LOG!("{}", log_message);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Default)]
|
||||||
pub struct PlayerInner {
|
pub struct PlayerInner {
|
||||||
app: RefCell<Option<GPSApp>>,
|
app: RefCell<Option<GPSApp>>,
|
||||||
pipeline: RefCell<Option<gst::Pipeline>>,
|
pipeline: RefCell<Option<gst::Pipeline>>,
|
||||||
|
|
Loading…
Reference in a new issue