W3C home > Mailing lists > Public > public-webrtc@w3.org > August 2013

Latest Stats API proposal RE: Stats variables - some more input

From: Göran Eriksson AP <goran.ap.eriksson@ericsson.com>
Date: Thu, 22 Aug 2013 09:52:26 +0000
To: Harald Alvestrand <harald@alvestrand.no>
CC: "public-webrtc@w3.org" <public-webrtc@w3.org>
Message-ID: <532A6DC6F9C115439C41705FF73D13871C3D9529@ESESSMB209.ericsson.se>
Hi Harald,

I am taking a closer look at the Stats API proposal and just want to make sure I look at the right "version".

Is this Your latest draft of the Stats API? Also, what are the plans for updating the editor spec, which seem not to be updated?


-----Original Message-----
From: Harald Alvestrand [mailto:harald@alvestrand.no] 
Sent: den 27 maj 2013 15:37
To: public-webrtc@w3.org
Subject: Stats variables - some more input

I'm continuing with the process of designing stats variables that make sense and are useful.
My current draft is reproduced below. Comments welcome!

One question that arose about audio volume representation: It's hairy.
Especially it's hairy to define volume in a way that makes sense when you don't know the sampling interval (because this is a polling interface), and you don't want to give undue importance to the last tenth of a before the sample. Or perhaps you do - it might be app dependent.

One suggestion made internally: Just report the cumulative audio energy (sum of audio energy over time) instead. Then people can transform that as they will.

Thoughts on this?
For now, the proposal contains a conventional "audio level" variable.
For the rest:

Root of hierarchy:

dictionary RTCStats {
DOMHiResTimeStamp timestamp;
RTCStatsType type;
DOMString id;

All SSRCs:

dictionary RTCRTPStreamStats : RTCStats { DOMString ssrc; DOMString remoteId; // New stuff:
DOMString mediaTrackId;
DOMString transportId;
DOMString codecId;

Note the convention that names ending in "Id" are identifiers of other stats objects.
Directed SSRCs:

dictionary RTCInboundRTPStreamStats : RTCRTPStreamStats { unsigned long packetsReceived; unsigned long bytesReceived; // In addition to current spec:
float jitter;

dictionary RTCOutboundRTPStreamStats : RTCRTPStreamStats { unsigned long packetsSent; unsigned long bytesSent; };

Representing MediaStreamTracks:

dictionary RTCMediaStreamTrackStats : RTCStats { DOMString trackIdentifier; // track.id property boolean remoteSource; sequence<DOMString> ssrcIds; // Only makes sense for audio unsigned int audioLevel; // Only makes sense for video unsigned int frameWidth; unsigned int frameHeight; unsigned float framesPerSecond; // The nominal FPS value unsigned int framesSent; unsigned int framesReceived; // Only makes sense for remoteSource=true unsigned int framesDecoded; int firs; }

dictionary MediaStream : RTCStats {
DOMString streamIdentifier; // stream.id property sequence<DOMString> trackIds; // Note: This is the id of the stats object, not the track.id }

Representing transports:

dictionary RTCTransport: RTCStats {
unsigned long bytesSent;
unsigned long bytesReceived;

dictionary RTCIceComponentStats : RTCStats { DOMString transportId; int component; unsigned long bytesSent; unsigned long bytesReceived; bool activeConnection; }

dictionary RTCIceCandidatePairStats : RTCStats { DOMString componentId; DOMString localCandidateId; DOMString remoteCandidateId; boolean writable; // Has gotten ACK to an ICE request boolean readable; // Has gotten a valid incoming ICE request }

dictionary RTCIceCandidate : RTCStats {
DOMString ipAddress;
int portNumber;
// More ICE-related info goes here.

dictionary RTCCodec : RTCStats {
unsigned int payloadType; // As used in RTP encoding.
DOMString codec; // video/vp8 or equivalent unsigned int clockRate; unsigned int channels; // 2 for stereo, missing for most other cases.
DOMString parameters; // From SDP description line }
Received on Thursday, 22 August 2013 09:52:58 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:35 UTC