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

Unified Diff: webrtc/modules/audio_mixer/audio_source_with_mix_status.h

Issue 2396483002: Made MixerAudioSource a pure interface. (Closed)
Patch Set: Removing dependency patch set. Created 4 years, 2 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: 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..3489ec46ec722e7ab32fb33c38206c17f0b0a73d
--- /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 {
+ public:
+ explicit AudioSourceWithMixStatus(MixerAudioSource* audio_source);
+ ~AudioSourceWithMixStatus();
+
+ AudioSourceWithMixStatus(const AudioSourceWithMixStatus&) = default;
+
+ // 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_ = nullptr;
+ bool is_mixed_ = false;
+};
+
+} // namespace webrtc
+
+#endif // WEBRTC_MODULES_AUDIO_MIXER_AUDIO_SOURCE_WITH_MIX_STATUS_H_
« no previous file with comments | « webrtc/modules/audio_mixer/audio_mixer_impl.cc ('k') | webrtc/modules/audio_mixer/audio_source_with_mix_status.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698