diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c index 21e58603c1956299d8037f0a1ee6029044e7be2f..7721d7f682d062c8e0737af1437f5c38c17713fe 100644 --- a/src/pulsecore/protocol-native.c +++ b/src/pulsecore/protocol-native.c @@ -624,6 +624,13 @@ static record_stream* record_stream_new( (double) s->configured_source_latency / PA_USEC_PER_MSEC); pa_source_output_put(s->source_output); + + if (s->source_output->source) { + AUDIO_INFO_LOG("[NEW]: SourceOutput[%{public}u] -----> source[%{public}u, %{public}s].", + s->source_output->index, s->source_output->source->index, s->source_output->source->name); + } else { + AUDIO_ERR_LOG("SourceOutput[%{public}u] -----> source is nullptr", s->source_output->index); + } return s; } @@ -1134,6 +1141,13 @@ static playback_stream* playback_stream_new( pa_sink_input_put(s->sink_input); + if (s->sink_input->sink) { + AUDIO_INFO_LOG("[NEW]: SinkInput[%{public}u] -----> sink[%{public}u, %{public}s].", + s->sink_input->index, s->sink_input->sink->index, s->sink_input->sink->name); + } else { + AUDIO_ERR_LOG("SourceInput[%{public}u] -----> sink is nullptr", s->sink_input->index); + } + out: if (formats) pa_idxset_free(formats, (pa_free_cb_t) pa_format_info_free); diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c index c1cd281bd55f30320fef0d6cab1d43caef3a8226..ae3ab21c7ed4edc4202de302a9b82f769ac7cee2 100644 --- a/src/pulsecore/sink-input.c +++ b/src/pulsecore/sink-input.c @@ -40,6 +40,8 @@ #include #include +#include "log/audio_log.h" + #include "sink-input.h" /* #define SINK_INPUT_DEBUG */ @@ -1882,6 +1884,10 @@ int pa_sink_input_start_move(pa_sink_input *i) { return r; pa_log_debug("Starting to move sink input %u from '%s'", (unsigned) i->index, i->sink->name); + if (i->sink) { + AUDIO_INFO_LOG("[StartMove]: SinkInput[%{public}u] --xxxx--> sink[%{public}u, %{public}s]", + i->index, i->sink->index, i->sink->name); + } /* Kill directly connected outputs */ while ((o = pa_idxset_first(i->direct_outputs, NULL))) { @@ -2190,6 +2196,11 @@ int pa_sink_input_finish_move(pa_sink_input *i, pa_sink *dest, bool save) { i->moving(i, dest); i->sink = dest; + if (dest) { + AUDIO_INFO_LOG("[FinishMove]: SinkInput[%{public}u] ----------> sink[%{public}u, %{public}s]", + i->index, dest->index, dest->name); + } + /* save == true, means user is calling the move_to() and want to save the preferred_sink */ if (save) { @@ -2252,6 +2263,7 @@ void pa_sink_input_fail_move(pa_sink_input *i) { return; } + AUDIO_WARNING_LOG("[FailMove]: SinkInput[%{public}u] moving FAILED.", i->index); if (i->moving) i->moving(i, NULL); diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c index 7c6cb78a3f303c93f3a3f7eb39a69393d974485b..9d9e2937bb91faf7a686d2dadb9246f3af057ccf 100644 --- a/src/pulsecore/source-output.c +++ b/src/pulsecore/source-output.c @@ -39,6 +39,8 @@ #include #include +#include "log/audio_log.h" + #include "source-output.h" #define MEMBLOCKQ_MAXLENGTH (32*1024*1024) @@ -1393,6 +1395,10 @@ int pa_source_output_start_move(pa_source_output *o) { return r; pa_log_debug("Starting to move source output %u from '%s'", (unsigned) o->index, o->source->name); + if (o->source) { + AUDIO_INFO_LOG("[StartMove]: SourceOutput[%{public}u] --xxxx--> source[%{public}u, %{public}s]", + o->index, o->source->index, o->source->name); + } origin = o->source; @@ -1613,6 +1619,11 @@ int pa_source_output_finish_move(pa_source_output *o, pa_source *dest, bool save o->moving(o, dest); o->source = dest; + if (dest) { + AUDIO_INFO_LOG("[FinishMove]: SourceOutput[%{public}u] ----------> source[%{public}u, %{public}s]", + o->index, dest->index, dest->name); + } + /* save == true, means user is calling the move_to() and want to save the preferred_source */ if (save) { @@ -1667,6 +1678,7 @@ void pa_source_output_fail_move(pa_source_output *o) { return; } + AUDIO_WARNING_LOG("[FailMove]: SourceOutput[%{public}u] moving FAILED.", o->index); if (o->moving) o->moving(o, NULL);