ToolX 1.11.1 [e3f477f]
A GUI debug tool chain for diagnosing GVA systems
Loading...
Searching...
No Matches
config.h
1#ifndef CONFIG_H
2#define CONFIG_H
3
4#include <QString>
5#include <map>
6#include <QFile>
7#include <QDialog>
8#ifdef BUILD_MEDIAX
9# include "rtp/rtp.h"
10#endif
11#include "ui_toolx.h"
12
14{
15 bool enabled;
16 QString session_name;
17 QString ip_address;
18 int port;
19 int height;
20 int width;
21 int framerate;
22#ifdef BUILD_MEDIAX
23 ::mediax::rtp::ColourspaceType colourspace;
24#else
25 int colourspace;
26#endif
27 int pattern;
29 bool h264_vaapi = false;
30};
31
32class Config
33{
34public:
39 Config(QDialog *dialogue);
41 Config(const Config &) = delete;
42 Config &operator=(const Config &) = delete;
43 Config(Config &&) = delete;
44 Config &operator=(Config &&) = delete;
45 ~Config();
46
52 std::map<int, VideoStreamInfo> &getStreams();
53
59 void setIpAddress(QString port);
60
66 QString getIpAddress();
67
72 void load();
73
78 void save();
79
85 void removeSession(int row);
86
92 int getDecoder() const;
93
99 void setDecoder(int codec);
100
106 bool getTimeOverlay() const;
107
113 void setTimeOverlay(bool enabled);
114
120 bool getSessionNameOverlay() const;
121
127 void setSessionNameOverlay(bool enabled);
128
129private:
130 // Map containing VideoStreamInfo
131 std::map<int, VideoStreamInfo> m_stream_map;
133 QDialog *m_dialogue;
135 QString m_ip_address = "127.0.0.1";
137 int m_decoder = 1;
139 bool m_time_overlay = false;
142};
143
144#endif // CONFIG_H
QDialog * m_dialogue
Dialogue.
Definition config.h:133
void setDecoder(int codec)
Set the decoder codec value.
Definition config.cpp:131
void setIpAddress(QString port)
Set the Ip Address object.
Definition config.cpp:116
std::map< int, VideoStreamInfo > & getStreams()
Get the Streams object.
Definition config.cpp:19
int getDecoder() const
Get the stored decoder codec value.
Definition config.cpp:126
Config(const Config &)=delete
Rule of zero.
void setTimeOverlay(bool enabled)
Set the time overlay enabled state.
Definition config.cpp:143
void removeSession(int row)
Remove a stream.
Definition config.cpp:121
bool m_time_overlay
Time overlay enabled.
Definition config.h:139
Config(QDialog *dialogue)
Construct a new Config object and load settings.
Definition config.cpp:12
void setSessionNameOverlay(bool enabled)
Set the session name overlay enabled state.
Definition config.cpp:153
bool getSessionNameOverlay() const
Get the session name overlay enabled state.
Definition config.cpp:148
bool m_session_name_overlay
Session name overlay enabled.
Definition config.h:141
QString getIpAddress()
Get the Ip Address object.
Definition config.cpp:111
QString m_ip_address
IP Address.
Definition config.h:135
void load()
Load persistant settings.
Definition config.cpp:25
int m_decoder
Decoder codec (1=openh264, 2=vaapih264, 3=nvenc264).
Definition config.h:137
void save()
Save persistant settings.
Definition config.cpp:70
bool getTimeOverlay() const
Get the time overlay enabled state.
Definition config.cpp:138
Definition config.h:14
bool h264_vaapi
For H.264 streams, true to encode with VAAPI instead of OpenH264.
Definition config.h:29