| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |