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

Side by Side Diff: webrtc/modules/audio_mixer/include/audio_mixer_defines.h

Issue 2127763002: Removed the memory pool from the mixer. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@removed_time_scheduler
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | webrtc/modules/audio_mixer/source/new_audio_conference_mixer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
(...skipping 27 matching lines...) Expand all
38 // with new audio every time it's called. The return value will be 38 // with new audio every time it's called. The return value will be
39 // interpreted as follows. 39 // interpreted as follows.
40 enum class AudioFrameInfo { 40 enum class AudioFrameInfo {
41 kNormal, // The samples in audio_frame are valid and should be used. 41 kNormal, // The samples in audio_frame are valid and should be used.
42 kMuted, // The samples in audio_frame should not be used, but should be 42 kMuted, // The samples in audio_frame should not be used, but should be
43 // implicitly interpreted as zero. Other fields in audio_frame 43 // implicitly interpreted as zero. Other fields in audio_frame
44 // may be read and should contain meaningful values. 44 // may be read and should contain meaningful values.
45 kError // audio_frame will not be used. 45 kError // audio_frame will not be used.
46 }; 46 };
47 47
48 virtual AudioFrameInfo GetAudioFrameWithMuted(int32_t id, 48 virtual AudioFrameInfo GetAudioFrameWithMuted(int32_t id,
ossu 2016/07/06 11:49:37 So, why does this function need an AudioFrame as i
aleloi 2016/07/06 11:59:38 It's public API (although only defined in voe::Cha
ossu 2016/07/06 12:58:44 Well it's not public yet, since you just forked th
49 AudioFrame* audio_frame) { 49 AudioFrame* audio_frame) {
50 return GetAudioFrame(id, audio_frame) == -1 ? AudioFrameInfo::kError 50 return GetAudioFrame(id, audio_frame) == -1 ? AudioFrameInfo::kError
51 : AudioFrameInfo::kNormal; 51 : AudioFrameInfo::kNormal;
52 } 52 }
53 53
54 // Returns true if the participant was mixed this mix iteration. 54 // Returns true if the participant was mixed this mix iteration.
55 bool IsMixed() const; 55 bool IsMixed() const;
56 56
57 // Indended use: the caller of GetAudioFrame* uses this method to
58 // provide an AudioFrame to this object. This decreases complexity
59 // and the need to allocate AudioFrames on the caller side.
60 AudioFrame* GetFramePointer() { return &_audio_frame; }
61
57 // This function specifies the sampling frequency needed for the AudioFrame 62 // This function specifies the sampling frequency needed for the AudioFrame
58 // for future GetAudioFrame(..) calls. 63 // for future GetAudioFrame(..) calls.
59 virtual int32_t NeededFrequency(int32_t id) const = 0; 64 virtual int32_t NeededFrequency(int32_t id) const = 0;
60 65
61 NewMixHistory* _mixHistory; 66 NewMixHistory* _mixHistory;
62 67
63 protected: 68 protected:
64 MixerAudioSource(); 69 MixerAudioSource();
65 virtual ~MixerAudioSource(); 70 virtual ~MixerAudioSource();
71
72 private:
73 // This frame is intended to be passed to GetAudioFrame* for
74 // efficiency.
75 AudioFrame _audio_frame;
ossu 2016/07/06 11:49:37 Seems to me the frame should be put in the impleme
aleloi 2016/07/06 11:59:38 You are right. I think I wanted to be consistent w
66 }; 76 };
67 } // namespace webrtc 77 } // namespace webrtc
68 78
69 #endif // WEBRTC_MODULES_AUDIO_MIXER_INCLUDE_AUDIO_MIXER_DEFINES_H_ 79 #endif // WEBRTC_MODULES_AUDIO_MIXER_INCLUDE_AUDIO_MIXER_DEFINES_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_mixer/source/new_audio_conference_mixer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698