Bug 1136877 - Collect telemetry on constraint_set flags from canPlayType. r=jya

This commit is contained in:
Mike Taylor 2015-03-03 08:54:00 -05:00
parent 410c989174
commit 8efae6d25f
2 changed files with 13 additions and 0 deletions

View File

@ -233,6 +233,13 @@ ExtractH264CodecDetails(const nsAString& aCodec,
aLevel = PromiseFlatString(Substring(aCodec, 9, 2)).ToInteger(&rv, 16);
NS_ENSURE_SUCCESS(rv, false);
// Capture the constraint_set flag value for the purpose of Telemetry.
// We don't NS_ENSURE_SUCCESS here because ExtractH264CodecDetails doesn't
// care about this, but we make sure constraints is above 4 (constraint_set5_flag)
// otherwise collect 0 for unknown.
uint8_t constraints = PromiseFlatString(Substring(aCodec, 7, 2)).ToInteger(&rv, 16);
Telemetry::Accumulate(Telemetry::VIDEO_CANPLAYTYPE_H264_CONSTRAINT_SET_FLAG,
constraints >= 4 ? constraints : 0);
// 244 is the highest meaningful profile value (High 4:4:4 Intra Profile)
// that can be represented as single hex byte, otherwise collect 0 for unknown.

View File

@ -5467,6 +5467,12 @@
"n_buckets": "1000",
"description": "The time (in milliseconds) that it took a 'reconfigure thread' request to go round trip."
},
"VIDEO_CANPLAYTYPE_H264_CONSTRAINT_SET_FLAG": {
"expires_in_version": "40",
"kind": "enumerated",
"n_values": 128,
"description": "The H.264 constraint set flag as extracted from the codecs parameter passed to HTMLMediaElement.canPlayType, with the addition of 0 for unknown values."
},
"VIDEO_CANPLAYTYPE_H264_LEVEL": {
"expires_in_version": "40",
"kind": "enumerated",