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

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/transport_feedback_adapter.h

Issue 1363573002: Wire up transport sequence number / send time callbacks to webrtc via libjingle. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: More ios deps Created 5 years, 2 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
(...skipping 15 matching lines...) Expand all
26 26
27 class TransportFeedbackAdapter : public TransportFeedbackObserver, 27 class TransportFeedbackAdapter : public TransportFeedbackObserver,
28 public CallStatsObserver, 28 public CallStatsObserver,
29 public RemoteBitrateObserver { 29 public RemoteBitrateObserver {
30 public: 30 public:
31 TransportFeedbackAdapter(RtcpBandwidthObserver* bandwidth_observer, 31 TransportFeedbackAdapter(RtcpBandwidthObserver* bandwidth_observer,
32 Clock* clock, 32 Clock* clock,
33 ProcessThread* process_thread); 33 ProcessThread* process_thread);
34 virtual ~TransportFeedbackAdapter(); 34 virtual ~TransportFeedbackAdapter();
35 35
36 void OnPacketSent(const PacketInfo& info) override; 36 void OnSentPacket(const PacketInfo& info) override;
37
38 void UpdateSendTime(uint16_t sequence_number, int64_t send_time_ms);
37 39
38 void OnTransportFeedback(const rtcp::TransportFeedback& feedback) override; 40 void OnTransportFeedback(const rtcp::TransportFeedback& feedback) override;
39 41
40 void SetBitrateEstimator(RemoteBitrateEstimator* rbe); 42 void SetBitrateEstimator(RemoteBitrateEstimator* rbe);
41 43
42 RemoteBitrateEstimator* GetBitrateEstimator() const { 44 RemoteBitrateEstimator* GetBitrateEstimator() const {
43 return bitrate_estimator_.get(); 45 return bitrate_estimator_.get();
44 } 46 }
45 47
46 private: 48 private:
47 void OnReceiveBitrateChanged(const std::vector<unsigned int>& ssrcs, 49 void OnReceiveBitrateChanged(const std::vector<unsigned int>& ssrcs,
48 unsigned int bitrate) override; 50 unsigned int bitrate) override;
49 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; 51 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override;
50 52
51 rtc::CriticalSection lock_; 53 rtc::CriticalSection lock_;
52 SendTimeHistory send_time_history_ GUARDED_BY(&lock_); 54 SendTimeHistory send_time_history_ GUARDED_BY(&lock_);
53 rtc::scoped_ptr<RtcpBandwidthObserver> rtcp_bandwidth_observer_; 55 rtc::scoped_ptr<RtcpBandwidthObserver> rtcp_bandwidth_observer_;
54 rtc::scoped_ptr<RemoteBitrateEstimator> bitrate_estimator_; 56 rtc::scoped_ptr<RemoteBitrateEstimator> bitrate_estimator_;
55 ProcessThread* const process_thread_; 57 ProcessThread* const process_thread_;
56 Clock* const clock_; 58 Clock* const clock_;
57 int64_t current_offset_ms_; 59 int64_t current_offset_ms_;
58 int64_t last_timestamp_us_; 60 int64_t last_timestamp_us_;
59 }; 61 };
60 62
61 } // namespace webrtc 63 } // namespace webrtc
62 64
63 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TRANSPORT_FEEDBACK_ADAPTER_H_ 65 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TRANSPORT_FEEDBACK_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698