wegen/FrOSCon26/examples/commons.hpp
Ichthyostega 2a61def8a4 Prototype: need to introduce an interface for the frame data feed
Since I want to segregate the code according to the domain,
several methods must be provided to the video display to conduct
a properly synchronised handover of video pixel data; by using
`Glib::Dispatcher` as base class, all aspects of feed synchronisation
can be packaged into a single connection interface, without having
to share implementation details between the video display and player.
2026-07-15 20:40:59 +02:00

45 lines
1 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
commons.hpp - common definitions and utils for the io_uring video output demo code
Copyright (C)
2026 Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or modify it
  under the terms of the GNU GPL version 2+ See the LICENSE file for details.
* ************************************************************************/
#ifndef COMMONS_H
#define COMMONS_H
#include <cstdint>
#include <iostream>
#include <string>
using std::string;
using uint = unsigned int;
using FrameRate = uint;
inline void
__FAIL (string msg)
{
std::cerr << "FAIL: " << msg << std::endl;
std::abort();
}
/**
* Marker class: any copy and copy construction prohibited
*/
class NonCopyable
{
protected:
~NonCopyable() = default;
NonCopyable() = default;
NonCopyable (NonCopyable const&) = delete;
NonCopyable& operator= (NonCopyable const&) = delete;
};
#endif /*COMMONS_H*/