1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#[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,
))
}
}
}