Skip to content

Commit

Permalink
tested with the new folders structure
Browse files Browse the repository at this point in the history
added changelog
  • Loading branch information
randaz81 committed Apr 21, 2021
1 parent 978f7b6 commit 15acee6
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 31 deletions.
6 changes: 6 additions & 0 deletions doc/release/master/zlib_portmonitor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
zlib_portmonitor {#master}
------------------

### PortMonitors

* added new portmonitor `depthimage_compression_zlib` which uses zlib library to compress/decompress (lossless) depth images through the network
1 change: 1 addition & 0 deletions src/portmonitors/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ include(YarpPrintFeature)
yarp_begin_plugin_library(yarppm OPTION YARP_COMPILE_PORTMONITOR_PLUGINS
DEFAULT ON)
add_subdirectory(depthimage_compression_zfp)
add_subdirectory(depthimage_compression_zlib)
add_subdirectory(depthimage_to_mono)
add_subdirectory(depthimage_to_rgb)
add_subdirectory(image_compression_ffmpeg)
Expand Down
74 changes: 47 additions & 27 deletions src/portmonitors/depthimage_compression_zlib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,37 +1,57 @@
# Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
# Copyright (C) 2006-2021 Istituto Italiano di Tecnologia (IIT)
# All rights reserved.
#
# This software may be modified and distributed under the terms of the
# BSD-3-Clause license. See the accompanying LICENSE file for details.

yarp_prepare_plugin(zlib TYPE ZlibMonitorObject
INCLUDE zlibPortmonitor.h
CATEGORY portmonitor
DEPENDS "ENABLE_yarpcar_portmonitor;YARP_HAS_ZLIB")
yarp_prepare_plugin(depthimage_compression_zlib
TYPE ZlibMonitorObject
INCLUDE zlibPortmonitor.h
CATEGORY portmonitor
DEPENDS "ENABLE_yarpcar_portmonitor;YARP_HAS_ZLIB"
)

if(NOT SKIP_zlib)
yarp_add_plugin(yarp_pm_zlib)

target_sources(yarp_pm_zlib PRIVATE zlibPortmonitor.cpp
zlibPortmonitor.h)

target_link_libraries(yarp_pm_zlib PRIVATE YARP::YARP_os
YARP::YARP_sig)
list(APPEND YARP_${YARP_PLUGIN_MASTER}_PRIVATE_DEPS YARP_os
YARP_sig)

target_include_directories(yarp_pm_zlib SYSTEM PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(yarp_pm_zlib PRIVATE ${ZLIB_LIBRARIES})
# list(APPEND YARP_${YARP_PLUGIN_MASTER}_PRIVATE_DEPS ZLIB) (not using targets)
if(SKIP_depthimage_compression_zlib)
return()
endif()

yarp_install(TARGETS yarp_pm_zlib
EXPORT YARP_${YARP_PLUGIN_MASTER}
COMPONENT ${YARP_PLUGIN_MASTER}
LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR}
YARP_INI DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
yarp_add_plugin(yarp_pm_depthimage_compression_zlib)

target_sources(yarp_pm_depthimage_compression_zlib
PRIVATE
zlibPortmonitor.cpp
zlibPortmonitor.h
)

target_link_libraries(yarp_pm_depthimage_compression_zlib
PRIVATE
YARP::YARP_os
YARP::YARP_sig
)
list(APPEND YARP_${YARP_PLUGIN_MASTER}_PRIVATE_DEPS
YARP_os
YARP_sig
)

target_include_directories(yarp_pm_depthimage_compression_zlib
SYSTEM PRIVATE
${ZLIB_INCLUDE_DIRS}
)
target_link_libraries(yarp_pm_depthimage_compression_zlib
PRIVATE
${ZLIB_LIBRARIES}
)
# list(APPEND YARP_${YARP_PLUGIN_MASTER}_PRIVATE_DEPS ZLIB) (not using targets)

yarp_install(
TARGETS yarp_pm_depthimage_compression_zlib
EXPORT YARP_${YARP_PLUGIN_MASTER}
COMPONENT ${YARP_PLUGIN_MASTER}
LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR}
YARP_INI DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR}
)

set(YARP_${YARP_PLUGIN_MASTER}_PRIVATE_DEPS ${YARP_${YARP_PLUGIN_MASTER}_PRIVATE_DEPS} PARENT_SCOPE)

set_property(TARGET yarp_pm_zlib PROPERTY FOLDER "Plugins/Port Monitor")
endif()
set_property(TARGET yarp_pm_depthimage_compression_zlib PROPERTY FOLDER "Plugins/Port Monitor")
9 changes: 7 additions & 2 deletions src/portmonitors/depthimage_compression_zlib/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

zlib_portmonitor plugin
depthimage_compression_zlib_portmonitor plugin
======================================================================
Portmonitor plugin for compression and decompression of generic data using zlib library.
Portmonitor plugin for compression and decompression of depth images using zlib library.

Usage:
-----

yarp connect /depthCamera/depthImage:o /view tcp+send.portmonitor+file.depthimage_compression_zlib+recv.portmonitor+file.depthimage_compression_zlib+type.dll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
* Copyright (C) 2006-2021 Istituto Italiano di Tecnologia (IIT)
* All rights reserved.
*
* This software may be modified and distributed under the terms of the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
* Copyright (C) 2006-2021 Istituto Italiano di Tecnologia (IIT)
* All rights reserved.
*
* This software may be modified and distributed under the terms of the
Expand Down

0 comments on commit 15acee6

Please sign in to comment.