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

Side by Side Diff: content/renderer/media/websourcebuffer_impl.cc

Issue 20123002: Add Chromium-side support for SourceBuffer.appendWindowStart and SourceBuffer.appendWindowEnd. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and remove URL in comment to make presubmit happy. Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/media/websourcebuffer_impl.h ('k') | media/base/stream_parser.h » ('j') | no next file with comments »
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 "content/renderer/media/websourcebuffer_impl.h" 5 #include "content/renderer/media/websourcebuffer_impl.h"
6 6
7 #include "base/float_util.h" 7 #include "base/float_util.h"
8 #include "media/filters/chunk_demuxer.h" 8 #include "media/filters/chunk_demuxer.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 void WebSourceBufferImpl::remove(double start, double end) { 57 void WebSourceBufferImpl::remove(double start, double end) {
58 demuxer_->Remove(id_, DoubleToTimeDelta(start), DoubleToTimeDelta(end)); 58 demuxer_->Remove(id_, DoubleToTimeDelta(start), DoubleToTimeDelta(end));
59 } 59 }
60 60
61 bool WebSourceBufferImpl::setTimestampOffset(double offset) { 61 bool WebSourceBufferImpl::setTimestampOffset(double offset) {
62 base::TimeDelta time_offset = base::TimeDelta::FromMicroseconds( 62 base::TimeDelta time_offset = base::TimeDelta::FromMicroseconds(
63 offset * base::Time::kMicrosecondsPerSecond); 63 offset * base::Time::kMicrosecondsPerSecond);
64 return demuxer_->SetTimestampOffset(id_, time_offset); 64 return demuxer_->SetTimestampOffset(id_, time_offset);
65 } 65 }
66 66
67 void WebSourceBufferImpl::setAppendWindowStart(double start) {
68 demuxer_->SetAppendWindowStart(id_, DoubleToTimeDelta(start));
69 }
70
71 void WebSourceBufferImpl::setAppendWindowEnd(double end) {
72 demuxer_->SetAppendWindowEnd(id_, DoubleToTimeDelta(end));
73 }
74
67 void WebSourceBufferImpl::removedFromMediaSource() { 75 void WebSourceBufferImpl::removedFromMediaSource() {
68 demuxer_->RemoveId(id_); 76 demuxer_->RemoveId(id_);
69 demuxer_ = NULL; 77 demuxer_ = NULL;
70 } 78 }
71 79
72 } // namespace content 80 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/websourcebuffer_impl.h ('k') | media/base/stream_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698