mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-09-01 01:13:48 +00:00
vulkan: expose VulkanFullScreenQuad (with Send+Sync) only for gst >= 1.26.4
This commit is contained in:
parent
09a6f7f21f
commit
5440e8ac1c
6 changed files with 18 additions and 12 deletions
|
@ -34,6 +34,7 @@ v1_20 = ["gst/v1_20", "gst-base/v1_20", "gst-video/v1_20", "ffi/v1_20", "v1_18"]
|
|||
v1_22 = ["gst/v1_22", "gst-base/v1_22", "gst-video/v1_22", "ffi/v1_22", "v1_20"]
|
||||
v1_24 = ["gst/v1_24", "gst-base/v1_24", "gst-video/v1_24", "ffi/v1_24", "v1_22"]
|
||||
v1_26 = ["gst/v1_26", "gst-base/v1_26", "gst-video/v1_26", "ffi/v1_26", "v1_24"]
|
||||
v1_26_4 = ["gst/v1_26", "gst-base/v1_26", "gst-video/v1_26", "ffi/v1_26_4", "v1_26"]
|
||||
serde = ["dep:serde", "gst/serde", "gst-video/serde"]
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
|
|
|
@ -117,7 +117,7 @@ status = "generate"
|
|||
[[object]]
|
||||
name = "GstVulkan.VulkanFullScreenQuad"
|
||||
status = "generate"
|
||||
concurrency = "none"
|
||||
version = "1.26.4"
|
||||
|
||||
[[object]]
|
||||
name = "GstVulkan.VulkanHandle"
|
||||
|
|
|
@ -24,7 +24,11 @@ pub use self::vulkan_device::VulkanDevice;
|
|||
mod vulkan_display;
|
||||
pub use self::vulkan_display::VulkanDisplay;
|
||||
|
||||
#[cfg(feature = "v1_26_4")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26_4")))]
|
||||
mod vulkan_full_screen_quad;
|
||||
#[cfg(feature = "v1_26_4")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26_4")))]
|
||||
pub use self::vulkan_full_screen_quad::VulkanFullScreenQuad;
|
||||
|
||||
mod vulkan_handle_pool;
|
||||
|
@ -88,6 +92,8 @@ pub(crate) mod traits {
|
|||
pub use super::vulkan_descriptor_pool::VulkanDescriptorPoolExt;
|
||||
pub use super::vulkan_device::VulkanDeviceExt;
|
||||
pub use super::vulkan_display::VulkanDisplayExt;
|
||||
#[cfg(feature = "v1_26_4")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26_4")))]
|
||||
pub use super::vulkan_full_screen_quad::VulkanFullScreenQuadExt;
|
||||
pub use super::vulkan_handle_pool::VulkanHandlePoolExt;
|
||||
pub use super::vulkan_instance::VulkanInstanceExt;
|
||||
|
|
|
@ -29,6 +29,9 @@ impl VulkanFullScreenQuad {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for VulkanFullScreenQuad {}
|
||||
unsafe impl Sync for VulkanFullScreenQuad {}
|
||||
|
||||
pub trait VulkanFullScreenQuadExt: IsA<VulkanFullScreenQuad> + 'static {
|
||||
#[doc(alias = "gst_vulkan_full_screen_quad_draw")]
|
||||
fn draw(&self) -> Result<(), glib::Error> {
|
||||
|
@ -45,8 +48,6 @@ pub trait VulkanFullScreenQuadExt: IsA<VulkanFullScreenQuad> + 'static {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "v1_22")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
|
||||
#[doc(alias = "gst_vulkan_full_screen_quad_enable_blend")]
|
||||
fn enable_blend(&self, enable_blend: bool) {
|
||||
unsafe {
|
||||
|
@ -57,8 +58,6 @@ pub trait VulkanFullScreenQuadExt: IsA<VulkanFullScreenQuad> + 'static {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "v1_22")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
|
||||
#[doc(alias = "gst_vulkan_full_screen_quad_enable_clear")]
|
||||
fn enable_clear(&self, enable_clear: bool) {
|
||||
unsafe {
|
||||
|
@ -102,8 +101,6 @@ pub trait VulkanFullScreenQuadExt: IsA<VulkanFullScreenQuad> + 'static {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "v1_26")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
||||
#[doc(alias = "gst_vulkan_full_screen_quad_get_queue")]
|
||||
#[doc(alias = "get_queue")]
|
||||
fn queue(&self) -> Option<VulkanQueue> {
|
||||
|
@ -132,15 +129,11 @@ pub trait VulkanFullScreenQuadExt: IsA<VulkanFullScreenQuad> + 'static {
|
|||
}
|
||||
}
|
||||
|
||||
//#[cfg(feature = "v1_22")]
|
||||
//#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
|
||||
//#[doc(alias = "gst_vulkan_full_screen_quad_set_blend_factors")]
|
||||
//fn set_blend_factors(&self, src_blend_factor: /*Ignored*/&vulkan::BlendFactor, dst_blend_factor: /*Ignored*/&vulkan::BlendFactor, src_alpha_blend_factor: /*Ignored*/&vulkan::BlendFactor, dst_alpha_blend_factor: /*Ignored*/&vulkan::BlendFactor) {
|
||||
// unsafe { TODO: call ffi:gst_vulkan_full_screen_quad_set_blend_factors() }
|
||||
//}
|
||||
|
||||
//#[cfg(feature = "v1_22")]
|
||||
//#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
|
||||
//#[doc(alias = "gst_vulkan_full_screen_quad_set_blend_operation")]
|
||||
//fn set_blend_operation(&self, colour_blend_op: /*Ignored*/&vulkan::BlendOp, alpha_blend_op: /*Ignored*/&vulkan::BlendOp) {
|
||||
// unsafe { TODO: call ffi:gst_vulkan_full_screen_quad_set_blend_operation() }
|
||||
|
|
|
@ -27,6 +27,7 @@ pub use crate::auto::*;
|
|||
|
||||
mod vulkan_command_pool;
|
||||
mod vulkan_device;
|
||||
#[cfg(feature = "v1_26_4")]
|
||||
mod vulkan_full_screen_quad;
|
||||
#[cfg(feature = "v1_24")]
|
||||
mod vulkan_operation;
|
||||
|
@ -42,6 +43,7 @@ pub mod prelude {
|
|||
|
||||
pub use super::vulkan_command_pool::VulkanCommandPoolExtManual;
|
||||
pub use super::vulkan_device::VulkanDeviceExtManual;
|
||||
#[cfg(feature = "v1_26_4")]
|
||||
pub use super::vulkan_full_screen_quad::VulkanFullScreenQuadExtManual;
|
||||
#[cfg(feature = "v1_24")]
|
||||
pub use super::vulkan_operation::VulkanOperationExtManual;
|
||||
|
|
|
@ -32,6 +32,7 @@ v1_20 = []
|
|||
v1_22 = ["v1_20"]
|
||||
v1_24 = ["v1_22"]
|
||||
v1_26 = ["v1_24"]
|
||||
v1_26_4 = ["v1_26"]
|
||||
|
||||
[lib]
|
||||
name = "gstreamer_vulkan_sys"
|
||||
|
@ -89,4 +90,7 @@ version = "1.22"
|
|||
version = "1.24"
|
||||
|
||||
[package.metadata.system-deps.gstreamer_vulkan_1_0.v1_26]
|
||||
version = "1.25"
|
||||
version = "1.26"
|
||||
|
||||
[package.metadata.system-deps.gstreamer_vulkan_1_0.v1_26_4]
|
||||
version = "1.26.4"
|
||||
|
|
Loading…
Reference in a new issue