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

Side by Side Diff: voice_engine/channel.h

Issue 3016543002: Remove VoENetwork (Closed)
Patch Set: rebase Created 3 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
« no previous file with comments | « voice_engine/BUILD.gn ('k') | 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 VOICE_ENGINE_CHANNEL_H_ 11 #ifndef VOICE_ENGINE_CHANNEL_H_
12 #define VOICE_ENGINE_CHANNEL_H_ 12 #define VOICE_ENGINE_CHANNEL_H_
13 13
14 #include <memory> 14 #include <memory>
15 15
16 #include "api/audio/audio_mixer.h" 16 #include "api/audio/audio_mixer.h"
17 #include "api/audio_codecs/audio_encoder.h" 17 #include "api/audio_codecs/audio_encoder.h"
18 #include "api/call/audio_sink.h" 18 #include "api/call/audio_sink.h"
19 #include "api/call/transport.h"
19 #include "api/optional.h" 20 #include "api/optional.h"
20 #include "common_audio/resampler/include/push_resampler.h" 21 #include "common_audio/resampler/include/push_resampler.h"
21 #include "common_types.h" // NOLINT(build/include) 22 #include "common_types.h" // NOLINT(build/include)
22 #include "modules/audio_coding/acm2/codec_manager.h" 23 #include "modules/audio_coding/acm2/codec_manager.h"
23 #include "modules/audio_coding/acm2/rent_a_codec.h" 24 #include "modules/audio_coding/acm2/rent_a_codec.h"
24 #include "modules/audio_coding/include/audio_coding_module.h" 25 #include "modules/audio_coding/include/audio_coding_module.h"
25 #include "modules/audio_conference_mixer/include/audio_conference_mixer_defines. h" 26 #include "modules/audio_conference_mixer/include/audio_conference_mixer_defines. h"
26 #include "modules/audio_processing/rms_level.h" 27 #include "modules/audio_processing/rms_level.h"
27 #include "modules/rtp_rtcp/include/remote_ntp_time_estimator.h" 28 #include "modules/rtp_rtcp/include/remote_ntp_time_estimator.h"
28 #include "modules/rtp_rtcp/include/rtp_header_parser.h" 29 #include "modules/rtp_rtcp/include/rtp_header_parser.h"
29 #include "modules/rtp_rtcp/include/rtp_receiver.h" 30 #include "modules/rtp_rtcp/include/rtp_receiver.h"
30 #include "modules/rtp_rtcp/include/rtp_rtcp.h" 31 #include "modules/rtp_rtcp/include/rtp_rtcp.h"
31 #include "rtc_base/criticalsection.h" 32 #include "rtc_base/criticalsection.h"
32 #include "rtc_base/event.h" 33 #include "rtc_base/event.h"
33 #include "rtc_base/thread_checker.h" 34 #include "rtc_base/thread_checker.h"
34 #include "voice_engine/audio_level.h" 35 #include "voice_engine/audio_level.h"
35 #include "voice_engine/include/voe_base.h" 36 #include "voice_engine/include/voe_base.h"
36 #include "voice_engine/include/voe_network.h"
37 #include "voice_engine/shared_data.h" 37 #include "voice_engine/shared_data.h"
38 #include "voice_engine/voice_engine_defines.h" 38 #include "voice_engine/voice_engine_defines.h"
39 39
40 namespace rtc { 40 namespace rtc {
41 class TimestampWrapAroundHandler; 41 class TimestampWrapAroundHandler;
42 } 42 }
43 43
44 namespace webrtc { 44 namespace webrtc {
45 45
46 class AudioDeviceModule; 46 class AudioDeviceModule;
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // Codecs 197 // Codecs
198 int32_t GetSendCodec(CodecInst& codec); 198 int32_t GetSendCodec(CodecInst& codec);
199 int32_t GetRecCodec(CodecInst& codec); 199 int32_t GetRecCodec(CodecInst& codec);
200 int32_t SetSendCodec(const CodecInst& codec); 200 int32_t SetSendCodec(const CodecInst& codec);
201 void SetBitRate(int bitrate_bps, int64_t probing_interval_ms); 201 void SetBitRate(int bitrate_bps, int64_t probing_interval_ms);
202 bool EnableAudioNetworkAdaptor(const std::string& config_string); 202 bool EnableAudioNetworkAdaptor(const std::string& config_string);
203 void DisableAudioNetworkAdaptor(); 203 void DisableAudioNetworkAdaptor();
204 void SetReceiverFrameLengthRange(int min_frame_length_ms, 204 void SetReceiverFrameLengthRange(int min_frame_length_ms,
205 int max_frame_length_ms); 205 int max_frame_length_ms);
206 206
207 // VoENetwork 207 // Network
208 int32_t RegisterExternalTransport(Transport* transport); 208 int32_t RegisterExternalTransport(Transport* transport);
209 int32_t DeRegisterExternalTransport(); 209 int32_t DeRegisterExternalTransport();
210 int32_t ReceivedRTPPacket(const uint8_t* received_packet,
211 size_t length,
212 const PacketTime& packet_time);
213 // TODO(nisse, solenberg): Delete when VoENetwork is deleted. 210 // TODO(nisse, solenberg): Delete when VoENetwork is deleted.
kwiberg-webrtc 2017/09/21 10:33:13 Delete the stuff, or change the text of the TODO?
the sun 2017/09/21 10:35:47 It seems to require a little more work than just d
214 int32_t ReceivedRTCPPacket(const uint8_t* data, size_t length); 211 int32_t ReceivedRTCPPacket(const uint8_t* data, size_t length);
215 void OnRtpPacket(const RtpPacketReceived& packet); 212 void OnRtpPacket(const RtpPacketReceived& packet);
216 213
217 // Muting, Volume and Level. 214 // Muting, Volume and Level.
218 void SetInputMute(bool enable); 215 void SetInputMute(bool enable);
219 void SetChannelOutputVolumeScaling(float scaling); 216 void SetChannelOutputVolumeScaling(float scaling);
220 int GetSpeechOutputLevel() const; 217 int GetSpeechOutputLevel() const;
221 int GetSpeechOutputLevelFullRange() const; 218 int GetSpeechOutputLevelFullRange() const;
222 // See description of "totalAudioEnergy" in the WebRTC stats spec: 219 // See description of "totalAudioEnergy" in the WebRTC stats spec:
223 // https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats-totalaudio energy 220 // https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats-totalaudio energy
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 std::vector<RtpSource> GetSources() const { 352 std::vector<RtpSource> GetSources() const {
356 return rtp_receiver_->GetSources(); 353 return rtp_receiver_->GetSources();
357 } 354 }
358 355
359 private: 356 private:
360 class ProcessAndEncodeAudioTask; 357 class ProcessAndEncodeAudioTask;
361 358
362 int GetRemoteSSRC(unsigned int& ssrc); 359 int GetRemoteSSRC(unsigned int& ssrc);
363 void OnUplinkPacketLossRate(float packet_loss_rate); 360 void OnUplinkPacketLossRate(float packet_loss_rate);
364 bool InputMute() const; 361 bool InputMute() const;
365 bool OnRtpPacketWithHeader(const uint8_t* received_packet,
366 size_t length,
367 RTPHeader *header);
368 bool OnRecoveredPacket(const uint8_t* packet, size_t packet_length); 362 bool OnRecoveredPacket(const uint8_t* packet, size_t packet_length);
369 363
370 bool ReceivePacket(const uint8_t* packet, 364 bool ReceivePacket(const uint8_t* packet,
371 size_t packet_length, 365 size_t packet_length,
372 const RTPHeader& header, 366 const RTPHeader& header,
373 bool in_order); 367 bool in_order);
374 bool IsPacketInOrder(const RTPHeader& header) const; 368 bool IsPacketInOrder(const RTPHeader& header) const;
375 bool IsPacketRetransmitted(const RTPHeader& header, bool in_order) const; 369 bool IsPacketRetransmitted(const RTPHeader& header, bool in_order) const;
376 int ResendPackets(const uint16_t* sequence_numbers, int length); 370 int ResendPackets(const uint16_t* sequence_numbers, int length);
377 void UpdatePlayoutTimestamp(bool rtcp); 371 void UpdatePlayoutTimestamp(bool rtcp);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 479
486 bool encoder_queue_is_active_ RTC_GUARDED_BY(encoder_queue_lock_) = false; 480 bool encoder_queue_is_active_ RTC_GUARDED_BY(encoder_queue_lock_) = false;
487 481
488 rtc::TaskQueue* encoder_queue_ = nullptr; 482 rtc::TaskQueue* encoder_queue_ = nullptr;
489 }; 483 };
490 484
491 } // namespace voe 485 } // namespace voe
492 } // namespace webrtc 486 } // namespace webrtc
493 487
494 #endif // VOICE_ENGINE_CHANNEL_H_ 488 #endif // VOICE_ENGINE_CHANNEL_H_
OLDNEW
« no previous file with comments | « voice_engine/BUILD.gn ('k') | voice_engine/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698