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

Side by Side Diff: talk/media/webrtc/fakewebrtcvoiceengine.h

Issue 1454073002: Move some receive stream configuration into webrtc::AudioReceiveStream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: reabse+comments Created 5 years, 1 month 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 | talk/media/webrtc/webrtcvoiceengine.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 * libjingle 2 * libjingle
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 max_encoding_bandwidth(0), 181 max_encoding_bandwidth(0),
182 opus_dtx(false), 182 opus_dtx(false),
183 red(false), 183 red(false),
184 nack(false), 184 nack(false),
185 cn8_type(13), 185 cn8_type(13),
186 cn16_type(105), 186 cn16_type(105),
187 dtmf_type(106), 187 dtmf_type(106),
188 red_type(117), 188 red_type(117),
189 nack_max_packets(0), 189 nack_max_packets(0),
190 send_ssrc(0), 190 send_ssrc(0),
191 receive_audio_level_ext_(-1),
192 receive_absolute_sender_time_ext_(-1),
193 associate_send_channel(-1), 191 associate_send_channel(-1),
194 neteq_capacity(-1), 192 neteq_capacity(-1),
195 neteq_fast_accelerate(false) { 193 neteq_fast_accelerate(false) {
196 memset(&send_codec, 0, sizeof(send_codec)); 194 memset(&send_codec, 0, sizeof(send_codec));
197 } 195 }
198 bool external_transport; 196 bool external_transport;
199 bool send; 197 bool send;
200 bool playout; 198 bool playout;
201 float volume_scale; 199 float volume_scale;
202 bool vad; 200 bool vad;
203 bool codec_fec; 201 bool codec_fec;
204 int max_encoding_bandwidth; 202 int max_encoding_bandwidth;
205 bool opus_dtx; 203 bool opus_dtx;
206 bool red; 204 bool red;
207 bool nack; 205 bool nack;
208 int cn8_type; 206 int cn8_type;
209 int cn16_type; 207 int cn16_type;
210 int dtmf_type; 208 int dtmf_type;
211 int red_type; 209 int red_type;
212 int nack_max_packets; 210 int nack_max_packets;
213 uint32_t send_ssrc; 211 uint32_t send_ssrc;
214 int receive_audio_level_ext_;
215 int receive_absolute_sender_time_ext_;
216 int associate_send_channel; 212 int associate_send_channel;
217 DtmfInfo dtmf_info; 213 DtmfInfo dtmf_info;
218 std::vector<webrtc::CodecInst> recv_codecs; 214 std::vector<webrtc::CodecInst> recv_codecs;
219 webrtc::CodecInst send_codec; 215 webrtc::CodecInst send_codec;
220 webrtc::PacketTime last_rtp_packet_time; 216 webrtc::PacketTime last_rtp_packet_time;
221 std::list<std::string> packets; 217 std::list<std::string> packets;
222 int neteq_capacity; 218 int neteq_capacity;
223 bool neteq_fast_accelerate; 219 bool neteq_fast_accelerate;
224 }; 220 };
225 221
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 ch->recv_codecs.push_back(codec); 341 ch->recv_codecs.push_back(codec);
346 } 342 }
347 if (config.Get<webrtc::NetEqCapacityConfig>().enabled) { 343 if (config.Get<webrtc::NetEqCapacityConfig>().enabled) {
348 ch->neteq_capacity = config.Get<webrtc::NetEqCapacityConfig>().capacity; 344 ch->neteq_capacity = config.Get<webrtc::NetEqCapacityConfig>().capacity;
349 } 345 }
350 ch->neteq_fast_accelerate = 346 ch->neteq_fast_accelerate =
351 config.Get<webrtc::NetEqFastAccelerate>().enabled; 347 config.Get<webrtc::NetEqFastAccelerate>().enabled;
352 channels_[++last_channel_] = ch; 348 channels_[++last_channel_] = ch;
353 return last_channel_; 349 return last_channel_;
354 } 350 }
355 int GetReceiveRtpExtensionId(int channel, const std::string& extension) {
356 WEBRTC_ASSERT_CHANNEL(channel);
357 if (extension == kRtpAudioLevelHeaderExtension) {
358 return channels_[channel]->receive_audio_level_ext_;
359 } else if (extension == kRtpAbsoluteSenderTimeHeaderExtension) {
360 return channels_[channel]->receive_absolute_sender_time_ext_;
361 }
362 return -1;
363 }
364 351
365 int GetNumSetSendCodecs() const { return num_set_send_codecs_; } 352 int GetNumSetSendCodecs() const { return num_set_send_codecs_; }
366 353
367 int GetAssociateSendChannel(int channel) { 354 int GetAssociateSendChannel(int channel) {
368 return channels_[channel]->associate_send_channel; 355 return channels_[channel]->associate_send_channel;
369 } 356 }
370 357
371 WEBRTC_STUB(Release, ()); 358 WEBRTC_STUB(Release, ());
372 359
373 // webrtc::VoEBase 360 // webrtc::VoEBase
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 // webrtc::VoERTP_RTCP 690 // webrtc::VoERTP_RTCP
704 WEBRTC_FUNC(SetLocalSSRC, (int channel, unsigned int ssrc)) { 691 WEBRTC_FUNC(SetLocalSSRC, (int channel, unsigned int ssrc)) {
705 WEBRTC_CHECK_CHANNEL(channel); 692 WEBRTC_CHECK_CHANNEL(channel);
706 channels_[channel]->send_ssrc = ssrc; 693 channels_[channel]->send_ssrc = ssrc;
707 return 0; 694 return 0;
708 } 695 }
709 WEBRTC_STUB(GetLocalSSRC, (int channel, unsigned int& ssrc)); 696 WEBRTC_STUB(GetLocalSSRC, (int channel, unsigned int& ssrc));
710 WEBRTC_STUB(GetRemoteSSRC, (int channel, unsigned int& ssrc)); 697 WEBRTC_STUB(GetRemoteSSRC, (int channel, unsigned int& ssrc));
711 WEBRTC_STUB(SetSendAudioLevelIndicationStatus, (int channel, bool enable, 698 WEBRTC_STUB(SetSendAudioLevelIndicationStatus, (int channel, bool enable,
712 unsigned char id)); 699 unsigned char id));
713 WEBRTC_FUNC(SetReceiveAudioLevelIndicationStatus, (int channel, bool enable, 700 WEBRTC_STUB(SetReceiveAudioLevelIndicationStatus, (int channel, bool enable,
714 unsigned char id)) { 701 unsigned char id));
715 WEBRTC_CHECK_CHANNEL(channel);
716 WEBRTC_CHECK_HEADER_EXTENSION_ID(enable, id);
717 channels_[channel]->receive_audio_level_ext_ = (enable) ? id : -1;
718 return 0;
719 }
720 WEBRTC_STUB(SetSendAbsoluteSenderTimeStatus, (int channel, bool enable, 702 WEBRTC_STUB(SetSendAbsoluteSenderTimeStatus, (int channel, bool enable,
721 unsigned char id)); 703 unsigned char id));
722 WEBRTC_FUNC(SetReceiveAbsoluteSenderTimeStatus, (int channel, bool enable, 704 WEBRTC_STUB(SetReceiveAbsoluteSenderTimeStatus, (int channel, bool enable,
723 unsigned char id)) { 705 unsigned char id));
724 WEBRTC_CHECK_CHANNEL(channel);
725 WEBRTC_CHECK_HEADER_EXTENSION_ID(enable, id);
726 channels_[channel]->receive_absolute_sender_time_ext_ = (enable) ? id : -1;
727 return 0;
728 }
729
730 WEBRTC_STUB(SetRTCPStatus, (int channel, bool enable)); 706 WEBRTC_STUB(SetRTCPStatus, (int channel, bool enable));
731 WEBRTC_STUB(GetRTCPStatus, (int channel, bool& enabled)); 707 WEBRTC_STUB(GetRTCPStatus, (int channel, bool& enabled));
732 WEBRTC_STUB(SetRTCP_CNAME, (int channel, const char cname[256])); 708 WEBRTC_STUB(SetRTCP_CNAME, (int channel, const char cname[256]));
733 WEBRTC_STUB(GetRTCP_CNAME, (int channel, char cname[256])); 709 WEBRTC_STUB(GetRTCP_CNAME, (int channel, char cname[256]));
734 WEBRTC_STUB(GetRemoteRTCP_CNAME, (int channel, char* cname)); 710 WEBRTC_STUB(GetRemoteRTCP_CNAME, (int channel, char* cname));
735 WEBRTC_STUB(GetRemoteRTCPData, (int channel, unsigned int& NTPHigh, 711 WEBRTC_STUB(GetRemoteRTCPData, (int channel, unsigned int& NTPHigh,
736 unsigned int& NTPLow, 712 unsigned int& NTPLow,
737 unsigned int& timestamp, 713 unsigned int& timestamp,
738 unsigned int& playoutTimestamp, 714 unsigned int& playoutTimestamp,
739 unsigned int* jitter, 715 unsigned int* jitter,
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 int playout_sample_rate_; 955 int playout_sample_rate_;
980 DtmfInfo dtmf_info_; 956 DtmfInfo dtmf_info_;
981 FakeAudioProcessing audio_processing_; 957 FakeAudioProcessing audio_processing_;
982 }; 958 };
983 959
984 #undef WEBRTC_CHECK_HEADER_EXTENSION_ID 960 #undef WEBRTC_CHECK_HEADER_EXTENSION_ID
985 961
986 } // namespace cricket 962 } // namespace cricket
987 963
988 #endif // TALK_SESSION_PHONE_FAKEWEBRTCVOICEENGINE_H_ 964 #endif // TALK_SESSION_PHONE_FAKEWEBRTCVOICEENGINE_H_
OLDNEW
« no previous file with comments | « no previous file | talk/media/webrtc/webrtcvoiceengine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698