Log into SessionLog

This commit is contained in:
Florian Märkl 2019-08-06 14:30:58 +02:00
commit 5403cbb389
No known key found for this signature in database
GPG key ID: 125BC8A5A6A1E857
6 changed files with 25 additions and 22 deletions

View file

@ -21,6 +21,8 @@
#include <QOpenGLWidget>
#include <QMutex>
#include <chiaki/log.h>
extern "C"
{
#include <libavcodec/avcodec.h>
@ -35,7 +37,7 @@ struct AVOpenGLFrame
unsigned int width;
unsigned int height;
bool Update(AVFrame *frame);
bool Update(AVFrame *frame, ChiakiLog *log);
};
class AVOpenGLWidget: public QOpenGLWidget
@ -65,7 +67,6 @@ class AVOpenGLWidget: public QOpenGLWidget
protected:
void initializeGL() override;
void resizeGL(int w, int h) override;
void paintGL() override;
};

View file

@ -20,6 +20,8 @@
#include "exception.h"
#include <chiaki/log.h>
#include <QMutex>
#include <QObject>
@ -41,16 +43,19 @@ class VideoDecoder: public QObject
Q_OBJECT
public:
VideoDecoder();
VideoDecoder(ChiakiLog *log);
~VideoDecoder();
void PushFrame(uint8_t *buf, size_t buf_size);
AVFrame *PullFrame();
ChiakiLog *GetChiakiLog() { return log; }
signals:
void FramesAvailable();
private:
ChiakiLog *log;
QMutex mutex;
AVCodec *codec;