mirror of
https://gitlab.freedesktop.org/dabrain34/GstPipelineStudio.git
synced 2024-11-24 10:01:01 +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::rc::{Rc, Weak};
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[derive(Default, Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum PipelineState {
|
||||
Playing,
|
||||
Paused,
|
||||
#[default]
|
||||
Stopped,
|
||||
Error,
|
||||
}
|
||||
|
@ -40,7 +41,7 @@ impl fmt::Display for PipelineState {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct Player(Rc<PlayerInner>);
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Default)]
|
||||
pub struct PlayerInner {
|
||||
app: RefCell<Option<GPSApp>>,
|
||||
pipeline: RefCell<Option<gst::Pipeline>>,
|
||||
|
|
Loading…
Reference in a new issue