#include "media/filters/frame_processor.h"
#include <stdint.h>
#include <memory>
#include <cstdlib>
#include "base/memory/raw_ptr.h"
#include "media/base/stream_parser_buffer.h"
#include "media/base/timestamp_constants.h"
namespace media {
const int kMaxDroppedPrerollWarnings = …;
const int kMaxAudioNonKeyframeWarnings = …;
const int kMaxNumKeyframeTimeGreaterThanDependantWarnings = …;
const int kMaxMuxedSequenceModeWarnings = …;
const int kMaxSkippedEmptyFrameWarnings = …;
const int kMaxPartialDiscardWarnings = …;
const int kMaxDroppedFrameWarnings = …;
class MseTrackBuffer { … };
MseTrackBuffer::MseTrackBuffer(ChunkDemuxerStream* stream,
MediaLog* media_log,
SourceBufferParseWarningCB parse_warning_cb)
: … { … }
MseTrackBuffer::~MseTrackBuffer() { … }
void MseTrackBuffer::Reset() { … }
void MseTrackBuffer::ResetHighestPresentationTimestamp() { … }
void MseTrackBuffer::SetHighestPresentationTimestampIfIncreased(
base::TimeDelta timestamp) { … }
bool MseTrackBuffer::EnqueueProcessedFrame(
scoped_refptr<StreamParserBuffer> frame) { … }
bool MseTrackBuffer::FlushProcessedFrames() { … }
void MseTrackBuffer::NotifyStartOfCodedFrameGroup(DecodeTimestamp start_dts,
base::TimeDelta start_pts) { … }
FrameProcessor::FrameProcessor(UpdateDurationCB update_duration_cb,
MediaLog* media_log)
: … { … }
FrameProcessor::~FrameProcessor() { … }
void FrameProcessor::SetParseWarningCallback(
SourceBufferParseWarningCB parse_warning_cb) { … }
void FrameProcessor::SetSequenceMode(bool sequence_mode) { … }
bool FrameProcessor::ProcessFrames(
const StreamParser::BufferQueueMap& buffer_queue_map,
base::TimeDelta append_window_start,
base::TimeDelta append_window_end,
base::TimeDelta* timestamp_offset) { … }
void FrameProcessor::SetGroupStartTimestampIfInSequenceMode(
base::TimeDelta timestamp_offset) { … }
bool FrameProcessor::AddTrack(StreamParser::TrackId id,
ChunkDemuxerStream* stream) { … }
bool FrameProcessor::UpdateTrackIds(const TrackIdChanges& track_id_changes) { … }
void FrameProcessor::SetAllTrackBuffersNeedRandomAccessPoint() { … }
void FrameProcessor::Reset() { … }
void FrameProcessor::OnPossibleAudioConfigUpdate(
const AudioDecoderConfig& config) { … }
MseTrackBuffer* FrameProcessor::FindTrack(StreamParser::TrackId id) { … }
void FrameProcessor::NotifyStartOfCodedFrameGroup(DecodeTimestamp start_dts,
base::TimeDelta start_pts) { … }
bool FrameProcessor::FlushProcessedFrames() { … }
bool FrameProcessor::HandlePartialAppendWindowTrimming(
base::TimeDelta append_window_start,
base::TimeDelta append_window_end,
scoped_refptr<StreamParserBuffer> buffer) { … }
bool FrameProcessor::CheckAudioPresentationOrder(
const StreamParserBuffer& frame,
bool track_buffer_needs_random_access_point) { … }
bool FrameProcessor::ProcessFrame(scoped_refptr<StreamParserBuffer> frame,
base::TimeDelta append_window_start,
base::TimeDelta append_window_end,
base::TimeDelta* timestamp_offset) { … }
}