mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
sink-input, source-output: remove set_name()
pa_sink_input_set_property() does everything pa_sink_input_set_name() does.
This commit is contained in:
parent
3e7e901ba0
commit
16b4624961
5 changed files with 2 additions and 56 deletions
|
|
@ -4486,7 +4486,7 @@ static void command_set_stream_name(pa_pdispatch *pd, uint32_t command, uint32_t
|
||||||
CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_NOENTITY);
|
CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_NOENTITY);
|
||||||
CHECK_VALIDITY(c->pstream, playback_stream_isinstance(s), tag, PA_ERR_NOENTITY);
|
CHECK_VALIDITY(c->pstream, playback_stream_isinstance(s), tag, PA_ERR_NOENTITY);
|
||||||
|
|
||||||
pa_sink_input_set_name(s->sink_input, name);
|
pa_sink_input_set_property(s->sink_input, PA_PROP_MEDIA_NAME, name);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
record_stream *s;
|
record_stream *s;
|
||||||
|
|
@ -4495,7 +4495,7 @@ static void command_set_stream_name(pa_pdispatch *pd, uint32_t command, uint32_t
|
||||||
s = pa_idxset_get_by_index(c->record_streams, idx);
|
s = pa_idxset_get_by_index(c->record_streams, idx);
|
||||||
CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_NOENTITY);
|
CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_NOENTITY);
|
||||||
|
|
||||||
pa_source_output_set_name(s->source_output, name);
|
pa_source_output_set_property(s->source_output, PA_PROP_MEDIA_NAME, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
pa_pstream_send_simple_ack(c->pstream, tag);
|
pa_pstream_send_simple_ack(c->pstream, tag);
|
||||||
|
|
|
||||||
|
|
@ -1574,31 +1574,6 @@ int pa_sink_input_set_rate(pa_sink_input *i, uint32_t rate) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called from main context */
|
|
||||||
void pa_sink_input_set_name(pa_sink_input *i, const char *name) {
|
|
||||||
const char *old;
|
|
||||||
pa_sink_input_assert_ref(i);
|
|
||||||
pa_assert_ctl_context();
|
|
||||||
|
|
||||||
if (!name && !pa_proplist_contains(i->proplist, PA_PROP_MEDIA_NAME))
|
|
||||||
return;
|
|
||||||
|
|
||||||
old = pa_proplist_gets(i->proplist, PA_PROP_MEDIA_NAME);
|
|
||||||
|
|
||||||
if (old && name && pa_streq(old, name))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (name)
|
|
||||||
pa_proplist_sets(i->proplist, PA_PROP_MEDIA_NAME, name);
|
|
||||||
else
|
|
||||||
pa_proplist_unset(i->proplist, PA_PROP_MEDIA_NAME);
|
|
||||||
|
|
||||||
if (PA_SINK_INPUT_IS_LINKED(i->state)) {
|
|
||||||
pa_hook_fire(&i->core->hooks[PA_CORE_HOOK_SINK_INPUT_PROPLIST_CHANGED], i);
|
|
||||||
pa_subscription_post(i->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, i->index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Called from main context */
|
/* Called from main context */
|
||||||
pa_resample_method_t pa_sink_input_get_resample_method(pa_sink_input *i) {
|
pa_resample_method_t pa_sink_input_get_resample_method(pa_sink_input *i) {
|
||||||
pa_sink_input_assert_ref(i);
|
pa_sink_input_assert_ref(i);
|
||||||
|
|
|
||||||
|
|
@ -335,8 +335,6 @@ int pa_sink_input_new(
|
||||||
void pa_sink_input_put(pa_sink_input *i);
|
void pa_sink_input_put(pa_sink_input *i);
|
||||||
void pa_sink_input_unlink(pa_sink_input* i);
|
void pa_sink_input_unlink(pa_sink_input* i);
|
||||||
|
|
||||||
void pa_sink_input_set_name(pa_sink_input *i, const char *name);
|
|
||||||
|
|
||||||
pa_usec_t pa_sink_input_set_requested_latency(pa_sink_input *i, pa_usec_t usec);
|
pa_usec_t pa_sink_input_set_requested_latency(pa_sink_input *i, pa_usec_t usec);
|
||||||
|
|
||||||
/* Request that the specified number of bytes already written out to
|
/* Request that the specified number of bytes already written out to
|
||||||
|
|
|
||||||
|
|
@ -1226,31 +1226,6 @@ int pa_source_output_set_rate(pa_source_output *o, uint32_t rate) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called from main context */
|
|
||||||
void pa_source_output_set_name(pa_source_output *o, const char *name) {
|
|
||||||
const char *old;
|
|
||||||
pa_assert_ctl_context();
|
|
||||||
pa_source_output_assert_ref(o);
|
|
||||||
|
|
||||||
if (!name && !pa_proplist_contains(o->proplist, PA_PROP_MEDIA_NAME))
|
|
||||||
return;
|
|
||||||
|
|
||||||
old = pa_proplist_gets(o->proplist, PA_PROP_MEDIA_NAME);
|
|
||||||
|
|
||||||
if (old && name && pa_streq(old, name))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (name)
|
|
||||||
pa_proplist_sets(o->proplist, PA_PROP_MEDIA_NAME, name);
|
|
||||||
else
|
|
||||||
pa_proplist_unset(o->proplist, PA_PROP_MEDIA_NAME);
|
|
||||||
|
|
||||||
if (PA_SOURCE_OUTPUT_IS_LINKED(o->state)) {
|
|
||||||
pa_hook_fire(&o->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_PROPLIST_CHANGED], o);
|
|
||||||
pa_subscription_post(o->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_CHANGE, o->index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Called from main context */
|
/* Called from main context */
|
||||||
pa_resample_method_t pa_source_output_get_resample_method(pa_source_output *o) {
|
pa_resample_method_t pa_source_output_get_resample_method(pa_source_output *o) {
|
||||||
pa_source_output_assert_ref(o);
|
pa_source_output_assert_ref(o);
|
||||||
|
|
|
||||||
|
|
@ -291,8 +291,6 @@ int pa_source_output_new(
|
||||||
void pa_source_output_put(pa_source_output *o);
|
void pa_source_output_put(pa_source_output *o);
|
||||||
void pa_source_output_unlink(pa_source_output*o);
|
void pa_source_output_unlink(pa_source_output*o);
|
||||||
|
|
||||||
void pa_source_output_set_name(pa_source_output *o, const char *name);
|
|
||||||
|
|
||||||
pa_usec_t pa_source_output_set_requested_latency(pa_source_output *o, pa_usec_t usec);
|
pa_usec_t pa_source_output_set_requested_latency(pa_source_output *o, pa_usec_t usec);
|
||||||
|
|
||||||
void pa_source_output_cork(pa_source_output *o, bool b);
|
void pa_source_output_cork(pa_source_output *o, bool b);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue