File tree 7 files changed +13
-13
lines changed
7 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ impl ::AudioFormat {
39
39
unsafe { from_glib ( ffi:: gst_audio_format_from_string ( s. to_glib_none ( ) . 0 ) ) }
40
40
}
41
41
42
- pub fn to_string ( & self ) -> & ' static str {
42
+ pub fn to_string < ' a > ( & self ) -> & ' a str {
43
43
unsafe {
44
44
CStr :: from_ptr ( ffi:: gst_audio_format_to_string ( self . to_glib ( ) ) )
45
45
. to_str ( )
Original file line number Diff line number Diff line change @@ -66,11 +66,11 @@ impl AudioFormatInfo {
66
66
from_glib ( self . 0 . format )
67
67
}
68
68
69
- pub fn name ( & self ) -> & ' static str {
69
+ pub fn name < ' a > ( & self ) -> & ' a str {
70
70
unsafe { CStr :: from_ptr ( self . 0 . name ) . to_str ( ) . unwrap ( ) }
71
71
}
72
72
73
- pub fn description ( & self ) -> & ' static str {
73
+ pub fn description < ' a > ( & self ) -> & ' a str {
74
74
unsafe { CStr :: from_ptr ( self . 0 . description ) . to_str ( ) . unwrap ( ) }
75
75
}
76
76
@@ -94,7 +94,7 @@ impl AudioFormatInfo {
94
94
from_glib ( self . 0 . unpack_format )
95
95
}
96
96
97
- pub fn silence ( & self ) -> & ' static [ u8 ] {
97
+ pub fn silence < ' a > ( & self ) -> & ' a [ u8 ] {
98
98
& self . 0 . silence
99
99
}
100
100
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ impl ::VideoFormat {
82
82
}
83
83
}
84
84
85
- pub fn to_string ( & self ) -> & ' static str {
85
+ pub fn to_string < ' a > ( & self ) -> & ' a str {
86
86
unsafe {
87
87
CStr :: from_ptr ( ffi:: gst_video_format_to_string ( self . to_glib ( ) ) )
88
88
. to_str ( )
Original file line number Diff line number Diff line change @@ -33,11 +33,11 @@ impl VideoFormatInfo {
33
33
from_glib ( self . 0 . format )
34
34
}
35
35
36
- pub fn name ( & self ) -> & ' static str {
36
+ pub fn name < ' a > ( & self ) -> & ' a str {
37
37
unsafe { CStr :: from_ptr ( self . 0 . name ) . to_str ( ) . unwrap ( ) }
38
38
}
39
39
40
- pub fn description ( & self ) -> & ' static str {
40
+ pub fn description < ' a > ( & self ) -> & ' a str {
41
41
unsafe { CStr :: from_ptr ( self . 0 . description ) . to_str ( ) . unwrap ( ) }
42
42
}
43
43
Original file line number Diff line number Diff line change @@ -17,11 +17,11 @@ use ffi;
17
17
use gobject_ffi;
18
18
19
19
pub trait DeviceProviderExtManual {
20
- fn get_metadata ( & self , key : & str ) -> Option < & ' static str > ;
20
+ fn get_metadata < ' a > ( & self , key : & str ) -> Option < & ' a str > ;
21
21
}
22
22
23
23
impl < O : IsA < DeviceProvider > > DeviceProviderExtManual for O {
24
- fn get_metadata ( & self , key : & str ) -> Option < & ' static str > {
24
+ fn get_metadata < ' a > ( & self , key : & str ) -> Option < & ' a str > {
25
25
unsafe {
26
26
let klass = ( * ( self . to_glib_none ( ) . 0 as * mut gobject_ffi:: GTypeInstance ) ) . g_class as
27
27
* mut ffi:: GstDeviceProviderClass ;
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ pub trait ElementExtManual {
54
54
55
55
fn send_event ( & self , event : Event ) -> bool ;
56
56
57
- fn get_metadata ( & self , key : & str ) -> Option < & ' static str > ;
57
+ fn get_metadata < ' a > ( & self , key : & str ) -> Option < & ' a str > ;
58
58
59
59
fn get_pad_template ( & self , name : & str ) -> Option < PadTemplate > ;
60
60
fn get_pad_template_list ( & self ) -> Vec < PadTemplate > ;
@@ -79,7 +79,7 @@ impl<O: IsA<Element>> ElementExtManual for O {
79
79
}
80
80
}
81
81
82
- fn get_metadata ( & self , key : & str ) -> Option < & ' static str > {
82
+ fn get_metadata < ' a > ( & self , key : & str ) -> Option < & ' a str > {
83
83
unsafe {
84
84
let klass = ( * ( self . to_glib_none ( ) . 0 as * mut gobject_ffi:: GTypeInstance ) ) . g_class as
85
85
* mut ffi:: GstElementClass ;
Original file line number Diff line number Diff line change @@ -24,15 +24,15 @@ use Sample;
24
24
25
25
pub trait Tag < ' a > {
26
26
type TagType : FromValueOptional < ' a > + SetValue ;
27
- fn tag_name ( ) -> & ' static str ;
27
+ fn tag_name < ' b > ( ) -> & ' b str ;
28
28
}
29
29
30
30
macro_rules! impl_tag(
31
31
( $name: ident, $t: ty, $tag: expr) => {
32
32
pub struct $name;
33
33
impl <' a> Tag <' a> for $name {
34
34
type TagType = $t;
35
- fn tag_name( ) -> & ' static str {
35
+ fn tag_name< ' b> ( ) -> & ' b str {
36
36
$tag
37
37
}
38
38
}
You can’t perform that action at this time.
0 commit comments