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

Side by Side Diff: webrtc/voice_engine/channel.h

Issue 1748403002: Move RtcEventLog object from inside VoiceEngine to Call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Processed review comments and rebased. Created 4 years, 9 months 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
OLDNEW
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 class VoERTPObserver; 56 class VoERTPObserver;
57 class VoiceEngineObserver; 57 class VoiceEngineObserver;
58 58
59 struct CallStatistics; 59 struct CallStatistics;
60 struct ReportBlock; 60 struct ReportBlock;
61 struct SenderInfo; 61 struct SenderInfo;
62 62
63 namespace voe { 63 namespace voe {
64 64
65 class OutputMixer; 65 class OutputMixer;
66 class RtcEventLogProxy;
66 class RtpPacketSenderProxy; 67 class RtpPacketSenderProxy;
67 class Statistics; 68 class Statistics;
68 class StatisticsProxy; 69 class StatisticsProxy;
69 class TransportFeedbackProxy; 70 class TransportFeedbackProxy;
70 class TransmitMixer; 71 class TransmitMixer;
71 class TransportSequenceNumberProxy; 72 class TransportSequenceNumberProxy;
72 class VoERtcpObserver; 73 class VoERtcpObserver;
73 74
74 // Helper class to simplify locking scheme for members that are accessed from 75 // Helper class to simplify locking scheme for members that are accessed from
75 // multiple threads. 76 // multiple threads.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 { 164 {
164 public: 165 public:
165 friend class VoERtcpObserver; 166 friend class VoERtcpObserver;
166 167
167 enum { KNumSocketThreads = 1 }; 168 enum { KNumSocketThreads = 1 };
168 enum { KNumberOfSocketBuffers = 8 }; 169 enum { KNumberOfSocketBuffers = 8 };
169 virtual ~Channel(); 170 virtual ~Channel();
170 static int32_t CreateChannel(Channel*& channel, 171 static int32_t CreateChannel(Channel*& channel,
171 int32_t channelId, 172 int32_t channelId,
172 uint32_t instanceId, 173 uint32_t instanceId,
173 RtcEventLog* const event_log,
174 const Config& config); 174 const Config& config);
175 Channel(int32_t channelId, 175 Channel(int32_t channelId,
176 uint32_t instanceId, 176 uint32_t instanceId,
177 RtcEventLog* const event_log,
178 const Config& config); 177 const Config& config);
179 int32_t Init(); 178 int32_t Init();
180 int32_t SetEngineInformation(Statistics& engineStatistics, 179 int32_t SetEngineInformation(Statistics& engineStatistics,
181 OutputMixer& outputMixer, 180 OutputMixer& outputMixer,
182 TransmitMixer& transmitMixer, 181 TransmitMixer& transmitMixer,
183 ProcessThread& moduleProcessThread, 182 ProcessThread& moduleProcessThread,
184 AudioDeviceModule& audioDeviceModule, 183 AudioDeviceModule& audioDeviceModule,
185 VoiceEngineObserver* voiceEngineObserver, 184 VoiceEngineObserver* voiceEngineObserver,
186 rtc::CriticalSection* callbackCritSect); 185 rtc::CriticalSection* callbackCritSect);
187 int32_t UpdateLocalTimeStamp(); 186 int32_t UpdateLocalTimeStamp();
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 // Used for obtaining RTT for a receive-only channel. 426 // Used for obtaining RTT for a receive-only channel.
428 void set_associate_send_channel(const ChannelOwner& channel) { 427 void set_associate_send_channel(const ChannelOwner& channel) {
429 assert(_channelId != channel.channel()->ChannelId()); 428 assert(_channelId != channel.channel()->ChannelId());
430 rtc::CritScope lock(&assoc_send_channel_lock_); 429 rtc::CritScope lock(&assoc_send_channel_lock_);
431 associate_send_channel_ = channel; 430 associate_send_channel_ = channel;
432 } 431 }
433 432
434 // Disassociate a send channel if it was associated. 433 // Disassociate a send channel if it was associated.
435 void DisassociateSendChannel(int channel_id); 434 void DisassociateSendChannel(int channel_id);
436 435
436 // Set a RtcEventLog logging object.
437 void SetRtcEventLog(RtcEventLog* event_log);
438
437 protected: 439 protected:
438 void OnIncomingFractionLoss(int fraction_lost); 440 void OnIncomingFractionLoss(int fraction_lost);
439 441
440 private: 442 private:
441 bool ReceivePacket(const uint8_t* packet, 443 bool ReceivePacket(const uint8_t* packet,
442 size_t packet_length, 444 size_t packet_length,
443 const RTPHeader& header, 445 const RTPHeader& header,
444 bool in_order); 446 bool in_order);
445 bool HandleRtxPacket(const uint8_t* packet, 447 bool HandleRtxPacket(const uint8_t* packet,
446 size_t packet_length, 448 size_t packet_length,
(...skipping 16 matching lines...) Expand all
463 int64_t GetRTT(bool allow_associate_channel) const; 465 int64_t GetRTT(bool allow_associate_channel) const;
464 466
465 rtc::CriticalSection _fileCritSect; 467 rtc::CriticalSection _fileCritSect;
466 rtc::CriticalSection _callbackCritSect; 468 rtc::CriticalSection _callbackCritSect;
467 rtc::CriticalSection volume_settings_critsect_; 469 rtc::CriticalSection volume_settings_critsect_;
468 uint32_t _instanceId; 470 uint32_t _instanceId;
469 int32_t _channelId; 471 int32_t _channelId;
470 472
471 ChannelState channel_state_; 473 ChannelState channel_state_;
472 474
473 RtcEventLog* const event_log_; 475 std::unique_ptr<voe::RtcEventLogProxy> event_log_proxy_;
474 476
475 std::unique_ptr<RtpHeaderParser> rtp_header_parser_; 477 std::unique_ptr<RtpHeaderParser> rtp_header_parser_;
476 std::unique_ptr<RTPPayloadRegistry> rtp_payload_registry_; 478 std::unique_ptr<RTPPayloadRegistry> rtp_payload_registry_;
477 std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_; 479 std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_;
478 std::unique_ptr<StatisticsProxy> statistics_proxy_; 480 std::unique_ptr<StatisticsProxy> statistics_proxy_;
479 std::unique_ptr<RtpReceiver> rtp_receiver_; 481 std::unique_ptr<RtpReceiver> rtp_receiver_;
480 TelephoneEventHandler* telephone_event_handler_; 482 TelephoneEventHandler* telephone_event_handler_;
481 std::unique_ptr<RtpRtcp> _rtpRtcpModule; 483 std::unique_ptr<RtpRtcp> _rtpRtcpModule;
482 std::unique_ptr<AudioCodingModule> audio_coding_; 484 std::unique_ptr<AudioCodingModule> audio_coding_;
483 std::unique_ptr<AudioSinkInterface> audio_sink_; 485 std::unique_ptr<AudioSinkInterface> audio_sink_;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 PacketRouter* packet_router_ = nullptr; 569 PacketRouter* packet_router_ = nullptr;
568 std::unique_ptr<TransportFeedbackProxy> feedback_observer_proxy_; 570 std::unique_ptr<TransportFeedbackProxy> feedback_observer_proxy_;
569 std::unique_ptr<TransportSequenceNumberProxy> seq_num_allocator_proxy_; 571 std::unique_ptr<TransportSequenceNumberProxy> seq_num_allocator_proxy_;
570 std::unique_ptr<RtpPacketSenderProxy> rtp_packet_sender_proxy_; 572 std::unique_ptr<RtpPacketSenderProxy> rtp_packet_sender_proxy_;
571 }; 573 };
572 574
573 } // namespace voe 575 } // namespace voe
574 } // namespace webrtc 576 } // namespace webrtc
575 577
576 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ 578 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698