Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(579)

Unified Diff: remoting/client/audio_player.h

Issue 2052723002: Adding an interface to allow extention of the audio player for CRD and iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor updates based on CL feedback. Thanks! Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/client/audio_player.h
diff --git a/remoting/client/audio_player.h b/remoting/client/audio_player.h
index ea0b789d75c5b20b7b5c7947446865a59d90178b..88fad4e37855212db5b2cac1bfcee6254c03fdf6 100644
--- a/remoting/client/audio_player.h
+++ b/remoting/client/audio_player.h
@@ -13,23 +13,23 @@
#include "base/macros.h"
#include "base/synchronization/lock.h"
+#include "remoting/client/audio_consumer.h"
#include "remoting/proto/audio.pb.h"
namespace remoting {
-class AudioPlayer {
+class AudioPlayer : public AudioConsumer {
public:
// The number of channels in the audio stream (only supporting stereo audio
// for now).
static const int kChannels = 2;
static const int kSampleSizeBytes = 2;
- virtual ~AudioPlayer();
-
void ProcessAudioPacket(std::unique_ptr<AudioPacket> packet);
protected:
AudioPlayer();
+ ~AudioPlayer() override;
// Return the recommended number of samples to include in a frame.
virtual uint32_t GetSamplesPerFrame() = 0;
@@ -47,6 +47,8 @@ class AudioPlayer {
// its buffer. Will fill the buffer with 0's if no sample is available.
void FillWithSamples(void* samples, uint32_t buffer_size);
+ void AddAudioPacket(std::unique_ptr<AudioPacket> packet) override;
Sergey Ulanov 2016/06/09 20:23:45 Add comment: // AudioConsumer implementation. al
nicholss 2016/06/09 20:57:08 Done.
+
private:
friend class AudioPlayerTest;

Powered by Google App Engine
This is Rietveld 408576698