mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-03-31 09:07:13 +09:00
Fix virtual sink not destroyed if gsr is forcefully killed (use pipewire to create the virtual sink instead of pulseaudio)
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#define GSR_PIPEWIRE_AUDIO_MAX_STREAM_NODES 128
|
||||
#define GSR_PIPEWIRE_AUDIO_MAX_PORTS 256
|
||||
#define GSR_PIPEWIRE_AUDIO_MAX_REQUESTED_LINKS 32
|
||||
#define GSR_PIPEWIRE_AUDIO_MAX_VIRTUAL_SINKS 32
|
||||
|
||||
typedef enum {
|
||||
GSR_PIPEWIRE_AUDIO_NODE_TYPE_STREAM_OUTPUT, /* Application audio */
|
||||
@@ -67,11 +68,16 @@ typedef struct {
|
||||
|
||||
gsr_pipewire_audio_requested_link requested_links[GSR_PIPEWIRE_AUDIO_MAX_REQUESTED_LINKS];
|
||||
int num_requested_links;
|
||||
|
||||
struct pw_proxy *virtual_sink_proxies[GSR_PIPEWIRE_AUDIO_MAX_VIRTUAL_SINKS];
|
||||
int num_virtual_sink_proxies;
|
||||
} gsr_pipewire_audio;
|
||||
|
||||
bool gsr_pipewire_audio_init(gsr_pipewire_audio *self);
|
||||
void gsr_pipewire_audio_deinit(gsr_pipewire_audio *self);
|
||||
|
||||
bool gsr_pipewire_audio_create_virtual_sink(gsr_pipewire_audio *self, const char *name);
|
||||
|
||||
/*
|
||||
This function links audio source outputs from applications that match the name |app_names| to the input
|
||||
that matches the name |stream_name_input|.
|
||||
|
||||
@@ -64,11 +64,6 @@ typedef enum {
|
||||
Returns 0 on success, or a negative value on failure.
|
||||
*/
|
||||
int sound_device_get_by_name(SoundDevice *device, const char *device_name, const char *description, unsigned int num_channels, unsigned int period_frame_size, AudioFormat audio_format);
|
||||
/*
|
||||
Creates a module-combine-sink and connects to it for recording, returning the device into the |device| parameter.
|
||||
Returns 0 on success, or a negative value on failure.
|
||||
*/
|
||||
int sound_device_create_combined_sink_connect(SoundDevice *device, const char *combined_sink_name, unsigned int num_channels, unsigned int period_frame_size, AudioFormat audio_format);
|
||||
|
||||
void sound_device_close(SoundDevice *device);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user