Give error when using an invalid audio input with pipewire

This commit is contained in:
dec05eba
2022-09-30 22:02:23 +02:00
parent 09ad7a1eb5
commit f7606a144b
4 changed files with 105 additions and 2 deletions

View File

@@ -18,11 +18,19 @@
#ifndef GPU_SCREEN_RECORDER_H
#define GPU_SCREEN_RECORDER_H
#include <vector>
#include <string>
typedef struct {
void *handle;
unsigned int frames;
} SoundDevice;
struct AudioInput {
std::string name;
std::string description;
};
/*
Get a sound device by name, returning the device into the @device parameter.
The device should be closed with @sound_device_close after it has been used
@@ -39,4 +47,6 @@ void sound_device_close(SoundDevice *device);
*/
int sound_device_read_next_chunk(SoundDevice *device, void **buffer);
std::vector<AudioInput> get_pulseaudio_inputs();
#endif /* GPU_SCREEN_RECORDER_H */