Skip to main content

gstreamer_vulkan/auto/
vulkan_operation.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::{VulkanCommandPool, ffi};
7use glib::{prelude::*, translate::*};
8
9glib::wrapper! {
10    #[doc(alias = "GstVulkanOperation")]
11    pub struct VulkanOperation(Object<ffi::GstVulkanOperation, ffi::GstVulkanOperationClass>) @extends gst::Object;
12
13    match fn {
14        type_ => || ffi::gst_vulkan_operation_get_type(),
15    }
16}
17
18impl VulkanOperation {
19    pub const NONE: Option<&'static VulkanOperation> = None;
20
21    #[doc(alias = "gst_vulkan_operation_new")]
22    pub fn new(cmd_pool: &impl IsA<VulkanCommandPool>) -> VulkanOperation {
23        skip_assert_initialized!();
24        unsafe {
25            from_glib_full(ffi::gst_vulkan_operation_new(
26                cmd_pool.as_ref().to_glib_none().0,
27            ))
28        }
29    }
30}
31
32unsafe impl Send for VulkanOperation {}
33unsafe impl Sync for VulkanOperation {}
34
35pub trait VulkanOperationExt: IsA<VulkanOperation> + 'static {
36    #[doc(alias = "gst_vulkan_operation_add_dependency_frame")]
37    fn add_dependency_frame(
38        &self,
39        frame: &gst::Buffer,
40        wait_stage: u64,
41        signal_stage: u64,
42    ) -> bool {
43        unsafe {
44            from_glib(ffi::gst_vulkan_operation_add_dependency_frame(
45                self.as_ref().to_glib_none().0,
46                frame.to_glib_none().0,
47                wait_stage,
48                signal_stage,
49            ))
50        }
51    }
52
53    //#[doc(alias = "gst_vulkan_operation_add_extra_image_barriers")]
54    //fn add_extra_image_barriers(&self, extra_barriers: /*Unknown conversion*//*Unimplemented*/Array TypeId { ns_id: 0, id: 25 }) {
55    //    unsafe { TODO: call ffi:gst_vulkan_operation_add_extra_image_barriers() }
56    //}
57
58    //#[doc(alias = "gst_vulkan_operation_add_frame_barrier")]
59    //fn add_frame_barrier(&self, frame: &gst::Buffer, src_stage: u64, dst_stage: u64, new_access: u64, new_layout: /*Ignored*/&vulkan::ImageLayout, new_queue: Option<&impl IsA<VulkanQueue>>) -> bool {
60    //    unsafe { TODO: call ffi:gst_vulkan_operation_add_frame_barrier() }
61    //}
62
63    //#[cfg(feature = "v1_26")]
64    //#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
65    //#[doc(alias = "gst_vulkan_operation_begin_query")]
66    //fn begin_query(&self, base: /*Ignored*/&mut vulkan::BaseInStructure, id: u32) -> bool {
67    //    unsafe { TODO: call ffi:gst_vulkan_operation_begin_query() }
68    //}
69
70    #[doc(alias = "gst_vulkan_operation_discard_dependencies")]
71    fn discard_dependencies(&self) {
72        unsafe {
73            ffi::gst_vulkan_operation_discard_dependencies(self.as_ref().to_glib_none().0);
74        }
75    }
76
77    //#[doc(alias = "gst_vulkan_operation_enable_query")]
78    //fn enable_query(&self, query_type: u32, n_queries: u32, pnext: /*Unimplemented*/Option<Basic: Pointer>) -> Result<(), glib::Error> {
79    //    unsafe { TODO: call ffi:gst_vulkan_operation_enable_query() }
80    //}
81
82    #[doc(alias = "gst_vulkan_operation_end_query")]
83    fn end_query(&self, id: u32) -> bool {
84        unsafe {
85            from_glib(ffi::gst_vulkan_operation_end_query(
86                self.as_ref().to_glib_none().0,
87                id,
88            ))
89        }
90    }
91
92    //#[doc(alias = "gst_vulkan_operation_get_query")]
93    //#[doc(alias = "get_query")]
94    //fn query(&self, data: /*Unimplemented*/&mut Option<Basic: Pointer>) -> Result<(), glib::Error> {
95    //    unsafe { TODO: call ffi:gst_vulkan_operation_get_query() }
96    //}
97
98    //#[doc(alias = "gst_vulkan_operation_new_extra_image_barriers")]
99    //fn new_extra_image_barriers(&self) -> /*Unknown conversion*//*Unimplemented*/Array TypeId { ns_id: 0, id: 25 } {
100    //    unsafe { TODO: call ffi:gst_vulkan_operation_new_extra_image_barriers() }
101    //}
102
103    //#[doc(alias = "gst_vulkan_operation_pipeline_barrier2")]
104    //fn pipeline_barrier2(&self, dependency_info: /*Unimplemented*/Option<Basic: Pointer>) -> bool {
105    //    unsafe { TODO: call ffi:gst_vulkan_operation_pipeline_barrier2() }
106    //}
107
108    #[doc(alias = "gst_vulkan_operation_reset")]
109    fn reset(&self) {
110        unsafe {
111            ffi::gst_vulkan_operation_reset(self.as_ref().to_glib_none().0);
112        }
113    }
114
115    //#[doc(alias = "gst_vulkan_operation_retrieve_image_barriers")]
116    //fn retrieve_image_barriers(&self) -> /*Unknown conversion*//*Unimplemented*/Array TypeId { ns_id: 0, id: 25 } {
117    //    unsafe { TODO: call ffi:gst_vulkan_operation_retrieve_image_barriers() }
118    //}
119
120    //#[doc(alias = "gst_vulkan_operation_update_frame")]
121    //fn update_frame(&self, frame: &gst::Buffer, dst_stage: u64, new_access: u64, new_layout: /*Ignored*/&vulkan::ImageLayout, new_queue: Option<&impl IsA<VulkanQueue>>) {
122    //    unsafe { TODO: call ffi:gst_vulkan_operation_update_frame() }
123    //}
124
125    #[doc(alias = "gst_vulkan_operation_use_sync2")]
126    fn use_sync2(&self) -> bool {
127        unsafe {
128            from_glib(ffi::gst_vulkan_operation_use_sync2(
129                self.as_ref().to_glib_none().0,
130            ))
131        }
132    }
133
134    #[doc(alias = "gst_vulkan_operation_wait")]
135    fn wait(&self) -> bool {
136        unsafe {
137            from_glib(ffi::gst_vulkan_operation_wait(
138                self.as_ref().to_glib_none().0,
139            ))
140        }
141    }
142
143    #[doc(alias = "command-pool")]
144    fn command_pool(&self) -> Option<VulkanCommandPool> {
145        ObjectExt::property(self.as_ref(), "command-pool")
146    }
147}
148
149impl<O: IsA<VulkanOperation>> VulkanOperationExt for O {}