From 65468c1fc85f50bb0ae7e3f1115ac74854ddc09a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 30 Dec 2017 12:03:03 +0200 Subject: [PATCH] Add Sample::get_info() and deprecate get_structure() For consistency with the C API naming. --- gstreamer/src/sample.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gstreamer/src/sample.rs b/gstreamer/src/sample.rs index cf45d7508..82dc8a739 100644 --- a/gstreamer/src/sample.rs +++ b/gstreamer/src/sample.rs @@ -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 {