Index: webrtc/modules/audio_mixer/audio_source_with_mix_status.h |
diff --git a/webrtc/modules/audio_mixer/audio_source_with_mix_status.h b/webrtc/modules/audio_mixer/audio_source_with_mix_status.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8e116de6ade7d9083401d1b23e6f6254b0415075 |
--- /dev/null |
+++ b/webrtc/modules/audio_mixer/audio_source_with_mix_status.h |
@@ -0,0 +1,45 @@ |
+/* |
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
+ * |
+ * Use of this source code is governed by a BSD-style license |
+ * that can be found in the LICENSE file in the root of the source |
+ * tree. An additional intellectual property rights grant can be found |
+ * in the file PATENTS. All contributing project authors may |
+ * be found in the AUTHORS file in the root of the source tree. |
+ */ |
+ |
+#ifndef WEBRTC_MODULES_AUDIO_MIXER_AUDIO_SOURCE_WITH_MIX_STATUS_H_ |
+#define WEBRTC_MODULES_AUDIO_MIXER_AUDIO_SOURCE_WITH_MIX_STATUS_H_ |
+ |
+#include "webrtc/modules/audio_mixer/audio_mixer_defines.h" |
+ |
+namespace webrtc { |
+ |
+// A class that holds a mixer participant and its mixing status. |
+class AudioSourceWithMixStatus { |
the sun
2016/10/04 20:36:10
How about making this class internal to the AudioM
ivoc
2016/10/04 20:39:29
This class seems a little complicated to me. How a
the sun
2016/10/04 20:57:41
I'm thinking about this was_mixed and is_mixed bus
aleloi
2016/10/05 15:18:19
That is a nice simplification! How about this plan
ivoc
2016/10/05 18:47:13
Sounds good.
the sun
2016/10/05 19:32:11
sgtm
|
+ public: |
+ explicit AudioSourceWithMixStatus(MixerAudioSource* audio_source); |
+ ~AudioSourceWithMixStatus(); |
+ |
+ AudioSourceWithMixStatus(const AudioSourceWithMixStatus&) = default; |
the sun
2016/10/04 20:36:10
Uhm, really? Who's owning the MixerAudioSource? I
aleloi
2016/10/05 15:18:19
I think you need a copy constructor to put this cl
|
+ |
+ // Returns true if the audio source was mixed this mix iteration. |
+ bool IsMixed() const; |
+ |
+ // Returns true if the audio source was mixed previous mix |
+ // iteration. |
+ bool WasMixed() const; |
+ |
+ // Updates the mixed status. |
+ void SetIsMixed(const bool mixed); |
+ void ResetMixedStatus(); |
+ MixerAudioSource* audio_source() const; |
+ |
+ private: |
+ MixerAudioSource* audio_source_; |
ivoc
2016/10/04 20:39:29
I think this can be MixerAudioSource const *
aleloi
2016/10/05 15:18:19
You are right, thanks!
|
+ bool is_mixed_ = false; |
the sun
2016/10/04 20:36:10
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS
aleloi
2016/10/05 15:18:19
Let's just simplify it to a struct with source, mi
the sun
2016/10/05 19:32:11
ok!
|
+}; |
+ |
+} // namespace webrtc |
+ |
+#endif // WEBRTC_MODULES_AUDIO_MIXER_AUDIO_SOURCE_WITH_MIX_STATUS_H_ |