2024-09-15 11:39:23 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <solanaceae/object_store/fwd.hpp>
|
|
|
|
#include "./stream_manager.hpp"
|
|
|
|
#include "./texture_uploader.hpp"
|
|
|
|
|
|
|
|
// provides a sink and a small window displaying a SDLVideoFrame
|
|
|
|
class DebugVideoTap {
|
|
|
|
ObjectStore2& _os;
|
|
|
|
StreamManager& _sm;
|
|
|
|
TextureUploaderI& _tu;
|
|
|
|
|
|
|
|
ObjectHandle _selected_src;
|
|
|
|
ObjectHandle _tap;
|
|
|
|
|
|
|
|
uint64_t _tex {0};
|
|
|
|
uint32_t _tex_w {0};
|
|
|
|
uint32_t _tex_h {0};
|
|
|
|
|
2024-09-16 20:24:07 +02:00
|
|
|
uint64_t _v_last_ts {0}; // us
|
2024-09-15 11:39:23 +02:00
|
|
|
float _v_interval_avg {0.f}; // s
|
|
|
|
|
|
|
|
public:
|
|
|
|
DebugVideoTap(ObjectStore2& os, StreamManager& sm, TextureUploaderI& tu);
|
|
|
|
~DebugVideoTap(void);
|
|
|
|
|
|
|
|
float render(void);
|
|
|
|
|
|
|
|
void switchTo(ObjectHandle o);
|
|
|
|
};
|
|
|
|
|