mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-09-01 09:23:50 +00:00
vulkan: Update bindings
Implemented manual bindings for "pixel-aspect-ratio" property since Gst.Fraction generated types mismatch.
This commit is contained in:
parent
7aec1816f9
commit
594e9d0187
45 changed files with 581 additions and 281 deletions
|
@ -142,7 +142,7 @@ trigger:
|
||||||
stage: container-base
|
stage: container-base
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_PACKAGES: >-
|
FDO_DISTRIBUTION_PACKAGES: >-
|
||||||
build-essential cmake curl glslc python3-setuptools libglib2.0-dev libxml2-dev
|
build-essential cmake curl python3-setuptools libglib2.0-dev libxml2-dev
|
||||||
libdrm-dev libegl1-mesa-dev libgl1-mesa-dev libgbm-dev libgles2-mesa-dev
|
libdrm-dev libegl1-mesa-dev libgl1-mesa-dev libgbm-dev libgles2-mesa-dev
|
||||||
libgl1-mesa-dri libegl-dev libgl-dev libgles-dev libglx-dev
|
libgl1-mesa-dri libegl-dev libgl-dev libgles-dev libglx-dev
|
||||||
libssl-dev git wget ca-certificates ninja-build python3-pip flex bison
|
libssl-dev git wget ca-certificates ninja-build python3-pip flex bison
|
||||||
|
|
|
@ -42,7 +42,7 @@ generate = [
|
||||||
"GstVulkan.VulkanOperation",
|
"GstVulkan.VulkanOperation",
|
||||||
"GstVulkan.VulkanPhysicalDevice",
|
"GstVulkan.VulkanPhysicalDevice",
|
||||||
"GstVulkan.VulkanQueue",
|
"GstVulkan.VulkanQueue",
|
||||||
"GstVulkan.VulkanSwapper",
|
# "GstVulkan.VulkanSwapper",
|
||||||
"GstVulkan.VulkanTrash",
|
"GstVulkan.VulkanTrash",
|
||||||
"GstVulkan.VulkanVideoFilter",
|
"GstVulkan.VulkanVideoFilter",
|
||||||
"GstVulkan.VulkanWindow",
|
"GstVulkan.VulkanWindow",
|
||||||
|
@ -93,6 +93,20 @@ name = "Gst.Structure"
|
||||||
status = "manual"
|
status = "manual"
|
||||||
ref_mode = "ref"
|
ref_mode = "ref"
|
||||||
|
|
||||||
|
[[object]]
|
||||||
|
name = "GstVulkan.VulkanDescriptorCache"
|
||||||
|
status = "generate"
|
||||||
|
[[object.function]]
|
||||||
|
name = "new"
|
||||||
|
ignore = true
|
||||||
|
|
||||||
|
[[object]]
|
||||||
|
name = "GstVulkan.VulkanDescriptorPool"
|
||||||
|
status = "generate"
|
||||||
|
[[object.function]]
|
||||||
|
name = "create"
|
||||||
|
ignore = true
|
||||||
|
|
||||||
[[object]]
|
[[object]]
|
||||||
name = "GstVulkan.VulkanFullScreenQuad"
|
name = "GstVulkan.VulkanFullScreenQuad"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
|
@ -104,15 +118,9 @@ status = "generate"
|
||||||
ref_mode = "ref"
|
ref_mode = "ref"
|
||||||
|
|
||||||
[[object]]
|
[[object]]
|
||||||
name = "GstVulkan.VulkanDescriptorPool"
|
name = "GstVulkan.VulkanSwapper"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
[[object.function]]
|
[[object.property]]
|
||||||
name = "create"
|
name = "pixel-aspect-ratio"
|
||||||
ignore = true
|
# fraction
|
||||||
|
manual = true
|
||||||
[[object]]
|
|
||||||
name = "GstVulkan.VulkanDescriptorCache"
|
|
||||||
status = "generate"
|
|
||||||
[[object.function]]
|
|
||||||
name = "new"
|
|
||||||
ignore = true
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
use crate::ffi;
|
||||||
use glib::{bitflags::bitflags, prelude::*, translate::*};
|
use glib::{bitflags::bitflags, prelude::*, translate::*};
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
Generated by gir (https://github.com/gtk-rs/gir @ 2d0807e9c5bc)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6668d0f5551a)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ d62956d67216+)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 2dcaaf8ae3d8+)
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
use crate::ffi;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstVulkanBufferMemoryAllocator")]
|
#[doc(alias = "GstVulkanBufferMemoryAllocator")]
|
||||||
pub struct VulkanBufferMemoryAllocator(Object<ffi::GstVulkanBufferMemoryAllocator, ffi::GstVulkanBufferMemoryAllocatorClass>) @extends gst::Allocator, gst::Object;
|
pub struct VulkanBufferMemoryAllocator(Object<ffi::GstVulkanBufferMemoryAllocator, ffi::GstVulkanBufferMemoryAllocatorClass>) @extends gst::Allocator, gst::Object;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::VulkanDevice;
|
use crate::{ffi, VulkanDevice};
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
use crate::ffi;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
pub struct VulkanCommandBuffer(Boxed<ffi::GstVulkanCommandBuffer>);
|
pub struct VulkanCommandBuffer(Boxed<ffi::GstVulkanCommandBuffer>);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::{VulkanCommandBuffer, VulkanQueue};
|
use crate::{ffi, VulkanCommandBuffer, VulkanQueue};
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
|
@ -22,12 +22,7 @@ impl VulkanCommandPool {
|
||||||
unsafe impl Send for VulkanCommandPool {}
|
unsafe impl Send for VulkanCommandPool {}
|
||||||
unsafe impl Sync for VulkanCommandPool {}
|
unsafe impl Sync for VulkanCommandPool {}
|
||||||
|
|
||||||
mod sealed {
|
pub trait VulkanCommandPoolExt: IsA<VulkanCommandPool> + 'static {
|
||||||
pub trait Sealed {}
|
|
||||||
impl<T: super::IsA<super::VulkanCommandPool>> Sealed for T {}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub trait VulkanCommandPoolExt: IsA<VulkanCommandPool> + sealed::Sealed + 'static {
|
|
||||||
#[doc(alias = "gst_vulkan_command_pool_create")]
|
#[doc(alias = "gst_vulkan_command_pool_create")]
|
||||||
fn create(&self) -> Result<VulkanCommandBuffer, glib::Error> {
|
fn create(&self) -> Result<VulkanCommandBuffer, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::{VulkanDescriptorSet, VulkanHandlePool};
|
use crate::{ffi, VulkanDescriptorSet, VulkanHandlePool};
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
|
@ -22,12 +22,7 @@ impl VulkanDescriptorCache {
|
||||||
unsafe impl Send for VulkanDescriptorCache {}
|
unsafe impl Send for VulkanDescriptorCache {}
|
||||||
unsafe impl Sync for VulkanDescriptorCache {}
|
unsafe impl Sync for VulkanDescriptorCache {}
|
||||||
|
|
||||||
mod sealed {
|
pub trait VulkanDescriptorCacheExt: IsA<VulkanDescriptorCache> + 'static {
|
||||||
pub trait Sealed {}
|
|
||||||
impl<T: super::IsA<super::VulkanDescriptorCache>> Sealed for T {}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub trait VulkanDescriptorCacheExt: IsA<VulkanDescriptorCache> + sealed::Sealed + 'static {
|
|
||||||
#[doc(alias = "gst_vulkan_descriptor_cache_acquire")]
|
#[doc(alias = "gst_vulkan_descriptor_cache_acquire")]
|
||||||
fn acquire(&self) -> Result<VulkanDescriptorSet, glib::Error> {
|
fn acquire(&self) -> Result<VulkanDescriptorSet, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::VulkanDevice;
|
use crate::{ffi, VulkanDevice};
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
|
@ -27,12 +27,7 @@ impl VulkanDescriptorPool {
|
||||||
unsafe impl Send for VulkanDescriptorPool {}
|
unsafe impl Send for VulkanDescriptorPool {}
|
||||||
unsafe impl Sync for VulkanDescriptorPool {}
|
unsafe impl Sync for VulkanDescriptorPool {}
|
||||||
|
|
||||||
mod sealed {
|
pub trait VulkanDescriptorPoolExt: IsA<VulkanDescriptorPool> + 'static {
|
||||||
pub trait Sealed {}
|
|
||||||
impl<T: super::IsA<super::VulkanDescriptorPool>> Sealed for T {}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub trait VulkanDescriptorPoolExt: IsA<VulkanDescriptorPool> + sealed::Sealed + 'static {
|
|
||||||
#[doc(alias = "gst_vulkan_descriptor_pool_get_device")]
|
#[doc(alias = "gst_vulkan_descriptor_pool_get_device")]
|
||||||
#[doc(alias = "get_device")]
|
#[doc(alias = "get_device")]
|
||||||
fn device(&self) -> VulkanDevice {
|
fn device(&self) -> VulkanDevice {
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
use crate::ffi;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
pub struct VulkanDescriptorSet(Boxed<ffi::GstVulkanDescriptorSet>);
|
pub struct VulkanDescriptorSet(Boxed<ffi::GstVulkanDescriptorSet>);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::{VulkanFence, VulkanInstance, VulkanPhysicalDevice, VulkanQueue};
|
use crate::{ffi, VulkanFence, VulkanInstance, VulkanPhysicalDevice, VulkanQueue};
|
||||||
use glib::{
|
use glib::{
|
||||||
prelude::*,
|
prelude::*,
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
|
@ -70,12 +70,7 @@ impl VulkanDevice {
|
||||||
unsafe impl Send for VulkanDevice {}
|
unsafe impl Send for VulkanDevice {}
|
||||||
unsafe impl Sync for VulkanDevice {}
|
unsafe impl Sync for VulkanDevice {}
|
||||||
|
|
||||||
mod sealed {
|
pub trait VulkanDeviceExt: IsA<VulkanDevice> + 'static {
|
||||||
pub trait Sealed {}
|
|
||||||
impl<T: super::IsA<super::VulkanDevice>> Sealed for T {}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub trait VulkanDeviceExt: IsA<VulkanDevice> + sealed::Sealed + 'static {
|
|
||||||
#[doc(alias = "gst_vulkan_device_create_fence")]
|
#[doc(alias = "gst_vulkan_device_create_fence")]
|
||||||
fn create_fence(&self) -> Result<Option<VulkanFence>, glib::Error> {
|
fn create_fence(&self) -> Result<Option<VulkanFence>, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
@ -121,36 +116,25 @@ pub trait VulkanDeviceExt: IsA<VulkanDevice> + sealed::Sealed + 'static {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(alias = "gst_vulkan_device_foreach_queue")]
|
#[doc(alias = "gst_vulkan_device_foreach_queue")]
|
||||||
fn foreach_queue(&self, func: Option<&mut dyn (FnMut(&VulkanDevice, &VulkanQueue) -> bool)>) {
|
fn foreach_queue<P: FnMut(&VulkanDevice, &VulkanQueue) -> bool>(&self, func: P) {
|
||||||
let func_data: Option<&mut dyn (FnMut(&VulkanDevice, &VulkanQueue) -> bool)> = func;
|
let mut func_data: P = func;
|
||||||
unsafe extern "C" fn func_func(
|
unsafe extern "C" fn func_func<P: FnMut(&VulkanDevice, &VulkanQueue) -> bool>(
|
||||||
device: *mut ffi::GstVulkanDevice,
|
device: *mut ffi::GstVulkanDevice,
|
||||||
queue: *mut ffi::GstVulkanQueue,
|
queue: *mut ffi::GstVulkanQueue,
|
||||||
user_data: glib::ffi::gpointer,
|
user_data: glib::ffi::gpointer,
|
||||||
) -> glib::ffi::gboolean {
|
) -> glib::ffi::gboolean {
|
||||||
let device = from_glib_borrow(device);
|
let device = from_glib_borrow(device);
|
||||||
let queue = from_glib_borrow(queue);
|
let queue = from_glib_borrow(queue);
|
||||||
let callback =
|
let callback = user_data as *mut P;
|
||||||
user_data as *mut Option<&mut dyn (FnMut(&VulkanDevice, &VulkanQueue) -> bool)>;
|
(*callback)(&device, &queue).into_glib()
|
||||||
if let Some(ref mut callback) = *callback {
|
|
||||||
callback(&device, &queue)
|
|
||||||
} else {
|
|
||||||
panic!("cannot get closure...")
|
|
||||||
}
|
}
|
||||||
.into_glib()
|
let func = Some(func_func::<P> as _);
|
||||||
}
|
let super_callback0: &mut P = &mut func_data;
|
||||||
let func = if func_data.is_some() {
|
|
||||||
Some(func_func as _)
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
};
|
|
||||||
let super_callback0: &Option<&mut dyn (FnMut(&VulkanDevice, &VulkanQueue) -> bool)> =
|
|
||||||
&func_data;
|
|
||||||
unsafe {
|
unsafe {
|
||||||
ffi::gst_vulkan_device_foreach_queue(
|
ffi::gst_vulkan_device_foreach_queue(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
func,
|
func,
|
||||||
super_callback0 as *const _ as *mut _,
|
super_callback0 as *mut _ as *mut _,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -167,6 +151,7 @@ pub trait VulkanDeviceExt: IsA<VulkanDevice> + sealed::Sealed + 'static {
|
||||||
|
|
||||||
//#[doc(alias = "gst_vulkan_device_get_physical_device")]
|
//#[doc(alias = "gst_vulkan_device_get_physical_device")]
|
||||||
//#[doc(alias = "get_physical_device")]
|
//#[doc(alias = "get_physical_device")]
|
||||||
|
//#[doc(alias = "physical-device")]
|
||||||
//fn physical_device(&self) -> /*Ignored*/vulkan::PhysicalDevice {
|
//fn physical_device(&self) -> /*Ignored*/vulkan::PhysicalDevice {
|
||||||
// unsafe { TODO: call ffi:gst_vulkan_device_get_physical_device() }
|
// unsafe { TODO: call ffi:gst_vulkan_device_get_physical_device() }
|
||||||
//}
|
//}
|
||||||
|
@ -233,7 +218,7 @@ pub trait VulkanDeviceExt: IsA<VulkanDevice> + sealed::Sealed + 'static {
|
||||||
//#[cfg(feature = "v1_24")]
|
//#[cfg(feature = "v1_24")]
|
||||||
//#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
//#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
||||||
//#[doc(alias = "gst_vulkan_device_select_queue")]
|
//#[doc(alias = "gst_vulkan_device_select_queue")]
|
||||||
//fn select_queue(&self, expected_flags: /*Ignored*/&vulkan::QueueFlagBits) -> VulkanQueue {
|
//fn select_queue(&self, expected_flags: /*Ignored*/&vulkan::QueueFlagBits) -> Option<VulkanQueue> {
|
||||||
// unsafe { TODO: call ffi:gst_vulkan_device_select_queue() }
|
// unsafe { TODO: call ffi:gst_vulkan_device_select_queue() }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
@ -257,8 +242,8 @@ pub trait VulkanDeviceExt: IsA<VulkanDevice> + sealed::Sealed + 'static {
|
||||||
let f: Box_<F> = Box_::new(f);
|
let f: Box_<F> = Box_::new(f);
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::instance\0".as_ptr() as *const _,
|
c"notify::instance".as_ptr() as *const _,
|
||||||
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
|
||||||
notify_instance_trampoline::<Self, F> as *const (),
|
notify_instance_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::{VulkanDisplayType, VulkanInstance, VulkanWindow};
|
use crate::{ffi, VulkanDisplayType, VulkanInstance, VulkanWindow};
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
|
@ -78,12 +78,7 @@ impl VulkanDisplay {
|
||||||
unsafe impl Send for VulkanDisplay {}
|
unsafe impl Send for VulkanDisplay {}
|
||||||
unsafe impl Sync for VulkanDisplay {}
|
unsafe impl Sync for VulkanDisplay {}
|
||||||
|
|
||||||
mod sealed {
|
pub trait VulkanDisplayExt: IsA<VulkanDisplay> + 'static {
|
||||||
pub trait Sealed {}
|
|
||||||
impl<T: super::IsA<super::VulkanDisplay>> Sealed for T {}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub trait VulkanDisplayExt: IsA<VulkanDisplay> + sealed::Sealed + 'static {
|
|
||||||
#[doc(alias = "gst_vulkan_display_create_window")]
|
#[doc(alias = "gst_vulkan_display_create_window")]
|
||||||
fn create_window(&self) -> Option<VulkanWindow> {
|
fn create_window(&self) -> Option<VulkanWindow> {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::VulkanDevice;
|
use crate::{ffi, VulkanDevice};
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::{VulkanCommandBuffer, VulkanFence, VulkanHandle, VulkanQueue};
|
use crate::{ffi, VulkanCommandBuffer, VulkanFence, VulkanHandle, VulkanQueue};
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
|
@ -29,12 +29,7 @@ impl VulkanFullScreenQuad {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mod sealed {
|
pub trait VulkanFullScreenQuadExt: IsA<VulkanFullScreenQuad> + 'static {
|
||||||
pub trait Sealed {}
|
|
||||||
impl<T: super::IsA<super::VulkanFullScreenQuad>> Sealed for T {}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub trait VulkanFullScreenQuadExt: IsA<VulkanFullScreenQuad> + sealed::Sealed + 'static {
|
|
||||||
#[doc(alias = "gst_vulkan_full_screen_quad_draw")]
|
#[doc(alias = "gst_vulkan_full_screen_quad_draw")]
|
||||||
fn draw(&self) -> Result<(), glib::Error> {
|
fn draw(&self) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::{VulkanDevice, VulkanDisplay, VulkanInstance};
|
use crate::{ffi, VulkanDevice, VulkanDisplay, VulkanInstance};
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
use crate::ffi;
|
||||||
use glib::prelude::*;
|
use glib::prelude::*;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
|
@ -21,12 +22,7 @@ impl VulkanHandlePool {
|
||||||
unsafe impl Send for VulkanHandlePool {}
|
unsafe impl Send for VulkanHandlePool {}
|
||||||
unsafe impl Sync for VulkanHandlePool {}
|
unsafe impl Sync for VulkanHandlePool {}
|
||||||
|
|
||||||
mod sealed {
|
pub trait VulkanHandlePoolExt: IsA<VulkanHandlePool> + 'static {
|
||||||
pub trait Sealed {}
|
|
||||||
impl<T: super::IsA<super::VulkanHandlePool>> Sealed for T {}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub trait VulkanHandlePoolExt: IsA<VulkanHandlePool> + sealed::Sealed + 'static {
|
|
||||||
//#[doc(alias = "gst_vulkan_handle_pool_acquire")]
|
//#[doc(alias = "gst_vulkan_handle_pool_acquire")]
|
||||||
//fn acquire(&self) -> Result</*Unimplemented*/Option<Basic: Pointer>, glib::Error> {
|
//fn acquire(&self) -> Result</*Unimplemented*/Option<Basic: Pointer>, glib::Error> {
|
||||||
// unsafe { TODO: call ffi:gst_vulkan_handle_pool_acquire() }
|
// unsafe { TODO: call ffi:gst_vulkan_handle_pool_acquire() }
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::VulkanDevice;
|
use crate::{ffi, VulkanDevice};
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
|
@ -29,6 +29,13 @@ impl VulkanImageBufferPool {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//#[cfg(feature = "v1_26")]
|
||||||
|
//#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
||||||
|
//#[doc(alias = "gst_vulkan_image_buffer_pool_config_get_allocation_params")]
|
||||||
|
//pub fn config_get_allocation_params(config: &gst::Structure, usage: /*Ignored*/vulkan::ImageUsageFlags, mem_props: /*Ignored*/vulkan::MemoryPropertyFlags, initial_layout: /*Ignored*/vulkan::ImageLayout) -> u64 {
|
||||||
|
// unsafe { TODO: call ffi:gst_vulkan_image_buffer_pool_config_get_allocation_params() }
|
||||||
|
//}
|
||||||
|
|
||||||
//#[cfg(feature = "v1_24")]
|
//#[cfg(feature = "v1_24")]
|
||||||
//#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
//#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
||||||
//#[doc(alias = "gst_vulkan_image_buffer_pool_config_set_allocation_params")]
|
//#[doc(alias = "gst_vulkan_image_buffer_pool_config_set_allocation_params")]
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
use crate::ffi;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstVulkanImageMemoryAllocator")]
|
#[doc(alias = "GstVulkanImageMemoryAllocator")]
|
||||||
pub struct VulkanImageMemoryAllocator(Object<ffi::GstVulkanImageMemoryAllocator, ffi::GstVulkanImageMemoryAllocatorClass>) @extends gst::Allocator, gst::Object;
|
pub struct VulkanImageMemoryAllocator(Object<ffi::GstVulkanImageMemoryAllocator, ffi::GstVulkanImageMemoryAllocatorClass>) @extends gst::Allocator, gst::Object;
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
use crate::ffi;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
pub struct VulkanImageView(Boxed<ffi::GstVulkanImageView>);
|
pub struct VulkanImageView(Boxed<ffi::GstVulkanImageView>);
|
||||||
|
|
|
@ -3,7 +3,10 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::VulkanDevice;
|
use crate::{ffi, VulkanDevice};
|
||||||
|
#[cfg(feature = "v1_26")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
||||||
|
use glib::object::ObjectType as _;
|
||||||
use glib::{
|
use glib::{
|
||||||
prelude::*,
|
prelude::*,
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
|
@ -60,12 +63,21 @@ impl Default for VulkanInstance {
|
||||||
unsafe impl Send for VulkanInstance {}
|
unsafe impl Send for VulkanInstance {}
|
||||||
unsafe impl Sync for VulkanInstance {}
|
unsafe impl Sync for VulkanInstance {}
|
||||||
|
|
||||||
mod sealed {
|
pub trait VulkanInstanceExt: IsA<VulkanInstance> + 'static {
|
||||||
pub trait Sealed {}
|
#[cfg(feature = "v1_26")]
|
||||||
impl<T: super::IsA<super::VulkanInstance>> Sealed for T {}
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
||||||
|
#[doc(alias = "gst_vulkan_instance_check_api_version")]
|
||||||
|
fn check_api_version(&self, major: u32, minor: u32, patch: u32) -> bool {
|
||||||
|
unsafe {
|
||||||
|
from_glib(ffi::gst_vulkan_instance_check_api_version(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
major,
|
||||||
|
minor,
|
||||||
|
patch,
|
||||||
|
))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait VulkanInstanceExt: IsA<VulkanInstance> + sealed::Sealed + 'static {
|
|
||||||
#[doc(alias = "gst_vulkan_instance_check_version")]
|
#[doc(alias = "gst_vulkan_instance_check_version")]
|
||||||
fn check_version(&self, major: u32, minor: u32, patch: u32) -> bool {
|
fn check_version(&self, major: u32, minor: u32, patch: u32) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
@ -92,6 +104,25 @@ pub trait VulkanInstanceExt: IsA<VulkanInstance> + sealed::Sealed + 'static {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "v1_26")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
||||||
|
#[doc(alias = "gst_vulkan_instance_create_device_with_index")]
|
||||||
|
fn create_device_with_index(&self, device_index: u32) -> Result<VulkanDevice, glib::Error> {
|
||||||
|
unsafe {
|
||||||
|
let mut error = std::ptr::null_mut();
|
||||||
|
let ret = ffi::gst_vulkan_instance_create_device_with_index(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
device_index,
|
||||||
|
&mut error,
|
||||||
|
);
|
||||||
|
if error.is_null() {
|
||||||
|
Ok(from_glib_full(ret))
|
||||||
|
} else {
|
||||||
|
Err(from_glib_full(error))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[doc(alias = "gst_vulkan_instance_disable_extension")]
|
#[doc(alias = "gst_vulkan_instance_disable_extension")]
|
||||||
fn disable_extension(&self, name: &str) -> bool {
|
fn disable_extension(&self, name: &str) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
@ -137,6 +168,29 @@ pub trait VulkanInstanceExt: IsA<VulkanInstance> + sealed::Sealed + 'static {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "v1_26")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
||||||
|
#[doc(alias = "gst_vulkan_instance_get_api_version")]
|
||||||
|
#[doc(alias = "get_api_version")]
|
||||||
|
fn api_version(&self) -> (u32, u32, u32) {
|
||||||
|
unsafe {
|
||||||
|
let mut major = std::mem::MaybeUninit::uninit();
|
||||||
|
let mut minor = std::mem::MaybeUninit::uninit();
|
||||||
|
let mut patch = std::mem::MaybeUninit::uninit();
|
||||||
|
ffi::gst_vulkan_instance_get_api_version(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
major.as_mut_ptr(),
|
||||||
|
minor.as_mut_ptr(),
|
||||||
|
patch.as_mut_ptr(),
|
||||||
|
);
|
||||||
|
(
|
||||||
|
major.assume_init(),
|
||||||
|
minor.assume_init(),
|
||||||
|
patch.assume_init(),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[doc(alias = "gst_vulkan_instance_get_extension_info")]
|
#[doc(alias = "gst_vulkan_instance_get_extension_info")]
|
||||||
#[doc(alias = "get_extension_info")]
|
#[doc(alias = "get_extension_info")]
|
||||||
fn extension_info(&self, name: &str) -> Option<u32> {
|
fn extension_info(&self, name: &str) -> Option<u32> {
|
||||||
|
@ -262,27 +316,34 @@ pub trait VulkanInstanceExt: IsA<VulkanInstance> + sealed::Sealed + 'static {
|
||||||
ObjectExt::set_property(self.as_ref(), "requested-api-minor", requested_api_minor)
|
ObjectExt::set_property(self.as_ref(), "requested-api-minor", requested_api_minor)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "v1_26")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
||||||
#[doc(alias = "create-device")]
|
#[doc(alias = "create-device")]
|
||||||
fn connect_create_device<F: Fn(&Self) -> VulkanDevice + Send + Sync + 'static>(
|
fn connect_create_device<F: Fn(&Self, u32) -> VulkanDevice + Send + Sync + 'static>(
|
||||||
&self,
|
&self,
|
||||||
f: F,
|
f: F,
|
||||||
) -> SignalHandlerId {
|
) -> SignalHandlerId {
|
||||||
unsafe extern "C" fn create_device_trampoline<
|
unsafe extern "C" fn create_device_trampoline<
|
||||||
P: IsA<VulkanInstance>,
|
P: IsA<VulkanInstance>,
|
||||||
F: Fn(&P) -> VulkanDevice + Send + Sync + 'static,
|
F: Fn(&P, u32) -> VulkanDevice + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut ffi::GstVulkanInstance,
|
this: *mut ffi::GstVulkanInstance,
|
||||||
|
device_index: std::ffi::c_uint,
|
||||||
f: glib::ffi::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) -> *mut ffi::GstVulkanDevice {
|
) -> *mut ffi::GstVulkanDevice {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(VulkanInstance::from_glib_borrow(this).unsafe_cast_ref()).to_glib_full()
|
f(
|
||||||
|
VulkanInstance::from_glib_borrow(this).unsafe_cast_ref(),
|
||||||
|
device_index,
|
||||||
|
)
|
||||||
|
.to_glib_full()
|
||||||
}
|
}
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<F> = Box_::new(f);
|
let f: Box_<F> = Box_::new(f);
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"create-device\0".as_ptr() as *const _,
|
c"create-device".as_ptr() as *const _,
|
||||||
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
|
||||||
create_device_trampoline::<Self, F> as *const (),
|
create_device_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -310,8 +371,8 @@ pub trait VulkanInstanceExt: IsA<VulkanInstance> + sealed::Sealed + 'static {
|
||||||
let f: Box_<F> = Box_::new(f);
|
let f: Box_<F> = Box_::new(f);
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::requested-api-major\0".as_ptr() as *const _,
|
c"notify::requested-api-major".as_ptr() as *const _,
|
||||||
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
|
||||||
notify_requested_api_major_trampoline::<Self, F> as *const (),
|
notify_requested_api_major_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -339,8 +400,8 @@ pub trait VulkanInstanceExt: IsA<VulkanInstance> + sealed::Sealed + 'static {
|
||||||
let f: Box_<F> = Box_::new(f);
|
let f: Box_<F> = Box_::new(f);
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::requested-api-minor\0".as_ptr() as *const _,
|
c"notify::requested-api-minor".as_ptr() as *const _,
|
||||||
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
|
||||||
notify_requested_api_minor_trampoline::<Self, F> as *const (),
|
notify_requested_api_minor_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::VulkanCommandPool;
|
use crate::{ffi, VulkanCommandPool};
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
|
@ -32,12 +32,7 @@ impl VulkanOperation {
|
||||||
unsafe impl Send for VulkanOperation {}
|
unsafe impl Send for VulkanOperation {}
|
||||||
unsafe impl Sync for VulkanOperation {}
|
unsafe impl Sync for VulkanOperation {}
|
||||||
|
|
||||||
mod sealed {
|
pub trait VulkanOperationExt: IsA<VulkanOperation> + 'static {
|
||||||
pub trait Sealed {}
|
|
||||||
impl<T: super::IsA<super::VulkanOperation>> Sealed for T {}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub trait VulkanOperationExt: IsA<VulkanOperation> + sealed::Sealed + 'static {
|
|
||||||
#[doc(alias = "gst_vulkan_operation_add_dependency_frame")]
|
#[doc(alias = "gst_vulkan_operation_add_dependency_frame")]
|
||||||
fn add_dependency_frame(
|
fn add_dependency_frame(
|
||||||
&self,
|
&self,
|
||||||
|
@ -61,7 +56,7 @@ pub trait VulkanOperationExt: IsA<VulkanOperation> + sealed::Sealed + 'static {
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//#[doc(alias = "gst_vulkan_operation_add_frame_barrier")]
|
//#[doc(alias = "gst_vulkan_operation_add_frame_barrier")]
|
||||||
//fn add_frame_barrier(&self, frame: &gst::Buffer, dst_stage: u64, new_access: u64, new_layout: /*Ignored*/&vulkan::ImageLayout, new_queue: Option<&impl IsA<VulkanQueue>>) -> bool {
|
//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 {
|
||||||
// unsafe { TODO: call ffi:gst_vulkan_operation_add_frame_barrier() }
|
// unsafe { TODO: call ffi:gst_vulkan_operation_add_frame_barrier() }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
@ -79,15 +74,12 @@ pub trait VulkanOperationExt: IsA<VulkanOperation> + sealed::Sealed + 'static {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(alias = "gst_vulkan_operation_begin_query")]
|
//#[cfg(feature = "v1_26")]
|
||||||
fn begin_query(&self, id: u32) -> bool {
|
//#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
||||||
unsafe {
|
//#[doc(alias = "gst_vulkan_operation_begin_query")]
|
||||||
from_glib(ffi::gst_vulkan_operation_begin_query(
|
//fn begin_query(&self, base: /*Ignored*/&mut vulkan::BaseInStructure, id: u32) -> bool {
|
||||||
self.as_ref().to_glib_none().0,
|
// unsafe { TODO: call ffi:gst_vulkan_operation_begin_query() }
|
||||||
id,
|
//}
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(alias = "gst_vulkan_operation_discard_dependencies")]
|
#[doc(alias = "gst_vulkan_operation_discard_dependencies")]
|
||||||
fn discard_dependencies(&self) {
|
fn discard_dependencies(&self) {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::VulkanInstance;
|
use crate::{ffi, VulkanInstance};
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
|
@ -38,12 +38,44 @@ impl VulkanPhysicalDevice {
|
||||||
unsafe impl Send for VulkanPhysicalDevice {}
|
unsafe impl Send for VulkanPhysicalDevice {}
|
||||||
unsafe impl Sync for VulkanPhysicalDevice {}
|
unsafe impl Sync for VulkanPhysicalDevice {}
|
||||||
|
|
||||||
mod sealed {
|
pub trait VulkanPhysicalDeviceExt: IsA<VulkanPhysicalDevice> + 'static {
|
||||||
pub trait Sealed {}
|
#[cfg(feature = "v1_26")]
|
||||||
impl<T: super::IsA<super::VulkanPhysicalDevice>> Sealed for T {}
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
||||||
|
#[doc(alias = "gst_vulkan_physical_device_check_api_version")]
|
||||||
|
fn check_api_version(&self, major: u32, minor: u32, patch: u32) -> bool {
|
||||||
|
unsafe {
|
||||||
|
from_glib(ffi::gst_vulkan_physical_device_check_api_version(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
major,
|
||||||
|
minor,
|
||||||
|
patch,
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "v1_26")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
||||||
|
#[doc(alias = "gst_vulkan_physical_device_get_api_version")]
|
||||||
|
#[doc(alias = "get_api_version")]
|
||||||
|
fn api_version(&self) -> (u32, u32, u32) {
|
||||||
|
unsafe {
|
||||||
|
let mut major = std::mem::MaybeUninit::uninit();
|
||||||
|
let mut minor = std::mem::MaybeUninit::uninit();
|
||||||
|
let mut patch = std::mem::MaybeUninit::uninit();
|
||||||
|
ffi::gst_vulkan_physical_device_get_api_version(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
major.as_mut_ptr(),
|
||||||
|
minor.as_mut_ptr(),
|
||||||
|
patch.as_mut_ptr(),
|
||||||
|
);
|
||||||
|
(
|
||||||
|
major.assume_init(),
|
||||||
|
minor.assume_init(),
|
||||||
|
patch.assume_init(),
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait VulkanPhysicalDeviceExt: IsA<VulkanPhysicalDevice> + sealed::Sealed + 'static {
|
|
||||||
#[doc(alias = "gst_vulkan_physical_device_get_extension_info")]
|
#[doc(alias = "gst_vulkan_physical_device_get_extension_info")]
|
||||||
#[doc(alias = "get_extension_info")]
|
#[doc(alias = "get_extension_info")]
|
||||||
fn extension_info(&self, name: &str) -> Option<u32> {
|
fn extension_info(&self, name: &str) -> Option<u32> {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::{VulkanCommandPool, VulkanDevice};
|
use crate::{ffi, VulkanCommandPool, VulkanDevice};
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
|
@ -48,12 +48,7 @@ impl VulkanQueue {
|
||||||
unsafe impl Send for VulkanQueue {}
|
unsafe impl Send for VulkanQueue {}
|
||||||
unsafe impl Sync for VulkanQueue {}
|
unsafe impl Sync for VulkanQueue {}
|
||||||
|
|
||||||
mod sealed {
|
pub trait VulkanQueueExt: IsA<VulkanQueue> + 'static {
|
||||||
pub trait Sealed {}
|
|
||||||
impl<T: super::IsA<super::VulkanQueue>> Sealed for T {}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub trait VulkanQueueExt: IsA<VulkanQueue> + sealed::Sealed + 'static {
|
|
||||||
#[doc(alias = "gst_vulkan_queue_create_command_pool")]
|
#[doc(alias = "gst_vulkan_queue_create_command_pool")]
|
||||||
fn create_command_pool(&self) -> Result<VulkanCommandPool, glib::Error> {
|
fn create_command_pool(&self) -> Result<VulkanCommandPool, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::{VulkanDevice, VulkanQueue, VulkanWindow};
|
use crate::{ffi, VulkanDevice, VulkanQueue, VulkanWindow};
|
||||||
use glib::{
|
use glib::{
|
||||||
prelude::*,
|
prelude::*,
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
|
@ -38,12 +38,7 @@ impl VulkanSwapper {
|
||||||
unsafe impl Send for VulkanSwapper {}
|
unsafe impl Send for VulkanSwapper {}
|
||||||
unsafe impl Sync for VulkanSwapper {}
|
unsafe impl Sync for VulkanSwapper {}
|
||||||
|
|
||||||
mod sealed {
|
pub trait VulkanSwapperExt: IsA<VulkanSwapper> + 'static {
|
||||||
pub trait Sealed {}
|
|
||||||
impl<T: super::IsA<super::VulkanSwapper>> Sealed for T {}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub trait VulkanSwapperExt: IsA<VulkanSwapper> + sealed::Sealed + 'static {
|
|
||||||
#[doc(alias = "gst_vulkan_swapper_choose_queue")]
|
#[doc(alias = "gst_vulkan_swapper_choose_queue")]
|
||||||
fn choose_queue(
|
fn choose_queue(
|
||||||
&self,
|
&self,
|
||||||
|
@ -134,16 +129,6 @@ pub trait VulkanSwapperExt: IsA<VulkanSwapper> + sealed::Sealed + 'static {
|
||||||
ObjectExt::set_property(self.as_ref(), "force-aspect-ratio", force_aspect_ratio)
|
ObjectExt::set_property(self.as_ref(), "force-aspect-ratio", force_aspect_ratio)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(alias = "pixel-aspect-ratio")]
|
|
||||||
fn pixel_aspect_ratio(&self) -> Option<gst::Fraction> {
|
|
||||||
ObjectExt::property(self.as_ref(), "pixel-aspect-ratio")
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(alias = "pixel-aspect-ratio")]
|
|
||||||
fn set_pixel_aspect_ratio(&self, pixel_aspect_ratio: Option<&gst::Fraction>) {
|
|
||||||
ObjectExt::set_property(self.as_ref(), "pixel-aspect-ratio", pixel_aspect_ratio)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(alias = "force-aspect-ratio")]
|
#[doc(alias = "force-aspect-ratio")]
|
||||||
fn connect_force_aspect_ratio_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
fn connect_force_aspect_ratio_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||||
&self,
|
&self,
|
||||||
|
@ -164,43 +149,14 @@ pub trait VulkanSwapperExt: IsA<VulkanSwapper> + sealed::Sealed + 'static {
|
||||||
let f: Box_<F> = Box_::new(f);
|
let f: Box_<F> = Box_::new(f);
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::force-aspect-ratio\0".as_ptr() as *const _,
|
c"notify::force-aspect-ratio".as_ptr() as *const _,
|
||||||
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
|
||||||
notify_force_aspect_ratio_trampoline::<Self, F> as *const (),
|
notify_force_aspect_ratio_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(alias = "pixel-aspect-ratio")]
|
|
||||||
fn connect_pixel_aspect_ratio_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
|
||||||
&self,
|
|
||||||
f: F,
|
|
||||||
) -> SignalHandlerId {
|
|
||||||
unsafe extern "C" fn notify_pixel_aspect_ratio_trampoline<
|
|
||||||
P: IsA<VulkanSwapper>,
|
|
||||||
F: Fn(&P) + Send + Sync + 'static,
|
|
||||||
>(
|
|
||||||
this: *mut ffi::GstVulkanSwapper,
|
|
||||||
_param_spec: glib::ffi::gpointer,
|
|
||||||
f: glib::ffi::gpointer,
|
|
||||||
) {
|
|
||||||
let f: &F = &*(f as *const F);
|
|
||||||
f(VulkanSwapper::from_glib_borrow(this).unsafe_cast_ref())
|
|
||||||
}
|
|
||||||
unsafe {
|
|
||||||
let f: Box_<F> = Box_::new(f);
|
|
||||||
connect_raw(
|
|
||||||
self.as_ptr() as *mut _,
|
|
||||||
b"notify::pixel-aspect-ratio\0".as_ptr() as *const _,
|
|
||||||
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
|
||||||
notify_pixel_aspect_ratio_trampoline::<Self, F> as *const (),
|
|
||||||
)),
|
|
||||||
Box_::into_raw(f),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<VulkanSwapper>> VulkanSwapperExt for O {}
|
impl<O: IsA<VulkanSwapper>> VulkanSwapperExt for O {}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::{VulkanDevice, VulkanFence};
|
use crate::{ffi, VulkanDevice, VulkanFence};
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
|
@ -20,29 +20,22 @@ glib::wrapper! {
|
||||||
|
|
||||||
impl VulkanTrash {
|
impl VulkanTrash {
|
||||||
#[doc(alias = "gst_vulkan_trash_new")]
|
#[doc(alias = "gst_vulkan_trash_new")]
|
||||||
pub fn new(
|
pub fn new<P: FnOnce(&VulkanDevice) + Send + Sync + 'static>(
|
||||||
fence: &mut VulkanFence,
|
fence: &mut VulkanFence,
|
||||||
notify: Option<Box_<dyn FnOnce(&VulkanDevice) + 'static>>,
|
notify: P,
|
||||||
) -> VulkanTrash {
|
) -> VulkanTrash {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
let notify_data: Box_<Option<Box_<dyn FnOnce(&VulkanDevice) + 'static>>> =
|
let notify_data: Box_<P> = Box_::new(notify);
|
||||||
Box_::new(notify);
|
unsafe extern "C" fn notify_func<P: FnOnce(&VulkanDevice) + Send + Sync + 'static>(
|
||||||
unsafe extern "C" fn notify_func(
|
|
||||||
device: *mut ffi::GstVulkanDevice,
|
device: *mut ffi::GstVulkanDevice,
|
||||||
user_data: glib::ffi::gpointer,
|
user_data: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let device = from_glib_borrow(device);
|
let device = from_glib_borrow(device);
|
||||||
let callback =
|
let callback = Box_::from_raw(user_data as *mut P);
|
||||||
Box_::from_raw(user_data as *mut Option<Box_<dyn FnOnce(&VulkanDevice) + 'static>>);
|
(*callback)(&device)
|
||||||
let callback = (*callback).expect("cannot get closure...");
|
|
||||||
callback(&device)
|
|
||||||
}
|
}
|
||||||
let notify = if notify_data.is_some() {
|
let notify = Some(notify_func::<P> as _);
|
||||||
Some(notify_func as _)
|
let super_callback0: Box_<P> = notify_data;
|
||||||
} else {
|
|
||||||
None
|
|
||||||
};
|
|
||||||
let super_callback0: Box_<Option<Box_<dyn FnOnce(&VulkanDevice) + 'static>>> = notify_data;
|
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_full(ffi::gst_vulkan_trash_new(
|
from_glib_full(ffi::gst_vulkan_trash_new(
|
||||||
fence.to_glib_none_mut().0,
|
fence.to_glib_none_mut().0,
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
use crate::ffi;
|
||||||
#[cfg(feature = "v1_26")]
|
#[cfg(feature = "v1_26")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
||||||
use crate::{VulkanDevice, VulkanInstance, VulkanQueue};
|
use crate::{VulkanDevice, VulkanInstance, VulkanQueue};
|
||||||
|
@ -27,12 +28,7 @@ impl VulkanVideoFilter {
|
||||||
unsafe impl Send for VulkanVideoFilter {}
|
unsafe impl Send for VulkanVideoFilter {}
|
||||||
unsafe impl Sync for VulkanVideoFilter {}
|
unsafe impl Sync for VulkanVideoFilter {}
|
||||||
|
|
||||||
mod sealed {
|
pub trait VulkanVideoFilterExt: IsA<VulkanVideoFilter> + 'static {
|
||||||
pub trait Sealed {}
|
|
||||||
impl<T: super::IsA<super::VulkanVideoFilter>> Sealed for T {}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub trait VulkanVideoFilterExt: IsA<VulkanVideoFilter> + sealed::Sealed + 'static {
|
|
||||||
#[cfg(feature = "v1_26")]
|
#[cfg(feature = "v1_26")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
||||||
#[doc(alias = "gst_vulkan_video_filter_get_device")]
|
#[doc(alias = "gst_vulkan_video_filter_get_device")]
|
||||||
|
|
|
@ -3,8 +3,9 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::{VulkanDevice, VulkanDisplay};
|
use crate::{ffi, VulkanDevice, VulkanDisplay};
|
||||||
use glib::{
|
use glib::{
|
||||||
|
object::ObjectType as _,
|
||||||
prelude::*,
|
prelude::*,
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
|
@ -37,12 +38,7 @@ impl VulkanWindow {
|
||||||
unsafe impl Send for VulkanWindow {}
|
unsafe impl Send for VulkanWindow {}
|
||||||
unsafe impl Sync for VulkanWindow {}
|
unsafe impl Sync for VulkanWindow {}
|
||||||
|
|
||||||
mod sealed {
|
pub trait VulkanWindowExt: IsA<VulkanWindow> + 'static {
|
||||||
pub trait Sealed {}
|
|
||||||
impl<T: super::IsA<super::VulkanWindow>> Sealed for T {}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub trait VulkanWindowExt: IsA<VulkanWindow> + sealed::Sealed + 'static {
|
|
||||||
#[doc(alias = "gst_vulkan_window_close")]
|
#[doc(alias = "gst_vulkan_window_close")]
|
||||||
fn close(&self) {
|
fn close(&self) {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
@ -180,8 +176,8 @@ pub trait VulkanWindowExt: IsA<VulkanWindow> + sealed::Sealed + 'static {
|
||||||
let f: Box_<F> = Box_::new(f);
|
let f: Box_<F> = Box_::new(f);
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"close\0".as_ptr() as *const _,
|
c"close".as_ptr() as *const _,
|
||||||
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
|
||||||
close_trampoline::<Self, F> as *const (),
|
close_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -205,8 +201,8 @@ pub trait VulkanWindowExt: IsA<VulkanWindow> + sealed::Sealed + 'static {
|
||||||
let f: Box_<F> = Box_::new(f);
|
let f: Box_<F> = Box_::new(f);
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"draw\0".as_ptr() as *const _,
|
c"draw".as_ptr() as *const _,
|
||||||
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
|
||||||
draw_trampoline::<Self, F> as *const (),
|
draw_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -224,8 +220,8 @@ pub trait VulkanWindowExt: IsA<VulkanWindow> + sealed::Sealed + 'static {
|
||||||
F: Fn(&P, &str, &str) + Send + Sync + 'static,
|
F: Fn(&P, &str, &str) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut ffi::GstVulkanWindow,
|
this: *mut ffi::GstVulkanWindow,
|
||||||
id: *mut libc::c_char,
|
id: *mut std::ffi::c_char,
|
||||||
key: *mut libc::c_char,
|
key: *mut std::ffi::c_char,
|
||||||
f: glib::ffi::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
|
@ -239,8 +235,8 @@ pub trait VulkanWindowExt: IsA<VulkanWindow> + sealed::Sealed + 'static {
|
||||||
let f: Box_<F> = Box_::new(f);
|
let f: Box_<F> = Box_::new(f);
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"key-event\0".as_ptr() as *const _,
|
c"key-event".as_ptr() as *const _,
|
||||||
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
|
||||||
key_event_trampoline::<Self, F> as *const (),
|
key_event_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -258,10 +254,10 @@ pub trait VulkanWindowExt: IsA<VulkanWindow> + sealed::Sealed + 'static {
|
||||||
F: Fn(&P, &str, i32, f64, f64) + Send + Sync + 'static,
|
F: Fn(&P, &str, i32, f64, f64) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut ffi::GstVulkanWindow,
|
this: *mut ffi::GstVulkanWindow,
|
||||||
id: *mut libc::c_char,
|
id: *mut std::ffi::c_char,
|
||||||
button: libc::c_int,
|
button: std::ffi::c_int,
|
||||||
x: libc::c_double,
|
x: std::ffi::c_double,
|
||||||
y: libc::c_double,
|
y: std::ffi::c_double,
|
||||||
f: glib::ffi::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
|
@ -277,8 +273,8 @@ pub trait VulkanWindowExt: IsA<VulkanWindow> + sealed::Sealed + 'static {
|
||||||
let f: Box_<F> = Box_::new(f);
|
let f: Box_<F> = Box_::new(f);
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"mouse-event\0".as_ptr() as *const _,
|
c"mouse-event".as_ptr() as *const _,
|
||||||
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
|
||||||
mouse_event_trampoline::<Self, F> as *const (),
|
mouse_event_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -296,8 +292,8 @@ pub trait VulkanWindowExt: IsA<VulkanWindow> + sealed::Sealed + 'static {
|
||||||
F: Fn(&P, u32, u32) + Send + Sync + 'static,
|
F: Fn(&P, u32, u32) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut ffi::GstVulkanWindow,
|
this: *mut ffi::GstVulkanWindow,
|
||||||
object: libc::c_uint,
|
object: std::ffi::c_uint,
|
||||||
p0: libc::c_uint,
|
p0: std::ffi::c_uint,
|
||||||
f: glib::ffi::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
|
@ -311,8 +307,8 @@ pub trait VulkanWindowExt: IsA<VulkanWindow> + sealed::Sealed + 'static {
|
||||||
let f: Box_<F> = Box_::new(f);
|
let f: Box_<F> = Box_::new(f);
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"resize\0".as_ptr() as *const _,
|
c"resize".as_ptr() as *const _,
|
||||||
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
|
||||||
resize_trampoline::<Self, F> as *const (),
|
resize_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -340,8 +336,8 @@ pub trait VulkanWindowExt: IsA<VulkanWindow> + sealed::Sealed + 'static {
|
||||||
let f: Box_<F> = Box_::new(f);
|
let f: Box_<F> = Box_::new(f);
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::display\0".as_ptr() as *const _,
|
c"notify::display".as_ptr() as *const _,
|
||||||
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
|
||||||
notify_display_trampoline::<Self, F> as *const (),
|
notify_display_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -27,6 +27,7 @@ pub use crate::auto::*;
|
||||||
|
|
||||||
mod vulkan_device;
|
mod vulkan_device;
|
||||||
mod vulkan_full_screen_quad;
|
mod vulkan_full_screen_quad;
|
||||||
|
mod vulkan_swapper;
|
||||||
|
|
||||||
// Re-export all the traits in a prelude module, so that applications
|
// Re-export all the traits in a prelude module, so that applications
|
||||||
// can always "use gst_vulkan::prelude::*" without getting conflicts
|
// can always "use gst_vulkan::prelude::*" without getting conflicts
|
||||||
|
@ -36,6 +37,7 @@ pub mod prelude {
|
||||||
|
|
||||||
pub use super::vulkan_device::VulkanDeviceExtManual;
|
pub use super::vulkan_device::VulkanDeviceExtManual;
|
||||||
pub use super::vulkan_full_screen_quad::VulkanFullScreenQuadExtManual;
|
pub use super::vulkan_full_screen_quad::VulkanFullScreenQuadExtManual;
|
||||||
|
pub use super::vulkan_swapper::VulkanSwapperExtManual;
|
||||||
pub use crate::auto::traits::*;
|
pub use crate::auto::traits::*;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,10 +9,7 @@ mod sealed {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait VulkanDeviceExtManual: sealed::Sealed + IsA<VulkanDevice> + 'static {
|
pub trait VulkanDeviceExtManual: sealed::Sealed + IsA<VulkanDevice> + 'static {
|
||||||
fn create_shader<const N: usize>(
|
fn create_shader(&self, code: &[u8]) -> Result<crate::VulkanHandle, glib::Error> {
|
||||||
&self,
|
|
||||||
code: [u8; N],
|
|
||||||
) -> Result<crate::VulkanHandle, glib::Error> {
|
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = std::ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let shader = crate::ffi::gst_vulkan_create_shader(
|
let shader = crate::ffi::gst_vulkan_create_shader(
|
||||||
|
|
21
gstreamer-vulkan/src/vulkan_swapper.rs
Normal file
21
gstreamer-vulkan/src/vulkan_swapper.rs
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
use crate::VulkanSwapper;
|
||||||
|
|
||||||
|
use glib::prelude::*;
|
||||||
|
|
||||||
|
mod sealed {
|
||||||
|
pub trait Sealed {}
|
||||||
|
impl<T: super::IsA<super::VulkanSwapper>> Sealed for T {}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub trait VulkanSwapperExtManual: sealed::Sealed + IsA<VulkanSwapper> + 'static {
|
||||||
|
#[doc(alias = "pixel-aspect-ratio")]
|
||||||
|
fn is_force_aspect_ratio(&self) -> gst::Fraction {
|
||||||
|
ObjectExt::property(self.as_ref(), "pixel-aspect-ratio")
|
||||||
|
}
|
||||||
|
|
||||||
|
#[doc(alias = "pixel-aspect-ratio")]
|
||||||
|
fn set_force_aspect_ratio(&self, pixel_aspect_ratio: gst::Fraction) {
|
||||||
|
ObjectExt::set_property(self.as_ref(), "pixel-aspect-ratio", pixel_aspect_ratio)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<O: IsA<VulkanSwapper>> VulkanSwapperExtManual for O {}
|
|
@ -1,5 +1,5 @@
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
system-deps = "6"
|
system-deps = "7"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libc = "0.2"
|
libc = "0.2"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
Generated by gir (https://github.com/gtk-rs/gir @ 2d0807e9c5bc)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6668d0f5551a)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ d62956d67216+)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 2dcaaf8ae3d8+)
|
||||||
|
|
|
@ -22,14 +22,15 @@ mod manual;
|
||||||
|
|
||||||
pub use manual::*;
|
pub use manual::*;
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
|
||||||
use libc::{
|
|
||||||
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
|
|
||||||
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
|
|
||||||
};
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
|
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE};
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
use std::ffi::{
|
||||||
|
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
|
||||||
|
};
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use glib::{gboolean, gconstpointer, gpointer, GType};
|
use glib::{gboolean, gconstpointer, gpointer, GType};
|
||||||
|
@ -118,6 +119,81 @@ pub const GST_VULKAN_FORMAT_FLAG_ALPHA: GstVulkanFormatFlags = 4;
|
||||||
pub const GST_VULKAN_FORMAT_FLAG_LE: GstVulkanFormatFlags = 8;
|
pub const GST_VULKAN_FORMAT_FLAG_LE: GstVulkanFormatFlags = 8;
|
||||||
pub const GST_VULKAN_FORMAT_FLAG_COMPLEX: GstVulkanFormatFlags = 16;
|
pub const GST_VULKAN_FORMAT_FLAG_COMPLEX: GstVulkanFormatFlags = 16;
|
||||||
|
|
||||||
|
// Unions
|
||||||
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
|
pub struct GstVulkanVideoCapabilities_decoder_codec {
|
||||||
|
_data: [u8; 0],
|
||||||
|
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ::std::fmt::Debug for GstVulkanVideoCapabilities_decoder_codec {
|
||||||
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||||
|
f.debug_struct(&format!(
|
||||||
|
"GstVulkanVideoCapabilities_decoder_codec @ {self:p}"
|
||||||
|
))
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
|
pub struct GstVulkanVideoCapabilities_encoder_codec {
|
||||||
|
_data: [u8; 0],
|
||||||
|
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ::std::fmt::Debug for GstVulkanVideoCapabilities_encoder_codec {
|
||||||
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||||
|
f.debug_struct(&format!(
|
||||||
|
"GstVulkanVideoCapabilities_encoder_codec @ {self:p}"
|
||||||
|
))
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
|
pub struct GstVulkanVideoCapabilities_u1 {
|
||||||
|
_data: [u8; 0],
|
||||||
|
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ::std::fmt::Debug for GstVulkanVideoCapabilities_u1 {
|
||||||
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||||
|
f.debug_struct(&format!("GstVulkanVideoCapabilities_u1 @ {self:p}"))
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
|
pub struct GstVulkanVideoProfile_codec {
|
||||||
|
_data: [u8; 0],
|
||||||
|
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ::std::fmt::Debug for GstVulkanVideoProfile_codec {
|
||||||
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||||
|
f.debug_struct(&format!("GstVulkanVideoProfile_codec @ {self:p}"))
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
|
pub struct GstVulkanVideoProfile_usage {
|
||||||
|
_data: [u8; 0],
|
||||||
|
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ::std::fmt::Debug for GstVulkanVideoProfile_usage {
|
||||||
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||||
|
f.debug_struct(&format!("GstVulkanVideoProfile_usage @ {self:p}"))
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Callbacks
|
// Callbacks
|
||||||
pub type GstVulkanDeviceForEachQueueFunc =
|
pub type GstVulkanDeviceForEachQueueFunc =
|
||||||
Option<unsafe extern "C" fn(*mut GstVulkanDevice, *mut GstVulkanQueue, gpointer) -> gboolean>;
|
Option<unsafe extern "C" fn(*mut GstVulkanDevice, *mut GstVulkanQueue, gpointer) -> gboolean>;
|
||||||
|
@ -134,6 +210,7 @@ pub type GstVulkanTrashNotify = Option<unsafe extern "C" fn(*mut GstVulkanDevice
|
||||||
|
|
||||||
// Records
|
// Records
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct GstVulkanBarrierBufferInfo {
|
pub struct GstVulkanBarrierBufferInfo {
|
||||||
_truncated_record_marker: c_void,
|
_truncated_record_marker: c_void,
|
||||||
// /*Ignored*/field parent has incomplete type
|
// /*Ignored*/field parent has incomplete type
|
||||||
|
@ -147,6 +224,7 @@ impl ::std::fmt::Debug for GstVulkanBarrierBufferInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct GstVulkanBarrierImageInfo {
|
pub struct GstVulkanBarrierImageInfo {
|
||||||
_truncated_record_marker: c_void,
|
_truncated_record_marker: c_void,
|
||||||
// /*Ignored*/field parent has incomplete type
|
// /*Ignored*/field parent has incomplete type
|
||||||
|
@ -160,6 +238,7 @@ impl ::std::fmt::Debug for GstVulkanBarrierImageInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct GstVulkanBarrierMemoryInfo {
|
pub struct GstVulkanBarrierMemoryInfo {
|
||||||
pub type_: GstVulkanBarrierType,
|
pub type_: GstVulkanBarrierType,
|
||||||
pub flags: GstVulkanBarrierFlags,
|
pub flags: GstVulkanBarrierFlags,
|
||||||
|
@ -183,6 +262,7 @@ impl ::std::fmt::Debug for GstVulkanBarrierMemoryInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct GstVulkanBufferMemory {
|
pub struct GstVulkanBufferMemory {
|
||||||
pub parent: gst::GstMemory,
|
pub parent: gst::GstMemory,
|
||||||
pub device: *mut GstVulkanDevice,
|
pub device: *mut GstVulkanDevice,
|
||||||
|
@ -230,6 +310,7 @@ impl ::std::fmt::Debug for GstVulkanBufferPoolClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct _GstVulkanBufferPoolPrivate {
|
pub struct _GstVulkanBufferPoolPrivate {
|
||||||
_data: [u8; 0],
|
_data: [u8; 0],
|
||||||
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
||||||
|
@ -238,6 +319,7 @@ pub struct _GstVulkanBufferPoolPrivate {
|
||||||
pub type GstVulkanBufferPoolPrivate = _GstVulkanBufferPoolPrivate;
|
pub type GstVulkanBufferPoolPrivate = _GstVulkanBufferPoolPrivate;
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct GstVulkanCommandBuffer {
|
pub struct GstVulkanCommandBuffer {
|
||||||
pub parent: gst::GstMiniObject,
|
pub parent: gst::GstMiniObject,
|
||||||
_truncated_record_marker: c_void,
|
_truncated_record_marker: c_void,
|
||||||
|
@ -268,6 +350,7 @@ impl ::std::fmt::Debug for GstVulkanCommandPoolClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct _GstVulkanCommandPoolPrivate {
|
pub struct _GstVulkanCommandPoolPrivate {
|
||||||
_data: [u8; 0],
|
_data: [u8; 0],
|
||||||
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
||||||
|
@ -291,6 +374,7 @@ impl ::std::fmt::Debug for GstVulkanDescriptorCacheClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct _GstVulkanDescriptorCachePrivate {
|
pub struct _GstVulkanDescriptorCachePrivate {
|
||||||
_data: [u8; 0],
|
_data: [u8; 0],
|
||||||
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
||||||
|
@ -314,6 +398,7 @@ impl ::std::fmt::Debug for GstVulkanDescriptorPoolClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct _GstVulkanDescriptorPoolPrivate {
|
pub struct _GstVulkanDescriptorPoolPrivate {
|
||||||
_data: [u8; 0],
|
_data: [u8; 0],
|
||||||
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
||||||
|
@ -322,6 +407,7 @@ pub struct _GstVulkanDescriptorPoolPrivate {
|
||||||
pub type GstVulkanDescriptorPoolPrivate = _GstVulkanDescriptorPoolPrivate;
|
pub type GstVulkanDescriptorPoolPrivate = _GstVulkanDescriptorPoolPrivate;
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct GstVulkanDescriptorSet {
|
pub struct GstVulkanDescriptorSet {
|
||||||
pub parent: gst::GstMiniObject,
|
pub parent: gst::GstMiniObject,
|
||||||
_truncated_record_marker: c_void,
|
_truncated_record_marker: c_void,
|
||||||
|
@ -352,6 +438,7 @@ impl ::std::fmt::Debug for GstVulkanDeviceClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct _GstVulkanDevicePrivate {
|
pub struct _GstVulkanDevicePrivate {
|
||||||
_data: [u8; 0],
|
_data: [u8; 0],
|
||||||
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
||||||
|
@ -379,6 +466,7 @@ impl ::std::fmt::Debug for GstVulkanDisplayClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct _GstVulkanDisplayPrivate {
|
pub struct _GstVulkanDisplayPrivate {
|
||||||
_data: [u8; 0],
|
_data: [u8; 0],
|
||||||
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
||||||
|
@ -405,6 +493,7 @@ impl ::std::fmt::Debug for GstVulkanEncodeQueryResult {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct GstVulkanFence {
|
pub struct GstVulkanFence {
|
||||||
pub parent: gst::GstMiniObject,
|
pub parent: gst::GstMiniObject,
|
||||||
pub device: *mut GstVulkanDevice,
|
pub device: *mut GstVulkanDevice,
|
||||||
|
@ -439,6 +528,7 @@ impl ::std::fmt::Debug for GstVulkanFenceCacheClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct GstVulkanFormatInfo {
|
pub struct GstVulkanFormatInfo {
|
||||||
_truncated_record_marker: c_void,
|
_truncated_record_marker: c_void,
|
||||||
// /*Ignored*/field format has incomplete type
|
// /*Ignored*/field format has incomplete type
|
||||||
|
@ -451,6 +541,22 @@ impl ::std::fmt::Debug for GstVulkanFormatInfo {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
|
pub struct GstVulkanFormatMap {
|
||||||
|
pub format: gst_video::GstVideoFormat,
|
||||||
|
_truncated_record_marker: c_void,
|
||||||
|
// /*Ignored*/field vkfrmt has incomplete type
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ::std::fmt::Debug for GstVulkanFormatMap {
|
||||||
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||||
|
f.debug_struct(&format!("GstVulkanFormatMap @ {self:p}"))
|
||||||
|
.field("format", &self.format)
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct GstVulkanFullScreenQuadClass {
|
pub struct GstVulkanFullScreenQuadClass {
|
||||||
|
@ -467,6 +573,7 @@ impl ::std::fmt::Debug for GstVulkanFullScreenQuadClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct _GstVulkanFullScreenQuadPrivate {
|
pub struct _GstVulkanFullScreenQuadPrivate {
|
||||||
_data: [u8; 0],
|
_data: [u8; 0],
|
||||||
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
||||||
|
@ -540,6 +647,7 @@ impl ::std::fmt::Debug for GstVulkanImageBufferPoolClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct _GstVulkanImageBufferPoolPrivate {
|
pub struct _GstVulkanImageBufferPoolPrivate {
|
||||||
_data: [u8; 0],
|
_data: [u8; 0],
|
||||||
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
||||||
|
@ -548,6 +656,7 @@ pub struct _GstVulkanImageBufferPoolPrivate {
|
||||||
pub type GstVulkanImageBufferPoolPrivate = _GstVulkanImageBufferPoolPrivate;
|
pub type GstVulkanImageBufferPoolPrivate = _GstVulkanImageBufferPoolPrivate;
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct GstVulkanImageMemory {
|
pub struct GstVulkanImageMemory {
|
||||||
pub parent: gst::GstMemory,
|
pub parent: gst::GstMemory,
|
||||||
pub device: *mut GstVulkanDevice,
|
pub device: *mut GstVulkanDevice,
|
||||||
|
@ -580,6 +689,7 @@ impl ::std::fmt::Debug for GstVulkanImageMemoryAllocatorClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct GstVulkanImageView {
|
pub struct GstVulkanImageView {
|
||||||
pub parent: gst::GstMiniObject,
|
pub parent: gst::GstMiniObject,
|
||||||
pub device: *mut GstVulkanDevice,
|
pub device: *mut GstVulkanDevice,
|
||||||
|
@ -614,6 +724,7 @@ impl ::std::fmt::Debug for GstVulkanInstanceClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct _GstVulkanInstancePrivate {
|
pub struct _GstVulkanInstancePrivate {
|
||||||
_data: [u8; 0],
|
_data: [u8; 0],
|
||||||
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
||||||
|
@ -622,6 +733,7 @@ pub struct _GstVulkanInstancePrivate {
|
||||||
pub type GstVulkanInstancePrivate = _GstVulkanInstancePrivate;
|
pub type GstVulkanInstancePrivate = _GstVulkanInstancePrivate;
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct GstVulkanMemory {
|
pub struct GstVulkanMemory {
|
||||||
pub mem: gst::GstMemory,
|
pub mem: gst::GstMemory,
|
||||||
pub device: *mut GstVulkanDevice,
|
pub device: *mut GstVulkanDevice,
|
||||||
|
@ -669,6 +781,7 @@ impl ::std::fmt::Debug for GstVulkanOperationClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct _GstVulkanOperationPrivate {
|
pub struct _GstVulkanOperationPrivate {
|
||||||
_data: [u8; 0],
|
_data: [u8; 0],
|
||||||
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
||||||
|
@ -692,6 +805,7 @@ impl ::std::fmt::Debug for GstVulkanPhysicalDeviceClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct _GstVulkanPhysicalDevicePrivate {
|
pub struct _GstVulkanPhysicalDevicePrivate {
|
||||||
_data: [u8; 0],
|
_data: [u8; 0],
|
||||||
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
||||||
|
@ -718,19 +832,20 @@ impl ::std::fmt::Debug for GstVulkanQueueClass {
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct GstVulkanQueueFamilyOps {
|
pub struct GstVulkanQueueFamilyOps {
|
||||||
pub video: u32,
|
pub video: u32,
|
||||||
pub query: gboolean,
|
pub query_result_status: gboolean,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ::std::fmt::Debug for GstVulkanQueueFamilyOps {
|
impl ::std::fmt::Debug for GstVulkanQueueFamilyOps {
|
||||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||||
f.debug_struct(&format!("GstVulkanQueueFamilyOps @ {self:p}"))
|
f.debug_struct(&format!("GstVulkanQueueFamilyOps @ {self:p}"))
|
||||||
.field("video", &self.video)
|
.field("video", &self.video)
|
||||||
.field("query", &self.query)
|
.field("query_result_status", &self.query_result_status)
|
||||||
.finish()
|
.finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct _GstVulkanQueuePrivate {
|
pub struct _GstVulkanQueuePrivate {
|
||||||
_data: [u8; 0],
|
_data: [u8; 0],
|
||||||
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
||||||
|
@ -754,6 +869,7 @@ impl ::std::fmt::Debug for GstVulkanSwapperClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct _GstVulkanSwapperPrivate {
|
pub struct _GstVulkanSwapperPrivate {
|
||||||
_data: [u8; 0],
|
_data: [u8; 0],
|
||||||
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
||||||
|
@ -819,6 +935,48 @@ impl ::std::fmt::Debug for GstVulkanTrashListClass {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
|
pub struct GstVulkanVideoCapabilities {
|
||||||
|
_truncated_record_marker: c_void,
|
||||||
|
// /*Ignored*/field caps has incomplete type
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ::std::fmt::Debug for GstVulkanVideoCapabilities {
|
||||||
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||||
|
f.debug_struct(&format!("GstVulkanVideoCapabilities @ {self:p}"))
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
|
pub struct GstVulkanVideoCapabilities__decoder {
|
||||||
|
_truncated_record_marker: c_void,
|
||||||
|
// /*Ignored*/field caps has incomplete type
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ::std::fmt::Debug for GstVulkanVideoCapabilities__decoder {
|
||||||
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||||
|
f.debug_struct(&format!("GstVulkanVideoCapabilities__decoder @ {self:p}"))
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
|
pub struct GstVulkanVideoCapabilities__encoder {
|
||||||
|
_truncated_record_marker: c_void,
|
||||||
|
// /*Ignored*/field caps has incomplete type
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ::std::fmt::Debug for GstVulkanVideoCapabilities__encoder {
|
||||||
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||||
|
f.debug_struct(&format!("GstVulkanVideoCapabilities__encoder @ {self:p}"))
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct GstVulkanVideoFilterClass {
|
pub struct GstVulkanVideoFilterClass {
|
||||||
|
@ -834,6 +992,20 @@ impl ::std::fmt::Debug for GstVulkanVideoFilterClass {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
|
pub struct GstVulkanVideoProfile {
|
||||||
|
_truncated_record_marker: c_void,
|
||||||
|
// /*Ignored*/field profile has incomplete type
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ::std::fmt::Debug for GstVulkanVideoProfile {
|
||||||
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||||
|
f.debug_struct(&format!("GstVulkanVideoProfile @ {self:p}"))
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct GstVulkanWindowClass {
|
pub struct GstVulkanWindowClass {
|
||||||
|
@ -869,6 +1041,7 @@ impl ::std::fmt::Debug for GstVulkanWindowClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct _GstVulkanWindowPrivate {
|
pub struct _GstVulkanWindowPrivate {
|
||||||
_data: [u8; 0],
|
_data: [u8; 0],
|
||||||
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
||||||
|
@ -910,6 +1083,7 @@ impl ::std::fmt::Debug for GstVulkanBufferPool {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct GstVulkanCommandPool {
|
pub struct GstVulkanCommandPool {
|
||||||
pub parent: gst::GstObject,
|
pub parent: gst::GstObject,
|
||||||
pub queue: *mut GstVulkanQueue,
|
pub queue: *mut GstVulkanQueue,
|
||||||
|
@ -944,6 +1118,7 @@ impl ::std::fmt::Debug for GstVulkanDescriptorCache {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct GstVulkanDescriptorPool {
|
pub struct GstVulkanDescriptorPool {
|
||||||
pub parent: gst::GstObject,
|
pub parent: gst::GstObject,
|
||||||
pub device: *mut GstVulkanDevice,
|
pub device: *mut GstVulkanDevice,
|
||||||
|
@ -961,6 +1136,7 @@ impl ::std::fmt::Debug for GstVulkanDescriptorPool {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct GstVulkanDevice {
|
pub struct GstVulkanDevice {
|
||||||
pub parent: gst::GstObject,
|
pub parent: gst::GstObject,
|
||||||
pub instance: *mut GstVulkanInstance,
|
pub instance: *mut GstVulkanInstance,
|
||||||
|
@ -1111,6 +1287,7 @@ impl ::std::fmt::Debug for GstVulkanImageMemoryAllocator {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct GstVulkanInstance {
|
pub struct GstVulkanInstance {
|
||||||
pub parent: gst::GstObject,
|
pub parent: gst::GstObject,
|
||||||
_truncated_record_marker: c_void,
|
_truncated_record_marker: c_void,
|
||||||
|
@ -1158,6 +1335,7 @@ impl ::std::fmt::Debug for GstVulkanOperation {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct GstVulkanPhysicalDevice {
|
pub struct GstVulkanPhysicalDevice {
|
||||||
pub parent: gst::GstObject,
|
pub parent: gst::GstObject,
|
||||||
pub instance: *mut GstVulkanInstance,
|
pub instance: *mut GstVulkanInstance,
|
||||||
|
@ -1177,6 +1355,7 @@ impl ::std::fmt::Debug for GstVulkanPhysicalDevice {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct GstVulkanQueue {
|
pub struct GstVulkanQueue {
|
||||||
pub parent: gst::GstObject,
|
pub parent: gst::GstObject,
|
||||||
pub device: *mut GstVulkanDevice,
|
pub device: *mut GstVulkanDevice,
|
||||||
|
@ -1217,6 +1396,7 @@ impl ::std::fmt::Debug for GstVulkanSwapper {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct GstVulkanTrashFenceList {
|
pub struct GstVulkanTrashFenceList {
|
||||||
_data: [u8; 0],
|
_data: [u8; 0],
|
||||||
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
||||||
|
@ -1288,7 +1468,6 @@ impl ::std::fmt::Debug for GstVulkanWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[link(name = "gstvulkan-1.0")]
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
|
@ -1362,7 +1541,7 @@ extern "C" {
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
||||||
pub fn gst_vulkan_buffer_memory_alloc_with_buffer_info(
|
pub fn gst_vulkan_buffer_memory_alloc_with_buffer_info(
|
||||||
device: *mut GstVulkanDevice,
|
device: *mut GstVulkanDevice,
|
||||||
buffer_info: *mut vulkan::VkBufferCreateInfo,
|
buffer_info: *const vulkan::VkBufferCreateInfo,
|
||||||
mem_prop_flags: vulkan::VkMemoryPropertyFlags,
|
mem_prop_flags: vulkan::VkMemoryPropertyFlags,
|
||||||
) -> *mut gst::GstMemory;
|
) -> *mut gst::GstMemory;
|
||||||
pub fn gst_vulkan_buffer_memory_init_once();
|
pub fn gst_vulkan_buffer_memory_init_once();
|
||||||
|
@ -1533,7 +1712,7 @@ extern "C" {
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
||||||
pub fn gst_vulkan_memory_find_memory_type_index_with_requirements(
|
pub fn gst_vulkan_memory_find_memory_type_index_with_requirements(
|
||||||
device: *mut GstVulkanDevice,
|
device: *mut GstVulkanDevice,
|
||||||
req: *mut vulkan::VkMemoryRequirements,
|
req: *const vulkan::VkMemoryRequirements,
|
||||||
properties: vulkan::VkMemoryPropertyFlags,
|
properties: vulkan::VkMemoryPropertyFlags,
|
||||||
type_index: *mut u32,
|
type_index: *mut u32,
|
||||||
) -> gboolean;
|
) -> gboolean;
|
||||||
|
@ -1562,6 +1741,34 @@ extern "C" {
|
||||||
pub fn gst_vulkan_trash_mini_object_unref(device: *mut GstVulkanDevice, user_data: gpointer);
|
pub fn gst_vulkan_trash_mini_object_unref(device: *mut GstVulkanDevice, user_data: gpointer);
|
||||||
pub fn gst_vulkan_trash_object_unref(device: *mut GstVulkanDevice, user_data: gpointer);
|
pub fn gst_vulkan_trash_object_unref(device: *mut GstVulkanDevice, user_data: gpointer);
|
||||||
|
|
||||||
|
//=========================================================================
|
||||||
|
// GstVulkanVideoProfile
|
||||||
|
//=========================================================================
|
||||||
|
#[cfg(feature = "v1_24")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
||||||
|
pub fn gst_vulkan_video_profile_is_equal(
|
||||||
|
a: *const GstVulkanVideoProfile,
|
||||||
|
b: *const GstVulkanVideoProfile,
|
||||||
|
) -> gboolean;
|
||||||
|
#[cfg(feature = "v1_24")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
||||||
|
pub fn gst_vulkan_video_profile_is_valid(
|
||||||
|
profile: *mut GstVulkanVideoProfile,
|
||||||
|
codec: c_uint,
|
||||||
|
) -> gboolean;
|
||||||
|
#[cfg(feature = "v1_24")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
||||||
|
pub fn gst_vulkan_video_profile_to_caps(
|
||||||
|
profile: *const GstVulkanVideoProfile,
|
||||||
|
) -> *mut gst::GstCaps;
|
||||||
|
#[cfg(feature = "v1_24")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
||||||
|
pub fn gst_vulkan_video_profile_from_caps(
|
||||||
|
profile: *mut GstVulkanVideoProfile,
|
||||||
|
caps: *mut gst::GstCaps,
|
||||||
|
video_operation: GstVulkanVideoOperation,
|
||||||
|
) -> gboolean;
|
||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
// GstVulkanBufferMemoryAllocator
|
// GstVulkanBufferMemoryAllocator
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
|
@ -1870,6 +2077,15 @@ extern "C" {
|
||||||
pub fn gst_vulkan_image_buffer_pool_new(
|
pub fn gst_vulkan_image_buffer_pool_new(
|
||||||
device: *mut GstVulkanDevice,
|
device: *mut GstVulkanDevice,
|
||||||
) -> *mut gst::GstBufferPool;
|
) -> *mut gst::GstBufferPool;
|
||||||
|
#[cfg(feature = "v1_26")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
||||||
|
pub fn gst_vulkan_image_buffer_pool_config_get_allocation_params(
|
||||||
|
config: *mut gst::GstStructure,
|
||||||
|
usage: *mut vulkan::VkImageUsageFlags,
|
||||||
|
mem_props: *mut vulkan::VkMemoryPropertyFlags,
|
||||||
|
initial_layout: *mut vulkan::VkImageLayout,
|
||||||
|
initial_access: *mut u64,
|
||||||
|
);
|
||||||
#[cfg(feature = "v1_24")]
|
#[cfg(feature = "v1_24")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
||||||
pub fn gst_vulkan_image_buffer_pool_config_set_allocation_params(
|
pub fn gst_vulkan_image_buffer_pool_config_set_allocation_params(
|
||||||
|
@ -1911,6 +2127,14 @@ extern "C" {
|
||||||
element: *mut gst::GstElement,
|
element: *mut gst::GstElement,
|
||||||
instance: *mut *mut GstVulkanInstance,
|
instance: *mut *mut GstVulkanInstance,
|
||||||
) -> gboolean;
|
) -> gboolean;
|
||||||
|
#[cfg(feature = "v1_26")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
||||||
|
pub fn gst_vulkan_instance_check_api_version(
|
||||||
|
instance: *mut GstVulkanInstance,
|
||||||
|
major: c_uint,
|
||||||
|
minor: c_uint,
|
||||||
|
patch: c_uint,
|
||||||
|
) -> gboolean;
|
||||||
pub fn gst_vulkan_instance_check_version(
|
pub fn gst_vulkan_instance_check_version(
|
||||||
instance: *mut GstVulkanInstance,
|
instance: *mut GstVulkanInstance,
|
||||||
major: c_uint,
|
major: c_uint,
|
||||||
|
@ -1921,6 +2145,13 @@ extern "C" {
|
||||||
instance: *mut GstVulkanInstance,
|
instance: *mut GstVulkanInstance,
|
||||||
error: *mut *mut glib::GError,
|
error: *mut *mut glib::GError,
|
||||||
) -> *mut GstVulkanDevice;
|
) -> *mut GstVulkanDevice;
|
||||||
|
#[cfg(feature = "v1_26")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
||||||
|
pub fn gst_vulkan_instance_create_device_with_index(
|
||||||
|
instance: *mut GstVulkanInstance,
|
||||||
|
device_index: c_uint,
|
||||||
|
error: *mut *mut glib::GError,
|
||||||
|
) -> *mut GstVulkanDevice;
|
||||||
pub fn gst_vulkan_instance_disable_extension(
|
pub fn gst_vulkan_instance_disable_extension(
|
||||||
instance: *mut GstVulkanInstance,
|
instance: *mut GstVulkanInstance,
|
||||||
name: *const c_char,
|
name: *const c_char,
|
||||||
|
@ -1937,6 +2168,14 @@ extern "C" {
|
||||||
instance: *mut GstVulkanInstance,
|
instance: *mut GstVulkanInstance,
|
||||||
error: *mut *mut glib::GError,
|
error: *mut *mut glib::GError,
|
||||||
) -> gboolean;
|
) -> gboolean;
|
||||||
|
#[cfg(feature = "v1_26")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
||||||
|
pub fn gst_vulkan_instance_get_api_version(
|
||||||
|
instance: *mut GstVulkanInstance,
|
||||||
|
major: *mut c_uint,
|
||||||
|
minor: *mut c_uint,
|
||||||
|
patch: *mut c_uint,
|
||||||
|
);
|
||||||
pub fn gst_vulkan_instance_get_extension_info(
|
pub fn gst_vulkan_instance_get_extension_info(
|
||||||
instance: *mut GstVulkanInstance,
|
instance: *mut GstVulkanInstance,
|
||||||
name: *const c_char,
|
name: *const c_char,
|
||||||
|
@ -2006,6 +2245,7 @@ extern "C" {
|
||||||
pub fn gst_vulkan_operation_add_frame_barrier(
|
pub fn gst_vulkan_operation_add_frame_barrier(
|
||||||
self_: *mut GstVulkanOperation,
|
self_: *mut GstVulkanOperation,
|
||||||
frame: *mut gst::GstBuffer,
|
frame: *mut gst::GstBuffer,
|
||||||
|
src_stage: u64,
|
||||||
dst_stage: u64,
|
dst_stage: u64,
|
||||||
new_access: u64,
|
new_access: u64,
|
||||||
new_layout: vulkan::VkImageLayout,
|
new_layout: vulkan::VkImageLayout,
|
||||||
|
@ -2017,9 +2257,13 @@ extern "C" {
|
||||||
self_: *mut GstVulkanOperation,
|
self_: *mut GstVulkanOperation,
|
||||||
error: *mut *mut glib::GError,
|
error: *mut *mut glib::GError,
|
||||||
) -> gboolean;
|
) -> gboolean;
|
||||||
#[cfg(feature = "v1_24")]
|
#[cfg(feature = "v1_26")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
||||||
pub fn gst_vulkan_operation_begin_query(self_: *mut GstVulkanOperation, id: u32) -> gboolean;
|
pub fn gst_vulkan_operation_begin_query(
|
||||||
|
self_: *mut GstVulkanOperation,
|
||||||
|
base: *mut vulkan::VkBaseInStructure,
|
||||||
|
id: u32,
|
||||||
|
) -> gboolean;
|
||||||
#[cfg(feature = "v1_24")]
|
#[cfg(feature = "v1_24")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
||||||
pub fn gst_vulkan_operation_discard_dependencies(self_: *mut GstVulkanOperation);
|
pub fn gst_vulkan_operation_discard_dependencies(self_: *mut GstVulkanOperation);
|
||||||
|
@ -2095,6 +2339,22 @@ extern "C" {
|
||||||
pub fn gst_vulkan_physical_device_type_to_string(
|
pub fn gst_vulkan_physical_device_type_to_string(
|
||||||
type_: vulkan::VkPhysicalDeviceType,
|
type_: vulkan::VkPhysicalDeviceType,
|
||||||
) -> *const c_char;
|
) -> *const c_char;
|
||||||
|
#[cfg(feature = "v1_26")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
||||||
|
pub fn gst_vulkan_physical_device_check_api_version(
|
||||||
|
device: *mut GstVulkanPhysicalDevice,
|
||||||
|
major: c_uint,
|
||||||
|
minor: c_uint,
|
||||||
|
patch: c_uint,
|
||||||
|
) -> gboolean;
|
||||||
|
#[cfg(feature = "v1_26")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
||||||
|
pub fn gst_vulkan_physical_device_get_api_version(
|
||||||
|
device: *mut GstVulkanPhysicalDevice,
|
||||||
|
major: *mut c_uint,
|
||||||
|
minor: *mut c_uint,
|
||||||
|
patch: *mut c_uint,
|
||||||
|
);
|
||||||
pub fn gst_vulkan_physical_device_get_extension_info(
|
pub fn gst_vulkan_physical_device_get_extension_info(
|
||||||
device: *mut GstVulkanPhysicalDevice,
|
device: *mut GstVulkanPhysicalDevice,
|
||||||
name: *const c_char,
|
name: *const c_char,
|
||||||
|
@ -2304,6 +2564,14 @@ extern "C" {
|
||||||
display_ptr: *mut *mut GstVulkanDisplay,
|
display_ptr: *mut *mut GstVulkanDisplay,
|
||||||
instance_ptr: *mut *mut GstVulkanInstance,
|
instance_ptr: *mut *mut GstVulkanInstance,
|
||||||
) -> gboolean;
|
) -> gboolean;
|
||||||
|
#[cfg(feature = "v1_26")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
||||||
|
pub fn gst_vulkan_ensure_element_device(
|
||||||
|
element: *mut gst::GstElement,
|
||||||
|
instance: *mut GstVulkanInstance,
|
||||||
|
device_ptr: *mut *mut GstVulkanDevice,
|
||||||
|
device_id: c_uint,
|
||||||
|
) -> gboolean;
|
||||||
pub fn gst_vulkan_format_from_video_info(
|
pub fn gst_vulkan_format_from_video_info(
|
||||||
v_info: *mut gst_video::GstVideoInfo,
|
v_info: *mut gst_video::GstVideoInfo,
|
||||||
plane: c_uint,
|
plane: c_uint,
|
||||||
|
@ -2311,7 +2579,7 @@ extern "C" {
|
||||||
#[cfg(feature = "v1_24")]
|
#[cfg(feature = "v1_24")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
||||||
pub fn gst_vulkan_format_from_video_info_2(
|
pub fn gst_vulkan_format_from_video_info_2(
|
||||||
physical_device: *mut GstVulkanPhysicalDevice,
|
device: *mut GstVulkanDevice,
|
||||||
info: *mut gst_video::GstVideoInfo,
|
info: *mut gst_video::GstVideoInfo,
|
||||||
tiling: vulkan::VkImageTiling,
|
tiling: vulkan::VkImageTiling,
|
||||||
no_multiplane: gboolean,
|
no_multiplane: gboolean,
|
||||||
|
@ -2324,6 +2592,11 @@ extern "C" {
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
||||||
pub fn gst_vulkan_format_get_aspect(format: vulkan::VkFormat) -> c_uint;
|
pub fn gst_vulkan_format_get_aspect(format: vulkan::VkFormat) -> c_uint;
|
||||||
pub fn gst_vulkan_format_get_info(format: vulkan::VkFormat) -> *const GstVulkanFormatInfo;
|
pub fn gst_vulkan_format_get_info(format: vulkan::VkFormat) -> *const GstVulkanFormatInfo;
|
||||||
|
#[cfg(feature = "v1_26")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
|
||||||
|
pub fn gst_vulkan_format_get_map(
|
||||||
|
format: gst_video::GstVideoFormat,
|
||||||
|
) -> *const GstVulkanFormatMap;
|
||||||
#[cfg(feature = "v1_24")]
|
#[cfg(feature = "v1_24")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
||||||
pub fn gst_vulkan_format_to_video_format(
|
pub fn gst_vulkan_format_to_video_format(
|
||||||
|
@ -2336,7 +2609,7 @@ extern "C" {
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
||||||
pub fn gst_vulkan_get_or_create_image_view_with_info(
|
pub fn gst_vulkan_get_or_create_image_view_with_info(
|
||||||
image: *mut GstVulkanImageMemory,
|
image: *mut GstVulkanImageMemory,
|
||||||
create_info: *mut vulkan::VkImageViewCreateInfo,
|
create_info: *const vulkan::VkImageViewCreateInfo,
|
||||||
) -> *mut GstVulkanImageView;
|
) -> *mut GstVulkanImageView;
|
||||||
pub fn gst_vulkan_global_context_query(
|
pub fn gst_vulkan_global_context_query(
|
||||||
element: *mut gst::GstElement,
|
element: *mut gst::GstElement,
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
pub mod vulkan {
|
pub mod vulkan {
|
||||||
|
pub use ash::vk::BaseInStructure as VkBaseInStructure;
|
||||||
pub use ash::vk::BlendFactor as VkBlendFactor;
|
pub use ash::vk::BlendFactor as VkBlendFactor;
|
||||||
pub use ash::vk::BlendOp as VkBlendOp;
|
pub use ash::vk::BlendOp as VkBlendOp;
|
||||||
pub use ash::vk::Buffer as VkBuffer;
|
pub use ash::vk::Buffer as VkBuffer;
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
Generated by gir (https://github.com/gtk-rs/gir @ 2d0807e9c5bc)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6668d0f5551a)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ d62956d67216+)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 2dcaaf8ae3d8+)
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
use crate::ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
|
|
|
@ -60,7 +60,7 @@ workspace = true
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
system-deps = "6"
|
system-deps = "7"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
shell-words = "1.0.0"
|
shell-words = "1.0.0"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
Generated by gir (https://github.com/gtk-rs/gir @ 2d0807e9c5bc)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6668d0f5551a)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ d62956d67216+)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 2dcaaf8ae3d8+)
|
||||||
|
|
|
@ -15,14 +15,15 @@
|
||||||
use glib_sys as glib;
|
use glib_sys as glib;
|
||||||
use gstreamer_vulkan_sys as gst_vulkan;
|
use gstreamer_vulkan_sys as gst_vulkan;
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
|
||||||
use libc::{
|
|
||||||
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
|
|
||||||
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
|
|
||||||
};
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
|
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE};
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
use std::ffi::{
|
||||||
|
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
|
||||||
|
};
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use glib::{gboolean, gconstpointer, gpointer, GType};
|
use glib::{gboolean, gconstpointer, gpointer, GType};
|
||||||
|
@ -68,7 +69,6 @@ impl ::std::fmt::Debug for GstVulkanDisplayWayland {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[link(name = "gstvulkan-1.0")]
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
Generated by gir (https://github.com/gtk-rs/gir @ 2d0807e9c5bc)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6668d0f5551a)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ d62956d67216+)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 2dcaaf8ae3d8+)
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
use crate::ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
|
|
|
@ -64,7 +64,7 @@ workspace = true
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
system-deps = "6"
|
system-deps = "7"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
shell-words = "1.0.0"
|
shell-words = "1.0.0"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
Generated by gir (https://github.com/gtk-rs/gir @ 2d0807e9c5bc)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ 6cd7b656acd6)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6668d0f5551a)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ d62956d67216+)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 2dcaaf8ae3d8+)
|
||||||
|
|
|
@ -15,14 +15,15 @@
|
||||||
use glib_sys as glib;
|
use glib_sys as glib;
|
||||||
use gstreamer_vulkan_sys as gst_vulkan;
|
use gstreamer_vulkan_sys as gst_vulkan;
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
|
||||||
use libc::{
|
|
||||||
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
|
|
||||||
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
|
|
||||||
};
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
|
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE};
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
use std::ffi::{
|
||||||
|
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
|
||||||
|
};
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use glib::{gboolean, gconstpointer, gpointer, GType};
|
use glib::{gboolean, gconstpointer, gpointer, GType};
|
||||||
|
@ -45,6 +46,7 @@ impl ::std::fmt::Debug for GstVulkanDisplayXCBClass {
|
||||||
|
|
||||||
// Classes
|
// Classes
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct GstVulkanDisplayXCB {
|
pub struct GstVulkanDisplayXCB {
|
||||||
_data: [u8; 0],
|
_data: [u8; 0],
|
||||||
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
||||||
|
@ -57,7 +59,6 @@ impl ::std::fmt::Debug for GstVulkanDisplayXCB {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[link(name = "gstvulkan-1.0")]
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
|
|
Loading…
Reference in a new issue