mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-22 16:16:37 +00:00
gstreamer-gl: Generate GLBufferPool
This commit is contained in:
parent
45708832dd
commit
a3875eab94
3 changed files with 64 additions and 0 deletions
|
@ -21,6 +21,7 @@ generate = [
|
|||
"GstGL.GLBaseFilter",
|
||||
"GstGL.GLBaseMemoryAllocator",
|
||||
"GstGL.GLBaseSrc",
|
||||
"GstGL.GLBufferPool",
|
||||
"GstGL.GLConfigCaveat",
|
||||
"GstGL.GLConfigSurfaceType",
|
||||
"GstGL.GLContextError",
|
||||
|
|
59
gstreamer-gl/src/auto/gl_buffer_pool.rs
Normal file
59
gstreamer-gl/src/auto/gl_buffer_pool.rs
Normal file
|
@ -0,0 +1,59 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(any(feature = "v1_20", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))]
|
||||
use crate::GLAllocationParams;
|
||||
use crate::GLContext;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
|
||||
glib::wrapper! {
|
||||
#[doc(alias = "GstGLBufferPool")]
|
||||
pub struct GLBufferPool(Object<ffi::GstGLBufferPool, ffi::GstGLBufferPoolClass>) @extends gst::BufferPool, gst::Object;
|
||||
|
||||
match fn {
|
||||
type_ => || ffi::gst_gl_buffer_pool_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl GLBufferPool {
|
||||
pub const NONE: Option<&'static GLBufferPool> = None;
|
||||
|
||||
#[doc(alias = "gst_gl_buffer_pool_new")]
|
||||
pub fn new(context: &impl IsA<GLContext>) -> GLBufferPool {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
gst::BufferPool::from_glib_none(ffi::gst_gl_buffer_pool_new(
|
||||
context.as_ref().to_glib_none().0,
|
||||
))
|
||||
.unsafe_cast()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for GLBufferPool {}
|
||||
unsafe impl Sync for GLBufferPool {}
|
||||
|
||||
pub trait GLBufferPoolExt: 'static {
|
||||
#[cfg(any(feature = "v1_20", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))]
|
||||
#[doc(alias = "gst_gl_buffer_pool_get_gl_allocation_params")]
|
||||
#[doc(alias = "get_gl_allocation_params")]
|
||||
fn gl_allocation_params(&self) -> Option<GLAllocationParams>;
|
||||
}
|
||||
|
||||
impl<O: IsA<GLBufferPool>> GLBufferPoolExt for O {
|
||||
#[cfg(any(feature = "v1_20", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))]
|
||||
fn gl_allocation_params(&self) -> Option<GLAllocationParams> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_gl_buffer_pool_get_gl_allocation_params(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
|
@ -16,6 +16,9 @@ mod gl_base_src;
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
pub use self::gl_base_src::GLBaseSrc;
|
||||
|
||||
mod gl_buffer_pool;
|
||||
pub use self::gl_buffer_pool::GLBufferPool;
|
||||
|
||||
mod gl_color_convert;
|
||||
pub use self::gl_color_convert::GLColorConvert;
|
||||
|
||||
|
@ -87,6 +90,7 @@ pub mod traits {
|
|||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
pub use super::gl_base_src::GLBaseSrcExt;
|
||||
pub use super::gl_buffer_pool::GLBufferPoolExt;
|
||||
pub use super::gl_context::GLContextExt;
|
||||
pub use super::gl_display::GLDisplayExt;
|
||||
pub use super::gl_filter::GLFilterExt;
|
||||
|
|
Loading…
Reference in a new issue