fix: Try to minimize frame latency
This commit is contained in:
@@ -111,12 +111,20 @@ impl From<gstreamer::Sample> for Sample {
|
||||
}
|
||||
|
||||
#[repr(transparent)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Sample {
|
||||
inner: gstreamer::Sample,
|
||||
pub inner: gstreamer::Sample,
|
||||
}
|
||||
|
||||
use gstreamer::BufferRef;
|
||||
impl Sample {
|
||||
#[doc(alias = "empty")]
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
inner: gstreamer::Sample::builder().build(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn buffer(&self) -> Option<&BufferRef> {
|
||||
self.inner.buffer()
|
||||
}
|
||||
@@ -124,6 +132,14 @@ impl Sample {
|
||||
pub fn caps(&self) -> Option<&gstreamer::CapsRef> {
|
||||
self.inner.caps()
|
||||
}
|
||||
|
||||
pub fn info(&self) -> Option<&gstreamer::StructureRef> {
|
||||
self.inner.info()
|
||||
}
|
||||
|
||||
// pub fn set_buffer(&mut self) {
|
||||
// self.inner.set_buffer(None);
|
||||
// }
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user