mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-26 03:21:03 +00:00
Add Sample::get_info() and deprecate get_structure()
For consistency with the C API naming.
This commit is contained in:
parent
4a9cb50670
commit
65468c1fc8
1 changed files with 6 additions and 1 deletions
|
@ -83,7 +83,7 @@ impl SampleRef {
|
|||
unsafe { from_glib_none(ffi::gst_sample_get_segment(self.as_mut_ptr())) }
|
||||
}
|
||||
|
||||
pub fn get_structure(&self) -> Option<&StructureRef> {
|
||||
pub fn get_info(&self) -> Option<&StructureRef> {
|
||||
unsafe {
|
||||
let ptr = ffi::gst_sample_get_info(self.as_mut_ptr());
|
||||
if ptr.is_null() {
|
||||
|
@ -93,6 +93,11 @@ impl SampleRef {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[deprecated(since = "0.10.1", note = "please use `get_info` instead")]
|
||||
pub fn get_structure(&self) -> Option<&StructureRef> {
|
||||
self.get_info()
|
||||
}
|
||||
}
|
||||
|
||||
impl StaticType for SampleRef {
|
||||
|
|
Loading…
Reference in a new issue