webrtc-stats
webrtc-stats copied to clipboard
sdpFmtpLine value space
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)
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)
also ħere
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.
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.
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.
Proposal:
- Clarify that sdpFmtpLine is undefined if there is nothing after the colon (editorial issue).