mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-20 16:40:12 +00:00
GUI: available_setting: Remove unused functionality
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
#include <QProcess>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QRegularExpression>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonArray>
|
||||
@@ -22,16 +19,6 @@ static bool vectorContains(const std::vector<std::string> &v, const std::string
|
||||
return false;
|
||||
}
|
||||
|
||||
static QString getProcessOutput(const std::string& executable, const QStringList& args){
|
||||
QProcess process;
|
||||
process.start(executable.c_str(), args);
|
||||
process.waitForFinished();
|
||||
|
||||
QString output = QString(process.readAllStandardOutput());
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
struct {
|
||||
SettingType type;
|
||||
std::string_view capStr;
|
||||
@@ -135,19 +122,6 @@ void AvailableSettings::queryLine(std::string_view line){
|
||||
(this->*parseFunc)(line);
|
||||
}
|
||||
|
||||
void AvailableSettings::queryFromString(const QString &string){
|
||||
QStringList lines = string.split(QRegularExpression("\n|\r\n|\r"));
|
||||
|
||||
queryBegin();
|
||||
|
||||
for(int i = 0; i < lines.size(); i++){
|
||||
auto stdStr = lines[i].toStdString();
|
||||
queryLine(stdStr);
|
||||
}
|
||||
|
||||
queryEnd();
|
||||
}
|
||||
|
||||
static void maybeWriteString (const QJsonObject& obj,
|
||||
const char *key,
|
||||
std::string& result)
|
||||
@@ -157,11 +131,6 @@ static void maybeWriteString (const QJsonObject& obj,
|
||||
}
|
||||
}
|
||||
|
||||
void AvailableSettings::queryAll(const std::string &executable){
|
||||
QString output = getProcessOutput(executable, QStringList() << "--capabilities");
|
||||
queryFromString(output);
|
||||
}
|
||||
|
||||
void AvailableSettings::queryVideoCompress(std::string_view line){
|
||||
QJsonDocument doc = QJsonDocument::fromJson(QByteArray::fromRawData(line.data(), line.size()));
|
||||
if(!doc.isObject())
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <QStringList>
|
||||
|
||||
enum SettingType{
|
||||
VIDEO_SRC = 0,
|
||||
@@ -72,9 +71,6 @@ struct CompressModule{
|
||||
|
||||
class AvailableSettings{
|
||||
public:
|
||||
void queryAll(const std::string &executable);
|
||||
void queryFromString(const QString &string);
|
||||
|
||||
void queryBegin();
|
||||
void queryLine(std::string_view line);
|
||||
void queryEnd();
|
||||
@@ -99,7 +95,6 @@ private:
|
||||
void queryVideoCompress(std::string_view line);
|
||||
|
||||
void parseStateVersion(std::string_view line);
|
||||
//void parseStateParse(std::string_view line);
|
||||
|
||||
void (AvailableSettings::*parseFunc)(std::string_view str) = nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user