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/android/media_source_delegate.h" | 5 #include "content/renderer/media/android/media_source_delegate.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 } | 293 } |
294 | 294 |
295 void MediaSourceDelegate::SeekInternal(const base::TimeDelta& seek_time) { | 295 void MediaSourceDelegate::SeekInternal(const base::TimeDelta& seek_time) { |
296 DCHECK(media_loop_->BelongsToCurrentThread()); | 296 DCHECK(media_loop_->BelongsToCurrentThread()); |
297 DCHECK(IsSeeking()); | 297 DCHECK(IsSeeking()); |
298 chunk_demuxer_->Seek(seek_time, base::Bind( | 298 chunk_demuxer_->Seek(seek_time, base::Bind( |
299 &MediaSourceDelegate::OnDemuxerSeekDone, | 299 &MediaSourceDelegate::OnDemuxerSeekDone, |
300 media_weak_factory_.GetWeakPtr())); | 300 media_weak_factory_.GetWeakPtr())); |
301 } | 301 } |
302 | 302 |
303 void MediaSourceDelegate::SetTotalBytes(int64 total_bytes) { | |
304 NOTIMPLEMENTED(); | |
305 } | |
306 | |
307 void MediaSourceDelegate::AddBufferedByteRange(int64 start, int64 end) { | |
308 NOTIMPLEMENTED(); | |
309 } | |
310 | |
311 void MediaSourceDelegate::AddBufferedTimeRange(base::TimeDelta start, | 303 void MediaSourceDelegate::AddBufferedTimeRange(base::TimeDelta start, |
312 base::TimeDelta end) { | 304 base::TimeDelta end) { |
313 buffered_time_ranges_.Add(start, end); | 305 buffered_time_ranges_.Add(start, end); |
314 } | 306 } |
315 | 307 |
316 void MediaSourceDelegate::SetDuration(base::TimeDelta duration) { | 308 void MediaSourceDelegate::SetDuration(base::TimeDelta duration) { |
317 DCHECK(main_loop_->BelongsToCurrentThread()); | 309 DCHECK(main_loop_->BelongsToCurrentThread()); |
318 DVLOG(1) << __FUNCTION__ << "(" << duration.InSecondsF() << ") : " | 310 DVLOG(1) << __FUNCTION__ << "(" << duration.InSecondsF() << ") : " |
319 << demuxer_client_id_; | 311 << demuxer_client_id_; |
320 | 312 |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 // current time have been garbage collected or removed by the web app, this is | 758 // current time have been garbage collected or removed by the web app, this is |
767 // unlikely. This may cause unexpected playback stall due to seek pending an | 759 // unlikely. This may cause unexpected playback stall due to seek pending an |
768 // append for a GOP prior to the last GOP demuxed. | 760 // append for a GOP prior to the last GOP demuxed. |
769 // TODO(wolenetz): Remove the possibility for this seek to cause unexpected | 761 // TODO(wolenetz): Remove the possibility for this seek to cause unexpected |
770 // player stall by replaying cached data since last keyframe in browser player | 762 // player stall by replaying cached data since last keyframe in browser player |
771 // rather than issuing browser seek. See http://crbug.com/304234. | 763 // rather than issuing browser seek. See http://crbug.com/304234. |
772 return seek_time; | 764 return seek_time; |
773 } | 765 } |
774 | 766 |
775 } // namespace content | 767 } // namespace content |
OLD | NEW |