mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-22 08:07:07 +00:00
Add constants for GST_BUFFER_OFFSET_NONE and GST_CLOCK_TIME_NONE
This commit is contained in:
parent
29f20ebe13
commit
3dac0c8b30
2 changed files with 10 additions and 6 deletions
|
@ -15,6 +15,7 @@ use std::usize;
|
||||||
|
|
||||||
use miniobject::*;
|
use miniobject::*;
|
||||||
use BufferFlags;
|
use BufferFlags;
|
||||||
|
use ClockTime;
|
||||||
|
|
||||||
use glib;
|
use glib;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
|
@ -283,27 +284,27 @@ impl BufferRef {
|
||||||
self.0.offset_end = offset_end;
|
self.0.offset_end = offset_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_pts(&self) -> u64 {
|
pub fn get_pts(&self) -> ClockTime {
|
||||||
self.0.pts
|
self.0.pts
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_pts(&mut self, pts: u64) {
|
pub fn set_pts(&mut self, pts: ClockTime) {
|
||||||
self.0.pts = pts;
|
self.0.pts = pts;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_dts(&self) -> u64 {
|
pub fn get_dts(&self) -> ClockTime {
|
||||||
self.0.dts
|
self.0.dts
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_dts(&mut self, dts: u64) {
|
pub fn set_dts(&mut self, dts: ClockTime) {
|
||||||
self.0.dts = dts;
|
self.0.dts = dts;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_duration(&self) -> u64 {
|
pub fn get_duration(&self) -> ClockTime {
|
||||||
self.0.duration
|
self.0.duration
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_duration(&mut self, duration: u64) {
|
pub fn set_duration(&mut self, duration: ClockTime) {
|
||||||
self.0.duration = duration;
|
self.0.duration = duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,3 +87,6 @@ pub fn init() -> Result<(), glib::Error> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub const BUFFER_OFFSET_NONE: u64 = ffi::GST_BUFFER_OFFSET_NONE;
|
||||||
|
pub const CLOCK_TIME_NONE: u64 = ffi::GST_CLOCK_TIME_NONE;
|
||||||
|
|
Loading…
Reference in a new issue