gstreamer_vulkan_xcb/auto/vulkan_display_xcb.rs
1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
4// DO NOT EDIT
5
6use crate::ffi;
7use glib::translate::*;
8
9glib::wrapper! {
10 #[doc(alias = "GstVulkanDisplayXCB")]
11 pub struct VulkanDisplayXCB(Object<ffi::GstVulkanDisplayXCB, ffi::GstVulkanDisplayXCBClass>) @extends gst::Object;
12
13 match fn {
14 type_ => || ffi::gst_vulkan_display_xcb_get_type(),
15 }
16}
17
18impl VulkanDisplayXCB {
19 #[doc(alias = "gst_vulkan_display_xcb_new")]
20 pub fn new(name: Option<&str>) -> Result<VulkanDisplayXCB, glib::BoolError> {
21 assert_initialized_main_thread!();
22 unsafe {
23 Option::<_>::from_glib_full(ffi::gst_vulkan_display_xcb_new(name.to_glib_none().0))
24 .ok_or_else(|| glib::bool_error!("Failed to create XCB display"))
25 }
26 }
27}
28
29unsafe impl Send for VulkanDisplayXCB {}
30unsafe impl Sync for VulkanDisplayXCB {}