Skip to content
Snippets Groups Projects
Commit 21a8f92b authored by Nicolas Pope's avatar Nicolas Pope
Browse files

More code tidy

parent c1059f11
Branches
No related tags found
1 merge request!316Resolves #343 GUI and Frame Refactor
Pipeline #28217 failed
......@@ -436,7 +436,7 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
add_subdirectory(components/common/cpp)
add_subdirectory(applications/calibration)
#add_subdirectory(applications/calibration)
add_subdirectory(components/codecs)
add_subdirectory(components/structures)
add_subdirectory(components/net)
......
......@@ -4,6 +4,8 @@
#include <ftl/rgbd/capabilities.hpp>
#include <chrono>
#include <loguru.hpp>
using ftl::gui2::Camera;
using ftl::codecs::Channel;
using ftl::rgbd::Capability;
......
......@@ -10,6 +10,8 @@
#include "../widgets/popupbutton.hpp"
#include <loguru.hpp>
using ftl::gui2::Camera;
using ftl::gui2::FixedWindow;
using ftl::gui2::MediaPanel;
......
#include "camera3d.hpp"
#include "../modules/camera.hpp"
#include <loguru.hpp>
using ftl::gui2::CameraView3D;
// =============================================================================
......
......@@ -4,8 +4,8 @@
#include <vector>
#include <cmath>
#define LOGURU_REPLACE_GLOG 1
#include <loguru.hpp>
//#define LOGURU_REPLACE_GLOG 1
//#include <loguru.hpp>
namespace ftl {
namespace audio {
......@@ -102,7 +102,6 @@ class FixedBuffer : public ftl::audio::Buffer<T> {
void reset() override {
Buffer<T>::reset();
write_position_ = 0; //int(this->cur_delay_);
LOG(INFO) << "RESET AUDIO: " << write_position_;
read_position_ = 0;
}
......
#include <ftl/codecs/nvidia_encoder.hpp>
#include <loguru.hpp>
//#include <loguru.hpp>
#include <ftl/timer.hpp>
#include <ftl/codecs/codecs.hpp>
#include <ftl/cuda_util.hpp>
......@@ -144,7 +144,7 @@ static bool validate(const cv::cuda::GpuMat &in, ftl::codecs::Packet &pkt) {
}
if (pkt.codec == codec_t::H264 && in.type() == CV_32F) {
LOG(ERROR) << "Lossy compression not supported with H264 currently";
//LOG(ERROR) << "Lossy compression not supported with H264 currently";
return false;
}
......@@ -153,12 +153,12 @@ static bool validate(const cv::cuda::GpuMat &in, ftl::codecs::Packet &pkt) {
}
if (in.empty()) {
LOG(WARNING) << "No data";
//LOG(WARNING) << "No data";
return false;
}
if (in.type() != CV_32F && in.type() != CV_8UC4) {
LOG(ERROR) << "Input type does not match given format";
//LOG(ERROR) << "Input type does not match given format";
pkt.flags = 0;
return false;
}
......@@ -199,7 +199,7 @@ bool NvidiaEncoder::encode(const cv::cuda::GpuMat &in, ftl::codecs::Packet &pkt)
was_reset_ = false;
if (cs == 0 || cs >= ftl::codecs::kVideoBufferSize) {
LOG(ERROR) << "Could not encode video frame";
//LOG(ERROR) << "Could not encode video frame";
return false;
} else {
return true;
......@@ -211,7 +211,7 @@ bool NvidiaEncoder::_createEncoder(const cv::cuda::GpuMat &in, const ftl::codecs
if (nvenc_ && (params == params_)) return true;
uint64_t bitrate = calculateBitrate(in.cols*in.rows, float(pkt.bitrate)/255.0f) * pkt.frame_count;
LOG(INFO) << "Calculated bitrate " << ((params.is_float) ? "(float)" : "(rgb)") << ": " << bitrate;
//LOG(INFO) << "Calculated bitrate " << ((params.is_float) ? "(float)" : "(rgb)") << ": " << bitrate;
params_ = params;
......@@ -226,7 +226,7 @@ bool NvidiaEncoder::_createEncoder(const cv::cuda::GpuMat &in, const ftl::codecs
cuCtxGetCurrent(&cudaContext);
if (nvenc_) {
LOG(INFO) << "Destroying old NVENC encoder";
//LOG(INFO) << "Destroying old NVENC encoder";
std::vector<std::vector<uint8_t>> tmp;
nvenc_->EndEncode(tmp);
nvenc_->DestroyEncoder();
......@@ -299,7 +299,7 @@ bool NvidiaEncoder::_createEncoder(const cv::cuda::GpuMat &in, const ftl::codecs
//LOG(ERROR) << "Could not create video encoder";
return false;
} else {
LOG(INFO) << "NVENC encoder created";
//LOG(INFO) << "NVENC encoder created";
//nvenc_->SetIOCudaStreams(cv::cuda::StreamAccessor::getStream(stream_), cv::cuda::StreamAccessor::getStream(stream_));
......
......@@ -19,7 +19,9 @@ check_function_exists(uriParseSingleUriA HAVE_URIPARSESINGLE)
add_library(ftlcommon ${COMMONSRC})
if (NOT WIN32)
target_compile_options(ftlcommon PUBLIC $<$<COMPILE_LANGUAGE:CXX>:-fPIC>)
endif()
target_include_directories(ftlcommon PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
......
......@@ -2,7 +2,7 @@
#ifndef _FTL_RGBD_MIDDLEBURY_SOURCE_HPP_
#define _FTL_RGBD_MIDDLEBURY_SOURCE_HPP_
#include <loguru.hpp>
//#include <loguru.hpp>
#include "../../basesource.hpp"
#include <ftl/cuda_common.hpp>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment