// Copyright 2016 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "media/filters/audio_timestamp_validator.h" #include <memory> namespace media { // Defines how many milliseconds of DecoderBuffer timestamp gap will be allowed // before warning the user. See CheckForTimestampGap(). Value of 50 chosen, as // this is low enough to catch issues early, but high enough to avoid noise for // containers like WebM that default to low granularity timestamp precision. const int kGapWarningThresholdMsec = …; // Limits the number of adjustments to |audio_ts_offset_| in order to reach a // stable state where gaps between encoded timestamps match decoded output // intervals. See CheckForTimestampGap(). const int kLimitTriesForStableTiming = …; // Limits the milliseconds of difference between expected and actual timestamps // gaps to consider timestamp expectations "stable". 1 chosen because some // containers (WebM) default to millisecond timestamp precision. See // CheckForTimestampGap(). const int kStableTimeGapThrsholdMsec = …; // Maximum number of timestamp gap warnings sent to MediaLog. const int kMaxTimestampGapWarnings = …; AudioTimestampValidator::AudioTimestampValidator( const AudioDecoderConfig& decoder_config, MediaLog* media_log) : … { … } AudioTimestampValidator::~AudioTimestampValidator() = default; void AudioTimestampValidator::CheckForTimestampGap( const DecoderBuffer& buffer) { … } void AudioTimestampValidator::RecordOutputDuration( const AudioBuffer& audio_buffer) { … } } // namespace media