|
36 | 36 | #include "pc/stats_collector.h"
|
37 | 37 | #include "pc/stream_collection.h"
|
38 | 38 | #include "pc/transceiver_list.h"
|
| 39 | +#include "pc/usage_pattern.h" |
39 | 40 | #include "pc/webrtc_session_description_factory.h"
|
40 | 41 | #include "rtc_base/experiments/field_trial_parser.h"
|
41 | 42 | #include "rtc_base/operations_chain.h"
|
@@ -70,53 +71,6 @@ class PeerConnection : public PeerConnectionInternal,
|
70 | 71 | public RtpSenderBase::SetStreamsObserver,
|
71 | 72 | public sigslot::has_slots<> {
|
72 | 73 | public:
|
73 |
| - // A bit in the usage pattern is registered when its defining event occurs at |
74 |
| - // least once. |
75 |
| - enum class UsageEvent : int { |
76 |
| - TURN_SERVER_ADDED = 0x01, |
77 |
| - STUN_SERVER_ADDED = 0x02, |
78 |
| - DATA_ADDED = 0x04, |
79 |
| - AUDIO_ADDED = 0x08, |
80 |
| - VIDEO_ADDED = 0x10, |
81 |
| - // |SetLocalDescription| returns successfully. |
82 |
| - SET_LOCAL_DESCRIPTION_SUCCEEDED = 0x20, |
83 |
| - // |SetRemoteDescription| returns successfully. |
84 |
| - SET_REMOTE_DESCRIPTION_SUCCEEDED = 0x40, |
85 |
| - // A local candidate (with type host, server-reflexive, or relay) is |
86 |
| - // collected. |
87 |
| - CANDIDATE_COLLECTED = 0x80, |
88 |
| - // A remote candidate is successfully added via |AddIceCandidate|. |
89 |
| - ADD_ICE_CANDIDATE_SUCCEEDED = 0x100, |
90 |
| - ICE_STATE_CONNECTED = 0x200, |
91 |
| - CLOSE_CALLED = 0x400, |
92 |
| - // A local candidate with private IP is collected. |
93 |
| - PRIVATE_CANDIDATE_COLLECTED = 0x800, |
94 |
| - // A remote candidate with private IP is added, either via AddiceCandidate |
95 |
| - // or from the remote description. |
96 |
| - REMOTE_PRIVATE_CANDIDATE_ADDED = 0x1000, |
97 |
| - // A local mDNS candidate is collected. |
98 |
| - MDNS_CANDIDATE_COLLECTED = 0x2000, |
99 |
| - // A remote mDNS candidate is added, either via AddIceCandidate or from the |
100 |
| - // remote description. |
101 |
| - REMOTE_MDNS_CANDIDATE_ADDED = 0x4000, |
102 |
| - // A local candidate with IPv6 address is collected. |
103 |
| - IPV6_CANDIDATE_COLLECTED = 0x8000, |
104 |
| - // A remote candidate with IPv6 address is added, either via AddIceCandidate |
105 |
| - // or from the remote description. |
106 |
| - REMOTE_IPV6_CANDIDATE_ADDED = 0x10000, |
107 |
| - // A remote candidate (with type host, server-reflexive, or relay) is |
108 |
| - // successfully added, either via AddIceCandidate or from the remote |
109 |
| - // description. |
110 |
| - REMOTE_CANDIDATE_ADDED = 0x20000, |
111 |
| - // An explicit host-host candidate pair is selected, i.e. both the local and |
112 |
| - // the remote candidates have the host type. This does not include candidate |
113 |
| - // pairs formed with equivalent prflx remote candidates, e.g. a host-prflx |
114 |
| - // pair where the prflx candidate has the same base as a host candidate of |
115 |
| - // the remote peer. |
116 |
| - DIRECT_CONNECTION_SELECTED = 0x40000, |
117 |
| - MAX_VALUE = 0x80000, |
118 |
| - }; |
119 |
| - |
120 | 74 | explicit PeerConnection(PeerConnectionFactory* factory,
|
121 | 75 | std::unique_ptr<RtcEventLog> event_log,
|
122 | 76 | std::unique_ptr<Call> call);
|
@@ -873,7 +827,7 @@ class PeerConnection : public PeerConnectionInternal,
|
873 | 827 | cricket::AudioOptions audio_options_ RTC_GUARDED_BY(signaling_thread());
|
874 | 828 | cricket::VideoOptions video_options_ RTC_GUARDED_BY(signaling_thread());
|
875 | 829 |
|
876 |
| - int usage_event_accumulator_ RTC_GUARDED_BY(signaling_thread()) = 0; |
| 830 | + UsagePattern usage_pattern_ RTC_GUARDED_BY(signaling_thread()); |
877 | 831 | bool return_histogram_very_quickly_ RTC_GUARDED_BY(signaling_thread()) =
|
878 | 832 | false;
|
879 | 833 |
|
|
0 commit comments