Chromium Code Reviews| 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..f09aa3de6418c154fd178eaea19c586cc501b079 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> |
| @@ -53,6 +54,8 @@ class PulseAudioOutputStream : public AudioOutputStream { |
| void Stop() override; |
| void SetVolume(double volume) override; |
| void GetVolume(double* volume) override; |
| + pa_threaded_mainloop* GetPAMainloop(); |
|
Henrik Grunell
2016/03/10 00:57:07
Empty line before.
rchtara
2016/03/10 13:20:35
Done.
|
| + void SetDefaultSystemDeviceName(const std::string& name); |
| private: |
| // Called by PulseAudio when |pa_stream_| change state. If an unexpected |
| @@ -62,6 +65,12 @@ 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 |
|
Henrik Grunell
2016/03/10 00:57:07
Empty line before the comment.
rchtara
2016/03/10 13:20:35
Done.
|
| + // 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. |
| @@ -75,6 +84,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_; |