signal_changed();
ui->grabbed_frame_label->installEventFilter(this);
- glGenBuffers(1, &pbo);
- glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB, pbo);
- glBufferData(GL_PIXEL_PACK_BUFFER_ARB, global_flags.width * global_flags.height * 4, nullptr, GL_STREAM_READ);
+ glGenBuffers(1, &pbo);
+ glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB, pbo);
+ glBufferData(GL_PIXEL_PACK_BUFFER_ARB, global_flags.width * global_flags.height * 4, nullptr, GL_STREAM_READ);
}
Analyzer::~Analyzer()
ui->blue_label->setText(u8"—");
ui->hex_label->setText(u8"#—");
}
- return false;
+ return false;
}
void Analyzer::grab_pixel(int x, int y)
global_headers = string(reinterpret_cast<const char *>(header->p_buffer), header->n_filled_len);
svt_av1_enc_stream_header_release(header); // Don't care about errors.
- }
+ }
}
void AV1Encoder::encoder_thread_func()
void callback(float level_lufs, float peak_db,
std::vector<AudioMixer::BusLevel> bus_levels,
- float global_level_lufs, float range_low_lufs, float range_high_lufs,
- float final_makeup_gain_db,
- float correlation)
+ float global_level_lufs, float range_low_lufs, float range_high_lufs,
+ float final_makeup_gain_db,
+ float correlation)
{
// Empty.
}
CorrelationMeasurer::CorrelationMeasurer(unsigned sample_rate,
float lowpass_cutoff_hz,
- float falloff_seconds)
+ float falloff_seconds)
: w1(2.0 * M_PI * lowpass_cutoff_hz / sample_rate),
w2(1.0 / (falloff_seconds * sample_rate))
{
int out_samples = swr_convert(resampler, &data, num_samples_room,
const_cast<const uint8_t **>(audio_avframe->data), audio_avframe->nb_samples);
if (out_samples < 0) {
- fprintf(stderr, "Audio conversion failed.\n");
- abort();
- }
+ fprintf(stderr, "Audio conversion failed.\n");
+ abort();
+ }
audio_frame->len += out_samples * bytes_per_sample;
}
#else // !defined(__SSE__)
union uint_float {
- float f;
- unsigned int i;
+ float f;
+ unsigned int i;
};
#define early_undenormalise(sample) { \
uint_float uf; \
}
num_controller_banks = min(max(mapping_proto->num_controller_banks(), 1), 5);
- current_controller_bank = 0;
+ current_controller_bank = 0;
receiver->clear_all_highlights();
update_highlights();
MIDIMappingDialog::MIDIMappingDialog(MIDIMapper *mapper)
: ui(new Ui::MIDIMappingDialog),
- mapper(mapper)
+ mapper(mapper)
{
ui->setupUi(this);
void Mixer::bm_frame(unsigned card_index, uint16_t timecode,
FrameAllocator::Frame video_frame, size_t video_offset, VideoFormat video_format,
- FrameAllocator::Frame audio_frame, size_t audio_offset, AudioFormat audio_format)
+ FrameAllocator::Frame audio_frame, size_t audio_offset, AudioFormat audio_format)
{
DeviceSpec device{InputSourceType::CAPTURE_CARD, card_index};
CaptureCard *card = &cards[card_index];
} // namespace
PBOFrameAllocator::PBOFrameAllocator(bmusb::PixelFormat pixel_format, size_t frame_size, GLuint width, GLuint height, unsigned card_index, MJPEGEncoder *mjpeg_encoder, size_t num_queued_frames, GLenum buffer, GLenum permissions, GLenum map_bits)
- : card_index(card_index),
+ : card_index(card_index),
mjpeg_encoder(mjpeg_encoder),
pixel_format(pixel_format),
buffer(buffer),
bmusb::FrameAllocator::Frame PBOFrameAllocator::alloc_frame()
{
- Frame vf;
+ Frame vf;
lock_guard<mutex> lock(freelist_mutex); // Meh.
if (freelist.empty()) {
bmusb::FrameAllocator::Frame PBOFrameAllocator::create_frame(size_t width, size_t height, size_t stride)
{
- Frame vf;
+ Frame vf;
size_t desired_frame_bytes = width * stride;
if (stride > 8192 * 4 || height > 8192 || desired_frame_bytes > MAX_FRAME_SIZE) {
// Prime the resampler so there's no more delay.
vresampler.inp_count = vresampler.inpsize() / 2 - 1;
- vresampler.out_count = 1048576;
- vresampler.process ();
+ vresampler.out_count = 1048576;
+ vresampler.process();
}
void ResamplingQueue::add_input_samples(steady_clock::time_point ts, const float *samples, ssize_t num_samples, ResamplingQueue::RateAdjustmentPolicy rate_adjustment_policy)
// An effect that does nothing.
class IdentityEffect : public Effect {
public:
- IdentityEffect() {}
- string effect_type_id() const override { return "IdentityEffect"; }
- string output_fragment_shader() override { return read_file("identity.frag"); }
+ IdentityEffect() {}
+ string effect_type_id() const override { return "IdentityEffect"; }
+ string output_fragment_shader() override { return read_file("identity.frag"); }
};
Effect *instantiate_effect(EffectChain *chain, EffectType effect_type)
channel_names[1] = "Preview";
L = luaL_newstate();
- luaL_openlibs(L);
+ luaL_openlibs(L);
// Search through all directories until we find a file that will load
// (as in, does not return LUA_ERRFILE); then run it. We store load errors
TimecodeRenderer::~TimecodeRenderer()
{
resource_pool->release_2d_texture(tex);
- check_error();
+ check_error();
resource_pool->release_glsl_program(program_num);
- check_error();
+ check_error();
glDeleteBuffers(1, &vbo);
- check_error();
+ check_error();
}
string TimecodeRenderer::get_timecode_text(double pts, unsigned frame_num)
check_error();
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, display_width, height, GL_RED, GL_UNSIGNED_BYTE, image->bits());
- check_error();
+ check_error();
glUseProgram(program_num);
check_error();
glUniform1i(texture_sampler_uniform, 0);
- check_error();
+ check_error();
- glBindBuffer(GL_ARRAY_BUFFER, vbo);
- check_error();
+ glBindBuffer(GL_ARRAY_BUFFER, vbo);
+ check_error();
for (GLint attr_index : { position_attribute_index, texcoord_attribute_index }) {
if (attr_index == -1) continue;
char buf[16];
snprintf(buf, sizeof(buf), "%u", num_local_work_groups);
- string shader_src = R"(#version 150
+ string shader_src = R"(#version 150
#extension GL_ARB_compute_shader : enable
#extension GL_ARB_shader_image_load_store : enable
layout(local_size_x = )" + string(buf) + R"() in;
check_error();
glUniform1i(shader.outbuf_pos, 1);
check_error();
- glBindImageTexture(0, tex_src, 0, GL_FALSE, 0, GL_READ_ONLY, GL_RGB10_A2);
+ glBindImageTexture(0, tex_src, 0, GL_FALSE, 0, GL_READ_ONLY, GL_RGB10_A2);
check_error();
- glBindImageTexture(1, tex_dst, 0, GL_FALSE, 0, GL_WRITE_ONLY, GL_RGB10_A2);
+ glBindImageTexture(1, tex_dst, 0, GL_FALSE, 0, GL_WRITE_ONLY, GL_RGB10_A2);
check_error();
// Actually run the shader.
x264_suffix = string(ptr, (m->l_name + strlen(m->l_name)) - ptr);
break;
}
- }
+ }
dlclose(handle);
if (x264_dir.empty()) {