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

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

Issue 1329083005: Add TransportFeedback adapter, adapting remote feedback to bwe estiamtor (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 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
(Empty)
1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TRANSPORT_FEEDBACK_ADAPTER_H_
12 #define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TRANSPORT_FEEDBACK_ADAPTER_H_
13
14 #include <vector>
15
16 #include "webrtc/base/criticalsection.h"
17 #include "webrtc/base/thread_annotations.h"
18 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
19 #include "webrtc/modules/interface/module_common_types.h"
20 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat or.h"
21 #include "webrtc/modules/remote_bitrate_estimator/include/send_time_history.h"
22
23 namespace webrtc {
24
25 class ProcessThread;
26
27 class TransportFeedbackAdapter : public TransportFeedbackObserver,
28 public CallStatsObserver,
29 public RemoteBitrateObserver {
30 public:
31 TransportFeedbackAdapter(RtcpBandwidthObserver* bandwidth_observer,
32 Clock* clock,
33 ProcessThread* process_thread);
34 virtual ~TransportFeedbackAdapter();
35
36 void OnPacketSent(uint16_t sequence_number,
37 int64_t send_time,
38 size_t size,
39 bool was_paced) override;
40
41 void OnTransportFeedback(const rtcp::TransportFeedback& feedback) override;
42
43 void SetBitrateEstimator(RemoteBitrateEstimator* rbe);
44
45 private:
46 void OnReceiveBitrateChanged(const std::vector<unsigned int>& ssrcs,
47 unsigned int bitrate) override;
48 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override;
49
50 rtc::CriticalSection lock_;
51 SendTimeHistory send_time_history_ GUARDED_BY(&lock_);
52 rtc::scoped_ptr<RtcpBandwidthObserver> rtcp_bandwidth_observer_;
53 rtc::scoped_ptr<RemoteBitrateEstimator> bitrate_estimator_;
54 ProcessThread* const process_thread_;
55 Clock* const clock_;
56 int64_t current_offset_ms_;
57 int64_t last_timestamp_us_;
58 };
59
60 } // namespace webrtc
61
62 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TRANSPORT_FEEDBACK_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698