#include "theme.h"
#include "resampler.h"
#include "timebase.h"
+#include "httpd.h"
+#include "ebu_r128_proc.h"
#define NUM_CARDS 2
output_channel[output].set_frame_ready_callback(callback);
}
+ typedef std::function<void(float, float, float, float, float)> audio_level_callback_t;
+ void set_audio_level_callback(audio_level_callback_t callback)
+ {
+ audio_level_callback = callback;
+ }
+
std::vector<std::string> get_transition_names()
{
return theme->get_transition_names(pts());
void release_display_frame(DisplayFrame *frame);
double pts() { return double(pts_int) / TIMEBASE; }
+ HTTPD httpd;
+
QSurface *mixer_surface, *h264_encoder_surface;
std::unique_ptr<movit::ResourcePool> resource_pool;
std::unique_ptr<Theme> theme;
std::thread mixer_thread;
bool should_quit = false;
+
+ audio_level_callback_t audio_level_callback = nullptr;
+ Ebu_r128_proc r128;
+
+ // TODO: Implement oversampled peak detection.
+ float peak = 0.0f;
};
extern Mixer *global_mixer;