Skip to content

Commit

Permalink
[Rec]: Removed debug output in FrameBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianReimold committed Jan 13, 2022
1 parent b463a99 commit 3564b56
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions app/rec/rec_client_core/src/frame_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "frame_buffer.h"

#include <thread>
#include <iostream>

namespace eCAL
{
Expand All @@ -38,14 +37,12 @@ namespace eCAL

bool FrameBuffer::is_enabled() const
{
std::cout << "Framebuffer:: is_enabled: " << std::this_thread::get_id() << std::endl;
std::shared_lock<decltype(frame_buffer_mutex_)> frame_buffer_lock(frame_buffer_mutex_);
return is_enabled_;
}

void FrameBuffer::set_enabled(bool enabled)
{
std::cout << "Framebuffer:: set_enabled: " << std::this_thread::get_id() << std::endl;
std::unique_lock<decltype(frame_buffer_mutex_)> frame_buffer_lock(frame_buffer_mutex_);

// Clear just in case something has happend while the frame-buffer was disabled
Expand All @@ -60,23 +57,19 @@ namespace eCAL

std::chrono::steady_clock::duration FrameBuffer::get_max_buffer_length() const
{
std::cout << "Framebuffer:: get_max_buffer_length: " << std::this_thread::get_id() << std::endl;

std::shared_lock<decltype(frame_buffer_mutex_)> frame_buffer_lock(frame_buffer_mutex_);
return max_buffer_length_;
}

void FrameBuffer::set_max_buffer_length(std::chrono::steady_clock::duration new_length)
{
std::cout << "Framebuffer:: set_max_buffer_length: " << std::this_thread::get_id() << std::endl;
std::unique_lock<decltype(frame_buffer_mutex_)> frame_buffer_lock(frame_buffer_mutex_);
max_buffer_length_ = new_length;
remove_old_frames_no_lock();
}

void FrameBuffer::push_back(const std::shared_ptr<Frame>& frame)
{
std::cout << "Framebuffer:: push_back: " << std::this_thread::get_id() << std::endl;
std::unique_lock<decltype(frame_buffer_mutex_)> frame_buffer_lock(frame_buffer_mutex_);
if (is_enabled_)
{
Expand All @@ -86,7 +79,6 @@ namespace eCAL

std::pair<int64_t, std::chrono::steady_clock::duration> FrameBuffer::length() const
{
std::cout << "Framebuffer:: length: " << std::this_thread::get_id() << std::endl;
std::shared_lock<decltype(frame_buffer_mutex_)> frame_buffer_lock(frame_buffer_mutex_);

if (!is_enabled_)
Expand All @@ -107,7 +99,6 @@ namespace eCAL

void FrameBuffer::remove_old_frames()
{
std::cout << "Framebuffer:: remove_old_frames: " << std::this_thread::get_id() << std::endl;
std::unique_lock<decltype(frame_buffer_mutex_)> frame_buffer_lock(frame_buffer_mutex_);
remove_old_frames_no_lock();
}
Expand Down Expand Up @@ -139,14 +130,12 @@ namespace eCAL

void FrameBuffer::clear()
{
std::cout << "Framebuffer:: clear: " << std::this_thread::get_id() << std::endl;
std::unique_lock<decltype(frame_buffer_mutex_)> frame_buffer_lock(frame_buffer_mutex_);
frame_buffer_deque_.clear();
}

std::deque<std::shared_ptr<Frame>> FrameBuffer::get_as_deque() const
{
std::cout << "Framebuffer:: get_as_deque: " << std::this_thread::get_id() << std::endl;
std::shared_lock<decltype(frame_buffer_mutex_)> frame_buffer_lock(frame_buffer_mutex_);
if (!is_enabled_)
return std::deque<std::shared_ptr<Frame>>();
Expand Down

0 comments on commit 3564b56

Please sign in to comment.