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

Unified 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: Changes from reviewer comments. 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_mixer/include/audio_mixer_defines.h
diff --git a/webrtc/modules/audio_mixer/include/audio_mixer_defines.h b/webrtc/modules/audio_mixer/include/audio_mixer_defines.h
index e204435c1a30f09114bf406967352769e359d9b8..10e41ca140df369366b38cc84d9218f26a61dd5d 100644
--- a/webrtc/modules/audio_mixer/include/audio_mixer_defines.h
+++ b/webrtc/modules/audio_mixer/include/audio_mixer_defines.h
@@ -21,22 +21,7 @@ class NewMixHistory;
// A callback class that all mixer participants must inherit from/implement.
class MixerAudioSource {
public:
- // The implementation of this function should update audioFrame with new
- // audio every time it's called.
- //
- // If it returns -1, the frame will not be added to the mix.
- //
- // NOTE: This function should not be called. It will remain for a short
- // time so that subclasses can override it without getting warnings.
- // TODO(henrik.lundin) Remove this function.
- virtual int32_t GetAudioFrame(int32_t id, AudioFrame* audioFrame) {
- RTC_CHECK(false);
- return -1;
- }
- // The implementation of GetAudioFrameWithMuted should update audio_frame
- // with new audio every time it's called. The return value will be
- // interpreted as follows.
enum class AudioFrameInfo {
kNormal, // The samples in audio_frame are valid and should be used.
kMuted, // The samples in audio_frame should not be used, but should be
@@ -45,11 +30,17 @@ class MixerAudioSource {
kError // audio_frame will not be used.
};
- virtual AudioFrameInfo GetAudioFrameWithMuted(int32_t id,
- AudioFrame* audio_frame) {
- return GetAudioFrame(id, audio_frame) == -1 ? AudioFrameInfo::kError
- : AudioFrameInfo::kNormal;
- }
+ struct AudioFrameWithInfo {
+ AudioFrame* audio_frame_pointer;
ossu 2016/07/06 12:58:44 I think this should just be called audio_frame (wi
+ AudioFrameInfo audio_frame_info;
+ };
+
+ // The implementation of GetAudioFrameWithMuted should update
+ // audio_frame with new audio every time it's called. Implementing
+ // classes are allowed to return the same AudioFrame pointer on
+ // different calls.
+ virtual AudioFrameWithInfo GetAudioFrameWithMuted(int32_t id,
+ int sample_rate_hz) = 0;
// Returns true if the participant was mixed this mix iteration.
bool IsMixed() const;
« 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