Index: webrtc/modules/audio_mixer/audio_mixer.h |
diff --git a/webrtc/modules/audio_mixer/audio_mixer.h b/webrtc/modules/audio_mixer/audio_mixer.h |
index 5729e14288c32650f5e755160d830ab7e9f39cd0..df41573d1ef2c208d974fd8daba247f32f86420c 100644 |
--- a/webrtc/modules/audio_mixer/audio_mixer.h |
+++ b/webrtc/modules/audio_mixer/audio_mixer.h |
@@ -13,13 +13,13 @@ |
#include <memory> |
+#include "webrtc/base/refcount.h" |
#include "webrtc/modules/include/module_common_types.h" |
namespace webrtc { |
-class AudioMixer { |
+class AudioMixer : public rtc::RefCountInterface { |
public: |
- static const int kMaximumAmountOfMixedAudioSources = 3; |
aleloi
2016/10/10 13:06:31
This is moved to AudioMixerImpl.
the sun
2016/10/10 13:35:49
Acknowledged.
|
// A callback class that all mixer participants must inherit from/implement. |
class Source { |
public: |
@@ -44,16 +44,20 @@ class AudioMixer { |
// mixer. |
virtual AudioFrameWithMuted GetAudioFrameWithMuted(int sample_rate_hz) = 0; |
+ // A way for a mixer implementation do distinguish participants. |
+ virtual int ssrc() = 0; |
+ |
protected: |
virtual ~Source() {} |
}; |
- // Factory method. Constructor disabled. |
- static std::unique_ptr<AudioMixer> Create(); |
aleloi
2016/10/10 13:06:31
Factory methods are moved to the implementing clas
the sun
2016/10/10 13:35:49
Acknowledged.
|
- virtual ~AudioMixer() {} |
+ ~AudioMixer() override {} |
aleloi
2016/10/10 13:06:31
Since RefCountInterface already specifies a virtua
the sun
2016/10/10 13:35:49
Acknowledged.
|
- // Add/remove audio sources as candidates for mixing. |
- virtual int32_t SetMixabilityStatus(Source* audio_source, bool mixable) = 0; |
+ // Returns false if source was already added or not present when |
+ // removed. The mixer has no ownership of the source. RemoveSource |
+ // must be called before the source is destroyed. |
+ virtual bool AddSource(Source* audio_source) = 0; |
+ virtual bool RemoveSource(Source* audio_source) = 0; |
// Performs mixing by asking registered audio sources for audio. The |
// mixed result is placed in the provided AudioFrame. Should only be |