| /* |
| * # Copyright 2020 Google LLC |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * https://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| #ifndef _GST_GL_MEMORY_DMA_H_ |
| #define _GST_GL_MEMORY_DMA_H_ |
| |
| #include <gst/gst.h> |
| #include <gst/gstallocator.h> |
| #include <gst/gl/gl.h> |
| #include <gst/gl/egl/gsteglimage.h> |
| #include <gst/gl/egl/gstegl.h> |
| #include <gst/gl/egl/gstgldisplay_egl.h> |
| |
| G_BEGIN_DECLS |
| |
| #define GST_TYPE_GL_MEMORY_DMA_ALLOCATOR (gst_gl_memory_dma_allocator_get_type()) |
| |
| #define GST_IS_GL_MEMORY_DMA_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GL_MEMORY_DMA_ALLOCATOR)) |
| #define GST_IS_GL_MEMORY_DMA_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_GL_MEMORY_DMA_ALLOCATOR)) |
| #define GST_GL_MEMORY_DMA_ALLOCATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_GL_MEMORY_DMA_ALLOCATOR, GstGLMemoryDmaAllocatorClass)) |
| #define GST_GL_MEMORY_DMA_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GL_MEMORY_DMA_ALLOCATOR, GstGLMemoryDmaAllocator)) |
| #define GST_GL_MEMORY_DMA_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GL_MEMORY_DMA_ALLOCATOR, GstGLAllocatorClass)) |
| #define GST_GL_MEMORY_DMA_ALLOCATOR_CAST(obj) ((GstGLMemoryDmaAllocator *)(obj)) |
| #define GST_GL_MEMORY_DMA_CAST(obj) ((GstGLMemoryDMA *)(obj)) |
| |
| #define GST_GL_MEMORY_DMA_ALLOCATOR_NAME "glmemorydma" |
| |
| typedef struct _GstGLMemoryDMA GstGLMemoryDMA; |
| typedef struct _GstGLMemoryDmaAllocator GstGLMemoryDmaAllocator; |
| typedef struct _GstGLMemoryDmaAllocatorClass GstGLMemoryDmaAllocatorClass; |
| |
| struct _GstGLMemoryDMA |
| { |
| GstGLMemory mem; |
| |
| GstEGLImage *image; |
| GstMemory *dma; |
| GstAllocationParams *params; |
| }; |
| |
| struct _GstGLMemoryDmaAllocator |
| { |
| GstGLMemoryAllocator alloc; |
| |
| GstPlugin *plugin; |
| GstAllocator *ion_allocator; |
| }; |
| |
| struct _GstGLMemoryDmaAllocatorClass |
| { |
| GstGLMemoryAllocatorClass parent_class; |
| }; |
| |
| GST_GL_API |
| GType gst_gl_memory_dma_allocator_get_type(void); |
| |
| GST_GL_API |
| gboolean gst_is_gl_memory_dma (GstMemory * mem); |
| |
| GST_GL_API |
| GstBuffer * gst_gl_memory_dma_sync_buffer (GstBuffer * glbuf); |
| |
| GST_GL_API |
| void gst_gl_memory_dma_init_once (void); |
| |
| G_END_DECLS |
| |
| #endif /* _GST_GL_MEMORY_DMA_H_ */ |
| |
| |
| |
| |
| |