class Reporter
Defined at line 176 of file ../../src/media/audio/audio_core/reporter.h
A singleton instance of |Reporter| handles instrumentation concerns (e.g.
exposing information via inspect, cobalt, etc) for an audio_core instance.
The idea is to make instrumentation as simple as possible for the code that
does the real work. The singleton can be accessed via
Reporter::Singleton()
Given a Reporter, reporting objects can be created through the Create*()
methods. Each reporting object is intended to mirror a single object within
audio_core, such as an AudioRenderer -- the reporting object should live
exactly as long as its parent audio_core object. In addition to Create*()
methods, there are FailedTo*() methods that report when an object could not
be created.
The singleton object always exists: it does not need to be created. However,
the singleton needs to be initialized, via Reporter::InitializeSingleton().
Before that static method is called, all reporting objects created by the
singleton will be no-ops.
The lifetime of each reporting object is divided into sessions. Roughly
speaking, a session corresponds to a contiguous time spent processing audio.
For example, for an AudioRenderer, this is the time between Play and Pause events.
Session lifetimes are controlled by StartSession and StopSession methods.
All times are relative to the system monotonic clock.
This class is fully thread safe, including all static methods and all methods
on reporting objects.
Public Members
static const size_t kObjectsToCache
static const size_t kVolumeControlsToCache
static const size_t kActiveUsagePoliciesToCache
Public Methods
void Reporter ()
Defined at line 350 of file ../../src/media/audio/audio_core/reporter.h
const inspect::Inspector & inspector ()
Exported for tests.
Defined at line 389 of file ../../src/media/audio/audio_core/reporter.h
Reporter & Singleton ()
static
Defined at line 1197 of file ../../src/media/audio/audio_core/reporter.cc
void InitializeSingleton (sys::ComponentContext & component_context, async_dispatcher_t * fidl_dispatcher, async_dispatcher_t * io_dispatcher, bool enable_cobalt)
static
Defined at line 1208 of file ../../src/media/audio/audio_core/reporter.cc
void Reporter (sys::ComponentContext & component_context, async_dispatcher_t * fidl_dispatcher, async_dispatcher_t * io_dispatcher, bool enable_cobalt)
Defined at line 1219 of file ../../src/media/audio/audio_core/reporter.cc
Container<OutputDevice, kObjectsToCache>::Ptr CreateOutputDevice (const std::string & name, const std::string & thread_name)
Defined at line 1268 of file ../../src/media/audio/audio_core/reporter.cc
Container<InputDevice, kObjectsToCache>::Ptr CreateInputDevice (const std::string & name, const std::string & thread_name)
Defined at line 1276 of file ../../src/media/audio/audio_core/reporter.cc
Container<Renderer, kObjectsToCache>::Ptr CreateRenderer ()
Defined at line 1284 of file ../../src/media/audio/audio_core/reporter.cc
Container<Capturer, kObjectsToCache>::Ptr CreateCapturer (const std::string & thread_name)
Defined at line 1290 of file ../../src/media/audio/audio_core/reporter.cc
Container<VolumeControl, kVolumeControlsToCache>::Ptr CreateVolumeControl ()
Defined at line 1297 of file ../../src/media/audio/audio_core/reporter.cc
void SetNumThermalStates (size_t num)
Thermal state of Audio system.
Defined at line 1353 of file ../../src/media/audio/audio_core/reporter.cc
void SetThermalState (uint32_t state)
Defined at line 1361 of file ../../src/media/audio/audio_core/reporter.cc
void SetAudioPolicyBehaviorGain (AudioAdmin::BehaviorGain behavior_gain)
Audio policy logging of usage activity and behavior (none|duck|mute).
Defined at line 1369 of file ../../src/media/audio/audio_core/reporter.cc
void UpdateActiveUsagePolicy (const std::vector<fuchsia::media::Usage2> & active_usages, const AudioAdmin::RendererPolicies & renderer_policies, const AudioAdmin::CapturerPolicies & capturer_policies)
Defined at line 1377 of file ../../src/media/audio/audio_core/reporter.cc
void FailedToConnectToDevice (const std::string & name, bool is_input, zx_status_t status)
Device creation failures.
Defined at line 1304 of file ../../src/media/audio/audio_core/reporter.cc
void FailedToObtainStreamChannel (const std::string & name, bool is_input, zx_status_t status)
Defined at line 1312 of file ../../src/media/audio/audio_core/reporter.cc
void FailedToStartDevice (const std::string & name)
Defined at line 1321 of file ../../src/media/audio/audio_core/reporter.cc
void MixerClockSkewDiscontinuity (zx::duration abs_clock_error)
Mixer events which are not easily tied to a specific device or client.
Defined at line 1345 of file ../../src/media/audio/audio_core/reporter.cc
void FailedToApplySchedulerProfile (const std::string & profile, zx_status_t status)
Failures when calling RoleManager (to set thread priority or pin processwide memory).
Defined at line 1329 of file ../../src/media/audio/audio_core/reporter.cc
void FailedToApplyMemoryProfile (const std::string & profile, zx_status_t status)
Defined at line 1337 of file ../../src/media/audio/audio_core/reporter.cc
Records
Friends
class CapturerImpl
class RendererImpl
class InputDeviceImpl
class OutputDeviceImpl
class ObjectTracker
class OverflowUnderflowTracker