| Index: media/audio/alsa/alsa_output.h
|
| diff --git a/media/audio/alsa/alsa_output.h b/media/audio/alsa/alsa_output.h
|
| index 7b2337a3378230fda9ac169bc119ed458aa5a1ff..a3c0b0712dbd244ba5c3c5f3670a6ee0985b4331 100644
|
| --- a/media/audio/alsa/alsa_output.h
|
| +++ b/media/audio/alsa/alsa_output.h
|
| @@ -34,6 +34,7 @@
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/single_thread_task_runner.h"
|
| #include "base/threading/non_thread_safe.h"
|
| +#include "base/time/tick_clock.h"
|
| #include "base/time/time.h"
|
| #include "media/audio/audio_io.h"
|
| #include "media/base/audio_parameters.h"
|
| @@ -84,6 +85,8 @@ class MEDIA_EXPORT AlsaPcmOutputStream : public AudioOutputStream,
|
| void SetVolume(double volume) override;
|
| void GetVolume(double* volume) override;
|
|
|
| + void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock);
|
| +
|
| private:
|
| friend class AlsaPcmOutputStreamTest;
|
| FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest,
|
| @@ -152,7 +155,9 @@ class MEDIA_EXPORT AlsaPcmOutputStream : public AudioOutputStream,
|
| // is passed into the output stream, but ownership is not transfered which
|
| // requires a synchronization on access of the |source_callback_| to avoid
|
| // using a deleted callback.
|
| - int RunDataCallback(AudioBus* audio_bus, uint32_t total_bytes_delay);
|
| + int RunDataCallback(base::TimeDelta delay,
|
| + base::TimeTicks delay_timestamp,
|
| + AudioBus* audio_bus);
|
| void RunErrorCallback(int code);
|
|
|
| // Changes the AudioSourceCallback to proxy calls to. Pass in NULL to
|
| @@ -208,6 +213,8 @@ class MEDIA_EXPORT AlsaPcmOutputStream : public AudioOutputStream,
|
| std::unique_ptr<ChannelMixer> channel_mixer_;
|
| std::unique_ptr<AudioBus> mixed_audio_bus_;
|
|
|
| + std::unique_ptr<base::TickClock> tick_clock_;
|
| +
|
| // Allows us to run tasks on the AlsaPcmOutputStream instance which are
|
| // bound by its lifetime.
|
| // NOTE: Weak pointers must be invalidated before all other member variables.
|
|
|