mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-27 18:40:30 +00:00
gstreamer: Add parse_bin_from_description_with_name_full()
The non-full variant existed already.
This commit is contained in:
parent
f8301ea9ce
commit
b8eaef3d02
1 changed files with 21 additions and 0 deletions
|
@ -59,6 +59,27 @@ pub fn parse_bin_from_description_full(
|
|||
}
|
||||
}
|
||||
|
||||
pub fn parse_bin_from_description_with_name_full(
|
||||
bin_description: &str,
|
||||
ghost_unlinked_pads: bool,
|
||||
bin_name: &str,
|
||||
context: Option<&mut ParseContext>,
|
||||
flags: ParseFlags,
|
||||
) -> Result<Element, glib::Error> {
|
||||
assert_initialized_main_thread!();
|
||||
|
||||
assert_initialized_main_thread!();
|
||||
let bin =
|
||||
parse_bin_from_description_full(bin_description, ghost_unlinked_pads, context, flags)?;
|
||||
if !bin_name.is_empty() {
|
||||
let obj = bin.clone().upcast::<Object>();
|
||||
unsafe {
|
||||
gst_sys::gst_object_set_name(obj.to_glib_none().0, bin_name.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
Ok(bin)
|
||||
}
|
||||
|
||||
pub fn parse_launch_full(
|
||||
pipeline_description: &str,
|
||||
mut context: Option<&mut ParseContext>,
|
||||
|
|
Loading…
Reference in a new issue