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

Side by Side Diff: webrtc/video/vie_remb.h

Issue 1613053003: Swap use of CriticalSectionWrapper for rtc::CriticalSection in webrtc/video. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase? Created 4 years, 11 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
« no previous file with comments | « webrtc/video/vie_receiver.cc ('k') | webrtc/video/vie_remb.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 #ifndef WEBRTC_VIDEO_VIE_REMB_H_ 11 #ifndef WEBRTC_VIDEO_VIE_REMB_H_
12 #define WEBRTC_VIDEO_VIE_REMB_H_ 12 #define WEBRTC_VIDEO_VIE_REMB_H_
13 13
14 #include <list> 14 #include <list>
15 #include <utility> 15 #include <utility>
16 #include <vector> 16 #include <vector>
17 17
18 #include "webrtc/base/criticalsection.h"
18 #include "webrtc/base/scoped_ptr.h" 19 #include "webrtc/base/scoped_ptr.h"
19 #include "webrtc/modules/include/module.h" 20 #include "webrtc/modules/include/module.h"
20 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat or.h" 21 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat or.h"
21 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" 22 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
22 23
23 namespace webrtc { 24 namespace webrtc {
24 25
25 class CriticalSectionWrapper;
26 class ProcessThread; 26 class ProcessThread;
27 class RtpRtcp; 27 class RtpRtcp;
28 28
29 class VieRemb : public RemoteBitrateObserver { 29 class VieRemb : public RemoteBitrateObserver {
30 public: 30 public:
31 explicit VieRemb(Clock* clock); 31 explicit VieRemb(Clock* clock);
32 ~VieRemb(); 32 ~VieRemb();
33 33
34 // Called to add a receive channel to include in the REMB packet. 34 // Called to add a receive channel to include in the REMB packet.
35 void AddReceiveChannel(RtpRtcp* rtp_rtcp); 35 void AddReceiveChannel(RtpRtcp* rtp_rtcp);
(...skipping 15 matching lines...) Expand all
51 // estimate has decreased or if no RTCP REMB packet has been sent for 51 // estimate has decreased or if no RTCP REMB packet has been sent for
52 // a certain time interval. 52 // a certain time interval.
53 // Implements RtpReceiveBitrateUpdate. 53 // Implements RtpReceiveBitrateUpdate.
54 virtual void OnReceiveBitrateChanged(const std::vector<unsigned int>& ssrcs, 54 virtual void OnReceiveBitrateChanged(const std::vector<unsigned int>& ssrcs,
55 unsigned int bitrate); 55 unsigned int bitrate);
56 56
57 private: 57 private:
58 typedef std::list<RtpRtcp*> RtpModules; 58 typedef std::list<RtpRtcp*> RtpModules;
59 59
60 Clock* const clock_; 60 Clock* const clock_;
61 rtc::scoped_ptr<CriticalSectionWrapper> list_crit_; 61 mutable rtc::CriticalSection list_crit_;
62 62
63 // The last time a REMB was sent. 63 // The last time a REMB was sent.
64 int64_t last_remb_time_; 64 int64_t last_remb_time_;
65 unsigned int last_send_bitrate_; 65 unsigned int last_send_bitrate_;
66 66
67 // All RtpRtcp modules to include in the REMB packet. 67 // All RtpRtcp modules to include in the REMB packet.
68 RtpModules receive_modules_; 68 RtpModules receive_modules_;
69 69
70 // All modules that can send REMB RTCP. 70 // All modules that can send REMB RTCP.
71 RtpModules rtcp_sender_; 71 RtpModules rtcp_sender_;
72 72
73 // The last bitrate update. 73 // The last bitrate update.
74 unsigned int bitrate_; 74 unsigned int bitrate_;
75 }; 75 };
76 76
77 } // namespace webrtc 77 } // namespace webrtc
78 78
79 #endif // WEBRTC_VIDEO_VIE_REMB_H_ 79 #endif // WEBRTC_VIDEO_VIE_REMB_H_
OLDNEW
« no previous file with comments | « webrtc/video/vie_receiver.cc ('k') | webrtc/video/vie_remb.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698