From cf9933781ff5675a491963aeef946346d331fb2c Mon Sep 17 00:00:00 2001 From: Marco Randazzo Date: Mon, 26 Aug 2024 16:57:35 +0200 Subject: [PATCH] style fix --- src/CMakeLists.txt | 4 +-- src/carriers/gstreamer_carrier/CMakeLists.txt | 4 +-- src/yarpgstreamerplugins/CMakeLists.txt | 5 ++- .../videopassthrough/CMakeLists.txt | 3 ++ .../videopassthrough/yarpVideoPassthrough.cpp | 7 ++++- .../videopassthrough/yarpVideoPassthrough.h | 5 +++ .../videosink/CMakeLists.txt | 3 ++ .../videosink/yarpVideoSink.cpp | 5 +++ .../videosink/yarpVideoSink.h | 7 ++++- .../videosource/CMakeLists.txt | 3 ++ .../videosource/yarpVideoSource.cpp | 31 ++++--------------- .../videosource/yarpVideoSource.h | 5 +++ 12 files changed, 50 insertions(+), 32 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9c29c1ba14..13ed8b014e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -71,8 +71,8 @@ if(YARP_COMPILE_EXECUTABLES) # Other GUIs add_subdirectory(yarplaserscannergui) - add_subdirectory(yarpopencvdisplay) - + add_subdirectory(yarpopencvdisplay) + #other add_subdirectory(yarpgstreamerplugins) add_subdirectory(yarpDeviceParamParserGenerator) diff --git a/src/carriers/gstreamer_carrier/CMakeLists.txt b/src/carriers/gstreamer_carrier/CMakeLists.txt index b809389629..9d358627fc 100644 --- a/src/carriers/gstreamer_carrier/CMakeLists.txt +++ b/src/carriers/gstreamer_carrier/CMakeLists.txt @@ -22,8 +22,8 @@ if(NOT SKIP_gstreamer) GstreamerCarrier.cpp GstreamerStream.h GstreamerStream.cpp - GstreamerDecoder.h - GstreamerDecoder.cpp + GstreamerDecoder.h + GstreamerDecoder.cpp ) target_link_libraries(yarp_gstreamer diff --git a/src/yarpgstreamerplugins/CMakeLists.txt b/src/yarpgstreamerplugins/CMakeLists.txt index 28cdf0e562..187bd90c02 100644 --- a/src/yarpgstreamerplugins/CMakeLists.txt +++ b/src/yarpgstreamerplugins/CMakeLists.txt @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2024 Istituto Italiano di Tecnologia (IIT) +# SPDX-License-Identifier: BSD-3-Clause + yarp_dependent_option (YARP_COMPILE_gstreamerplugins "Do you want to compile gstreamerplugins?" OFF "YARP_HAS_GObject;YARP_HAS_GLIB2;YARP_HAS_GStreamer;YARP_HAS_GStreamerPluginsBase" OFF ) @@ -8,4 +11,4 @@ add_subdirectory(videosource) add_subdirectory(videosink) add_subdirectory(videopassthrough) -endif() \ No newline at end of file +endif() diff --git a/src/yarpgstreamerplugins/videopassthrough/CMakeLists.txt b/src/yarpgstreamerplugins/videopassthrough/CMakeLists.txt index e17c8bb58a..8f888dbe3f 100644 --- a/src/yarpgstreamerplugins/videopassthrough/CMakeLists.txt +++ b/src/yarpgstreamerplugins/videopassthrough/CMakeLists.txt @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2024 Istituto Italiano di Tecnologia (IIT) +# SPDX-License-Identifier: BSD-3-Clause + cmake_minimum_required(VERSION 3.10) project(gstyarpvideopassthrough LANGUAGES CXX) diff --git a/src/yarpgstreamerplugins/videopassthrough/yarpVideoPassthrough.cpp b/src/yarpgstreamerplugins/videopassthrough/yarpVideoPassthrough.cpp index bf14313589..9071052db2 100644 --- a/src/yarpgstreamerplugins/videopassthrough/yarpVideoPassthrough.cpp +++ b/src/yarpgstreamerplugins/videopassthrough/yarpVideoPassthrough.cpp @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2024-2024 Istituto Italiano di Tecnologia (IIT) + * SPDX-License-Identifier: BSD-3-Clause + */ + #include "yarp/os/Time.h" #include "yarp/os/Network.h" #include "yarp/os/Log.h" @@ -244,7 +249,7 @@ static gboolean gst_yarp_video_passthrough_stop(GstBaseTransform* elem) /* Register the plugin */ static gboolean yarp_video_passthrough_init(GstPlugin* plugin) -{ +{ return gst_element_register(plugin, "yarpvideopassthrough", GST_RANK_NONE, gst_yarp_video_passthrough_get_type()); } diff --git a/src/yarpgstreamerplugins/videopassthrough/yarpVideoPassthrough.h b/src/yarpgstreamerplugins/videopassthrough/yarpVideoPassthrough.h index 282a785bc3..3c97b4982b 100644 --- a/src/yarpgstreamerplugins/videopassthrough/yarpVideoPassthrough.h +++ b/src/yarpgstreamerplugins/videopassthrough/yarpVideoPassthrough.h @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2024-2024 Istituto Italiano di Tecnologia (IIT) + * SPDX-License-Identifier: BSD-3-Clause + */ + #ifndef GST_YARP_VIDEO_PASSTHROUGH_H #define GST_YARP_VIDEO_PASSTHROUGH_H diff --git a/src/yarpgstreamerplugins/videosink/CMakeLists.txt b/src/yarpgstreamerplugins/videosink/CMakeLists.txt index de3e8af205..9841aca651 100644 --- a/src/yarpgstreamerplugins/videosink/CMakeLists.txt +++ b/src/yarpgstreamerplugins/videosink/CMakeLists.txt @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2024 Istituto Italiano di Tecnologia (IIT) +# SPDX-License-Identifier: BSD-3-Clause + cmake_minimum_required(VERSION 3.10) project(gstyarpvideosink LANGUAGES CXX) diff --git a/src/yarpgstreamerplugins/videosink/yarpVideoSink.cpp b/src/yarpgstreamerplugins/videosink/yarpVideoSink.cpp index 35a137e452..da14176e78 100644 --- a/src/yarpgstreamerplugins/videosink/yarpVideoSink.cpp +++ b/src/yarpgstreamerplugins/videosink/yarpVideoSink.cpp @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2024-2024 Istituto Italiano di Tecnologia (IIT) + * SPDX-License-Identifier: BSD-3-Clause + */ + #include #include #include diff --git a/src/yarpgstreamerplugins/videosink/yarpVideoSink.h b/src/yarpgstreamerplugins/videosink/yarpVideoSink.h index 5ab44b688c..b0914a66f6 100644 --- a/src/yarpgstreamerplugins/videosink/yarpVideoSink.h +++ b/src/yarpgstreamerplugins/videosink/yarpVideoSink.h @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2024-2024 Istituto Italiano di Tecnologia (IIT) + * SPDX-License-Identifier: BSD-3-Clause + */ + #ifndef GST_YARP_VIDEO_SINK_H #define GST_YARP_VIDEO_SINK_H @@ -35,4 +40,4 @@ class yarp_handler_class } }; -#endif // GST_YARP_VIDEO_SINK_H \ No newline at end of file +#endif // GST_YARP_VIDEO_SINK_H diff --git a/src/yarpgstreamerplugins/videosource/CMakeLists.txt b/src/yarpgstreamerplugins/videosource/CMakeLists.txt index e9ebbc61e1..14c589e14e 100644 --- a/src/yarpgstreamerplugins/videosource/CMakeLists.txt +++ b/src/yarpgstreamerplugins/videosource/CMakeLists.txt @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2024 Istituto Italiano di Tecnologia (IIT) +# SPDX-License-Identifier: BSD-3-Clause + cmake_minimum_required(VERSION 3.10) project(gstyarpvideosource LANGUAGES CXX) diff --git a/src/yarpgstreamerplugins/videosource/yarpVideoSource.cpp b/src/yarpgstreamerplugins/videosource/yarpVideoSource.cpp index 7c4c6437e8..74d1c7a353 100644 --- a/src/yarpgstreamerplugins/videosource/yarpVideoSource.cpp +++ b/src/yarpgstreamerplugins/videosource/yarpVideoSource.cpp @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2024-2024 Istituto Italiano di Tecnologia (IIT) + * SPDX-License-Identifier: BSD-3-Clause + */ + #include "yarp/os/Time.h" #include "yarp/os/Network.h" #include "yarp/os/Log.h" @@ -255,7 +260,7 @@ static gboolean gst_yarp_video_source_start(GstBaseSrc* src) b = yarp::os::Network::connect(yarp_handler->remote_port_name, yarp_handler->input_port_name, yarp_handler->connection_protocol); if (!b) { - yCError(YVS_COMP) << "Could not perform connection between: " << yarp_handler->remote_port_name + yCError(YVS_COMP) << "Could not perform connection between: " << yarp_handler->remote_port_name << " and " << yarp_handler->input_port_name << " via " << yarp_handler->connection_protocol; return FALSE; } @@ -372,27 +377,3 @@ GST_PLUGIN_DEFINE( "LGPL", "GStreamer", "http://gstreamer.net/") - - - // TO test it: -// export GST_PLUGIN_PATH=$GST_PLUGIN_PATH:C:\Software\iCubSoftware\yarp\build\bin\Release -// set GST_PLUGIN_PATH=%GST_PLUGIN_PATH%;C:\Software\iCubSoftware\yarp\build\bin\Release -// gst-inspect-1.0 yarpvideosource -// gst-launch-1.0 yarpvideosource localPortname="/aaa" portType = "rgb" ! videoconvert ! autovideosink -// gst-launch-1.0 yarpvideosource localPortname="/aaa" ! videoconvert ! autovideosink -//gst-launch-1.0 yarpvideosource ! "video/x-raw, format=(string)I420, width=(int)640, height=(int)480" ! autovideosink -//gst-launch-1.0 yarpvideosource ! "video/x-raw, format=(string)I420, width=(int)640, height=(int)480" ! autovideosink -// gst-launch-1.0 yarpvideosource ! glimagesink -//gst-launch-1.0 yarpvideosource localPortname="/aaa" !videoconvert !x264enc !h264parse !avdec_h264 !videoconvert !autovideosink - -//grabber_yarp -> -> fast_tcp -> *porta_rgb_2_gs_image* -> sink -//telecamera -> h264enc -> blob2porta -> fast_tcp -> porta_blob_2_gs_image -> 264dec -> sink - - /* - C:\Software\gstreamer\1.0\msvc_x86_64\lib\gstreamer-1.0.lib - C:\Software\gstreamer\1.0\msvc_x86_64\lib\gstapp-1.0.lib - C:\Software\gstreamer\1.0\msvc_x86_64\lib\gstbase-1.0.lib - C:\Software\gstreamer\1.0\msvc_x86_64\lib\gstbase-1.0.lib - C:\Software\gstreamer\1.0\msvc_x86_64\lib\gstvideo-1.0.lib - */ - diff --git a/src/yarpgstreamerplugins/videosource/yarpVideoSource.h b/src/yarpgstreamerplugins/videosource/yarpVideoSource.h index 94d3485ab2..8318682e4e 100644 --- a/src/yarpgstreamerplugins/videosource/yarpVideoSource.h +++ b/src/yarpgstreamerplugins/videosource/yarpVideoSource.h @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2024-2024 Istituto Italiano di Tecnologia (IIT) + * SPDX-License-Identifier: BSD-3-Clause + */ + #ifndef GST_YARP_VIDEO_SOURCE_H #define GST_YARP_VIDEO_SOURCE_H