I am currently trying to build a very simple Audio-Tool, which needs to change its name in pavucontrol and qjackctl on runtime. When an Application produces Audio, its name is shown in pavucontrol. E.g. if I use firefox it is shown as "Firefox". I tried the most commonly suggested solutions: Editing argv and using prctl both did not succeed.
I also searched the pipewire documentation but I didn't find anything useful (but maybe I am just blind).
Is it even possible? From where does pipewire get the name of the Application?
Here is a little test-script in C with SDL2:
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <SDL2/SDL.h>
Uint8* audio_buffer = NULL;
Uint32 audio_length = 0;
void audio_callback(void* userdata, Uint8* stream, int n) {
    memset(stream, 0, n);
}
int main(int argc, char** argv) {
    SDL_Event evt;
    SDL_AudioSpec desired;
    SDL_Init(SDL_INIT_AUDIO|SDL_INIT_EVENTS);
    SDL_LoadWAV("suil.wav", &desired, &audio_buffer, &audio_length);
    desired.callback = audio_callback;
    SDL_OpenAudio(&desired, NULL);
    SDL_PauseAudio(0);
    while (1) {
        while (SDL_PollEvent(&evt)) {
            switch (evt.type) {
                case SDL_QUIT:
                    exit(EXIT_SUCCESS);
            }
        }
    }
}
And a picture of what I would like to have changed on runtime:
(Note: The "test" would be the name in question.)
Disclaimer: I'm not sure if this would maybe sdl-2 specific, so I added the SDL tag.
