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

Side by Side Diff: webrtc/voice_engine/channel.h

Issue 2703373006: Injectable audio encoders: voice_engine/channel changes. (Closed)
Patch Set: Added checks, made mock use pointer, elaborated on why I make up a CodecInst Created 3 years, 9 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 | « webrtc/voice_engine/BUILD.gn ('k') | webrtc/voice_engine/channel.cc » ('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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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_VOICE_ENGINE_CHANNEL_H_ 11 #ifndef WEBRTC_VOICE_ENGINE_CHANNEL_H_
12 #define WEBRTC_VOICE_ENGINE_CHANNEL_H_ 12 #define WEBRTC_VOICE_ENGINE_CHANNEL_H_
13 13
14 #include <memory> 14 #include <memory>
15 15
16 #include "webrtc/api/audio/audio_mixer.h" 16 #include "webrtc/api/audio/audio_mixer.h"
17 #include "webrtc/api/call/audio_sink.h" 17 #include "webrtc/api/call/audio_sink.h"
18 #include "webrtc/base/criticalsection.h" 18 #include "webrtc/base/criticalsection.h"
19 #include "webrtc/base/optional.h" 19 #include "webrtc/base/optional.h"
20 #include "webrtc/common_audio/resampler/include/push_resampler.h" 20 #include "webrtc/common_audio/resampler/include/push_resampler.h"
21 #include "webrtc/common_types.h" 21 #include "webrtc/common_types.h"
22 #include "webrtc/modules/audio_coding/acm2/codec_manager.h" 22 #include "webrtc/modules/audio_coding/acm2/codec_manager.h"
23 #include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" 23 #include "webrtc/modules/audio_coding/acm2/rent_a_codec.h"
24 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
24 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" 25 #include "webrtc/modules/audio_coding/include/audio_coding_module.h"
25 #include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_d efines.h" 26 #include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_d efines.h"
26 #include "webrtc/modules/audio_processing/rms_level.h" 27 #include "webrtc/modules/audio_processing/rms_level.h"
27 #include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h" 28 #include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h"
28 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" 29 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
29 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" 30 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
30 #include "webrtc/voice_engine/file_player.h" 31 #include "webrtc/voice_engine/file_player.h"
31 #include "webrtc/voice_engine/file_recorder.h" 32 #include "webrtc/voice_engine/file_recorder.h"
32 #include "webrtc/voice_engine/include/voe_audio_processing.h" 33 #include "webrtc/voice_engine/include/voe_audio_processing.h"
33 #include "webrtc/voice_engine/include/voe_base.h" 34 #include "webrtc/voice_engine/include/voe_base.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 int32_t UpdateLocalTimeStamp(); 163 int32_t UpdateLocalTimeStamp();
163 164
164 void SetSink(std::unique_ptr<AudioSinkInterface> sink); 165 void SetSink(std::unique_ptr<AudioSinkInterface> sink);
165 166
166 // TODO(ossu): Don't use! It's only here to confirm that the decoder factory 167 // TODO(ossu): Don't use! It's only here to confirm that the decoder factory
167 // passed into AudioReceiveStream is the same as the one set when creating the 168 // passed into AudioReceiveStream is the same as the one set when creating the
168 // ADM. Once Channel creation is moved into Audio{Send,Receive}Stream this can 169 // ADM. Once Channel creation is moved into Audio{Send,Receive}Stream this can
169 // go. 170 // go.
170 const rtc::scoped_refptr<AudioDecoderFactory>& GetAudioDecoderFactory() const; 171 const rtc::scoped_refptr<AudioDecoderFactory>& GetAudioDecoderFactory() const;
171 172
173 // Send using this encoder, with this payload type.
174 virtual bool SetEncoder(int payload_type,
the sun 2017/03/10 12:55:43 Remove "virtual"?
175 std::unique_ptr<AudioEncoder> encoder);
176
172 // API methods 177 // API methods
173 178
174 // VoEBase 179 // VoEBase
175 int32_t StartPlayout(); 180 int32_t StartPlayout();
176 int32_t StopPlayout(); 181 int32_t StopPlayout();
177 int32_t StartSend(); 182 int32_t StartSend();
178 int32_t StopSend(); 183 int32_t StopSend();
179 int32_t RegisterVoiceEngineObserver(VoiceEngineObserver& observer); 184 int32_t RegisterVoiceEngineObserver(VoiceEngineObserver& observer);
180 int32_t DeRegisterVoiceEngineObserver(); 185 int32_t DeRegisterVoiceEngineObserver();
181 186
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 std::unique_ptr<RateLimiter> retransmission_rate_limiter_; 518 std::unique_ptr<RateLimiter> retransmission_rate_limiter_;
514 519
515 // TODO(ossu): Remove once GetAudioDecoderFactory() is no longer needed. 520 // TODO(ossu): Remove once GetAudioDecoderFactory() is no longer needed.
516 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; 521 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_;
517 }; 522 };
518 523
519 } // namespace voe 524 } // namespace voe
520 } // namespace webrtc 525 } // namespace webrtc
521 526
522 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ 527 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_
OLDNEW
« no previous file with comments | « webrtc/voice_engine/BUILD.gn ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698