diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/cuda/cuda-gst.h b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/cuda-gst.h index 381264a3bb..497d83bb95 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/cuda/cuda-gst.h +++ b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/cuda-gst.h @@ -1,6 +1,6 @@ #pragma once -#include "cuda-prelude.h" +#include #include #include diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcuda-private.h b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcuda-private.h index e8c4eff2a4..5c2cc1a9a8 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcuda-private.h +++ b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcuda-private.h @@ -19,8 +19,9 @@ #pragma once -#include "cuda-prelude.h" -#include "cuda-gst.h" +#include +#include +#include #include diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcuda.h b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcuda.h new file mode 100644 index 0000000000..467c094361 --- /dev/null +++ b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcuda.h @@ -0,0 +1,36 @@ +/* GStreamer + * Copyright (C) 2022 Seungha Yang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#pragma once + +#ifndef GST_USE_UNSTABLE_API +#pragma message ("The Cuda library from gst-plugins-bad is unstable API and may change in future.") +#pragma message ("You can define GST_USE_UNSTABLE_API to avoid this warning.") +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudabufferpool.h b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudabufferpool.h index 216f51653e..5d9e59bdb2 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudabufferpool.h +++ b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudabufferpool.h @@ -17,19 +17,12 @@ * Boston, MA 02110-1301, USA. */ -#ifndef __GST_CUDA_BUFFER_POOL_H__ -#define __GST_CUDA_BUFFER_POOL_H__ +#pragma once -#ifndef GST_USE_UNSTABLE_API -#warning "The Cuda library from gst-plugins-bad is unstable API and may change in future." -#warning "You can define GST_USE_UNSTABLE_API to avoid this warning." -#endif +#include -#include "cuda-prelude.h" -#include -#include - -#include "gstcudamemory.h" +#include +#include G_BEGIN_DECLS @@ -80,4 +73,3 @@ GstBufferPool * gst_cuda_buffer_pool_new (GstCudaContext * context); G_END_DECLS -#endif /* __GST_CUDA_BUFFER_POOL_H__ */ diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudacontext.h b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudacontext.h index 84f417f93d..e62df38d4d 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudacontext.h +++ b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudacontext.h @@ -17,17 +17,11 @@ * Boston, MA 02110-1301, USA. */ -#ifndef __GST_CUDA_CONTEXT_H__ -#define __GST_CUDA_CONTEXT_H__ +#pragma once -#ifndef GST_USE_UNSTABLE_API -#warning "The Cuda library from gst-plugins-bad is unstable API and may change in future." -#warning "You can define GST_USE_UNSTABLE_API to avoid this warning." -#endif - -#include "cuda-prelude.h" #include -#include "cuda.h" +#include +#include G_BEGIN_DECLS @@ -101,4 +95,3 @@ gboolean gst_cuda_context_can_access_peer (GstCudaContext * ctx, G_END_DECLS -#endif /* __GST_CUDA_CONTEXT_H__ */ diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudaloader.h b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudaloader.h index 24a36ee3e8..91d1fc0e00 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudaloader.h +++ b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudaloader.h @@ -17,19 +17,10 @@ * Boston, MA 02110-1301, USA. */ -#ifndef __GST_CUDA_LOADER_H__ -#define __GST_CUDA_LOADER_H__ +#pragma once -#ifndef GST_USE_UNSTABLE_API -#warning "The Cuda library from gst-plugins-bad is unstable API and may change in future." -#warning "You can define GST_USE_UNSTABLE_API to avoid this warning." -#endif - -#include "cuda.h" -#include "cudaGL.h" - -#include "cuda-prelude.h" #include +#include G_BEGIN_DECLS @@ -37,4 +28,3 @@ GST_CUDA_API gboolean gst_cuda_load_library (void); G_END_DECLS -#endif /* __GST_CUDA_LOADER_H__ */ diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudamemory.h b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudamemory.h index 666e33f460..c4f9da6b76 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudamemory.h +++ b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudamemory.h @@ -17,20 +17,13 @@ * Boston, MA 02110-1301, USA. */ -#ifndef __GST_CUDA_MEMORY_H__ -#define __GST_CUDA_MEMORY_H__ +#pragma once -#ifndef GST_USE_UNSTABLE_API -#warning "The Cuda library from gst-plugins-bad is unstable API and may change in future." -#warning "You can define GST_USE_UNSTABLE_API to avoid this warning." -#endif - -#include "cuda-prelude.h" #include #include #include -#include "gstcudaloader.h" -#include "gstcudacontext.h" +#include +#include G_BEGIN_DECLS @@ -159,4 +152,3 @@ GstMemory * gst_cuda_allocator_alloc (GstCudaAllocator * allocator, G_END_DECLS -#endif /* __GST_CUDA_MEMORY_H__ */ diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudanvrtc.h b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudanvrtc.h index 0818297810..5fc4bf7bae 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudanvrtc.h +++ b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudanvrtc.h @@ -17,16 +17,10 @@ * Boston, MA 02110-1301, USA. */ -#ifndef __GST_CUDA_NVRTC_H__ -#define __GST_CUDA_NVRTC_H__ +#pragma once -#ifndef GST_USE_UNSTABLE_API -#warning "The Cuda library from gst-plugins-bad is unstable API and may change in future." -#warning "You can define GST_USE_UNSTABLE_API to avoid this warning." -#endif - -#include "cuda-prelude.h" #include +#include G_BEGIN_DECLS @@ -38,4 +32,3 @@ gchar * gst_cuda_nvrtc_compile (const gchar * source); G_END_DECLS -#endif /* __GST_CUDA_NVRTC_H__ */ diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudautils.h b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudautils.h index eb680c4917..c8d5893a3b 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudautils.h +++ b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudautils.h @@ -17,21 +17,13 @@ * Boston, MA 02110-1301, USA. */ -#ifndef __GST_CUDA_UTILS_H__ -#define __GST_CUDA_UTILS_H__ +#pragma once -#ifndef GST_USE_UNSTABLE_API -#warning "The Cuda library from gst-plugins-bad is unstable API and may change in future." -#warning "You can define GST_USE_UNSTABLE_API to avoid this warning." -#endif - -#include "cuda-prelude.h" #include #include -#include "cuda-gst.h" -#include "gstcudaloader.h" -#include "gstcudacontext.h" -#include "gstcudamemory.h" +#include +#include +#include G_BEGIN_DECLS @@ -186,4 +178,3 @@ void gst_cuda_graphics_resource_free (GstCudaGraphicsResource * resou G_END_DECLS -#endif /* __GST_CUDA_UTILS_H__ */ diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/cuda/meson.build b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/meson.build index 00ebdbc6d8..a735bdbe4d 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/cuda/meson.build +++ b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/meson.build @@ -1,20 +1,21 @@ cuda_sources = files([ - 'gstcudaloader.c', - 'gstcudacontext.c', - 'gstcudautils.c', - 'gstcudamemory.c', 'gstcudabufferpool.c', + 'gstcudacontext.c', + 'gstcudaloader.c', + 'gstcudamemory.c', 'gstcudanvrtc.c', + 'gstcudautils.c', ]) cuda_headers = files([ - 'cuda-prelude.h', - 'gstcudabufferpool.h', - 'gstcudacontext.h', - 'gstcudaloader.h', - 'gstcudamemory.h', - 'gstcudanvrtc.h', - 'gstcudautils.h', + 'cuda-prelude.h', + 'gstcuda.h', + 'gstcudabufferpool.h', + 'gstcudacontext.h', + 'gstcudaloader.h', + 'gstcudamemory.h', + 'gstcudanvrtc.h', + 'gstcudautils.h', ]) gstcuda_dep = dependency('', required : false) @@ -110,7 +111,7 @@ pkgconfig.generate(gstcuda, description : 'Unstable library to work with CUDA inside GStreamer', ) -install_headers(cuda_headers + ['cuda-gst.h'], subdir : 'gstreamer-1.0/gst/cuda') +install_headers(cuda_headers + ['cuda-gst.h', 'gstcuda.h'], subdir : 'gstreamer-1.0/gst/cuda') gstcuda_dep = declare_dependency(link_with : gstcuda, include_directories : [libsinc], dependencies : [gstbase_dep, gmodule_dep, gstvideo_dep, gstglproto_dep], diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstcudabasetransform.c b/subprojects/gst-plugins-bad/sys/nvcodec/gstcudabasetransform.c index 4161e4a28d..117ffc83a5 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstcudabasetransform.c +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstcudabasetransform.c @@ -29,8 +29,6 @@ # include #endif -#include - #include "gstcudabasetransform.h" GST_DEBUG_CATEGORY_STATIC (gst_cuda_base_transform_debug); diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstcudabasetransform.h b/subprojects/gst-plugins-bad/sys/nvcodec/gstcudabasetransform.h index da0cce8a73..46f91fde39 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstcudabasetransform.h +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstcudabasetransform.h @@ -23,8 +23,7 @@ #include #include #include -#include -#include +#include G_BEGIN_DECLS diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaconverter.c b/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaconverter.c index a7ea73d141..ec8e4e7f41 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaconverter.c +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaconverter.c @@ -22,9 +22,6 @@ #endif #include "gstcudaconverter.h" -#include -#include -#include #include GST_DEBUG_CATEGORY_STATIC (gst_cuda_converter_debug); diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaconverter.h b/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaconverter.h index d7b009a545..b19c03ef14 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaconverter.h +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaconverter.h @@ -20,7 +20,7 @@ #pragma once #include -#include +#include G_BEGIN_DECLS diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstcudafilter.c b/subprojects/gst-plugins-bad/sys/nvcodec/gstcudafilter.c index 9118a5ce5d..1898376547 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstcudafilter.c +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstcudafilter.c @@ -21,8 +21,7 @@ #include "config.h" #endif -#include -#include +#include #include "gstcudafilter.h" #include "gstcudaconvertscale.h" diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstcudamemorycopy.c b/subprojects/gst-plugins-bad/sys/nvcodec/gstcudamemorycopy.c index 0a70adc3a4..450249b235 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstcudamemorycopy.c +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstcudamemorycopy.c @@ -41,7 +41,6 @@ #include "gstcudabasetransform.h" #include "gstcudamemorycopy.h" #include "gstcudaformat.h" -#include #include #ifdef HAVE_NVCODEC_NVMM #include "gstcudanvmm.h" diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstcuvidloader.h b/subprojects/gst-plugins-bad/sys/nvcodec/gstcuvidloader.h index ccf4bdf2bb..ebefe2ba01 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstcuvidloader.h +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstcuvidloader.h @@ -21,7 +21,7 @@ #define __GST_CUVID_LOADER_H__ #include -#include "cuda.h" +#include #include "nvcuvid.h" G_BEGIN_DECLS diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvav1dec.c b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvav1dec.c index 31e23ebcff..6d43b7c820 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvav1dec.c +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvav1dec.c @@ -36,8 +36,6 @@ #include "config.h" #endif -#include - #include "gstnvav1dec.h" #include "gstnvdecoder.h" diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvbaseenc.c b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvbaseenc.c index aa48baa98a..dcd9e3004d 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvbaseenc.c +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvbaseenc.c @@ -22,8 +22,6 @@ #endif #include "gstnvbaseenc.h" -#include -#include #include diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvbaseenc.h b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvbaseenc.h index ee384ee991..cb159d0db9 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvbaseenc.h +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvbaseenc.h @@ -23,7 +23,7 @@ #include "gstnvenc.h" #include -#include +#include #define GST_TYPE_NV_BASE_ENC \ (gst_nv_base_enc_get_type()) diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdec.c b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdec.c index 8c259cf5d7..921fa75886 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdec.c +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdec.c @@ -29,9 +29,6 @@ #include "config.h" #endif -#include -#include - #include "gstcuvidloader.h" #include "gstnvdec.h" diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdec.h b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdec.h index ea8b18e0e6..47a23e0bad 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdec.h +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdec.h @@ -37,8 +37,7 @@ #include #include #include -#include -#include +#include G_BEGIN_DECLS diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdecoder.h b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdecoder.h index b30ceafec9..bc10d5e612 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdecoder.h +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdecoder.h @@ -22,7 +22,7 @@ #include #include -#include +#include #include "gstcuvidloader.h" G_BEGIN_DECLS diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvenc.h b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvenc.h index 77a95562db..f60bddf1c0 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvenc.h +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvenc.h @@ -22,7 +22,7 @@ #include #include -#include +#include #include "nvEncodeAPI.h" diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvencoder.h b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvencoder.h index 126a608d7b..ff5c649bc1 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvencoder.h +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvencoder.h @@ -28,9 +28,9 @@ #include +#include #include "nvEncodeAPI.h" #include "gstnvenc.h" -#include G_BEGIN_DECLS diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvh264dec.c b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvh264dec.c index f34da14420..2f854113c1 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvh264dec.c +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvh264dec.c @@ -89,8 +89,6 @@ #include "config.h" #endif -#include - #include "gstnvh264dec.h" #include "gstnvdecoder.h" diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvvp8dec.c b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvvp8dec.c index f4a8ed4f62..c007b22bc9 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvvp8dec.c +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvvp8dec.c @@ -36,8 +36,6 @@ #include "config.h" #endif -#include - #include "gstnvvp8dec.h" #include "gstnvdecoder.h" diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvvp9dec.c b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvvp9dec.c index 82951c4dbe..b656e52772 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvvp9dec.c +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvvp9dec.c @@ -36,8 +36,6 @@ #include "config.h" #endif -#include - #include "gstnvvp9dec.h" #include "gstnvdecoder.h"