diff options
author | wm4 <wm4@nowhere> | 2014-11-07 15:54:35 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-11-07 15:54:35 +0100 |
commit | b814b7ca84a85a6c17c4ab85ae9855afb62bc237 (patch) | |
tree | ced176126a7a58f9b8a6d034d27889f380164d11 /audio/out/ao_pulse.c | |
parent | 01141198be2beaec58928355b59ce5882027866e (diff) | |
download | mpv-b814b7ca84a85a6c17c4ab85ae9855afb62bc237.tar.bz2 mpv-b814b7ca84a85a6c17c4ab85ae9855afb62bc237.tar.xz |
audio: add --audio-client-name option
The main need I see for this is with libmpv - it would be confusing if
some application showed up as "mpv" on whateverthehell PulseAudio uses
it for (generally it does show up on various PA GUI tools).
Diffstat (limited to 'audio/out/ao_pulse.c')
-rw-r--r-- | audio/out/ao_pulse.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/audio/out/ao_pulse.c b/audio/out/ao_pulse.c index e1f339f20b..f9fe64d84d 100644 --- a/audio/out/ao_pulse.c +++ b/audio/out/ao_pulse.c @@ -35,8 +35,6 @@ #include "ao.h" #include "internal.h" -#define PULSE_CLIENT_NAME "mpv" - #define VOL_PA2MP(v) ((v) * 100 / PA_VOLUME_NORM) #define VOL_MP2PA(v) ((v) * PA_VOLUME_NORM / 100) @@ -308,7 +306,7 @@ static int pa_init_boilerplate(struct ao *ao) locked = true; if (!(priv->context = pa_context_new(pa_threaded_mainloop_get_api( - priv->mainloop), PULSE_CLIENT_NAME))) + priv->mainloop), ao->client_name))) { MP_ERR(ao, "Failed to allocate context\n"); goto fail; @@ -396,8 +394,7 @@ static int init(struct ao *ao) goto unlock_and_fail; } (void)pa_proplist_sets(proplist, PA_PROP_MEDIA_ROLE, "video"); - (void)pa_proplist_sets(proplist, PA_PROP_MEDIA_ICON_NAME, - PULSE_CLIENT_NAME); + (void)pa_proplist_sets(proplist, PA_PROP_MEDIA_ICON_NAME, ao->client_name); pa_format_info_set_rate(format, ao->samplerate); pa_format_info_set_channels(format, ao->channels.num); |