2
* gstvaapivideopool_priv.h - Video object pool abstraction (private defs)
4
* Copyright (C) 2010-2011 Splitted-Desktop Systems
5
* Author: Gwenole Beauchesne <gwenole.beauchesne@splitted-desktop.com>
6
* Copyright (C) 2012-2013 Intel Corporation
7
* Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
9
* This library is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU Lesser General Public License
11
* as published by the Free Software Foundation; either version 2.1
12
* of the License, or (at your option) any later version.
14
* This library is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
* Lesser General Public License for more details.
19
* You should have received a copy of the GNU Lesser General Public
20
* License along with this library; if not, write to the Free
21
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22
* Boston, MA 02110-1301 USA
25
#ifndef GST_VAAPI_VIDEO_POOL_PRIV_H
26
#define GST_VAAPI_VIDEO_POOL_PRIV_H
28
#include "gstvaapiminiobject.h"
32
#define GST_VAAPI_VIDEO_POOL_CLASS(klass) \
33
((GstVaapiVideoPoolClass *)(klass))
35
#define GST_VAAPI_IS_VIDEO_POOL_CLASS(klass) \
38
typedef struct _GstVaapiVideoPoolClass GstVaapiVideoPoolClass;
43
* A pool of lazily allocated video objects. e.g. surfaces, images.
45
struct _GstVaapiVideoPool {
47
GstVaapiMiniObject parent_instance;
50
GstVaapiDisplay *display;
59
* GstVaapiVideoPoolClass:
60
* @alloc_object: virtual function for allocating a video pool object
62
* A pool base class used to hold video objects. e.g. surfaces, images.
64
struct _GstVaapiVideoPoolClass {
66
GstVaapiMiniObjectClass parent_class;
69
gpointer (*alloc_object)(GstVaapiVideoPool *pool);
74
gst_vaapi_video_pool_init(GstVaapiVideoPool *pool, GstVaapiDisplay *display,
75
GstVaapiVideoPoolObjectType object_type);
79
gst_vaapi_video_pool_finalize(GstVaapiVideoPool *pool);
81
/* Internal aliases */
83
#define gst_vaapi_video_pool_ref_internal(pool) \
84
((gpointer)gst_vaapi_mini_object_ref(GST_VAAPI_MINI_OBJECT(pool)))
86
#define gst_vaapi_video_pool_unref_internal(pool) \
87
gst_vaapi_mini_object_unref(GST_VAAPI_MINI_OBJECT(pool))
89
#define gst_vaapi_video_pool_replace_internal(old_pool_ptr, new_pool) \
90
gst_vaapi_mini_object_replace((GstVaapiMiniObject **)(old_pool_ptr), \
91
GST_VAAPI_MINI_OBJECT(new_pool))
93
#undef gst_vaapi_video_pool_ref
94
#define gst_vaapi_video_pool_ref(pool) \
95
gst_vaapi_video_pool_ref_internal((pool))
97
#undef gst_vaapi_video_pool_unref
98
#define gst_vaapi_video_pool_unref(pool) \
99
gst_vaapi_video_pool_unref_internal((pool))
101
#undef gst_vaapi_video_pool_replace
102
#define gst_vaapi_video_pool_replace(old_pool_ptr, new_pool) \
103
gst_vaapi_video_pool_replace_internal((old_pool_ptr), (new_pool))
107
#endif /* GST_VAAPI_VIDEO_POOL_PRIV_H */