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

Side by Side Diff: media/blink/websourcebuffer_impl.cc

Issue 1008463002: Fix MSE GC, make it less aggressive, more spec-compliant (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added overflow check to sanity checks and use CHECK instead of DCHECK Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | media/filters/chunk_demuxer.h » ('j') | media/filters/chunk_demuxer.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/blink/websourcebuffer_impl.h" 5 #include "media/blink/websourcebuffer_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 blink::WebTimeRanges result(ranges.size()); 76 blink::WebTimeRanges result(ranges.size());
77 for (size_t i = 0; i < ranges.size(); i++) { 77 for (size_t i = 0; i < ranges.size(); i++) {
78 result[i].start = ranges.start(i).InSecondsF(); 78 result[i].start = ranges.start(i).InSecondsF();
79 result[i].end = ranges.end(i).InSecondsF(); 79 result[i].end = ranges.end(i).InSecondsF();
80 } 80 }
81 return result; 81 return result;
82 } 82 }
83 83
84 bool WebSourceBufferImpl::evictCodedFrames(double currentPlaybackTime, 84 bool WebSourceBufferImpl::evictCodedFrames(double currentPlaybackTime,
85 size_t newDataSize) { 85 size_t newDataSize) {
86 // TODO(servolk): A dummy method to facilitate landing MSE GC changes. 86 return demuxer_->EvictCodedFrames(
87 // Will be replaced with actual implementation in CL 87 id_,
88 // https://codereview.chromium.org/1008463002/ 88 base::TimeDelta::FromSecondsD(currentPlaybackTime),
89 return true; 89 newDataSize);
90 } 90 }
91 91
92 void WebSourceBufferImpl::append( 92 void WebSourceBufferImpl::append(
93 const unsigned char* data, 93 const unsigned char* data,
94 unsigned length, 94 unsigned length,
95 double* timestamp_offset) { 95 double* timestamp_offset) {
96 base::TimeDelta old_offset = timestamp_offset_; 96 base::TimeDelta old_offset = timestamp_offset_;
97 demuxer_->AppendData(id_, data, length, 97 demuxer_->AppendData(id_, data, length,
98 append_window_start_, append_window_end_, 98 append_window_start_, append_window_end_,
99 &timestamp_offset_, 99 &timestamp_offset_,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 demuxer_ = NULL; 153 demuxer_ = NULL;
154 client_ = NULL; 154 client_ = NULL;
155 } 155 }
156 156
157 void WebSourceBufferImpl::InitSegmentReceived() { 157 void WebSourceBufferImpl::InitSegmentReceived() {
158 DVLOG(1) << __FUNCTION__; 158 DVLOG(1) << __FUNCTION__;
159 client_->initializationSegmentReceived(); 159 client_->initializationSegmentReceived();
160 } 160 }
161 161
162 } // namespace media 162 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/filters/chunk_demuxer.h » ('j') | media/filters/chunk_demuxer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698