mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-06-08 00:18:56 +00:00
rtp: av1pay: Derive Default trait for the state instead of manual implementation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1628>
This commit is contained in:
parent
433acfb2c6
commit
627a756f04
1 changed files with 1 additions and 13 deletions
|
@ -67,7 +67,7 @@ struct ObuData {
|
||||||
pts: Option<gst::ClockTime>,
|
pts: Option<gst::ClockTime>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
#[derive(Clone, Debug, Default, PartialEq, Eq)]
|
||||||
struct State {
|
struct State {
|
||||||
/// Holds header information and raw bytes for all received OBUs,
|
/// Holds header information and raw bytes for all received OBUs,
|
||||||
/// as well as DTS and PTS
|
/// as well as DTS and PTS
|
||||||
|
@ -91,18 +91,6 @@ pub struct RTPAv1Pay {
|
||||||
state: Mutex<State>,
|
state: Mutex<State>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for State {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self {
|
|
||||||
obus: VecDeque::new(),
|
|
||||||
open_obu_fragment: false,
|
|
||||||
last_dts: None,
|
|
||||||
last_pts: None,
|
|
||||||
framed: false,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl RTPAv1Pay {
|
impl RTPAv1Pay {
|
||||||
fn reset(&self, state: &mut State, full: bool) {
|
fn reset(&self, state: &mut State, full: bool) {
|
||||||
gst::debug!(CAT, imp: self, "resetting state");
|
gst::debug!(CAT, imp: self, "resetting state");
|
||||||
|
|
Loading…
Reference in a new issue