forked from mirrors/gstreamer-rs
gstreamer: Return any lifetime instead of 'static
Following https://github.com/gtk-rs/glib/pull/633
This commit is contained in:
parent
f28a92c46c
commit
1d2609d448
2 changed files with 4 additions and 4 deletions
|
@ -443,7 +443,7 @@ impl StructureRef {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get_name(&self) -> &'static str {
|
||||
pub fn get_name<'a>(&self) -> &'a str {
|
||||
unsafe {
|
||||
CStr::from_ptr(gst_sys::gst_structure_get_name(&self.0))
|
||||
.to_str()
|
||||
|
@ -500,7 +500,7 @@ impl StructureRef {
|
|||
Iter::new(self)
|
||||
}
|
||||
|
||||
pub fn get_nth_field_name(&self, idx: u32) -> Option<&'static str> {
|
||||
pub fn get_nth_field_name<'a>(&self, idx: u32) -> Option<&'a str> {
|
||||
unsafe {
|
||||
let field_name = gst_sys::gst_structure_nth_field_name(&self.0, idx);
|
||||
if field_name.is_null() {
|
||||
|
|
|
@ -798,7 +798,7 @@ pub fn tag_get_type(name: &str) -> glib::Type {
|
|||
unsafe { from_glib(gst_sys::gst_tag_get_type(name.to_glib_none().0)) }
|
||||
}
|
||||
|
||||
pub fn tag_get_nick(name: &str) -> Option<&'static str> {
|
||||
pub fn tag_get_nick<'b>(name: &str) -> Option<&'b str> {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
let ptr = gst_sys::gst_tag_get_nick(name.to_glib_none().0);
|
||||
|
@ -811,7 +811,7 @@ pub fn tag_get_nick(name: &str) -> Option<&'static str> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn tag_get_description(name: &str) -> Option<&'static str> {
|
||||
pub fn tag_get_description<'b>(name: &str) -> Option<&'b str> {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
let ptr = gst_sys::gst_tag_get_description(name.to_glib_none().0);
|
||||
|
|
Loading…
Reference in a new issue