| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_INTERFACE_AUDIO_CONFERENCE_MIXER_H
_ | 11 #ifndef WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_INTERFACE_AUDIO_CONFERENCE_MIXER_H
_ |
| 12 #define WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_INTERFACE_AUDIO_CONFERENCE_MIXER_H
_ | 12 #define WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_INTERFACE_AUDIO_CONFERENCE_MIXER_H
_ |
| 13 | 13 |
| 14 #include "webrtc/modules/audio_conference_mixer/interface/audio_conference_mixer
_defines.h" | 14 #include "webrtc/modules/audio_conference_mixer/interface/audio_conference_mixer
_defines.h" |
| 15 #include "webrtc/modules/interface/module.h" | 15 #include "webrtc/modules/interface/module.h" |
| 16 #include "webrtc/modules/interface/module_common_types.h" | 16 #include "webrtc/modules/interface/module_common_types.h" |
| 17 | 17 |
| 18 namespace webrtc { | 18 namespace webrtc { |
| 19 class AudioMixerOutputReceiver; | 19 class AudioMixerOutputReceiver; |
| 20 class AudioMixerStatusReceiver; | |
| 21 class MixerParticipant; | 20 class MixerParticipant; |
| 22 class Trace; | 21 class Trace; |
| 23 | 22 |
| 24 class AudioConferenceMixer : public Module | 23 class AudioConferenceMixer : public Module |
| 25 { | 24 { |
| 26 public: | 25 public: |
| 27 enum {kMaximumAmountOfMixedParticipants = 3}; | 26 enum {kMaximumAmountOfMixedParticipants = 3}; |
| 28 enum Frequency | 27 enum Frequency |
| 29 { | 28 { |
| 30 kNbInHz = 8000, | 29 kNbInHz = 8000, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 41 | 40 |
| 42 // Module functions | 41 // Module functions |
| 43 int64_t TimeUntilNextProcess() override = 0; | 42 int64_t TimeUntilNextProcess() override = 0; |
| 44 int32_t Process() override = 0; | 43 int32_t Process() override = 0; |
| 45 | 44 |
| 46 // Register/unregister a callback class for receiving the mixed audio. | 45 // Register/unregister a callback class for receiving the mixed audio. |
| 47 virtual int32_t RegisterMixedStreamCallback( | 46 virtual int32_t RegisterMixedStreamCallback( |
| 48 AudioMixerOutputReceiver& receiver) = 0; | 47 AudioMixerOutputReceiver& receiver) = 0; |
| 49 virtual int32_t UnRegisterMixedStreamCallback() = 0; | 48 virtual int32_t UnRegisterMixedStreamCallback() = 0; |
| 50 | 49 |
| 51 // Register/unregister a callback class for receiving status information. | |
| 52 virtual int32_t RegisterMixerStatusCallback( | |
| 53 AudioMixerStatusReceiver& mixerStatusCallback, | |
| 54 const uint32_t amountOf10MsBetweenCallbacks) = 0; | |
| 55 virtual int32_t UnRegisterMixerStatusCallback() = 0; | |
| 56 | |
| 57 // Add/remove participants as candidates for mixing. | 50 // Add/remove participants as candidates for mixing. |
| 58 virtual int32_t SetMixabilityStatus(MixerParticipant& participant, | 51 virtual int32_t SetMixabilityStatus(MixerParticipant& participant, |
| 59 bool mixable) = 0; | 52 bool mixable) = 0; |
| 60 // mixable is set to true if a participant is a candidate for mixing. | 53 // mixable is set to true if a participant is a candidate for mixing. |
| 61 virtual int32_t MixabilityStatus(MixerParticipant& participant, | 54 virtual int32_t MixabilityStatus(MixerParticipant& participant, |
| 62 bool& mixable) = 0; | 55 bool& mixable) = 0; |
| 63 | 56 |
| 64 // Inform the mixer that the participant should always be mixed and not | 57 // Inform the mixer that the participant should always be mixed and not |
| 65 // count toward the number of mixed participants. Note that a participant | 58 // count toward the number of mixed participants. Note that a participant |
| 66 // must have been added to the mixer (by calling SetMixabilityStatus()) | 59 // must have been added to the mixer (by calling SetMixabilityStatus()) |
| 67 // before this function can be successfully called. | 60 // before this function can be successfully called. |
| 68 virtual int32_t SetAnonymousMixabilityStatus(MixerParticipant& participant, | 61 virtual int32_t SetAnonymousMixabilityStatus(MixerParticipant& participant, |
| 69 const bool mixable) = 0; | 62 const bool mixable) = 0; |
| 70 // mixable is set to true if the participant is mixed anonymously. | 63 // mixable is set to true if the participant is mixed anonymously. |
| 71 virtual int32_t AnonymousMixabilityStatus(MixerParticipant& participant, | 64 virtual int32_t AnonymousMixabilityStatus(MixerParticipant& participant, |
| 72 bool& mixable) = 0; | 65 bool& mixable) = 0; |
| 73 | 66 |
| 74 // Set the minimum sampling frequency at which to mix. The mixing algorithm | 67 // Set the minimum sampling frequency at which to mix. The mixing algorithm |
| 75 // may still choose to mix at a higher samling frequency to avoid | 68 // may still choose to mix at a higher samling frequency to avoid |
| 76 // downsampling of audio contributing to the mixed audio. | 69 // downsampling of audio contributing to the mixed audio. |
| 77 virtual int32_t SetMinimumMixingFrequency(Frequency freq) = 0; | 70 virtual int32_t SetMinimumMixingFrequency(Frequency freq) = 0; |
| 78 | 71 |
| 79 protected: | 72 protected: |
| 80 AudioConferenceMixer() {} | 73 AudioConferenceMixer() {} |
| 81 }; | 74 }; |
| 82 } // namespace webrtc | 75 } // namespace webrtc |
| 83 | 76 |
| 84 #endif // WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_INTERFACE_AUDIO_CONFERENCE_MIXER
_H_ | 77 #endif // WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_INTERFACE_AUDIO_CONFERENCE_MIXER
_H_ |
| OLD | NEW |