| Index: media/audio/pulse/pulse_output.h
|
| diff --git a/media/audio/pulse/pulse_output.h b/media/audio/pulse/pulse_output.h
|
| index ce9a58914ece8af79409b0c537605e650d59060c..f7a29af5bbbe84ed11daa4e3d9d9cd41733a0b53 100644
|
| --- a/media/audio/pulse/pulse_output.h
|
| +++ b/media/audio/pulse/pulse_output.h
|
| @@ -20,6 +20,7 @@
|
| #ifndef MEDIA_AUDIO_PULSE_PULSE_OUTPUT_H_
|
| #define MEDIA_AUDIO_PULSE_PULSE_OUTPUT_H_
|
|
|
| +#include <pulse/pulseaudio.h>
|
| #include <stddef.h>
|
|
|
| #include <string>
|
| @@ -54,6 +55,9 @@ class PulseAudioOutputStream : public AudioOutputStream {
|
| void SetVolume(double volume) override;
|
| void GetVolume(double* volume) override;
|
|
|
| + pa_threaded_mainloop* GetPAMainloop();
|
| + void SetDefaultSystemDeviceName(const std::string& name);
|
| +
|
| private:
|
| // Called by PulseAudio when |pa_stream_| change state. If an unexpected
|
| // failure state change happens and |source_callback_| is set
|
| @@ -63,6 +67,13 @@ class PulseAudioOutputStream : public AudioOutputStream {
|
| // Called by PulseAudio when it needs more audio data.
|
| static void StreamRequestCallback(pa_stream* s, size_t len, void* p_this);
|
|
|
| + // Initialize |pa_mainloop_| and |pa_context_| and prepare them for creating
|
| + // an output stream.
|
| + bool InitializeMainloopAndContext();
|
| +
|
| + // Get default system output device for the output stream.
|
| + void GetSystemDefaultOutputDevice();
|
| +
|
| // Fulfill a write request from the write request callback. Outputs silence
|
| // if the request could not be fulfilled.
|
| void FulfillWriteRequest(size_t requested_bytes);
|
| @@ -75,6 +86,10 @@ class PulseAudioOutputStream : public AudioOutputStream {
|
|
|
| // The device ID for the device to open.
|
| const std::string device_id_;
|
| + // The name of the system default device. Set by
|
| + // GetSystemDefaultOutputDeviceCallback if |device_id_| is set to be the
|
| + // default device.
|
| + std::string default_system_device_name_;
|
|
|
| // Audio manager that created us. Used to report that we've closed.
|
| AudioManagerBase* manager_;
|
|
|