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

Unified Diff: remoting/client/audio_player_android.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_player.cc ('k') | remoting/client/audio_player_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/audio_player_android.h
diff --git a/remoting/client/audio_player_android.h b/remoting/client/audio_player_android.h
index 1c062938910ce609b40b97cb9c4ab239d9acd5af..16059b602df7ba063ac1fdf7e8e9926da9d9ed4a 100644
--- a/remoting/client/audio_player_android.h
+++ b/remoting/client/audio_player_android.h
@@ -9,6 +9,7 @@
#include <SLES/OpenSLES_Android.h>
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "remoting/client/audio_player.h"
namespace remoting {
@@ -18,6 +19,8 @@ class AudioPlayerAndroid : public AudioPlayer {
AudioPlayerAndroid();
~AudioPlayerAndroid() override;
+ base::WeakPtr<AudioPlayerAndroid> GetWeakPtr();
+
// AudioPlayer overrides.
uint32_t GetSamplesPerFrame() override;
bool ResetAudioPlayer(AudioPacket::SamplingRate sampling_rate) override;
@@ -42,6 +45,8 @@ class AudioPlayerAndroid : public AudioPlayer {
size_t buffer_size_ = 0;
uint32_t sample_per_frame_ = 0;
+ base::WeakPtrFactory<AudioPlayerAndroid> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(AudioPlayerAndroid);
};
« no previous file with comments | « remoting/client/audio_player.cc ('k') | remoting/client/audio_player_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698