Skip to content

Commit

Permalink
Fix Streamer/Recorder build errors
Browse files Browse the repository at this point in the history
Streamer/Recorder toolbox was failing at build because since GCC 11, the
default C++ standard is C++17, which does not allow dynamic exception
specifications anymore. This was resolved by changing the C++ standard
used to build the ProtonectSR target to C++14, though I suppose the
ideal solution would be to simply not use dynamic exception
specifications anymore.

There was also the problem that the files `recorder.cpp` and
`streamer.cpp` referenced `CV_IMWRITE_JPEG_QUALITY` when, at least
according to what I could find, doesn't exist and should be
`cv::IMWRITE_JPEG_QUALITY`.

Resolves: OpenKinect#1155
  • Loading branch information
spiwocoal committed Sep 23, 2021
1 parent fd64c5d commit a7a94cc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions tools/streamer_recorder/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ ADD_EXECUTABLE(ProtonectSR
${ProtonectSR_src}
)

SET_TARGET_PROPERTIES(ProtonectSR PROPERTIES
CXX_STANDARD 14
)

TARGET_LINK_LIBRARIES(ProtonectSR
${ProtonectSR_LIBRARIES}
)
Expand Down
2 changes: 1 addition & 1 deletion tools/streamer_recorder/recorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void Recorder::initialize()
/////////////////////////////////////////////////////////////////

// record image: define compression parameters and frame counter
img_comp_param.push_back(CV_IMWRITE_JPEG_QUALITY); //specify the compression technique
img_comp_param.push_back(cv::IMWRITE_JPEG_QUALITY); //specify the compression technique
img_comp_param.push_back(100); //specify the compression quality
frameID = 0;

Expand Down
2 changes: 1 addition & 1 deletion tools/streamer_recorder/streamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void Streamer::initialize()
servAddress = SERVER_ADDRESS;
servPort = Socket::resolveService(SERVER_PORT, "udp"); // Server port

compression_params.push_back(CV_IMWRITE_JPEG_QUALITY);
compression_params.push_back(cv::IMWRITE_JPEG_QUALITY);
compression_params.push_back(jpegqual);
}

Expand Down

0 comments on commit a7a94cc

Please sign in to comment.