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

Side by Side Diff: webrtc/audio/audio_send_stream.h

Issue 2979833002: Add a histogram metric tracking for how long audio RTP packets are sent (Closed)
Patch Set: Adjust for comments. Created 3 years, 5 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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
11 #ifndef WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ 11 #ifndef WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_
12 #define WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ 12 #define WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_
13 13
14 #include <memory> 14 #include <memory>
15 #include <vector> 15 #include <vector>
16 16
17 #include "webrtc/audio/time_interval.h"
17 #include "webrtc/call/audio_send_stream.h" 18 #include "webrtc/call/audio_send_stream.h"
18 #include "webrtc/call/audio_state.h" 19 #include "webrtc/call/audio_state.h"
19 #include "webrtc/call/bitrate_allocator.h" 20 #include "webrtc/call/bitrate_allocator.h"
20 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" 21 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
21 #include "webrtc/rtc_base/constructormagic.h" 22 #include "webrtc/rtc_base/constructormagic.h"
22 #include "webrtc/rtc_base/thread_checker.h" 23 #include "webrtc/rtc_base/thread_checker.h"
23 #include "webrtc/voice_engine/transport_feedback_packet_loss_tracker.h" 24 #include "webrtc/voice_engine/transport_feedback_packet_loss_tracker.h"
24 25
25 namespace webrtc { 26 namespace webrtc {
26 class VoiceEngine; 27 class VoiceEngine;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 70
70 // From PacketFeedbackObserver. 71 // From PacketFeedbackObserver.
71 void OnPacketAdded(uint32_t ssrc, uint16_t seq_num) override; 72 void OnPacketAdded(uint32_t ssrc, uint16_t seq_num) override;
72 void OnPacketFeedbackVector( 73 void OnPacketFeedbackVector(
73 const std::vector<PacketFeedback>& packet_feedback_vector) override; 74 const std::vector<PacketFeedback>& packet_feedback_vector) override;
74 75
75 const webrtc::AudioSendStream::Config& config() const; 76 const webrtc::AudioSendStream::Config& config() const;
76 void SetTransportOverhead(int transport_overhead_per_packet); 77 void SetTransportOverhead(int transport_overhead_per_packet);
77 78
78 RtpState GetRtpState() const; 79 RtpState GetRtpState() const;
80 const TimeInterval& GetActiveLifetime() const;
79 81
80 private: 82 private:
83 class TimedTransport;
84
81 VoiceEngine* voice_engine() const; 85 VoiceEngine* voice_engine() const;
82 86
83 // These are all static to make it less likely that (the old) config_ is 87 // These are all static to make it less likely that (the old) config_ is
84 // accessed unintentionally. 88 // accessed unintentionally.
85 static void ConfigureStream(AudioSendStream* stream, 89 static void ConfigureStream(AudioSendStream* stream,
86 const Config& new_config, 90 const Config& new_config,
87 bool first_time); 91 bool first_time);
88 static bool SetupSendCodec(AudioSendStream* stream, const Config& new_config); 92 static bool SetupSendCodec(AudioSendStream* stream, const Config& new_config);
89 static bool ReconfigureSendCodec(AudioSendStream* stream, 93 static bool ReconfigureSendCodec(AudioSendStream* stream,
90 const Config& new_config); 94 const Config& new_config);
(...skipping 19 matching lines...) Expand all
110 RtpTransportControllerSendInterface* const transport_; 114 RtpTransportControllerSendInterface* const transport_;
111 std::unique_ptr<RtcpBandwidthObserver> bandwidth_observer_; 115 std::unique_ptr<RtcpBandwidthObserver> bandwidth_observer_;
112 116
113 rtc::CriticalSection packet_loss_tracker_cs_; 117 rtc::CriticalSection packet_loss_tracker_cs_;
114 TransportFeedbackPacketLossTracker packet_loss_tracker_ 118 TransportFeedbackPacketLossTracker packet_loss_tracker_
115 GUARDED_BY(&packet_loss_tracker_cs_); 119 GUARDED_BY(&packet_loss_tracker_cs_);
116 120
117 RtpRtcp* rtp_rtcp_module_; 121 RtpRtcp* rtp_rtcp_module_;
118 rtc::Optional<RtpState> const suspended_rtp_state_; 122 rtc::Optional<RtpState> const suspended_rtp_state_;
119 123
124 std::unique_ptr<TimedTransport> timed_send_transport_adapter_;
125 TimeInterval active_lifetime_;
126
120 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSendStream); 127 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSendStream);
121 }; 128 };
122 } // namespace internal 129 } // namespace internal
123 } // namespace webrtc 130 } // namespace webrtc
124 131
125 #endif // WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_ 132 #endif // WEBRTC_AUDIO_AUDIO_SEND_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698