mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
sink-input, source-output: Add pa_sink_input/source_output_get_description()
This commit is contained in:
parent
94345677dc
commit
c5e1d505cb
4 changed files with 35 additions and 1 deletions
|
|
@ -32,6 +32,7 @@
|
|||
#include <pulse/util.h>
|
||||
#include <pulse/internal.h>
|
||||
|
||||
#include <pulsecore/i18n.h>
|
||||
#include <pulsecore/mix.h>
|
||||
#include <pulsecore/core-subscribe.h>
|
||||
#include <pulsecore/log.h>
|
||||
|
|
@ -825,6 +826,20 @@ void pa_sink_input_put(pa_sink_input *i) {
|
|||
pa_sink_update_status(i->sink);
|
||||
}
|
||||
|
||||
/* Called from the main thread. */
|
||||
const char *pa_sink_input_get_description(pa_sink_input *i) {
|
||||
const char *description;
|
||||
|
||||
pa_assert(i);
|
||||
|
||||
description = pa_proplist_gets(i->proplist, PA_PROP_MEDIA_NAME);
|
||||
|
||||
if (!description)
|
||||
description = _("(unnamed stream)");
|
||||
|
||||
return description;
|
||||
}
|
||||
|
||||
/* Called from main context */
|
||||
void pa_sink_input_kill(pa_sink_input*i) {
|
||||
pa_sink_input_assert_ref(i);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue