mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 02:51:10 +00:00
Revert "Event/Message::get_structure() can return None"
This reverts commit aa275d5ddb
.
It actually breaks the API, we need to find another way.
This commit is contained in:
parent
aa275d5ddb
commit
927b1ac822
2 changed files with 4 additions and 12 deletions
|
@ -101,14 +101,10 @@ impl EventRef {
|
|||
}
|
||||
|
||||
|
||||
pub fn get_structure(&self) -> Option<&StructureRef> {
|
||||
pub fn get_structure(&self) -> &StructureRef {
|
||||
unsafe {
|
||||
let structure = ffi::gst_event_get_structure(self.as_mut_ptr());
|
||||
if structure.is_null() {
|
||||
None
|
||||
} else {
|
||||
Some(StructureRef::from_glib_borrow(structure))
|
||||
}
|
||||
StructureRef::from_glib_borrow(structure)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,14 +45,10 @@ impl MessageRef {
|
|||
unsafe { ffi::gst_message_get_seqnum(self.as_mut_ptr()) }
|
||||
}
|
||||
|
||||
pub fn get_structure(&self) -> Option<&StructureRef> {
|
||||
pub fn get_structure(&self) -> &StructureRef {
|
||||
unsafe {
|
||||
let structure = ffi::gst_message_get_structure(self.as_mut_ptr());
|
||||
if structure.is_null() {
|
||||
None
|
||||
} else {
|
||||
Some(StructureRef::from_glib_borrow(structure))
|
||||
}
|
||||
StructureRef::from_glib_borrow(structure)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue