-
- for (IDeckLinkDisplayMode *mode_ptr; mode_it->Next(&mode_ptr) == S_OK; mode_ptr->Release()) {
- VideoMode mode;
- mode.id = mode_ptr->GetDisplayMode();
-
- const char *mode_name;
- if (mode_ptr->GetName(&mode_name) != S_OK) {
- mode.name = "Unknown mode";
- } else {
- mode.name = mode_name;
+ const vector<pair<BMDAudioConnection, string>> audio_input_types = {
+ { bmdAudioConnectionEmbedded, "Embedded" },
+ { bmdAudioConnectionAESEBU, "AES/EBU" },
+ { bmdAudioConnectionAnalog, "Analog" },
+ { bmdAudioConnectionAnalogXLR, "Analog XLR" },
+ { bmdAudioConnectionAnalogRCA, "Analog RCA" },
+ { bmdAudioConnectionMicrophone, "Microphone" },
+ { bmdAudioConnectionHeadphones, "Headphones" }
+ };
+ for (const auto &audio_input : audio_input_types) {
+ if (audio_input_mask & audio_input.first) {
+ audio_inputs.emplace(audio_input.first, audio_input.second);