| 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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 // Associate to a send channel. | 408 // Associate to a send channel. |
| 409 // Used for obtaining RTT for a receive-only channel. | 409 // Used for obtaining RTT for a receive-only channel. |
| 410 void set_associate_send_channel(const ChannelOwner& channel); | 410 void set_associate_send_channel(const ChannelOwner& channel); |
| 411 // Disassociate a send channel if it was associated. | 411 // Disassociate a send channel if it was associated. |
| 412 void DisassociateSendChannel(int channel_id); | 412 void DisassociateSendChannel(int channel_id); |
| 413 | 413 |
| 414 // Set a RtcEventLog logging object. | 414 // Set a RtcEventLog logging object. |
| 415 void SetRtcEventLog(RtcEventLog* event_log); | 415 void SetRtcEventLog(RtcEventLog* event_log); |
| 416 | 416 |
| 417 void SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats); | 417 void SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats); |
| 418 void SetTransportOverhead(int transport_overhead_per_packet); | 418 void SetTransportOverhead(size_t transport_overhead_per_packet); |
| 419 | 419 |
| 420 // From OverheadObserver in the RTP/RTCP module | 420 // From OverheadObserver in the RTP/RTCP module |
| 421 void OnOverheadChanged(size_t overhead_bytes_per_packet) override; | 421 void OnOverheadChanged(size_t overhead_bytes_per_packet) override; |
| 422 | 422 |
| 423 protected: | 423 protected: |
| 424 void OnIncomingFractionLoss(int fraction_lost); | 424 void OnIncomingFractionLoss(int fraction_lost); |
| 425 | 425 |
| 426 private: | 426 private: |
| 427 bool ReceivePacket(const uint8_t* packet, | 427 bool ReceivePacket(const uint8_t* packet, |
| 428 size_t packet_length, | 428 size_t packet_length, |
| 429 const RTPHeader& header, | 429 const RTPHeader& header, |
| 430 bool in_order); | 430 bool in_order); |
| 431 bool HandleRtxPacket(const uint8_t* packet, | 431 bool HandleRtxPacket(const uint8_t* packet, |
| 432 size_t packet_length, | 432 size_t packet_length, |
| 433 const RTPHeader& header); | 433 const RTPHeader& header); |
| 434 bool IsPacketInOrder(const RTPHeader& header) const; | 434 bool IsPacketInOrder(const RTPHeader& header) const; |
| 435 bool IsPacketRetransmitted(const RTPHeader& header, bool in_order) const; | 435 bool IsPacketRetransmitted(const RTPHeader& header, bool in_order) const; |
| 436 int ResendPackets(const uint16_t* sequence_numbers, int length); | 436 int ResendPackets(const uint16_t* sequence_numbers, int length); |
| 437 int32_t MixOrReplaceAudioWithFile(int mixingFrequency); | 437 int32_t MixOrReplaceAudioWithFile(int mixingFrequency); |
| 438 int32_t MixAudioWithFile(AudioFrame& audioFrame, int mixingFrequency); | 438 int32_t MixAudioWithFile(AudioFrame& audioFrame, int mixingFrequency); |
| 439 void UpdatePlayoutTimestamp(bool rtcp); | 439 void UpdatePlayoutTimestamp(bool rtcp); |
| 440 void RegisterReceiveCodecsToRTPModule(); | 440 void RegisterReceiveCodecsToRTPModule(); |
| 441 | 441 |
| 442 int SetSendRtpHeaderExtension(bool enable, | 442 int SetSendRtpHeaderExtension(bool enable, |
| 443 RTPExtensionType type, | 443 RTPExtensionType type, |
| 444 unsigned char id); | 444 unsigned char id); |
| 445 | 445 |
| 446 void UpdateOverheadForEncoder(); |
| 447 |
| 446 int GetRtpTimestampRateHz() const; | 448 int GetRtpTimestampRateHz() const; |
| 447 int64_t GetRTT(bool allow_associate_channel) const; | 449 int64_t GetRTT(bool allow_associate_channel) const; |
| 448 | 450 |
| 449 rtc::CriticalSection _fileCritSect; | 451 rtc::CriticalSection _fileCritSect; |
| 450 rtc::CriticalSection _callbackCritSect; | 452 rtc::CriticalSection _callbackCritSect; |
| 451 rtc::CriticalSection volume_settings_critsect_; | 453 rtc::CriticalSection volume_settings_critsect_; |
| 452 uint32_t _instanceId; | 454 uint32_t _instanceId; |
| 453 int32_t _channelId; | 455 int32_t _channelId; |
| 454 | 456 |
| 455 ChannelState channel_state_; | 457 ChannelState channel_state_; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 // VoEVolumeControl | 524 // VoEVolumeControl |
| 523 bool input_mute_ GUARDED_BY(volume_settings_critsect_); | 525 bool input_mute_ GUARDED_BY(volume_settings_critsect_); |
| 524 bool previous_frame_muted_; // Only accessed from PrepareEncodeAndSend(). | 526 bool previous_frame_muted_; // Only accessed from PrepareEncodeAndSend(). |
| 525 float _panLeft GUARDED_BY(volume_settings_critsect_); | 527 float _panLeft GUARDED_BY(volume_settings_critsect_); |
| 526 float _panRight GUARDED_BY(volume_settings_critsect_); | 528 float _panRight GUARDED_BY(volume_settings_critsect_); |
| 527 float _outputGain GUARDED_BY(volume_settings_critsect_); | 529 float _outputGain GUARDED_BY(volume_settings_critsect_); |
| 528 // VoeRTP_RTCP | 530 // VoeRTP_RTCP |
| 529 uint32_t _lastLocalTimeStamp; | 531 uint32_t _lastLocalTimeStamp; |
| 530 int8_t _lastPayloadType; | 532 int8_t _lastPayloadType; |
| 531 bool _includeAudioLevelIndication; | 533 bool _includeAudioLevelIndication; |
| 534 size_t transport_overhead_per_packet_; |
| 535 size_t rtp_overhead_per_packet_; |
| 532 // VoENetwork | 536 // VoENetwork |
| 533 AudioFrame::SpeechType _outputSpeechType; | 537 AudioFrame::SpeechType _outputSpeechType; |
| 534 // VoEVideoSync | 538 // VoEVideoSync |
| 535 rtc::CriticalSection video_sync_lock_; | 539 rtc::CriticalSection video_sync_lock_; |
| 536 // VoEAudioProcessing | 540 // VoEAudioProcessing |
| 537 bool restored_packet_in_use_; | 541 bool restored_packet_in_use_; |
| 538 // RtcpBandwidthObserver | 542 // RtcpBandwidthObserver |
| 539 std::unique_ptr<VoERtcpObserver> rtcp_observer_; | 543 std::unique_ptr<VoERtcpObserver> rtcp_observer_; |
| 540 // An associated send channel. | 544 // An associated send channel. |
| 541 rtc::CriticalSection assoc_send_channel_lock_; | 545 rtc::CriticalSection assoc_send_channel_lock_; |
| 542 ChannelOwner associate_send_channel_ GUARDED_BY(assoc_send_channel_lock_); | 546 ChannelOwner associate_send_channel_ GUARDED_BY(assoc_send_channel_lock_); |
| 543 | 547 |
| 544 bool pacing_enabled_; | 548 bool pacing_enabled_; |
| 545 PacketRouter* packet_router_ = nullptr; | 549 PacketRouter* packet_router_ = nullptr; |
| 546 std::unique_ptr<TransportFeedbackProxy> feedback_observer_proxy_; | 550 std::unique_ptr<TransportFeedbackProxy> feedback_observer_proxy_; |
| 547 std::unique_ptr<TransportSequenceNumberProxy> seq_num_allocator_proxy_; | 551 std::unique_ptr<TransportSequenceNumberProxy> seq_num_allocator_proxy_; |
| 548 std::unique_ptr<RtpPacketSenderProxy> rtp_packet_sender_proxy_; | 552 std::unique_ptr<RtpPacketSenderProxy> rtp_packet_sender_proxy_; |
| 549 std::unique_ptr<RateLimiter> retransmission_rate_limiter_; | 553 std::unique_ptr<RateLimiter> retransmission_rate_limiter_; |
| 550 | 554 |
| 551 // TODO(ossu): Remove once GetAudioDecoderFactory() is no longer needed. | 555 // TODO(ossu): Remove once GetAudioDecoderFactory() is no longer needed. |
| 552 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; | 556 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; |
| 553 | 557 |
| 554 SmoothingFilterImpl bitrate_smoother_; | 558 SmoothingFilterImpl bitrate_smoother_; |
| 555 }; | 559 }; |
| 556 | 560 |
| 557 } // namespace voe | 561 } // namespace voe |
| 558 } // namespace webrtc | 562 } // namespace webrtc |
| 559 | 563 |
| 560 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ | 564 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ |
| OLD | NEW |