2 * Copyright (C) 2009 Ole André Vadla Ravnås <oleavr@soundrop.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
20 #ifndef __GST_CORE_MEDIA_BUFFER_H__
21 #define __GST_CORE_MEDIA_BUFFER_H__
24 #include <gst/video/gstvideometa.h>
25 #include "videotexturecache.h"
27 #include "CoreMedia/CoreMedia.h"
31 #define GST_CORE_MEDIA_META_API_TYPE (gst_core_media_meta_api_get_type())
32 #define gst_buffer_get_core_media_meta(b) \
33 ((GstCoreMediaMeta*)gst_buffer_get_meta((b),GST_CORE_MEDIA_META_API_TYPE))
35 typedef struct _GstCoreMediaMeta
39 CMSampleBufferRef sample_buf;
40 CVImageBufferRef image_buf;
41 CVPixelBufferRef pixel_buf;
42 CMBlockBufferRef block_buf;
46 GstBuffer * gst_core_media_buffer_new (CMSampleBufferRef sample_buf,
47 gboolean use_video_meta,
48 GstVideoTextureCache *cache);
49 CVPixelBufferRef gst_core_media_buffer_get_pixel_buffer
51 GType gst_core_media_meta_api_get_type (void);
55 #endif /* __GST_CORE_MEDIA_BUFFER_H__ */