#include <assert.h>
#include <epoxy/egl.h>
+#include <movit/effect.h>
#include <movit/effect_chain.h>
#include <movit/effect_util.h>
#include <movit/flat_input.h>
#include <string>
#include <thread>
+#include <movit/effect.h>
#include <va/va.h>
class HTTPD;
chosen_type == LIVE_INPUT_YCBCR_PLANAR ||
chosen_type == LIVE_INPUT_BGRA);
int signal = find_signal_to_connect(L, input);
- Theme::WhiteBalance wb = theme->get_white_balance_for_signal(signal);
+ RGBTriplet wb = theme->get_white_balance_for_signal(signal);
if (fabs(wb.r - 1.0) < 1e-3 && fabs(wb.g - 1.0) < 1e-3 && fabs(wb.b - 1.0) < 1e-3) {
// Neutral white balance.
block->currently_chosen_alternative = find_index_of(block, IDENTITY_EFFECT);
lock_guard<mutex> lock(m);
if (channel_signals.count(channel)) {
- white_balance_for_signal[channel_signals[channel]] = WhiteBalance{ r, g, b };
+ white_balance_for_signal[channel_signals[channel]] = RGBTriplet{ r, g, b };
}
lua_getglobal(L, "set_wb");
assert(lua_gettop(L) == 0);
}
-Theme::WhiteBalance Theme::get_white_balance_for_signal(int signal)
+RGBTriplet Theme::get_white_balance_for_signal(int signal)
{
if (white_balance_for_signal.count(signal)) {
return white_balance_for_signal[signal];
} else {
- return WhiteBalance{ 1.0, 1.0, 1.0 };
+ return RGBTriplet{ 1.0, 1.0, 1.0 };
}
}
#define _THEME_H 1
#include <lua.hpp>
+#include <movit/effect.h>
#include <movit/flat_input.h>
#include <movit/ycbcr_input.h>
#include <stdbool.h>
// for non-interlaced inputs.
std::vector<RefCountedFrame> input_frames;
};
- struct WhiteBalance {
- float r, g, b;
- };
Chain get_chain(unsigned num, float t, unsigned width, unsigned height, const InputState &input_state);
int get_channel_signal(unsigned channel);
bool get_supports_set_wb(unsigned channel);
void set_wb(unsigned channel, float r, float g, float b);
- WhiteBalance get_white_balance_for_signal(int signal);
+ movit::RGBTriplet get_white_balance_for_signal(int signal);
std::string get_channel_color(unsigned channel);
- std::unordered_map<int, WhiteBalance> white_balance_for_signal;
+ std::unordered_map<int, movit::RGBTriplet> white_balance_for_signal;
std::vector<std::string> get_transition_names(float t);