/* * GStreamer * Copyright (c) 2010, Texas Instruments Incorporated * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation * version 2.1 of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __GSTDUCATIBUFFERPOOL_H__ #define __GSTDUCATIBUFFERPOOL_H__ #include "gstducati.h" #include #include #include G_BEGIN_DECLS typedef struct _GstTITilerMeta GstTITilerMeta; typedef struct _GstTITilerBufferPool GstTITilerBufferPool; typedef struct _GstTITilerBufferPoolClass GstTITilerBufferPoolClass; typedef struct _GstTITilerBufferPoolPrivate GstTITilerBufferPoolPrivate; const GstMetaInfo * gst_ti_tiler_meta_get_info (void); #define GST_TI_TILER_META_INFO (gst_ti_tiler_meta_get_info()) #define gst_buffer_get_ti_tiler_meta(b) ((GstTITilerMeta*)gst_buffer_get_meta((b),GST_TI_TILER_META_INFO)) struct _GstTITilerMeta { GstMeta meta; /* Allocation blocks */ guint nblocks; MemAllocBlock block[2]; /* Physical adresses */ SSPtr y_paddr; SSPtr uv_paddr; /* Memory type */ XDAS_Int16 y_type, uv_type; /* TRUE if memory was allocated via MemMgr_Alloc or * FALSE if via Memmgr_Map */ gboolean allocated; }; /* Buffer pool implementation */ #define GST_TYPE_TI_TILER_BUFFER_POOL (gst_ti_tiler_buffer_pool_get_type()) #define GST_IS_TI_TILER_BUFFER_POOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TI_TILER_BUFFER_POOL)) #define GST_TI_TILER_BUFFER_POOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TI_TILER_BUFFER_POOL, GstTITilerBufferPool)) #define GST_TI_TILER_BUFFER_POOL_CAST(obj) ((GstTITilerBufferPool*)(obj)) struct _GstTITilerBufferPool { GstBufferPool bufferpool; gboolean alloc2d; GstCaps *caps; GstVideoInfo info; GstVideoAlignment align; guint padded_width; guint padded_height; gboolean add_metavideo; }; struct _GstTITilerBufferPoolClass { GstBufferPoolClass parent_class; }; GType gst_ti_tiler_buffer_pool_get_type (void); GstBufferPool * gst_ti_tiler_buffer_pool_new (gboolean alloc2d); G_END_DECLS #endif /* __GSTDUCATIBUFFERPOOL_H__ */