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

Side by Side Diff: webrtc/modules/audio_conference_mixer/interface/audio_conference_mixer_defines.h

Issue 1311733003: Stylizing AudioConferenceMixer. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: refine two commenting Created 5 years, 3 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 unified diff | Download patch
OLDNEW
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_D EFINES_H_ 11 #ifndef WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_INTERFACE_AUDIO_CONFERENCE_MIXER_D EFINES_H_
12 #define WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_INTERFACE_AUDIO_CONFERENCE_MIXER_D EFINES_H_ 12 #define WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_INTERFACE_AUDIO_CONFERENCE_MIXER_D EFINES_H_
13 13
14 #include "webrtc/modules/interface/module_common_types.h" 14 #include "webrtc/modules/interface/module_common_types.h"
15 #include "webrtc/typedefs.h" 15 #include "webrtc/typedefs.h"
16 16
17 namespace webrtc { 17 namespace webrtc {
18 class MixHistory; 18 class MixHistory;
19 19
20 // A callback class that all mixer participants must inherit from/implement. 20 // A callback class that all mixer participants must inherit from/implement.
21 class MixerParticipant 21 class MixerParticipant
22 { 22 {
23 public: 23 public:
24 // The implementation of this function should update audioFrame with new 24 // The implementation of this function should update audioFrame with new
25 // audio every time it's called. 25 // audio every time it's called.
26 // 26 //
27 // If it returns -1, the frame will not be added to the mix. 27 // If it returns -1, the frame will not be added to the mix.
28 virtual int32_t GetAudioFrame(const int32_t id, AudioFrame& audioFrame) = 0; 28 virtual int32_t GetAudioFrame(int32_t id,
29 AudioFrame* audioFrame) = 0;
29 30
30 // mixed will be set to true if the participant was mixed this mix iteration 31 // Returns true if the participant was mixed this mix iteration.
31 int32_t IsMixed(bool& mixed) const; 32 bool IsMixed() const;
32 33
33 // This function specifies the sampling frequency needed for the AudioFrame 34 // This function specifies the sampling frequency needed for the AudioFrame
34 // for future GetAudioFrame(..) calls. 35 // for future GetAudioFrame(..) calls.
35 virtual int32_t NeededFrequency(const int32_t id) = 0; 36 virtual int32_t NeededFrequency(int32_t id) const = 0;
36 37
37 MixHistory* _mixHistory; 38 MixHistory* _mixHistory;
38 protected: 39 protected:
39 MixerParticipant(); 40 MixerParticipant();
40 virtual ~MixerParticipant(); 41 virtual ~MixerParticipant();
41 }; 42 };
42 43
43 class AudioMixerOutputReceiver 44 class AudioMixerOutputReceiver
44 { 45 {
45 public: 46 public:
46 // This callback function provides the mixed audio for this mix iteration. 47 // This callback function provides the mixed audio for this mix iteration.
47 // Note that uniqueAudioFrames is an array of AudioFrame pointers with the 48 // Note that uniqueAudioFrames is an array of AudioFrame pointers with the
48 // size according to the size parameter. 49 // size according to the size parameter.
49 virtual void NewMixedAudio(const int32_t id, 50 virtual void NewMixedAudio(const int32_t id,
50 const AudioFrame& generalAudioFrame, 51 const AudioFrame& generalAudioFrame,
51 const AudioFrame** uniqueAudioFrames, 52 const AudioFrame** uniqueAudioFrames,
52 const uint32_t size) = 0; 53 const uint32_t size) = 0;
53 protected: 54 protected:
54 AudioMixerOutputReceiver() {} 55 AudioMixerOutputReceiver() {}
55 virtual ~AudioMixerOutputReceiver() {} 56 virtual ~AudioMixerOutputReceiver() {}
56 }; 57 };
57 } // namespace webrtc 58 } // namespace webrtc
58 59
59 #endif // WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_INTERFACE_AUDIO_CONFERENCE_MIXER _DEFINES_H_ 60 #endif // WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_INTERFACE_AUDIO_CONFERENCE_MIXER _DEFINES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698