Debian Codegraph @

gst-libs/gst/cuda/gstcudamemorypool.h

raw symbols SCIP
1 /* GStreamer
2 * Copyright (C) 2024 Seungha Yang <[email protected]>
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 #pragma once
21
22 #include <gst/gst.h>
23 #include <gst/cuda/cuda-prelude.h>
24 #include <gst/cuda/gstcudacontext.h>
25 #include <cuda.h>
26
27 G_BEGIN_DECLS
28
29 #define GST_TYPE_CUDA_MEMORY_POOL (gst_cuda_memory_pool_get_type())
30 #define GST_IS_CUDA_MEMORY_POOL(obj) (GST_IS_MINI_OBJECT_TYPE(obj, GST_TYPE_CUDA_MEMORY_POOL))
31 #define GST_CUDA_MEMORY_POOL(obj) ((GstCudaMemoryPool *)obj)
32
33 typedef struct _GstCudaMemoryPool GstCudaMemoryPool;
34 typedef struct _GstCudaMemoryPoolPrivate GstCudaMemoryPoolPrivate;
35
36 /**
37 * GstCudaMemoryPool:
38 *
39 * Since: 1.26
40 */
41 struct _GstCudaMemoryPool
42 {
43 GstMiniObject parent;
44
45 GstCudaContext *context;
46
47 /*< private >*/
48 GstCudaMemoryPoolPrivate *priv;
49 };
50
51 GST_CUDA_API
52 GType gst_cuda_memory_pool_get_type (void);
53
54 GST_CUDA_API
55 GstCudaMemoryPool * gst_cuda_memory_pool_new (GstCudaContext * context,
56 const CUmemPoolProps * props) G_GNUC_WARN_UNUSED_RESULT;
57
58 GST_CUDA_API
59 CUmemoryPool gst_cuda_memory_pool_get_handle (GstCudaMemoryPool * pool);
60
61 GST_CUDA_API
62 GstCudaMemoryPool * gst_cuda_memory_pool_ref (GstCudaMemoryPool * pool);
63
64 GST_CUDA_API
65 void gst_cuda_memory_pool_unref (GstCudaMemoryPool * pool);
66
67 GST_CUDA_API
68 void gst_clear_cuda_memory_pool (GstCudaMemoryPool ** pool);
69
70 G_END_DECLS