Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir
[platform/upstream/gstreamer.git] / subprojects / gst-plugins-bad / sys / applemedia / coremediabuffer.h
1 /*
2  * Copyright (C) 2009 Ole André Vadla Ravnås <oleavr@soundrop.com>
3  *
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.
8  *
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.
13  *
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.
18  */
19
20 #ifndef __GST_CORE_MEDIA_BUFFER_H__
21 #define __GST_CORE_MEDIA_BUFFER_H__
22
23 #include <gst/gst.h>
24 #include <gst/video/gstvideometa.h>
25 #include "videotexturecache.h"
26
27 #include "CoreMedia/CoreMedia.h"
28
29 G_BEGIN_DECLS
30
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))
34
35 typedef struct _GstCoreMediaMeta
36 {
37   GstMeta meta;
38
39   CMSampleBufferRef sample_buf;
40   CVImageBufferRef image_buf;
41   CVPixelBufferRef pixel_buf;
42   CMBlockBufferRef block_buf;
43 } GstCoreMediaMeta;
44
45
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
50                                            (GstBuffer * buf);
51 GType gst_core_media_meta_api_get_type (void);
52
53 G_END_DECLS
54
55 #endif /* __GST_CORE_MEDIA_BUFFER_H__ */