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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 friend class VoERtcpObserver; | 168 friend class VoERtcpObserver; |
169 | 169 |
170 enum { KNumSocketThreads = 1 }; | 170 enum { KNumSocketThreads = 1 }; |
171 enum { KNumberOfSocketBuffers = 8 }; | 171 enum { KNumberOfSocketBuffers = 8 }; |
172 virtual ~Channel(); | 172 virtual ~Channel(); |
173 static int32_t CreateChannel(Channel*& channel, | 173 static int32_t CreateChannel(Channel*& channel, |
174 int32_t channelId, | 174 int32_t channelId, |
175 uint32_t instanceId, | 175 uint32_t instanceId, |
176 RtcEventLog* const event_log, | 176 RtcEventLog* const event_log, |
177 const Config& config); | 177 const Config& config); |
| 178 static int32_t CreateChannel( |
| 179 Channel*& channel, |
| 180 int32_t channelId, |
| 181 uint32_t instanceId, |
| 182 RtcEventLog* const event_log, |
| 183 const Config& config, |
| 184 std::shared_ptr<AudioDecoderFactory> decoder_factory); |
178 Channel(int32_t channelId, | 185 Channel(int32_t channelId, |
179 uint32_t instanceId, | 186 uint32_t instanceId, |
180 RtcEventLog* const event_log, | 187 RtcEventLog* const event_log, |
181 const Config& config); | 188 const Config& config, |
| 189 std::shared_ptr<AudioDecoderFactory> decoder_factory); |
182 int32_t Init(); | 190 int32_t Init(); |
183 int32_t SetEngineInformation(Statistics& engineStatistics, | 191 int32_t SetEngineInformation(Statistics& engineStatistics, |
184 OutputMixer& outputMixer, | 192 OutputMixer& outputMixer, |
185 TransmitMixer& transmitMixer, | 193 TransmitMixer& transmitMixer, |
186 ProcessThread& moduleProcessThread, | 194 ProcessThread& moduleProcessThread, |
187 AudioDeviceModule& audioDeviceModule, | 195 AudioDeviceModule& audioDeviceModule, |
188 VoiceEngineObserver* voiceEngineObserver, | 196 VoiceEngineObserver* voiceEngineObserver, |
189 rtc::CriticalSection* callbackCritSect); | 197 rtc::CriticalSection* callbackCritSect); |
190 int32_t UpdateLocalTimeStamp(); | 198 int32_t UpdateLocalTimeStamp(); |
191 | 199 |
192 void SetSink(std::unique_ptr<AudioSinkInterface> sink); | 200 void SetSink(std::unique_ptr<AudioSinkInterface> sink); |
193 | 201 |
| 202 // TODO(ossu): Don't use! It's only here to confirm that the decoder factory |
| 203 // passed into AudioReceiveStream is the same as the one set when creating the |
| 204 // ADM. Once Channel creation is moved into Audio{Send,Receive}Stream this can |
| 205 // go. |
| 206 const std::shared_ptr<AudioDecoderFactory>& GetAudioDecoderFactory() const; |
| 207 |
194 // API methods | 208 // API methods |
195 | 209 |
196 // VoEBase | 210 // VoEBase |
197 int32_t StartPlayout(); | 211 int32_t StartPlayout(); |
198 int32_t StopPlayout(); | 212 int32_t StopPlayout(); |
199 int32_t StartSend(); | 213 int32_t StartSend(); |
200 int32_t StopSend(); | 214 int32_t StopSend(); |
201 int32_t StartReceiving(); | 215 int32_t StartReceiving(); |
202 int32_t StopReceiving(); | 216 int32_t StopReceiving(); |
203 | 217 |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 std::unique_ptr<NetworkPredictor> network_predictor_; | 581 std::unique_ptr<NetworkPredictor> network_predictor_; |
568 // An associated send channel. | 582 // An associated send channel. |
569 rtc::CriticalSection assoc_send_channel_lock_; | 583 rtc::CriticalSection assoc_send_channel_lock_; |
570 ChannelOwner associate_send_channel_ GUARDED_BY(assoc_send_channel_lock_); | 584 ChannelOwner associate_send_channel_ GUARDED_BY(assoc_send_channel_lock_); |
571 | 585 |
572 bool pacing_enabled_; | 586 bool pacing_enabled_; |
573 PacketRouter* packet_router_ = nullptr; | 587 PacketRouter* packet_router_ = nullptr; |
574 std::unique_ptr<TransportFeedbackProxy> feedback_observer_proxy_; | 588 std::unique_ptr<TransportFeedbackProxy> feedback_observer_proxy_; |
575 std::unique_ptr<TransportSequenceNumberProxy> seq_num_allocator_proxy_; | 589 std::unique_ptr<TransportSequenceNumberProxy> seq_num_allocator_proxy_; |
576 std::unique_ptr<RtpPacketSenderProxy> rtp_packet_sender_proxy_; | 590 std::unique_ptr<RtpPacketSenderProxy> rtp_packet_sender_proxy_; |
| 591 |
| 592 // TODO(ossu): Remove once GetAudioDecoderFactory() is no longer needed. |
| 593 std::shared_ptr<AudioDecoderFactory> decoder_factory_; |
577 }; | 594 }; |
578 | 595 |
579 } // namespace voe | 596 } // namespace voe |
580 } // namespace webrtc | 597 } // namespace webrtc |
581 | 598 |
582 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ | 599 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ |
OLD | NEW |