summaryrefslogtreecommitdiff
path: root/src/pulsecore/sink-input.h
diff options
context:
space:
mode:
authorTanu Kaskinen <tanuk@iki.fi>2018-06-26 16:25:56 +0300
committerTanu Kaskinen <tanuk@iki.fi>2018-07-02 18:16:10 +0300
commit64ba239f65b162b278e145376e26b94ad290dac5 (patch)
tree4edb1060fcd78d418100956812ca4a6367aa594e /src/pulsecore/sink-input.h
parente40adfa9cc4cf9ec65fef86f369e0efcd78b6c99 (diff)
downloadpulseaudio-64ba239f65b162b278e145376e26b94ad290dac5.tar.gz
sink-input: remove the DRAINED state
The only thing that the drained state was being used for was "pacmd list-sink-inputs". In all other cases the drained and running states were treated as equivalent. IMHO, this usage doesn't justify the complexity that the additional state brings. This patch was inspired by a bug report[1] that pointed out an error in an if condition in pa_sink_input_set_state_within_thread(). The buggy code is now removed altogether. [1] https://bugs.freedesktop.org/show_bug.cgi?id=106982
Diffstat (limited to 'src/pulsecore/sink-input.h')
-rw-r--r--src/pulsecore/sink-input.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h
index b16f60fe5..aa8c546a7 100644
--- a/src/pulsecore/sink-input.h
+++ b/src/pulsecore/sink-input.h
@@ -35,7 +35,6 @@
typedef enum pa_sink_input_state {
PA_SINK_INPUT_INIT, /*< The stream is not active yet, because pa_sink_input_put() has not been called yet */
- PA_SINK_INPUT_DRAINED, /*< The stream stopped playing because there was no data to play */
PA_SINK_INPUT_RUNNING, /*< The stream is alive and kicking */
PA_SINK_INPUT_CORKED, /*< The stream was corked on user request */
PA_SINK_INPUT_UNLINKED /*< The stream is dead */
@@ -43,7 +42,7 @@ typedef enum pa_sink_input_state {
} pa_sink_input_state_t;
static inline bool PA_SINK_INPUT_IS_LINKED(pa_sink_input_state_t x) {
- return x == PA_SINK_INPUT_DRAINED || x == PA_SINK_INPUT_RUNNING || x == PA_SINK_INPUT_CORKED;
+ return x == PA_SINK_INPUT_RUNNING || x == PA_SINK_INPUT_CORKED;
}
typedef enum pa_sink_input_flags {
@@ -67,9 +66,6 @@ struct pa_sink_input {
uint32_t index;
pa_core *core;
- /* Please note that this state should only be read with
- * pa_sink_input_get_state(). That function will transparently
- * merge the thread_info.drained value in. */
pa_sink_input_state_t state;
pa_sink_input_flags_t flags;
@@ -231,7 +227,6 @@ struct pa_sink_input {
struct {
pa_sink_input_state_t state;
- pa_atomic_t drained;
pa_cvolume soft_volume;
bool muted:1;