webrtc-stats icon indicating copy to clipboard operation
webrtc-stats copied to clipboard

sdpFmtpLine value space

Open dontcallmedom opened this issue 4 years ago • 6 comments

sdpFmtpLine is defined as

The a=fmtp line in the SDP corresponding to the codec, i.e., after the colon following the PT. This defined by [JSEP] in Section 5.7.

at least in chrome, this results with the value undefined when there is nothing coming after the colon in PT; is this the expected value or should it be the empty string?

(right now, the tests in Web Platform Tests expects a non-undefined value)

dontcallmedom avatar Nov 03 '20 08:11 dontcallmedom

I would say there is a semantic difference:

  • null/undefined: there is no a=fmtp line for this codec in the sdp
  • "": there is a a=fmtp line but its empty (which is probably a bad idea and there should be a test; but I don't think https://tools.ietf.org/html/rfc4566#section-6 forbids it)

The first option would be clarified by adding "undefined if there is no fmtp line corresponding to the codecs payload type (you also have a typo in the title)

fippo avatar Nov 05 '20 09:11 fippo

also ħere

fippo avatar Nov 05 '20 20:11 fippo

We cover this in the bolierplate that undefined means not present or not available. I suppose the question here is which of the two cases (pointed out by @fippo) does undefined correspond to or does it correspond to both situations.

I dont have a strong opinion, if undefined corresponded to both situations.

vr000m avatar Nov 27 '20 11:11 vr000m

Other metrics we leave undefined if it's not applicable. So if it's not applicable it's not testable to check whether or not it has been implemented. If you want to check if it has been implemented, you have to set up a scenario where you know it is applicable, and then assert the presence of this metrics.

For testing purposes we should simply update the test to make sure there is an fmtp line before asserting presence.

henbos avatar Dec 08 '20 11:12 henbos

For example you don't have a frame rate until it has been measured, which requires frames. This makes more sense to me than claiming that the fps is 0. So in other words, a test for frame rates has to wait until it is present (which should happen within a reasonable timeout).

In this case, a test for codecs have to pick a codec with something after the colon. We could also assert that for codecs without the colon, the value must be undefined.

henbos avatar Dec 08 '20 11:12 henbos

Proposal:

  • Clarify that sdpFmtpLine is undefined if there is nothing after the colon (editorial issue).

henbos avatar Dec 08 '20 11:12 henbos