UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
previewWidget.hpp
Go to the documentation of this file.
1#ifndef PREVIEWWIDGET_HPP
2#define PREVIEWWIDGET_HPP
3
4#include <QOpenGLWidget>
5#include <QOpenGLFunctions>
6#include <QSharedMemory>
7#include <QOpenGLVertexArrayObject>
8#include <QTimer>
9#include <string_view>
10
11#include "ipc_frame.h"
12#include "ipc_frame_unix.h"
13
14class PreviewWidget : public QOpenGLWidget{
15public:
16 PreviewWidget(QWidget *parent);
18
19 void setKey(std::string_view key);
20 void start();
21 void stop();
22
23protected:
24 void initializeGL();
25 void resizeGL(int w, int h);
26 void paintGL();
27
28private:
29 bool loadFrame();
30 void render();
31
32 GLuint vertexBuffer = 0;
33 GLuint program = 0;
34 GLuint frame_texture = 0;
35 GLuint testbars_texture = 0;
36
37 GLuint selected_texture = 0;
38
39 QOpenGLVertexArrayObject vao;
40
41 GLfloat scaleVec[2];
42 int vidW = 0;
43 int vidH = 0;
44 int width = 0;
45 int height = 0;
46
47 void setVidSize(int w, int h);
48 void calculateScale();
49
52 QTimer timer;
53};
54
55#endif
QOpenGLVertexArrayObject vao
PreviewWidget(QWidget *parent)
GLfloat scaleVec[2]
Ipc_frame_uniq ipc_frame
void setVidSize(int w, int h)
void resizeGL(int w, int h)
void setKey(std::string_view key)
GLuint testbars_texture
Ipc_frame_reader_uniq ipc_frame_reader
GLuint selected_texture
std::unique_ptr< Ipc_frame, Ipc_frame_deleter > Ipc_frame_uniq
Definition ipc_frame.h:40
std::unique_ptr< Ipc_frame_reader, Ipc_frame_reader_deleter > Ipc_frame_reader_uniq
const char * parent
Definition settings.cpp:198
const char * key
Definition cineform.cpp:125