Bug 1136877 - Collect telemetry on SPS.max_num_ref_frames. r=jya

This commit is contained in:
Mike Taylor 2015-03-06 08:18:00 -05:00
parent e0585984ae
commit c7cbce1e29
2 changed files with 12 additions and 0 deletions

View File

@ -21,6 +21,7 @@
#include "mp4_demuxer/H264.h"
#include "SharedDecoderManager.h"
#include "mp4_demuxer/MP4TrackDemuxer.h"
#include <algorithm>
#ifdef MOZ_EME
#include "mozilla/CDMProxy.h"
@ -92,6 +93,11 @@ AccumulateSPSTelemetry(const ByteBuffer* aExtradata)
(spsdata.level_idc >= 10 && spsdata.level_idc <= 52) ?
spsdata.level_idc : 0);
// max_num_ref_frames should be between 0 and 16, anything larger will
// be treated as invalid.
Telemetry::Accumulate(Telemetry::VIDEO_H264_SPS_MAX_NUM_REF_FRAMES,
std::min(spsdata.max_num_ref_frames, 17u));
return true;
}

View File

@ -5503,6 +5503,12 @@
"n_values": 244,
"description": "The H.264 profile number (profile_idc) as extracted from the decoded SPS."
},
"VIDEO_H264_SPS_MAX_NUM_REF_FRAMES": {
"expires_in_version": "40",
"kind": "enumerated",
"n_values": 17,
"description": "SPS.max_num_ref_frames indicates how deep the H.264 queue is going to be, and as such the minimum memory usage by the decoder, from 0 to 16. 17 indicates an invalid value."
},
"WEBRTC_ICE_FINAL_CONNECTION_STATE": {
"expires_in_version": "never",
"kind": "enumerated",