mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 23:40:26 +00:00
GUI: Fix specific display device selection
This commit is contained in:
committed by
Martin Pulec
parent
4bc5614fa6
commit
be415f5cb4
@@ -28,16 +28,6 @@ struct DeviceMode{
|
||||
std::vector<SettingVal> opts;
|
||||
};
|
||||
|
||||
struct Device{
|
||||
std::string name;
|
||||
std::string type;
|
||||
std::string deviceOpt;
|
||||
|
||||
std::map<std::string, std::string> extra;
|
||||
|
||||
std::vector<DeviceMode> modes;
|
||||
};
|
||||
|
||||
struct CapabOpt{
|
||||
std::string displayName; //Name displayed to user
|
||||
std::string displayDesc; //Description displayed to user
|
||||
@@ -52,6 +42,16 @@ struct CapabOpt{
|
||||
bool booleanOpt; //If true, GUI shows a checkbox instead of text edit
|
||||
};
|
||||
|
||||
struct Device{
|
||||
std::string name;
|
||||
std::string type; //UltraGrid module name (e.g. v4l2)
|
||||
std::string deviceOpt; //Specific device (e.g. ":device=/dev/video0")
|
||||
|
||||
std::map<std::string, std::string> extra;
|
||||
|
||||
std::vector<DeviceMode> modes;
|
||||
};
|
||||
|
||||
struct Encoder{
|
||||
std::string name;
|
||||
std::string optStr;
|
||||
|
||||
@@ -92,6 +92,7 @@ std::vector<SettingItem> getVideoDisplay(AvailableSettings *availSettings){
|
||||
SettingItem item;
|
||||
item.name = i.name;
|
||||
item.opts.push_back({optStr, i.type});
|
||||
item.opts.push_back({optStr + "." + i.type + ".device", i.deviceOpt});
|
||||
auto embedAudioIt = i.extra.find("embeddedAudioAvailable");
|
||||
bool enableAudio = embedAudioIt != i.extra.end()
|
||||
&& embedAudioIt->second == "t";
|
||||
|
||||
Reference in New Issue
Block a user