mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-14 10:46:51 -07:00
Log into SessionLog
This commit is contained in:
parent
c4921ad682
commit
5403cbb389
6 changed files with 25 additions and 22 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue