mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1125340 - (1/2) Gather telemetry on H.264 profile & level values. r=cpearce
This commit is contained in:
parent
a849105e3a
commit
96f9f6b1c4
@ -12,6 +12,7 @@
|
||||
#include "SharedThreadPool.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/Base64.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "nsIRandomGenerator.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "MediaTaskQueue.h"
|
||||
@ -224,7 +225,7 @@ ExtractH264CodecDetails(const nsAString& aCodec,
|
||||
return false;
|
||||
}
|
||||
|
||||
// Extract the profile_idc, constrains, and level_idc.
|
||||
// Extract the profile_idc and level_idc.
|
||||
nsresult rv = NS_OK;
|
||||
aProfile = PromiseFlatString(Substring(aCodec, 5, 2)).ToInteger(&rv, 16);
|
||||
NS_ENSURE_SUCCESS(rv, false);
|
||||
@ -232,6 +233,17 @@ ExtractH264CodecDetails(const nsAString& aCodec,
|
||||
aLevel = PromiseFlatString(Substring(aCodec, 9, 2)).ToInteger(&rv, 16);
|
||||
NS_ENSURE_SUCCESS(rv, false);
|
||||
|
||||
|
||||
// 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.
|
||||
Telemetry::Accumulate(Telemetry::VIDEO_CANPLAYTYPE_H264_PROFILE,
|
||||
aProfile <= 244 ? aProfile : 0);
|
||||
|
||||
// Make sure aLevel represents a value between levels 1 and 5.2,
|
||||
// otherwise collect 0 for unknown.
|
||||
Telemetry::Accumulate(Telemetry::VIDEO_CANPLAYTYPE_H264_LEVEL,
|
||||
(aLevel >= 10 && aLevel <= 52) ? aLevel : 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -5447,6 +5447,18 @@
|
||||
"n_buckets": "1000",
|
||||
"description": "The time (in milliseconds) that it took a 'reconfigure thread' request to go round trip."
|
||||
},
|
||||
"VIDEO_CANPLAYTYPE_H264_LEVEL": {
|
||||
"expires_in_version": "40",
|
||||
"kind": "enumerated",
|
||||
"n_values": 51,
|
||||
"description": "The H.264 level (level_idc) as extracted from the codecs parameter passed to HTMLMediaElement.canPlayType, from levels 1 (10) to 5.2 (51), with the addition of 0 for unknown values."
|
||||
},
|
||||
"VIDEO_CANPLAYTYPE_H264_PROFILE": {
|
||||
"expires_in_version": "40",
|
||||
"kind": "enumerated",
|
||||
"n_values": 244,
|
||||
"description": "The H.264 profile number (profile_idc) as extracted from the codecs parameter passed to HTMLMediaElement.canPlayType."
|
||||
},
|
||||
"WEBRTC_ICE_FINAL_CONNECTION_STATE": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "enumerated",
|
||||
|
Loading…
Reference in New Issue
Block a user