mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-09-02 01:43:49 +00:00
sdp: Add bindings for new SDPMedia::add_media_from_structure()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1743>
This commit is contained in:
parent
0ac135c334
commit
b180622ead
1 changed files with 16 additions and 0 deletions
|
@ -618,6 +618,22 @@ impl SDPMediaRef {
|
||||||
_ => Err(glib::bool_error!("Failed to set media from caps")),
|
_ => Err(glib::bool_error!("Failed to set media from caps")),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "v1_28")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
|
||||||
|
#[doc(alias = "gst_sdp_media_add_media_from_structure")]
|
||||||
|
pub fn add_media_from_structure(
|
||||||
|
&mut self,
|
||||||
|
s: &gst::StructureRef,
|
||||||
|
) -> Result<(), glib::BoolError> {
|
||||||
|
skip_assert_initialized!();
|
||||||
|
let result =
|
||||||
|
unsafe { ffi::gst_sdp_media_add_media_from_structure(s.as_ptr(), &mut self.0) };
|
||||||
|
match result {
|
||||||
|
ffi::GST_SDP_OK => Ok(()),
|
||||||
|
_ => Err(glib::bool_error!("Failed to add media from structure")),
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Borrow<SDPMediaRef> for SDPMedia {
|
impl Borrow<SDPMediaRef> for SDPMedia {
|
||||||
|
|
Loading…
Reference in a new issue