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

Unified Diff: media/filters/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/frame_processor.h ('k') | media/filters/frame_processor_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/frame_processor.cc
diff --git a/media/filters/frame_processor.cc b/media/filters/frame_processor.cc
index 68f4c613d81aa4cfe71ed63d52a711a81de98ebb..f6e3eca4befbcd99a83898dbed55ea9cd616e113 100644
--- a/media/filters/frame_processor.cc
+++ b/media/filters/frame_processor.cc
@@ -43,7 +43,8 @@ bool FrameProcessor::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) {
StreamParser::BufferQueue frames;
if (!MergeBufferQueues(audio_buffers, video_buffers, text_map, &frames)) {
DVLOG(2) << "Parse error discovered while merging parser's buffers";
@@ -62,7 +63,7 @@ bool FrameProcessor::ProcessFrames(
for (StreamParser::BufferQueue::const_iterator frames_itr = frames.begin();
frames_itr != frames.end(); ++frames_itr) {
if (!ProcessFrame(*frames_itr, append_window_start, append_window_end,
- timestamp_offset, new_media_segment)) {
+ timestamp_offset, new_media_segment, media_time)) {
return false;
}
}
@@ -80,7 +81,8 @@ bool FrameProcessor::ProcessFrame(
base::TimeDelta append_window_start,
base::TimeDelta append_window_end,
base::TimeDelta* timestamp_offset,
- bool* new_media_segment) {
+ bool* new_media_segment,
+ base::TimeDelta media_time) {
// Implements the loop within step 1 of the coded frame processing algorithm
// for a single input frame per April 1, 2014 MSE spec editor's draft:
// https://dvcs.w3.org/hg/html-media/raw-file/d471a4412040/media-source/
@@ -339,7 +341,7 @@ bool FrameProcessor::ProcessFrame(
// See http://crbug.com/371197.
StreamParser::BufferQueue buffer_to_append;
buffer_to_append.push_back(frame);
- if (!track_buffer->stream()->Append(buffer_to_append)) {
+ if (!track_buffer->stream()->Append(buffer_to_append, media_time)) {
DVLOG(3) << __FUNCTION__ << ": Failure appending frame to stream";
return false;
}
« no previous file with comments | « media/filters/frame_processor.h ('k') | media/filters/frame_processor_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698