pub struct GstreamerPipeStream {
child: Child,
width: u32,
height: u32,
frame_rate: f32,
frame_count: Option<u64>,
next_index: u64,
frame_buffer: Vec<u8>,
}Expand description
Streams BGRA frames from a video file by piping it through gst-launch-1.0.
Fields§
§child: Child§width: u32§height: u32§frame_rate: f32§frame_count: Option<u64>§next_index: u64§frame_buffer: Vec<u8>Pre-sized buffer — width * height * 4 bytes, reused per frame.
Implementations§
Source§impl GstreamerPipeStream
impl GstreamerPipeStream
Sourcepub fn probe(path: &Path) -> Result<VideoMetadata>
pub fn probe(path: &Path) -> Result<VideoMetadata>
Probe path with gst-discoverer-1.0 and return the metadata,
without starting a decode.
Sourcepub fn open(path: &Path) -> Result<Self>
pub fn open(path: &Path) -> Result<Self>
Open path for streaming decode. Spawns gst-launch-1.0
immediately; frames are pulled via VideoStream::next_frame.
Trait Implementations§
Source§impl Drop for GstreamerPipeStream
impl Drop for GstreamerPipeStream
Source§impl VideoStream for GstreamerPipeStream
impl VideoStream for GstreamerPipeStream
Source§fn frame_rate(&self) -> f32
fn frame_rate(&self) -> f32
Source frame rate (frames per second). Used by the player loop to
time uploads; backends without a known fixed rate may return their
nominal rate (e.g.
AVFoundation’s nominalFrameRate on the track).Source§fn frame_count_hint(&self) -> Option<u64>
fn frame_count_hint(&self) -> Option<u64>
Total frame count, if known up-front.
None for live streams.Source§fn next_frame(&mut self) -> Option<VideoFrame>
fn next_frame(&mut self) -> Option<VideoFrame>
Pull the next frame. Returns
None at end-of-stream.Auto Trait Implementations§
impl Freeze for GstreamerPipeStream
impl RefUnwindSafe for GstreamerPipeStream
impl Send for GstreamerPipeStream
impl Sync for GstreamerPipeStream
impl Unpin for GstreamerPipeStream
impl UnsafeUnpin for GstreamerPipeStream
impl UnwindSafe for GstreamerPipeStream
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