66 std::string
getId()
const {
return id_; };
77 void readFromDevice();
80 bool initDevice(
const std::string& device);
81 bool initFile(
const std::string& path);
82 bool initCapture(
const std::string& device);
84 void frameResized(std::shared_ptr<AudioFrame>&&
ptr);
87 std::string sourceRingBufferId_;
88 std::shared_ptr<RingBuffer> ringBuf_;
89 bool muteState_ {
false};
91 mutable std::mutex fmtMutex_ {};
94 std::atomic_bool paused_ {
true};
96 std::unique_ptr<Resampler> resampler_;
97 std::unique_ptr<AudioFrameResizer> resizer_;
98 std::unique_ptr<MediaDecoder> decoder_;
100 std::string resource_;
101 std::mutex resourceMutex_ {};
102 DeviceParams devOpts_;
103 std::promise<DeviceParams> foundDevOpts_;
104 std::shared_future<DeviceParams> futureDevOpts_;
105 std::atomic_bool devOptsFound_ {
false};
106 void foundDevOpts(
const DeviceParams&
params);
108 std::atomic_bool playingDevice_ {
false};
109 std::atomic_bool decodingFile_ {
false};
110 std::atomic_bool playingFile_ {
false};
111 std::unique_ptr<AudioDeviceGuard> deviceGuard_;
116 std::chrono::time_point<std::chrono::steady_clock> wakeUp_;
119 std::function<
void(
const MediaStream& ms)> recorderCallback_;
120 std::atomic_bool settingMS_ {
true};