]> git.sesse.net Git - nageru/blobdiff - input_mapping_dialog.h
Support audio-only FFmpeg inputs. Somewhat wonky, though.
[nageru] / input_mapping_dialog.h
index 93a84b02d5c8d55c8465bec792de068f8f5a3dce..640644e3898ce9cca25fc950bf9e350477c1b17b 100644 (file)
@@ -2,11 +2,14 @@
 #define _INPUT_MAPPING_DIALOG_H
 
 #include <QDialog>
-#include <string>
+#include <QString>
+#include <map>
 #include <vector>
-#include <sys/time.h>
 
-#include "mixer.h"
+#include "audio_mixer.h"
+#include "input_mapping.h"
+
+class QObject;
 
 namespace Ui {
 class InputMappingDialog;
@@ -20,6 +23,7 @@ class InputMappingDialog : public QDialog
 
 public:
        InputMappingDialog();
+       ~InputMappingDialog();
 
 private:
        void fill_ui_from_mapping(const InputMapping &mapping);
@@ -33,6 +37,8 @@ private:
        void add_clicked();
        void remove_clicked();
        void updown_clicked(int direction);
+       void save_clicked();
+       void load_clicked();
        void update_button_state();
 
        Ui::InputMappingDialog *ui;
@@ -43,7 +49,13 @@ private:
        // held forever).
        InputMapping old_mapping;
 
-       const std::map<DeviceSpec, std::string> card_names;
+       // One for each bus in the mapping. Edited along with the mapping,
+       // so that old volumes etc. are being kept in place for buses that
+       // existed before.
+       std::vector<AudioMixer::BusSettings> bus_settings;
+
+       std::map<DeviceSpec, DeviceInfo> devices;  // Needs no lock, accessed only on the UI thread.
+       AudioMixer::state_changed_callback_t saved_callback;
 };
 
 #endif  // !defined(_INPUT_MAPPING_DIALOG_H)