Debian Codegraph @

gst-libs/gst/cuda/gstcudastream.h

raw symbols SCIP
1 /* GStreamer
2 * Copyright (C) 2022 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_STREAM (gst_cuda_stream_get_type())
30 #define GST_IS_CUDA_STREAM(obj) (GST_IS_MINI_OBJECT_TYPE(obj, GST_TYPE_CUDA_STREAM))
31 #define GST_CUDA_STREAM(obj) ((GstCudaStream *)obj)
32
33 typedef struct _GstCudaStream GstCudaStream;
34 typedef struct _GstCudaStreamPrivate GstCudaStreamPrivate;
35
36 /**
37 * GstCudaStream:
38 *
39 * Since: 1.24
40 */
41 struct _GstCudaStream
42 {
43 GstMiniObject parent;
44
45 GstCudaContext *context;
46
47 /*< private >*/
48 GstCudaStreamPrivate *priv;
49 };
50
51 GST_CUDA_API
52 GType gst_cuda_stream_get_type (void);
53
54 GST_CUDA_API
55 GstCudaStream * gst_cuda_stream_new (GstCudaContext * context) G_GNUC_WARN_UNUSED_RESULT;
56
57 GST_CUDA_API
58 CUstream gst_cuda_stream_get_handle (GstCudaStream * stream);
59
60 GST_CUDA_API
61 GstCudaStream * gst_cuda_stream_ref (GstCudaStream * stream);
62
63 GST_CUDA_API
64 void gst_cuda_stream_unref (GstCudaStream * stream);
65
66 GST_CUDA_API
67 void gst_clear_cuda_stream (GstCudaStream ** stream);
68
69 G_END_DECLS