Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1069)

Unified Diff: media/filters/legacy_frame_processor.cc

Issue 341083004: Introduce the playback time into the MSE garbage collection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: New flow to pass the media time to SourceBufferStream. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/legacy_frame_processor.h ('k') | media/filters/source_buffer_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/legacy_frame_processor.cc
diff --git a/media/filters/legacy_frame_processor.cc b/media/filters/legacy_frame_processor.cc
index 3707b01d633178f422d71ba9ae0fe0be0d581f6b..ac077aaa973ead153dc22c2cc33387e095709e6b 100644
--- a/media/filters/legacy_frame_processor.cc
+++ b/media/filters/legacy_frame_processor.cc
@@ -33,7 +33,8 @@ bool LegacyFrameProcessor::ProcessFrames(
base::TimeDelta append_window_start,
base::TimeDelta append_window_end,
bool* new_media_segment,
- base::TimeDelta* timestamp_offset) {
+ base::TimeDelta* timestamp_offset,
+ base::TimeDelta media_time) {
DVLOG(2) << __FUNCTION__ << "()";
DCHECK(new_media_segment);
DCHECK(timestamp_offset);
@@ -111,12 +112,14 @@ bool LegacyFrameProcessor::ProcessFrames(
}
if (!filtered_audio.empty() &&
- !AppendAndUpdateDuration(audio_track->stream(), filtered_audio)) {
+ !AppendAndUpdateDuration(
+ audio_track->stream(), filtered_audio, media_time)) {
return false;
}
if (!filtered_video.empty() &&
- !AppendAndUpdateDuration(video_track->stream(), filtered_video)) {
+ !AppendAndUpdateDuration(
+ video_track->stream(), filtered_video, media_time)) {
return false;
}
@@ -126,7 +129,8 @@ bool LegacyFrameProcessor::ProcessFrames(
itr != filtered_text.end();
++itr) {
MseTrackBuffer* track = FindTrack(itr->first);
- if (!track || !AppendAndUpdateDuration(track->stream(), itr->second))
+ if (!track || !AppendAndUpdateDuration(
+ track->stream(), itr->second, media_time))
return false;
}
}
@@ -233,10 +237,11 @@ void LegacyFrameProcessor::FilterWithAppendWindow(
bool LegacyFrameProcessor::AppendAndUpdateDuration(
ChunkDemuxerStream* stream,
- const StreamParser::BufferQueue& buffers) {
+ const StreamParser::BufferQueue& buffers,
+ base::TimeDelta media_time) {
DCHECK(!buffers.empty());
- if (!stream || !stream->Append(buffers))
+ if (!stream || !stream->Append(buffers, media_time))
return false;
// Approximate spec's "highest presentation end timestamp".
« no previous file with comments | « media/filters/legacy_frame_processor.h ('k') | media/filters/source_buffer_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698