From 5c146a329e0c06a0ee8e1a7edc0441be7be975e1 Mon Sep 17 00:00:00 2001 From: Heikki Tampio Date: Wed, 23 Aug 2023 12:55:43 +0300 Subject: [PATCH] v3c: Move V3C utility files to examples folder --- CMakeLists.txt | 2 -- examples/CMakeLists.txt | 12 ++++++++---- src/v3c_parser.cc => examples/v3c/v3c_util.cc | 2 +- .../uvgrtp/v3c_parser.hh => examples/v3c/v3c_util.hh | 0 examples/v3c_receiver.cc | 1 + examples/v3c_sender.cc | 1 + include/uvgrtp/lib.hh | 1 - 7 files changed, 11 insertions(+), 8 deletions(-) rename src/v3c_parser.cc => examples/v3c/v3c_util.cc (99%) rename include/uvgrtp/v3c_parser.hh => examples/v3c/v3c_util.hh (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index a550be5f..b079433e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,7 +99,6 @@ target_sources(${PROJECT_NAME} PRIVATE src/wrapper_c.cc src/socketfactory.cc src/rtcp_reader.cc - src/v3c_parser.cc ) source_group(src/srtp src/srtp/.*) @@ -153,7 +152,6 @@ target_sources(${PROJECT_NAME} PRIVATE src/srtp/srtcp.hh src/socketfactory.hh src/rtcp_reader.hh - include/uvgrtp/v3c_parser.hh include/uvgrtp/util.hh include/uvgrtp/clock.hh diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 214431ba..c29761b5 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -30,8 +30,12 @@ target_sources(srtp_zrtp PRIVATE srtp_zrtp.cc) target_sources(zrtp_multistream PRIVATE zrtp_multistream.cc) target_sources(sync_sender PRIVATE sync_sender.cc) target_sources(sync_receiver PRIVATE sync_receiver.cc) -target_sources(v3c_receiver PRIVATE v3c_receiver.cc) -target_sources(v3c_sender PRIVATE v3c_sender.cc) +target_sources(v3c_receiver PRIVATE v3c_receiver.cc v3c/v3c_util.cc v3c/v3c_util.hh) +target_sources(v3c_sender PRIVATE v3c_sender.cc v3c/v3c_util.cc v3c/v3c_util.hh) + +# V3C Utility files +target_include_directories(v3c_receiver PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} v3c) +target_include_directories(v3c_sender PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} v3c) # set crypto++ to be linked in examples if available if (NOT UVGRTP_DISABLE_CRYPTO AND CRYPTOPP_FOUND) @@ -57,5 +61,5 @@ target_link_libraries(srtp_zrtp PRIVATE uvgrtp ${CRYPTOPP_LIB_NAME}) target_link_libraries(zrtp_multistream PRIVATE uvgrtp ${CRYPTOPP_LIB_NAME}) target_link_libraries(sync_sender PRIVATE uvgrtp ${CRYPTOPP_LIB_NAME}) target_link_libraries(sync_receiver PRIVATE uvgrtp ${CRYPTOPP_LIB_NAME}) -target_link_libraries(v3c_receiver PRIVATE uvgrtp ${CRYPTOPP_LIB_NAME}) -target_link_libraries(v3c_sender PRIVATE uvgrtp ${CRYPTOPP_LIB_NAME}) \ No newline at end of file +target_link_libraries(v3c_receiver PRIVATE uvgrtp ${CRYPTOPP_LIB_NAME}) +target_link_libraries(v3c_sender PRIVATE uvgrtp ${CRYPTOPP_LIB_NAME}) \ No newline at end of file diff --git a/src/v3c_parser.cc b/examples/v3c/v3c_util.cc similarity index 99% rename from src/v3c_parser.cc rename to examples/v3c/v3c_util.cc index 696f11c1..97f0ac7b 100644 --- a/src/v3c_parser.cc +++ b/examples/v3c/v3c_util.cc @@ -1,4 +1,4 @@ -#include "uvgrtp/v3c_parser.hh" +#include "v3c/v3c_util.hh" uint32_t combineBytes(uint8_t byte1, uint8_t byte2, uint8_t byte3, uint8_t byte4) { return (static_cast(byte1) << 24) | diff --git a/include/uvgrtp/v3c_parser.hh b/examples/v3c/v3c_util.hh similarity index 100% rename from include/uvgrtp/v3c_parser.hh rename to examples/v3c/v3c_util.hh diff --git a/examples/v3c_receiver.cc b/examples/v3c_receiver.cc index 807c7e6e..751f941c 100644 --- a/examples/v3c_receiver.cc +++ b/examples/v3c_receiver.cc @@ -1,4 +1,5 @@ #include +#include "v3c/v3c_util.hh" #include #include diff --git a/examples/v3c_sender.cc b/examples/v3c_sender.cc index 728ec832..a796306f 100644 --- a/examples/v3c_sender.cc +++ b/examples/v3c_sender.cc @@ -1,4 +1,5 @@ #include +#include "v3c/v3c_util.hh" #include #include diff --git a/include/uvgrtp/lib.hh b/include/uvgrtp/lib.hh index 90e19c22..e0ba4f1c 100644 --- a/include/uvgrtp/lib.hh +++ b/include/uvgrtp/lib.hh @@ -13,4 +13,3 @@ #include "frame.hh" // frame related functions #include "util.hh" // types #include "version.hh" // version -#include "v3c_parser.hh" // v3c parser