OLD | NEW |
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 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 enum { KNumberOfSocketBuffers = 8 }; | 129 enum { KNumberOfSocketBuffers = 8 }; |
130 virtual ~Channel(); | 130 virtual ~Channel(); |
131 static int32_t CreateChannel(Channel*& channel, | 131 static int32_t CreateChannel(Channel*& channel, |
132 int32_t channelId, | 132 int32_t channelId, |
133 uint32_t instanceId, | 133 uint32_t instanceId, |
134 const VoEBase::ChannelConfig& config); | 134 const VoEBase::ChannelConfig& config); |
135 Channel(int32_t channelId, | 135 Channel(int32_t channelId, |
136 uint32_t instanceId, | 136 uint32_t instanceId, |
137 const VoEBase::ChannelConfig& config); | 137 const VoEBase::ChannelConfig& config); |
138 int32_t Init(); | 138 int32_t Init(); |
139 void RegisterLegacyReceiveCodecs(); | |
140 void Terminate(); | 139 void Terminate(); |
141 int32_t SetEngineInformation(Statistics& engineStatistics, | 140 int32_t SetEngineInformation(Statistics& engineStatistics, |
142 OutputMixer& outputMixer, | 141 OutputMixer& outputMixer, |
143 ProcessThread& moduleProcessThread, | 142 ProcessThread& moduleProcessThread, |
144 AudioDeviceModule& audioDeviceModule, | 143 AudioDeviceModule& audioDeviceModule, |
145 VoiceEngineObserver* voiceEngineObserver, | 144 VoiceEngineObserver* voiceEngineObserver, |
146 rtc::CriticalSection* callbackCritSect, | 145 rtc::CriticalSection* callbackCritSect, |
147 rtc::TaskQueue* encoder_queue); | 146 rtc::TaskQueue* encoder_queue); |
148 | 147 |
149 void SetSink(std::unique_ptr<AudioSinkInterface> sink); | 148 void SetSink(std::unique_ptr<AudioSinkInterface> sink); |
(...skipping 14 matching lines...) Expand all Loading... |
164 // API methods | 163 // API methods |
165 | 164 |
166 // VoEBase | 165 // VoEBase |
167 int32_t StartPlayout(); | 166 int32_t StartPlayout(); |
168 int32_t StopPlayout(); | 167 int32_t StopPlayout(); |
169 int32_t StartSend(); | 168 int32_t StartSend(); |
170 void StopSend(); | 169 void StopSend(); |
171 int32_t RegisterVoiceEngineObserver(VoiceEngineObserver& observer); | 170 int32_t RegisterVoiceEngineObserver(VoiceEngineObserver& observer); |
172 int32_t DeRegisterVoiceEngineObserver(); | 171 int32_t DeRegisterVoiceEngineObserver(); |
173 | 172 |
174 // VoECodec | 173 // Codecs |
175 int32_t GetSendCodec(CodecInst& codec); | 174 int32_t GetSendCodec(CodecInst& codec); |
176 int32_t GetRecCodec(CodecInst& codec); | 175 int32_t GetRecCodec(CodecInst& codec); |
177 int32_t SetSendCodec(const CodecInst& codec); | 176 int32_t SetSendCodec(const CodecInst& codec); |
178 void SetBitRate(int bitrate_bps, int64_t probing_interval_ms); | 177 void SetBitRate(int bitrate_bps, int64_t probing_interval_ms); |
179 int32_t SetVADStatus(bool enableVAD, ACMVADMode mode, bool disableDTX); | |
180 int32_t GetVADStatus(bool& enabledVAD, ACMVADMode& mode, bool& disabledDTX); | |
181 int32_t SetRecPayloadType(const CodecInst& codec); | |
182 int32_t SetRecPayloadType(int payload_type, const SdpAudioFormat& format); | |
183 int32_t GetRecPayloadType(CodecInst& codec); | |
184 int32_t SetSendCNPayloadType(int type, PayloadFrequencies frequency); | |
185 int SetOpusMaxPlaybackRate(int frequency_hz); | |
186 int SetOpusDtx(bool enable_dtx); | |
187 int GetOpusDtx(bool* enabled); | |
188 bool EnableAudioNetworkAdaptor(const std::string& config_string); | 178 bool EnableAudioNetworkAdaptor(const std::string& config_string); |
189 void DisableAudioNetworkAdaptor(); | 179 void DisableAudioNetworkAdaptor(); |
190 void SetReceiverFrameLengthRange(int min_frame_length_ms, | 180 void SetReceiverFrameLengthRange(int min_frame_length_ms, |
191 int max_frame_length_ms); | 181 int max_frame_length_ms); |
192 | 182 |
193 // VoENetwork | 183 // VoENetwork |
194 int32_t RegisterExternalTransport(Transport* transport); | 184 int32_t RegisterExternalTransport(Transport* transport); |
195 int32_t DeRegisterExternalTransport(); | 185 int32_t DeRegisterExternalTransport(); |
196 int32_t ReceivedRTPPacket(const uint8_t* received_packet, | 186 int32_t ReceivedRTPPacket(const uint8_t* received_packet, |
197 size_t length, | 187 size_t length, |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 void SetRTCPStatus(bool enable); | 233 void SetRTCPStatus(bool enable); |
244 int GetRTCPStatus(bool& enabled); | 234 int GetRTCPStatus(bool& enabled); |
245 int SetRTCP_CNAME(const char cName[256]); | 235 int SetRTCP_CNAME(const char cName[256]); |
246 int GetRemoteRTCP_CNAME(char cName[256]); | 236 int GetRemoteRTCP_CNAME(char cName[256]); |
247 int SendApplicationDefinedRTCPPacket(unsigned char subType, | 237 int SendApplicationDefinedRTCPPacket(unsigned char subType, |
248 unsigned int name, | 238 unsigned int name, |
249 const char* data, | 239 const char* data, |
250 unsigned short dataLengthInBytes); | 240 unsigned short dataLengthInBytes); |
251 int GetRemoteRTCPReportBlocks(std::vector<ReportBlock>* report_blocks); | 241 int GetRemoteRTCPReportBlocks(std::vector<ReportBlock>* report_blocks); |
252 int GetRTPStatistics(CallStatistics& stats); | 242 int GetRTPStatistics(CallStatistics& stats); |
253 int SetCodecFECStatus(bool enable); | |
254 bool GetCodecFECStatus(); | |
255 void SetNACKStatus(bool enable, int maxNumberOfPackets); | 243 void SetNACKStatus(bool enable, int maxNumberOfPackets); |
256 | 244 |
257 // From AudioPacketizationCallback in the ACM | 245 // From AudioPacketizationCallback in the ACM |
258 int32_t SendData(FrameType frameType, | 246 int32_t SendData(FrameType frameType, |
259 uint8_t payloadType, | 247 uint8_t payloadType, |
260 uint32_t timeStamp, | 248 uint32_t timeStamp, |
261 const uint8_t* payloadData, | 249 const uint8_t* payloadData, |
262 size_t payloadSize, | 250 size_t payloadSize, |
263 const RTPFragmentationHeader* fragmentation) override; | 251 const RTPFragmentationHeader* fragmentation) override; |
264 | 252 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 | 468 |
481 bool encoder_queue_is_active_ RTC_GUARDED_BY(encoder_queue_lock_) = false; | 469 bool encoder_queue_is_active_ RTC_GUARDED_BY(encoder_queue_lock_) = false; |
482 | 470 |
483 rtc::TaskQueue* encoder_queue_ = nullptr; | 471 rtc::TaskQueue* encoder_queue_ = nullptr; |
484 }; | 472 }; |
485 | 473 |
486 } // namespace voe | 474 } // namespace voe |
487 } // namespace webrtc | 475 } // namespace webrtc |
488 | 476 |
489 #endif // VOICE_ENGINE_CHANNEL_H_ | 477 #endif // VOICE_ENGINE_CHANNEL_H_ |
OLD | NEW |