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

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: Addressing comments in CL. 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
« no previous file with comments | « remoting/client/audio_decode_scheduler_unittest.cc ('k') | remoting/client/audio_player.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/audio_player.h
diff --git a/remoting/client/audio_player.h b/remoting/client/audio_player.h
index ea0b789d75c5b20b7b5c7947446865a59d90178b..7422c6660b2d4106e06ba82ed4932d56d9a64340 100644
--- a/remoting/client/audio_player.h
+++ b/remoting/client/audio_player.h
@@ -13,20 +13,22 @@
#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();
+ ~AudioPlayer() override;
- void ProcessAudioPacket(std::unique_ptr<AudioPacket> packet);
+ // AudioConsumer implementation.
+ void AddAudioPacket(std::unique_ptr<AudioPacket> packet) override;
protected:
AudioPlayer();
@@ -50,7 +52,7 @@ class AudioPlayer {
private:
friend class AudioPlayerTest;
- typedef std::list<AudioPacket*> AudioPacketQueue;
+ typedef std::list<std::unique_ptr<AudioPacket>> AudioPacketQueue;
void ResetQueue();
« no previous file with comments | « remoting/client/audio_decode_scheduler_unittest.cc ('k') | remoting/client/audio_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698