A simple program that accepts RTMP streams and then restreams them directly to other services. I use it to record at a higher rate but stream to target services at the rate they want. It's also useful for streaming to multiple sites.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
distributary/dbc.hpp

29 lines
766 B

#pragma once
#include <string>
#include <fmt/core.h>
#include <functional>
using std::string;
namespace dbc {
class Error {
public:
const string message;
Error(string m) : message{m} {}
Error(const char *m) : message{m} {}
};
class CheckError : public Error {};
class SentinelError : public Error {};
class PreCondError : public Error {};
class PostCondError : public Error {};
void log(const string &message);
void sentinel(const string &message);
void pre(const string &message, bool test);
void pre(const string &message, std::function<bool()> tester);
void post(const string &message, bool test);
void post(const string &message, std::function<bool()> tester);
void check(bool test, const string &message);
}