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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 class VoERTPObserver; | 63 class VoERTPObserver; |
64 class VoiceEngineObserver; | 64 class VoiceEngineObserver; |
65 | 65 |
66 struct CallStatistics; | 66 struct CallStatistics; |
67 struct ReportBlock; | 67 struct ReportBlock; |
68 struct SenderInfo; | 68 struct SenderInfo; |
69 | 69 |
70 namespace voe { | 70 namespace voe { |
71 | 71 |
72 class OutputMixer; | 72 class OutputMixer; |
73 class RtcEventLogProxy; | |
73 class RtpPacketSenderProxy; | 74 class RtpPacketSenderProxy; |
74 class Statistics; | 75 class Statistics; |
75 class StatisticsProxy; | 76 class StatisticsProxy; |
76 class TransportFeedbackProxy; | 77 class TransportFeedbackProxy; |
77 class TransmitMixer; | 78 class TransmitMixer; |
78 class TransportSequenceNumberProxy; | 79 class TransportSequenceNumberProxy; |
79 class VoERtcpObserver; | 80 class VoERtcpObserver; |
80 | 81 |
81 // Helper class to simplify locking scheme for members that are accessed from | 82 // Helper class to simplify locking scheme for members that are accessed from |
82 // multiple threads. | 83 // multiple threads. |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
171 { | 172 { |
172 public: | 173 public: |
173 friend class VoERtcpObserver; | 174 friend class VoERtcpObserver; |
174 | 175 |
175 enum { KNumSocketThreads = 1 }; | 176 enum { KNumSocketThreads = 1 }; |
176 enum { KNumberOfSocketBuffers = 8 }; | 177 enum { KNumberOfSocketBuffers = 8 }; |
177 virtual ~Channel(); | 178 virtual ~Channel(); |
178 static int32_t CreateChannel(Channel*& channel, | 179 static int32_t CreateChannel(Channel*& channel, |
179 int32_t channelId, | 180 int32_t channelId, |
180 uint32_t instanceId, | 181 uint32_t instanceId, |
181 RtcEventLog* const event_log, | |
182 const Config& config); | 182 const Config& config); |
183 Channel(int32_t channelId, | 183 Channel(int32_t channelId, |
184 uint32_t instanceId, | 184 uint32_t instanceId, |
185 RtcEventLog* const event_log, | |
186 const Config& config); | 185 const Config& config); |
187 int32_t Init(); | 186 int32_t Init(); |
188 int32_t SetEngineInformation(Statistics& engineStatistics, | 187 int32_t SetEngineInformation(Statistics& engineStatistics, |
189 OutputMixer& outputMixer, | 188 OutputMixer& outputMixer, |
190 TransmitMixer& transmitMixer, | 189 TransmitMixer& transmitMixer, |
191 ProcessThread& moduleProcessThread, | 190 ProcessThread& moduleProcessThread, |
192 AudioDeviceModule& audioDeviceModule, | 191 AudioDeviceModule& audioDeviceModule, |
193 VoiceEngineObserver* voiceEngineObserver, | 192 VoiceEngineObserver* voiceEngineObserver, |
194 rtc::CriticalSection* callbackCritSect); | 193 rtc::CriticalSection* callbackCritSect); |
195 int32_t UpdateLocalTimeStamp(); | 194 int32_t UpdateLocalTimeStamp(); |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
448 // Used for obtaining RTT for a receive-only channel. | 447 // Used for obtaining RTT for a receive-only channel. |
449 void set_associate_send_channel(const ChannelOwner& channel) { | 448 void set_associate_send_channel(const ChannelOwner& channel) { |
450 assert(_channelId != channel.channel()->ChannelId()); | 449 assert(_channelId != channel.channel()->ChannelId()); |
451 rtc::CritScope lock(&assoc_send_channel_lock_); | 450 rtc::CritScope lock(&assoc_send_channel_lock_); |
452 associate_send_channel_ = channel; | 451 associate_send_channel_ = channel; |
453 } | 452 } |
454 | 453 |
455 // Disassociate a send channel if it was associated. | 454 // Disassociate a send channel if it was associated. |
456 void DisassociateSendChannel(int channel_id); | 455 void DisassociateSendChannel(int channel_id); |
457 | 456 |
457 // Set a RtcEventLog logging object. | |
458 void SetRtcEventLog(RtcEventLog* event_log); | |
459 | |
458 protected: | 460 protected: |
459 void OnIncomingFractionLoss(int fraction_lost); | 461 void OnIncomingFractionLoss(int fraction_lost); |
460 | 462 |
461 private: | 463 private: |
462 bool ReceivePacket(const uint8_t* packet, | 464 bool ReceivePacket(const uint8_t* packet, |
463 size_t packet_length, | 465 size_t packet_length, |
464 const RTPHeader& header, | 466 const RTPHeader& header, |
465 bool in_order); | 467 bool in_order); |
466 bool HandleRtxPacket(const uint8_t* packet, | 468 bool HandleRtxPacket(const uint8_t* packet, |
467 size_t packet_length, | 469 size_t packet_length, |
(...skipping 17 matching lines...) Expand all Loading... | |
485 int64_t GetRTT(bool allow_associate_channel) const; | 487 int64_t GetRTT(bool allow_associate_channel) const; |
486 | 488 |
487 rtc::CriticalSection _fileCritSect; | 489 rtc::CriticalSection _fileCritSect; |
488 rtc::CriticalSection _callbackCritSect; | 490 rtc::CriticalSection _callbackCritSect; |
489 rtc::CriticalSection volume_settings_critsect_; | 491 rtc::CriticalSection volume_settings_critsect_; |
490 uint32_t _instanceId; | 492 uint32_t _instanceId; |
491 int32_t _channelId; | 493 int32_t _channelId; |
492 | 494 |
493 ChannelState channel_state_; | 495 ChannelState channel_state_; |
494 | 496 |
495 RtcEventLog* const event_log_; | 497 std::unique_ptr<voe::RtcEventLogProxy> event_log_; |
stefan-webrtc
2016/03/21 13:25:48
event_log_proxy_
ivoc
2016/03/22 13:44:55
Done.
| |
496 | 498 |
497 std::unique_ptr<RtpHeaderParser> rtp_header_parser_; | 499 std::unique_ptr<RtpHeaderParser> rtp_header_parser_; |
498 std::unique_ptr<RTPPayloadRegistry> rtp_payload_registry_; | 500 std::unique_ptr<RTPPayloadRegistry> rtp_payload_registry_; |
499 std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_; | 501 std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_; |
500 std::unique_ptr<StatisticsProxy> statistics_proxy_; | 502 std::unique_ptr<StatisticsProxy> statistics_proxy_; |
501 std::unique_ptr<RtpReceiver> rtp_receiver_; | 503 std::unique_ptr<RtpReceiver> rtp_receiver_; |
502 TelephoneEventHandler* telephone_event_handler_; | 504 TelephoneEventHandler* telephone_event_handler_; |
503 std::unique_ptr<RtpRtcp> _rtpRtcpModule; | 505 std::unique_ptr<RtpRtcp> _rtpRtcpModule; |
504 std::unique_ptr<AudioCodingModule> audio_coding_; | 506 std::unique_ptr<AudioCodingModule> audio_coding_; |
505 std::unique_ptr<AudioSinkInterface> audio_sink_; | 507 std::unique_ptr<AudioSinkInterface> audio_sink_; |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
595 PacketRouter* packet_router_ = nullptr; | 597 PacketRouter* packet_router_ = nullptr; |
596 std::unique_ptr<TransportFeedbackProxy> feedback_observer_proxy_; | 598 std::unique_ptr<TransportFeedbackProxy> feedback_observer_proxy_; |
597 std::unique_ptr<TransportSequenceNumberProxy> seq_num_allocator_proxy_; | 599 std::unique_ptr<TransportSequenceNumberProxy> seq_num_allocator_proxy_; |
598 std::unique_ptr<RtpPacketSenderProxy> rtp_packet_sender_proxy_; | 600 std::unique_ptr<RtpPacketSenderProxy> rtp_packet_sender_proxy_; |
599 }; | 601 }; |
600 | 602 |
601 } // namespace voe | 603 } // namespace voe |
602 } // namespace webrtc | 604 } // namespace webrtc |
603 | 605 |
604 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ | 606 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ |
OLD | NEW |