#define _INPUT_MAPPING_H 1
#include <stdint.h>
+#include <map>
#include <string>
#include <vector>
-enum class InputSourceType { SILENCE, CAPTURE_CARD, ALSA_INPUT };
+enum class InputSourceType { SILENCE, CAPTURE_CARD, ALSA_INPUT, FFMPEG_VIDEO_INPUT };
struct DeviceSpec {
InputSourceType type;
unsigned index;
std::vector<Bus> buses;
};
+// This is perhaps not the most user-friendly output, but it's at least better
+// than the raw index.
+std::string spec_to_string(DeviceSpec device_spec);
+
+bool save_input_mapping_to_file(const std::map<DeviceSpec, DeviceInfo> &devices,
+ const InputMapping &mapping,
+ const std::string &filename);
+bool load_input_mapping_from_file(const std::map<DeviceSpec, DeviceInfo> &devices,
+ const std::string &filename,
+ InputMapping *mapping);
+
#endif // !defined(_INPUT_MAPPING_H)