1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * Copyright 2021 Rockchip Electronics Co., Ltd 3*4882a593Smuzhiyun * Author: Jeffy Chen <jeffy.chen@rock-chips.com> 4*4882a593Smuzhiyun * 5*4882a593Smuzhiyun * This library is free software; you can redistribute it and/or 6*4882a593Smuzhiyun * modify it under the terms of the GNU Library General Public 7*4882a593Smuzhiyun * License as published by the Free Software Foundation; either 8*4882a593Smuzhiyun * version 2 of the License, or (at your option) any later version. 9*4882a593Smuzhiyun * 10*4882a593Smuzhiyun * This library is distributed in the hope that it will be useful, 11*4882a593Smuzhiyun * but WITHOUT ANY WARRANTY; without even the implied warranty of 12*4882a593Smuzhiyun * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13*4882a593Smuzhiyun * Library General Public License for more details. 14*4882a593Smuzhiyun * 15*4882a593Smuzhiyun * You should have received a copy of the GNU Library General Public 16*4882a593Smuzhiyun * License along with this library; if not, write to the 17*4882a593Smuzhiyun * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 18*4882a593Smuzhiyun * Boston, MA 02110-1301, USA. 19*4882a593Smuzhiyun * 20*4882a593Smuzhiyun */ 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun #ifndef __GST_MPP_ALLOCATOR_H__ 23*4882a593Smuzhiyun #define __GST_MPP_ALLOCATOR_H__ 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun #include <gst/video/video.h> 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun #include <rockchip/rk_mpi.h> 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun G_BEGIN_DECLS; 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun GstAllocator *gst_mpp_allocator_new (void); 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun void gst_mpp_allocator_set_cacheable (GstAllocator * allocator, 34*4882a593Smuzhiyun gboolean cacheable); 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun gint gst_mpp_allocator_get_index (GstAllocator * allocator); 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun MppBufferGroup gst_mpp_allocator_get_mpp_group (GstAllocator * allocator); 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun MppBuffer gst_mpp_mpp_buffer_from_gst_memory (GstMemory * mem); 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun GstMemory *gst_mpp_allocator_import_mppbuf (GstAllocator * allocator, 43*4882a593Smuzhiyun MppBuffer mbuf); 44*4882a593Smuzhiyun 45*4882a593Smuzhiyun GstMemory *gst_mpp_allocator_import_gst_memory (GstAllocator * allocator, 46*4882a593Smuzhiyun GstMemory * mem); 47*4882a593Smuzhiyun 48*4882a593Smuzhiyun MppBuffer gst_mpp_allocator_alloc_mppbuf (GstAllocator * allocator, gsize size); 49*4882a593Smuzhiyun 50*4882a593Smuzhiyun G_END_DECLS; 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun #endif /* __GST_MPP_ALLOCATOR_H__ */ 53