#include <utility>
#include "context.h"
+#include "defs.h"
#include "httpd.h"
#include "timebase.h"
static int frame_height = 144;
static int frame_width_mbaligned;
static int frame_height_mbaligned;
-static int frame_rate = 60;
+static int frame_rate = FPS;
static unsigned int frame_bitrate = 0;
static unsigned int frame_slices = 1;
static double frame_size = 0;
//static int initial_qp = 28;
static int minimal_qp = 0;
static int intra_period = 30;
-static int intra_idr_period = 60;
+static int intra_idr_period = FPS;
static int ip_period = 3;
static int rc_mode = -1;
static int rc_default_modes[] = {
AVCodec *codec_audio = avcodec_find_encoder(AV_CODEC_ID_MP3);
context_audio = avcodec_alloc_context3(codec_audio);
context_audio->bit_rate = 256000;
- context_audio->sample_rate = 48000;
+ context_audio->sample_rate = OUTPUT_FREQUENCY;
context_audio->sample_fmt = AV_SAMPLE_FMT_FLTP;
context_audio->channels = 2;
context_audio->channel_layout = AV_CH_LAYOUT_STEREO;
copy_thread = std::thread([this]{
//SDL_GL_MakeCurrent(window, context);
- QOpenGLContext *context = create_context();
+ QOpenGLContext *context = create_context(this->surface);
eglBindAPI(EGL_OPENGL_API);
if (!make_current(context, this->surface)) {
printf("display=%p surface=%p context=%p curr=%p err=%d\n", eglGetCurrentDisplay(), this->surface, context, eglGetCurrentContext(),