webrtc/api
Henrik Boström 1df1bf8551 PeerConnectionInterface::GetStats() with selector argument added.
This exposes the stats selection algorithm[1] on the PeerConnection.

Per-spec, there are four flavors of getStats():
1. RTCPeerConnection.getStats().
2. RTCPeerConnection.getStats(MediaStreamTrack selector).
3. RTCRtpSender.getStats().
4. RTCRtpReceiver.getStats().

1) is the parameterless getStats() which is already shipped.
2) is the same as 3) and 4) except the track is used to look up the
corresponding sender/receiver to use as the selector.
3) and 4) perform stats collection with a filter, which is implemented
in RTCStatsCollector.GetStatsReport(selector).

For technical reasons, it is easier to place GetStats() on the
PeerConnection where the RTCStatsCollector lives than to place it on the
sender/receiver. Passing the selector as an argument or as a "this"
makes little difference other than style. Wiring Chrome up such that the
JavaScript APIs is like the spec is trivial after GetStats() is added to
PeerConnectionInterface.

This CL also adds comments documenting our intent to deprecate and
remove the legacy GetStats() APIs some time in the future.

[1] https://w3c.github.io/webrtc-pc/#dfn-stats-selection-algorithm

Bug: chromium:680172
Change-Id: I09316ba6f20b25d4f9c11785d0a1a1262d6062a1
Reviewed-on: https://webrtc-review.googlesource.com/62900
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22602}
2018-03-26 12:08:20 +00:00
..
audio Robustification of the echo suppression behavior during headset usage. 2018-03-22 00:23:23 +00:00
audio_codecs Tests: Pass codec ID argument to audio codecs 2018-03-12 13:25:29 +00:00
call Add application_data field(s) to RtpPacketToSend and PacketOptions. 2018-02-23 17:20:46 +00:00
ortc Delete ortc methods using cricket::VideoCapturer. 2018-03-22 08:55:24 +00:00
stats PeerConnectionInterface::GetStats() with selector argument added. 2018-03-26 12:08:20 +00:00
test Moved audioproc_f interface into api directory. 2018-03-15 12:31:37 +00:00
video VideoStreamDecoderImpl implementation, part 1. 2018-03-23 13:58:55 +00:00
video_codecs Delete unused method SetPeriodicKeyFrames. 2018-03-05 08:54:32 +00:00
array_view.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
array_view_unittest.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
audio_options.h Reland "Deprecate the adaptive level controller" 2018-03-09 09:42:13 +00:00
BUILD.gn Move aligned memory utilities to rtc_base/memory/ 2018-03-22 14:13:24 +00:00
candidate.cc Fix clang style warnings in api/candidate.h 2017-10-26 23:22:18 +00:00
candidate.h Fix clang style warnings in api/candidate.h 2017-10-26 23:22:18 +00:00
cryptoparams.h Fix ortc_api circular deps. 2017-11-15 13:31:51 +00:00
datachannelinterface.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
DEPS Move aligned memory utilities to rtc_base/memory/ 2018-03-22 14:13:24 +00:00
dtmfsenderinterface.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
fakemetricsobserver.cc Report UMA metrics for received SDP format 2018-03-06 21:22:51 +00:00
fakemetricsobserver.h Report UMA metrics for received SDP format 2018-03-06 21:22:51 +00:00
fec_controller.h Revert "Revert "Enables PeerConnectionFactory using external fec controller"" 2018-02-20 12:41:55 +00:00
jsep.cc Fix clang style errors in api/jsep.h 2017-12-06 18:12:06 +00:00
jsep.h Change error handlers for Set*Description to use RTCError 2018-03-09 15:37:34 +00:00
jsepicecandidate.h Reland "Clean up libjingle API dependencies." 2017-10-05 13:51:21 +00:00
jsepsessiondescription.h Introduce webrtc::SdpType, the chosen enum for offer/pranswer/answer 2017-12-06 02:27:32 +00:00
mediaconstraintsinterface.cc Reland "Deprecate the adaptive level controller" 2018-03-09 09:42:13 +00:00
mediaconstraintsinterface.h Reland "Deprecate the adaptive level controller" 2018-03-09 09:42:13 +00:00
mediastreaminterface.cc Final name changing of MediaStreamInterface.label() to id(). 2018-03-14 20:30:52 +00:00
mediastreaminterface.h Final name changing of MediaStreamInterface.label() to id(). 2018-03-14 20:30:52 +00:00
mediastreamproxy.h Final name changing of MediaStreamInterface.label() to id(). 2018-03-14 20:30:52 +00:00
mediastreamtrackproxy.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
mediatypes.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
mediatypes.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
notifier.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
optional.cc Added nullopt and implicit construction to rtc::Optional 2017-11-15 15:50:11 +00:00
optional.h Added nullopt and implicit construction to rtc::Optional 2017-11-15 15:50:11 +00:00
optional_unittest.cc Added nullopt and implicit construction to rtc::Optional 2017-11-15 15:50:11 +00:00
OWNERS Make hbos@webrtc.org OWNER of peerconnection*. 2017-11-13 12:27:29 +00:00
peerconnectionfactoryproxy.h Remove dead version of StartRtcEventLog 2017-10-06 15:18:24 +00:00
peerconnectioninterface.h PeerConnectionInterface::GetStats() with selector argument added. 2018-03-26 12:08:20 +00:00
peerconnectionproxy.h PeerConnectionInterface::GetStats() with selector argument added. 2018-03-26 12:08:20 +00:00
proxy.cc Enable the clang style plugin in primary p2p/ target 2017-11-01 00:19:05 +00:00
proxy.h Enable the clang style plugin in primary p2p/ target 2017-11-01 00:19:05 +00:00
refcountedbase.h New classes RefCounter and RefCountedBase. 2017-10-23 11:46:47 +00:00
rtcerror.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
rtcerror.h Stop using LOG macros in favor of RTC_ prefixed macros. 2017-11-09 11:56:32 +00:00
rtcerror_unittest.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
rtceventlogoutput.h Move RtcEventLogOutput to api/ 2017-10-06 13:58:14 +00:00
rtp_headers.cc Fix circular dependencies in webrtc_common. 2017-12-15 14:33:26 +00:00
rtp_headers.h Drop dependency of common_video on api:libjingle_peerconnection_api. 2018-02-19 13:20:24 +00:00
rtpparameters.cc Updates to video config to allow changes in google3 tests, in order to not break anything. 2017-12-19 22:10:10 +00:00
rtpparameters.h Updated comments for RtpEncodingParameters. 2018-02-13 19:47:56 +00:00
rtpparameters_unittest.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
rtpreceiverinterface.cc Reland "Update RTCStatsCollector to work with RtpTransceivers" 2018-02-17 00:01:39 +00:00
rtpreceiverinterface.h Reland "Update RTCStatsCollector to work with RtpTransceivers" 2018-02-17 00:01:39 +00:00
rtpsenderinterface.h Reland "Update RTCStatsCollector to work with RtpTransceivers" 2018-02-17 00:01:39 +00:00
rtptransceiverinterface.h Changes name of RtpTransceiverInit's stream_labels to stream_ids. 2018-03-06 23:42:01 +00:00
setremotedescriptionobserverinterface.h Reland "SetRemoteDescriptionObserverInterface added." 2017-11-23 19:59:48 +00:00
statstypes.cc Reland "Add hugeFramesSent GetStats metric" 2018-03-06 13:38:11 +00:00
statstypes.h Reland "Add hugeFramesSent GetStats metric" 2018-03-06 13:38:11 +00:00
turncustomizer.h TurnCustomizer - an interface for modifying stun messages sent by TurnPort 2017-10-11 07:45:29 +00:00
umametrics.cc Enable the clang style plugin in primary p2p/ target 2017-11-01 00:19:05 +00:00
umametrics.h Report SRTP error codes to UMA 2018-03-20 18:37:49 +00:00
videosinkinterface.h Move videosinkinterface.h to common_video to solve a circular dep. 2018-01-04 13:19:49 +00:00
videosourceinterface.cc Move videosourceinterface to api. 2018-01-05 09:14:19 +00:00
videosourceinterface.h Move videosourceinterface to api. 2018-01-05 09:14:19 +00:00
videosourceproxy.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00