mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-01-03 05:48:43 +00:00
gl/gl_memory: Use gl_memory_get_type() since 1.19.1
This commit is contained in:
parent
a85b30eacb
commit
738a07b279
2 changed files with 13 additions and 1 deletions
|
@ -18,6 +18,7 @@ edition = "2018"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bitflags = "1.0"
|
bitflags = "1.0"
|
||||||
byteorder = "1"
|
byteorder = "1"
|
||||||
|
cfg-if = "1"
|
||||||
libc = "0.2"
|
libc = "0.2"
|
||||||
once_cell = "1.0"
|
once_cell = "1.0"
|
||||||
ffi = { package = "gstreamer-gl-sys", path = "sys" }
|
ffi = { package = "gstreamer-gl-sys", path = "sys" }
|
||||||
|
|
|
@ -7,7 +7,18 @@ use crate::GLTextureTarget;
|
||||||
use ffi::{GstGLBaseMemory, GstGLMemory};
|
use ffi::{GstGLBaseMemory, GstGLMemory};
|
||||||
use gst::{result_from_gboolean, LoggableError, CAT_RUST};
|
use gst::{result_from_gboolean, LoggableError, CAT_RUST};
|
||||||
|
|
||||||
gst::mini_object_wrapper!(GLMemory, GLMemoryRef, GstGLMemory);
|
cfg_if::cfg_if! {
|
||||||
|
if #[cfg(feature = "v1_20")] {
|
||||||
|
gst::mini_object_wrapper!(
|
||||||
|
GLMemory,
|
||||||
|
GLMemoryRef,
|
||||||
|
GstGLMemory,
|
||||||
|
ffi::gst_gl_memory_get_type
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
gst::mini_object_wrapper!(GLMemory, GLMemoryRef, GstGLMemory);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl std::ops::Deref for GLMemoryRef {
|
impl std::ops::Deref for GLMemoryRef {
|
||||||
type Target = GLBaseMemoryRef;
|
type Target = GLBaseMemoryRef;
|
||||||
|
|
Loading…
Reference in a new issue