Repository navigation
Releases
0.3.0
Outbound tracks bind to the streams their sender sends now, also when libwebrtc keeps reporting
senders that lost their track, and libwebrtc timestamps are read in milliseconds. Stats adapters
move to the client monitor.
Breaking: stats adapters belong to the client monitor. PeerConnectionMonitor::AddStatsAdapter()
/ RemoveStatsAdapter() and PeerConnectionMonitor::Collect() are gone; use
ClientMonitor::AddStatsAdapter() / RemoveStatsAdapter() / GetStatsAdapter(), and
ClientMonitor::Collect(). StatsAdapter::Adapt() takes the peer connection id:
Adapt(peerConnectionId, stats).
ClientMonitor::Collect()takes every peer connection's raw report, reports it through the new
Listener::OnRawStats(), runs the adapters, then hands the adapted report to the peer connection
monitor.PeerConnectionMonitor::Accept()takes the same path;GetRawStats()returns the
collector's report. The client monitor starts with aLibWebRtcStatsAdapter.LibWebRtcStatsAdapterconverts microsecond timestamps (libwebrtc'sRTCStatsReport::ToJson())
to milliseconds. Before, every elapsed time read 1000 times too long: rates were 1000 times too
low, and millisecond thresholds such as the dry detectors' were crossed after one collection. The
timestamps in the samples are milliseconds now too (see "Sample timestamps" below).DetachedSenderStatsAdapter: removesmediaSourceIdfrom theoutbound-rtpentries of senders
that carry no track, as W3C stats have it; libwebrtc keeps reporting such senders with a stale
reference. Told per peer connection and bymid; the entries stay in the report.- The mediasoupclient binding adds it to the client monitor for send transports and tells it, by
transport id andmid, which producers' senders carry a track (created, track replaced, closed). - Outbound tracks re-read their
outbound-rtpstreams frommediaSourceIdon every report, also
when a report repeats its timestamp, and take the media source a stream references when several
carry the track's id.dry-outbound-trackis no longer raised for a sending track bound to a
closed sender's streams. - A new outbound track with the id of an ended one starts a new monitor, instead of being ignored
while the ended one's streams, attachments and detector state stay.
Sample timestamps
Changed for sample consumers: the timestamp of every stats object inside
peerConnections[] (outboundRtps, inboundRtps, remoteInboundRtps, remoteOutboundRtps,
mediaSources, mediaPlayouts, codecs, dataChannels, peerConnectionTransports,
iceTransports, iceCandidates, iceCandidatePairs, certificates) is now in milliseconds since
the epoch, as in samples from a browser.
- Up to 0.2.0 these were microseconds, as libwebrtc reports them: an
outbound-rtpat
1792044664814755next to a sampletimestampof1792044676463. From 0.3.0 the same entry
reads1792044664814.755. - Unchanged, and always milliseconds: the sample-level
timestamp,clientEvents[].timestamp,
clientIssues[].timestampandclientMetaItems[].timestamp. - Applications on 0.2.0 or earlier stay in use for a while, so a consumer receives both units at
once. The unit can be told from the value itself: an epoch timestamp above1e14cannot be
milliseconds (that is the year 5138), so it is microseconds and divides by 1000; anything lower
is milliseconds. Reading the unit per value keeps both working, and does not depend on the
client's platform or library version. - Everything derived from stats timestamps is affected: elapsed times and the rates computed from
them (bitrate, packet rate, frame rate), time axes, gap detection, and ordering stats against
events and issues. A consumer that already reads microseconds for these clients should read the
unit per value instead, so 0.3.0 samples are not read 1000 times too short.
0.2.0
Makes a libmediasoupclient application's samples join to the SFU the way the web client's do, and
the bindings easy to build.
Breaking: everything moved into the observertc::clientmonitor namespace (the v0.1.0 tag
predates the move; the 0.1.0 notes below already describe it).
- Attachments on every level of a sample:
ClientMonitor::UpdateAttachments()merges into the
client attachments (RFC 7386,nullremoves a key); every stats monitor hasGetAttachments()/
UpdateAttachments(), kept across reports;PeerConnectionMonitor::SetDataChannelAttachments()
binds a data channel's attachments by SCTP stream id. ClientMonitor::AddMetaData(ClientMetaData), for payloads that are not objects (an SDP with its
peerConnectionId).AddMetaData({})andAddMetaData({ "type" })are now ambiguous;
writeAddMetaData("type").- mediasoupclient binding, matching the web client's
MediasoupTransportBinding:direction: "send" | "recv"on the peer connection attachments;{ dataProducerId[, dataConsumerId] }on the data channel entries;ReplaceTrack()drops the old track and keepsproducerIdon the new one; a producer's track
is remembered, so closing it works after the track is gone;MEDIA_TRACK_REMOVEDwith the producer and consumer ids when either closes;OnConsumerProducerPaused()/OnConsumerProducerResumed()setremoteOutboundTrackPaused;GetTransportId(),GetDirection().
- Build:
- with
CLIENTMONITOR_MEDIASOUPCLIENT, libsdptransform'sjson.hppis found and used
automatically. The README's earlier${libsdptransform_SOURCE_DIR}recipe expanded to an empty
path from the application's scope; aCLIENTMONITOR_JSON_INCLUDE_PATHwithout ajson.hppis
now an error; - libwebrtc's include directories are
SYSTEM, so applications building with-Werrorcompile; test/bindingscompiles both bindings and the newexamples/mediasoup_client.cppagainst
libmediasoupclient and a prebuilt libwebrtc m140, in CI;- CI ran on
master, which does not exist; it runs onmainnow.
- with
0.1.0
First release: a native C++ port of the core of
@observertc/client-monitor-js 4.11.0,
producing ObserveRTC ClientSamples on schema 3.7.0.
ClientMonitorwith a libmediasoupclient-styleListenerAPI, its own collecting timer or
manualCollect(), sampling, client events, meta data, extension stats and issues.PeerConnectionMonitorand the 15 stats monitors (RTP, ICE, codec, media source/playout,
data channel, certificate, tracks), with the JS library's derived metrics.- Detectors: stats gap, ICE disconnected, transport delay, dry inbound track, dry outbound track.
LibWebRtcStatsAdapter(the JSChromeStatsAdapter).- Schema types generated by observertc-schemas (
npm run generate:cpp). - Optional bindings for libwebrtc and libmediasoupclient (not yet compiled against either).
- Everything lives in
observertc::clientmonitor, next to the generatedobservertc::schemas. docs/USAGE.md, a recipe for every public API, andexamples/api_tour.cpp, which compiles and
runs them in CI.
See PORTING.md for what is not ported yet.