X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=input_mapping.h;h=67af0f489ee3aaf465b8c6c32aa554796c788cf1;hb=4a300e3cab7b1b1ef5a32e1f4a7ec319c48e95e5;hp=a1e90eb483e245b049dc6b2cb3c13c643b56273a;hpb=a564f192f808841ad8dfa9a4aa6c8db3335bd6fd;p=nageru diff --git a/input_mapping.h b/input_mapping.h index a1e90eb..67af0f4 100644 --- a/input_mapping.h +++ b/input_mapping.h @@ -2,10 +2,11 @@ #define _INPUT_MAPPING_H 1 #include +#include #include #include -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; @@ -46,4 +47,15 @@ struct InputMapping { std::vector 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 &devices, + const InputMapping &mapping, + const std::string &filename); +bool load_input_mapping_from_file(const std::map &devices, + const std::string &filename, + InputMapping *mapping); + #endif // !defined(_INPUT_MAPPING_H)