| 6 |
| 7 | #ifndef LIBTGVOIP_AUDIOINPUT_H |
| 8 | #define LIBTGVOIP_AUDIOINPUT_H |
| 9 |
| 10 | #include "../MediaStreamItf.h" |
| 11 |
| 12 | #include <cstdint> |
| 13 | #include <string> |
| 14 | #include <vector> |
| 15 |
| 16 | namespace tgvoip |
| 17 | { |
| 18 |
| 19 | class AudioInputDevice; |
| 20 | class AudioOutputDevice; |
| 21 |
| 22 | namespace audio |
| 23 | { |
| 24 |
| 25 | class AudioInput : public MediaStreamItf |
| 26 | { |
| 27 | public: |
| 28 | AudioInput(); |
| 29 | AudioInput(std::string deviceID); |
| 30 | virtual ~AudioInput(); |
| 31 |
| 32 | bool IsInitialized() const; |
| 33 | virtual std::string GetCurrentDevice() const; |
| 34 | virtual void SetCurrentDevice(std::string deviceID); |
| 35 | static void EnumerateDevices(std::vector<AudioInputDevice>& devs); |
| 36 | static std::int32_t GetEstimatedDelay(); |
| 37 |
| 38 | protected: |
| 39 | std::string m_currentDevice; |
| 40 | bool m_failed = false; |
| 41 | static std::int32_t m_estimatedDelay; |
| 42 | }; |
| 43 |
| 44 | } // namespace audio |
| 45 |
| 46 | } // namespace tgvoip |
| 47 |
| 48 | #endif // LIBTGVOIP_AUDIOINPUT_H |
| 49 |