60using std::chrono::milliseconds;
61using std::condition_variable;
63using std::unique_lock;
87 unique_lock<mutex> lk(m_lock);
94 m_frame_ready.notify_one();
101 unique_lock<mutex> lk(
m_lock);
128 return receiver_thread;
137 "loopback dummy transport",
struct video_frame * frame
struct video_desc video_desc_from_frame(const struct video_frame *frame)
Returns struct video_desc from video frame.
virtual void send_frame(std::shared_ptr< video_frame >) noexcept override
loopback_video_rxtx(std::map< std::string, param_u > const &)
std::queue< std::shared_ptr< video_frame > > m_frames
virtual void *(*)(void *arg) get_receiver_thread() noexcept
virtual ~loopback_video_rxtx()
std::condition_variable m_frame_ready
static void * receiver_thread(void *arg)
struct display * m_display_device
#define LOG_LEVEL_ERROR
general errors
#define LOG_LEVEL_WARNING
less severe errors
bool display_put_frame(struct display *d, struct video_frame *frame, long long timeout_ns)
Puts filled video frame. After calling this function, video frame cannot be used.
struct video_frame * display_get_frame(struct display *d)
Returns video framebuffer which will be written to.
@ LIBRARY_CLASS_VIDEO_RXTX
#define REGISTER_MODULE(name, info, lclass, abi)
Registers module to global modules' registry.
static const int BUFF_MAX_LEN
static const char * MODULE_NAME
static video_rxtx * create_video_rxtx_loopback(std::map< std::string, param_u > const ¶ms)
static const struct video_rxtx_info loopback_video_rxtx_info
This struct represents initialized video display state.
char * data
Raw tile data. Pointer must be at least 4B aligned.
unsigned int data_len
length of the data
struct tile tiles[FLEXIBLE_ARRAY_MEMBER]
void set_thread_name(const char *name)
@ VIDEO_NORMAL
normal video (one tile)
bool display_reconfigure(struct display *d, struct video_desc desc, enum video_mode video_mode)
Reconfigure display to new video format.
#define VIDEO_RXTX_ABI_VERSION