[libcamera-devel] [PATCH v2 1/2] gst: Turn the top-level plugin file gstlibcamera.c into a C++ file
Nicolas Dufresne
nicolas.dufresne at collabora.com
Sat Mar 7 20:34:01 CET 2020
Le samedi 07 mars 2020 à 21:16 +0200, Laurent Pinchart a écrit :
> The top-level plugin file gstlibcamera.c is the only C source file in
> the whole libcamera GStreamer element. To avoid specifying both C and
> C++ compiler arguments in the future, turn it into a C++ file.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne at collabora.com>
> ---
> src/gstreamer/{gstlibcamera.c => gstlibcamera.cpp} | 0
> src/gstreamer/meson.build | 8 ++++----
> 2 files changed, 4 insertions(+), 4 deletions(-)
> rename src/gstreamer/{gstlibcamera.c => gstlibcamera.cpp} (100%)
>
> diff --git a/src/gstreamer/gstlibcamera.c b/src/gstreamer/gstlibcamera.cpp
> similarity index 100%
> rename from src/gstreamer/gstlibcamera.c
> rename to src/gstreamer/gstlibcamera.cpp
> diff --git a/src/gstreamer/meson.build b/src/gstreamer/meson.build
> index 1965b5041132..8759a12205fa 100644
> --- a/src/gstreamer/meson.build
> +++ b/src/gstreamer/meson.build
> @@ -1,6 +1,6 @@
> libcamera_gst_sources = [
> 'gstlibcamera-utils.cpp',
> - 'gstlibcamera.c',
> + 'gstlibcamera.cpp',
> 'gstlibcameraallocator.cpp',
> 'gstlibcamerapad.cpp',
> 'gstlibcamerapool.cpp',
> @@ -8,7 +8,7 @@ libcamera_gst_sources = [
> 'gstlibcamerasrc.cpp',
> ]
>
> -libcamera_gst_c_args = [
> +libcamera_gst_cpp_args = [
> '-DVERSION="@0@"'.format(libcamera_git_version),
> '-DPACKAGE="@0@"'.format(meson.project_name()),
> ]
> @@ -27,12 +27,12 @@ if glib_dep.found() and gstvideo_dep.found() and gstallocator_dep.found()
> # complain about the ones we are not using. Silence the -Wunused-function
> # warning in that case.
> if cc.get_id() == 'clang' and glib_dep.version().version_compare('<2.63.0')
> - libcamera_gst_c_args += [ '-Wno-unused-function' ]
> + libcamera_gst_cpp_args += [ '-Wno-unused-function' ]
> endif
>
> libcamera_gst = shared_library('gstlibcamera',
> libcamera_gst_sources,
> - c_args : libcamera_gst_c_args,
> + cpp_args : libcamera_gst_cpp_args,
> dependencies : [libcamera_dep, gstvideo_dep, gstallocator_dep],
> install: true,
> install_dir : '@0@/gstreamer-1.0'.format(get_option('libdir')),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20200307/cdbe8b58/attachment.sig>
More information about the libcamera-devel
mailing list