#[repr(C)]pub struct EventRecord {
pub kind: u32,
pub reason: u32,
pub media_27mhz: u64,
pub a_us: u64,
pub b_us: u64,
pub track: u32,
pub track_valid: u32,
}Expand description
Plain-data, #[repr(C)] form of an Event for a C ABI.
| kind | reason | media_27mhz | a_us | b_us |
|---|---|---|---|---|
| 1 StartPlaying | 0 | start position | lead | 0 |
| 2 Pause | Reason::code | hold position | depth | resume target |
| 3 Resume | 0 | restart position | lead | 0 |
| 4 TargetChanged | 0 | 0 | old target | new target |
| 5 OverMax | 0 | 0 | need | max |
| 6 Rebaselined | 0 | 0 | 0 | 0 |
| 7 EventsDropped | 0 | 0 | count | 0 |
track_valid is 1 only for a Pause that names the starving track in
track (two or more tracks known); otherwise both are 0. Layout (ABI
version 2): 40 bytes, kind@0 reason@4 media_27mhz@8 a_us@16 b_us@24 track@32 track_valid@36.
There is no separate “Starved” event: a starvation is a Pause whose
reason is 2/3 and whose a_us is the lead at that instant.
Fields§
§kind: u32Event kind code (see kind).
reason: u32Pause reason code, else 0.
media_27mhz: u64Media position (PTS domain, 27 MHz), else 0.
a_us: u64First value (table above).
b_us: u64Second value (table above).
track: u32The starving track when track_valid == 1, else 0.
track_valid: u321 when track is meaningful, else 0.
Trait Implementations§
Source§impl Clone for EventRecord
impl Clone for EventRecord
impl Copy for EventRecord
Source§impl Debug for EventRecord
impl Debug for EventRecord
Source§impl Default for EventRecord
impl Default for EventRecord
impl Eq for EventRecord
Source§impl PartialEq for EventRecord
impl PartialEq for EventRecord
Source§impl Serialize for EventRecord
impl Serialize for EventRecord
impl StructuralPartialEq for EventRecord
Auto Trait Implementations§
impl Freeze for EventRecord
impl RefUnwindSafe for EventRecord
impl Send for EventRecord
impl Sync for EventRecord
impl Unpin for EventRecord
impl UnsafeUnpin for EventRecord
impl UnwindSafe for EventRecord
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more