class PipelineMixThread

Defined at line 45 of file ../../src/media/audio/services/mixer/mix/pipeline_mix_thread.h

A mix thread encapsulates a kernel thread and all work performed on that thread, which includes

mix jobs and other operations that must execute on a mix thread. This class is essentially just a

set of ConsumerStages, plus a thread that does:

```

for (;;) {

SleepUntil(next_period);

for (auto c : consumers) {

c->RunMixJob(...);

}

}

```

See discussion in ../README.md.

This class is not thread safe: with the exception of a few const methods, all methods

on this class must be called from the kernel thread owned by this thread. This is

usually done by posting a closure to the GlobalTaskQueue.

Public Methods

std::shared_ptr<PipelineMixThread> Create (Args args)

Defined at line 27 of file ../../src/media/audio/services/mixer/mix/pipeline_mix_thread.cc

ThreadId id ()

Implementation of Thread.

Defined at line 80 of file ../../src/media/audio/services/mixer/mix/pipeline_mix_thread.h

std::string_view name ()

Defined at line 81 of file ../../src/media/audio/services/mixer/mix/pipeline_mix_thread.h

const ThreadChecker & checker ()

Defined at line 82 of file ../../src/media/audio/services/mixer/mix/pipeline_mix_thread.h

zx::duration mix_period ()

Reports the mix period.

Defined at line 85 of file ../../src/media/audio/services/mixer/mix/pipeline_mix_thread.h

void Shutdown ()

Shuts down this thread.

The underlying kernel thread will tear itself down asynchronously.

Defined at line 92 of file ../../src/media/audio/services/mixer/mix/pipeline_mix_thread.cc

void AddConsumer (ConsumerStagePtr consumer)

Adds a consumer to this thread.

This thread becomes responsible for running mix jobs on this consumer.

Defined at line 81 of file ../../src/media/audio/services/mixer/mix/pipeline_mix_thread.cc

void RemoveConsumer (ConsumerStagePtr consumer)

Removes a consumer from this thread.

Defined at line 86 of file ../../src/media/audio/services/mixer/mix/pipeline_mix_thread.cc

void NotifyConsumerStarting (ConsumerStagePtr consumer)

Notifies this thread that `consumer` is about to start running. This should be called

immediately after a StartCommand is sent to `consumer`, and also after AddConsumer if the

consumer may have been previously started.

Defined at line 99 of file ../../src/media/audio/services/mixer/mix/pipeline_mix_thread.cc

void AddClock (std::shared_ptr<const Clock> clock)

Adds/removes a clock. A clock should be added when it is used by any mix job controlled by this

thread, and removed when it's no longer needed by any mix jobs.

Defined at line 105 of file ../../src/media/audio/services/mixer/mix/pipeline_mix_thread.h

void RemoveClock (std::shared_ptr<const Clock> clock)

Defined at line 108 of file ../../src/media/audio/services/mixer/mix/pipeline_mix_thread.h

Records

Friends

shared_ptr PipelineMixThread (Args args)
class PipelineMixThreadRunMixJobsTest