Skip to content

Commit

Permalink
style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
randaz81 committed Aug 26, 2024
1 parent ded5308 commit cf99337
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 32 deletions.
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/carriers/gstreamer_carrier/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion src/yarpgstreamerplugins/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
)
Expand All @@ -8,4 +11,4 @@ add_subdirectory(videosource)
add_subdirectory(videosink)
add_subdirectory(videopassthrough)

endif()
endif()
3 changes: 3 additions & 0 deletions src/yarpgstreamerplugins/videopassthrough/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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());
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
3 changes: 3 additions & 0 deletions src/yarpgstreamerplugins/videosink/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
5 changes: 5 additions & 0 deletions src/yarpgstreamerplugins/videosink/yarpVideoSink.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2024-2024 Istituto Italiano di Tecnologia (IIT)
* SPDX-License-Identifier: BSD-3-Clause
*/

#include <yarp/os/Network.h>
#include <yarp/os/BufferedPort.h>
#include <yarp/os/Log.h>
Expand Down
7 changes: 6 additions & 1 deletion src/yarpgstreamerplugins/videosink/yarpVideoSink.h
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -35,4 +40,4 @@ class yarp_handler_class
}
};

#endif // GST_YARP_VIDEO_SINK_H
#endif // GST_YARP_VIDEO_SINK_H
3 changes: 3 additions & 0 deletions src/yarpgstreamerplugins/videosource/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
31 changes: 6 additions & 25 deletions src/yarpgstreamerplugins/videosource/yarpVideoSource.cpp
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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
*/

5 changes: 5 additions & 0 deletions src/yarpgstreamerplugins/videosource/yarpVideoSource.h
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit cf99337

Please sign in to comment.