mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-03-31 09:07:13 +09:00
--info: output if app audio is supported (if compiled with it and pipewire server)
This commit is contained in:
@@ -42,10 +42,6 @@ struct AudioDevices {
|
||||
std::vector<AudioInput> audio_inputs;
|
||||
};
|
||||
|
||||
struct ApplicationAudio {
|
||||
std::string name;
|
||||
};
|
||||
|
||||
struct MergedAudioInputs {
|
||||
std::vector<AudioInput> audio_inputs;
|
||||
AudioInputType type = AudioInputType::DEVICE;
|
||||
@@ -78,6 +74,5 @@ void sound_device_close(SoundDevice *device);
|
||||
int sound_device_read_next_chunk(SoundDevice *device, void **buffer, double timeout_sec, double *latency_seconds);
|
||||
|
||||
AudioDevices get_pulseaudio_inputs();
|
||||
std::vector<ApplicationAudio> get_pulseaudio_applications();
|
||||
|
||||
#endif /* GPU_SCREEN_RECORDER_H */
|
||||
|
||||
11
src/main.cpp
11
src/main.cpp
@@ -1124,7 +1124,7 @@ static void usage_full() {
|
||||
fprintf(stderr, " It's possible to use an application name that is not listed in --list-application-audio, for example when trying to record audio from an application that hasn't started yet.\n");
|
||||
fprintf(stderr, "\n");
|
||||
fprintf(stderr, " -aai Record audio from all applications except the ones specified with this option (case-insensitive). Can be specified multiple times.\n");
|
||||
fprintf(stderr, " Each time this is specified a new audio track is added that records all applications except the ones specified.\n");
|
||||
fprintf(stderr, " Each time this is specified a new audio track is added that records audio from all applications except the ones specified.\n");
|
||||
fprintf(stderr, " Multiple application audio can be merged into one audio track by using \"|\" as a separator into one -a argument, for example: -a \"firefox|csgo\".\n");
|
||||
fprintf(stderr, " If the application name is an empty string then the argument is ignored.\n");
|
||||
fprintf(stderr, " Optional, no application audio is added by default.\n");
|
||||
@@ -1899,6 +1899,15 @@ static void disable_prime_run() {
|
||||
|
||||
static void list_system_info(bool wayland) {
|
||||
printf("display_server|%s\n", wayland ? "wayland" : "x11");
|
||||
bool supports_app_audio = false;
|
||||
#ifdef GSR_APP_AUDIO
|
||||
gsr_pipewire_audio audio;
|
||||
if(gsr_pipewire_audio_init(&audio)) {
|
||||
supports_app_audio = true;
|
||||
gsr_pipewire_audio_deinit(&audio);
|
||||
}
|
||||
#endif
|
||||
printf("supports_app_audio|%s\n", supports_app_audio ? "yes" : "no");
|
||||
}
|
||||
|
||||
static void list_gpu_info(gsr_egl *egl) {
|
||||
|
||||
Reference in New Issue
Block a user