-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.cpp
44 lines (35 loc) · 841 Bytes
/
mainwindow.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <QtWidgets>
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "images_panel.h"
#include "mylog.h"
Q_DECLARE_METATYPE(AVFrame)
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
img_panel_ = new ImagesPanel(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::InitImgPanel()
{
img_panel_->InitGLWidgets();
img_panel_->PutLayout();
img_panel_->setWindowTitle("image_panel");
img_panel_->resize(1600, 900);
setCentralWidget(img_panel_);
}
void MainWindow::slots_on_avframe(AVFrame* frame)
{
static int frame_id = 0;
LOG << "frame_id:" << frame_id
<< " key:" << frame->key_frame
<< " " << frame->width << '*' << frame->height
<< " dts:" << frame->pkt_dts << " :"
<< frame->pts;
++frame_id;
}