diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pulsecore/source-output.c | 49 | ||||
-rw-r--r-- | src/pulsecore/source-output.h | 6 | ||||
-rw-r--r-- | src/pulsecore/source.c | 33 |
3 files changed, 2 insertions, 86 deletions
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c index 82c6f542..0ce77780 100644 --- a/src/pulsecore/source-output.c +++ b/src/pulsecore/source-output.c @@ -423,16 +423,6 @@ int pa_source_output_new( o->muted = data->muted; - if (data->sync_base) { - o->sync_next = data->sync_base->sync_next; - o->sync_prev = data->sync_base; - - if (data->sync_base->sync_next) - data->sync_base->sync_next->sync_prev = o; - data->sync_base->sync_next = o; - } else - o->sync_next = o->sync_prev = NULL; - o->direct_on_input = data->direct_on_input; reset_callbacks(o); @@ -498,7 +488,7 @@ static void update_n_corked(pa_source_output *o, pa_source_output_state_t state) /* Called from main context */ static void source_output_set_state(pa_source_output *o, pa_source_output_state_t state) { - pa_source_output *ssync; + pa_assert(o); pa_assert_ctl_context(); @@ -510,24 +500,9 @@ static void source_output_set_state(pa_source_output *o, pa_source_output_state_ update_n_corked(o, state); o->state = state; - for (ssync = o->sync_prev; ssync; ssync = ssync->sync_prev) { - update_n_corked(ssync, state); - ssync->state = state; - } - for (ssync = o->sync_next; ssync; ssync = ssync->sync_next) { - update_n_corked(ssync, state); - ssync->state = state; - } - if (state != PA_SOURCE_OUTPUT_UNLINKED) { pa_hook_fire(&o->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_STATE_CHANGED], o); - for (ssync = o->sync_prev; ssync; ssync = ssync->sync_prev) - pa_hook_fire(&o->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_STATE_CHANGED], ssync); - - for (ssync = o->sync_next; ssync; ssync = ssync->sync_next) - pa_hook_fire(&o->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_STATE_CHANGED], ssync); - if (PA_SOURCE_OUTPUT_IS_LINKED(state)) pa_subscription_post(o->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_CHANGE, o->index); } @@ -551,13 +526,6 @@ void pa_source_output_unlink(pa_source_output*o) { if (linked) pa_hook_fire(&o->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_UNLINK], o); - if (o->sync_prev) - o->sync_prev->sync_next = o->sync_next; - if (o->sync_next) - o->sync_next->sync_prev = o->sync_prev; - - o->sync_prev = o->sync_next = NULL; - if (o->direct_on_input) pa_idxset_remove_by_data(o->direct_on_input->direct_outputs, o, NULL); @@ -1160,11 +1128,6 @@ pa_bool_t pa_source_output_may_move(pa_source_output *o) { if (o->direct_on_input) return FALSE; - if (o->sync_next || o->sync_prev) { - pa_log_warn("Moving synchronized streams not supported."); - return FALSE; - } - return TRUE; } @@ -1567,19 +1530,11 @@ int pa_source_output_process_msg(pa_msgobject *mo, int code, void *userdata, int pa_resampler_set_output_rate(o->thread_info.resampler, PA_PTR_TO_UINT(userdata)); return 0; - case PA_SOURCE_OUTPUT_MESSAGE_SET_STATE: { - pa_source_output *ssync; + case PA_SOURCE_OUTPUT_MESSAGE_SET_STATE: pa_source_output_set_state_within_thread(o, PA_PTR_TO_UINT(userdata)); - for (ssync = o->thread_info.sync_prev; ssync; ssync = ssync->thread_info.sync_prev) - pa_source_output_set_state_within_thread(ssync, PA_PTR_TO_UINT(userdata)); - - for (ssync = o->thread_info.sync_next; ssync; ssync = ssync->thread_info.sync_next) - pa_source_output_set_state_within_thread(ssync, PA_PTR_TO_UINT(userdata)); - return 0; - } case PA_SOURCE_OUTPUT_MESSAGE_SET_REQUESTED_LATENCY: { pa_usec_t *usec = userdata; diff --git a/src/pulsecore/source-output.h b/src/pulsecore/source-output.h index cd4b0d0f..b9a2b6b2 100644 --- a/src/pulsecore/source-output.h +++ b/src/pulsecore/source-output.h @@ -87,8 +87,6 @@ struct pa_source_output { pa_channel_map channel_map; pa_format_info *format; - pa_source_output *sync_prev, *sync_next; - /* Also see http://pulseaudio.org/wiki/InternalVolumes */ pa_cvolume volume; /* The volume clients are informed about */ pa_cvolume reference_ratio; /* The ratio of the stream's volume to the source's reference volume */ @@ -208,8 +206,6 @@ struct pa_source_output { * don't implement rewind() */ pa_memblockq *delay_memblockq; - pa_source_output *sync_prev, *sync_next; - /* The requested latency for the source */ pa_usec_t requested_source_latency; @@ -254,8 +250,6 @@ typedef struct pa_source_output_new_data { pa_resample_method_t resample_method; - pa_source_output *sync_base; - pa_sample_spec sample_spec; pa_channel_map channel_map; pa_format_info *format; diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c index 9c15d3f3..78a52036 100644 --- a/src/pulsecore/source.c +++ b/src/pulsecore/source.c @@ -1665,22 +1665,6 @@ int pa_source_process_msg(pa_msgobject *object, int code, void *userdata, int64_ pa_hashmap_put(s->thread_info.outputs, PA_UINT32_TO_PTR(o->index), pa_source_output_ref(o)); - /* Since the caller sleeps in pa_source_output_put(), we can - * safely access data outside of thread_info even though - * it is mutable */ - - if ((o->thread_info.sync_prev = o->sync_prev)) { - pa_assert(o->source == o->thread_info.sync_prev->source); - pa_assert(o->sync_prev->sync_next == o); - o->thread_info.sync_prev->thread_info.sync_next = o; - } - - if ((o->thread_info.sync_next = o->sync_next)) { - pa_assert(o->source == o->thread_info.sync_next->source); - pa_assert(o->sync_next->sync_prev == o); - o->thread_info.sync_next->thread_info.sync_prev = o; - } - if (o->direct_on_input) { o->thread_info.direct_on_input = o->direct_on_input; pa_hashmap_put(o->thread_info.direct_on_input->thread_info.direct_outputs, PA_UINT32_TO_PTR(o->index), o); @@ -1720,23 +1704,6 @@ int pa_source_process_msg(pa_msgobject *object, int code, void *userdata, int64_ pa_assert(o->thread_info.attached); o->thread_info.attached = FALSE; - /* Since the caller sleeps in pa_sink_input_unlink(), - * we can safely access data outside of thread_info even - * though it is mutable */ - - pa_assert(!o->sync_prev); - pa_assert(!o->sync_next); - - if (o->thread_info.sync_prev) { - o->thread_info.sync_prev->thread_info.sync_next = o->thread_info.sync_prev->sync_next; - o->thread_info.sync_prev = NULL; - } - - if (o->thread_info.sync_next) { - o->thread_info.sync_next->thread_info.sync_prev = o->thread_info.sync_next->sync_prev; - o->thread_info.sync_next = NULL; - } - if (o->thread_info.direct_on_input) { pa_hashmap_remove(o->thread_info.direct_on_input->thread_info.direct_outputs, PA_UINT32_TO_PTR(o->index)); o->thread_info.direct_on_input = NULL; |