blob: e125d928ed70e4b61ad87c8287b46077e8374291 [file] [log] [blame]
/*
* # 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 __ALLOCATOR_ION_H__
#define __ALLOCATOR_ION_H__
#include <gst/gst.h>
#include <gst/allocators/gstdmabuf.h>
#define GST_TYPE_ALLOCATOR_ION (gst_allocator_ion_get_type())
#define GST_ALLOCATOR_ION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_ALLOCATOR_ION, GstAllocatorIon))
#define GST_ALLOCATOR_ION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_ALLOCATOR_ION, GstAllocatorIonClass))
#define GST_IS_ALLOCATOR_ION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_ALLOCATOR_ION))
#define GST_IS_ALLOCATOR_ION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_ALLOCATOR_ION))
#define GST_ALLOCATOR_ION_NAME "ion"
typedef struct _GstAllocatorIon GstAllocatorIon;
typedef struct _GstAllocatorIonClass GstAllocatorIonClass;
struct _GstAllocatorIon {
GstDmaBufAllocator parent;
GMutex mutex;
int fd;
int heap_mask;
};
struct _GstAllocatorIonClass {
GstDmaBufAllocatorClass parent_class;
};
GType gst_allocator_ion_get_type (void);
gboolean gst_allocator_ion_init_check (GstAllocatorIon * ion);
#endif