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 "media/blink/webmediaplayer_impl.h" | 5 #include "media/blink/webmediaplayer_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <limits> | 9 #include <limits> |
10 #include <string> | 10 #include <string> |
(...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1539 #else | 1539 #else |
1540 OnError(PipelineStatus::DEMUXER_ERROR_COULD_NOT_OPEN); | 1540 OnError(PipelineStatus::DEMUXER_ERROR_COULD_NOT_OPEN); |
1541 return; | 1541 return; |
1542 #endif | 1542 #endif |
1543 } else { | 1543 } else { |
1544 DCHECK(!chunk_demuxer_); | 1544 DCHECK(!chunk_demuxer_); |
1545 DCHECK(!data_source_); | 1545 DCHECK(!data_source_); |
1546 | 1546 |
1547 chunk_demuxer_ = new ChunkDemuxer( | 1547 chunk_demuxer_ = new ChunkDemuxer( |
1548 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnDemuxerOpened), | 1548 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnDemuxerOpened), |
1549 encrypted_media_init_data_cb, media_log_, true); | 1549 encrypted_media_init_data_cb, media_log_); |
1550 demuxer_.reset(chunk_demuxer_); | 1550 demuxer_.reset(chunk_demuxer_); |
1551 } | 1551 } |
1552 | 1552 |
1553 // TODO(sandersd): FileSystem objects may also be non-static, but due to our | 1553 // TODO(sandersd): FileSystem objects may also be non-static, but due to our |
1554 // caching layer such situations are broken already. http://crbug.com/593159 | 1554 // caching layer such situations are broken already. http://crbug.com/593159 |
1555 bool is_static = !chunk_demuxer_; | 1555 bool is_static = !chunk_demuxer_; |
1556 | 1556 |
1557 // ... and we're ready to go! | 1557 // ... and we're ready to go! |
1558 seeking_ = true; | 1558 seeking_ = true; |
1559 | 1559 |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1893 pipeline_metadata_.natural_size, | 1893 pipeline_metadata_.natural_size, |
1894 base::Bind(&GetCurrentTimeInternal, this))); | 1894 base::Bind(&GetCurrentTimeInternal, this))); |
1895 watch_time_reporter_->OnVolumeChange(volume_); | 1895 watch_time_reporter_->OnVolumeChange(volume_); |
1896 if (delegate_ && delegate_->IsHidden()) | 1896 if (delegate_ && delegate_->IsHidden()) |
1897 watch_time_reporter_->OnHidden(); | 1897 watch_time_reporter_->OnHidden(); |
1898 else | 1898 else |
1899 watch_time_reporter_->OnShown(); | 1899 watch_time_reporter_->OnShown(); |
1900 } | 1900 } |
1901 | 1901 |
1902 } // namespace media | 1902 } // namespace media |
OLD | NEW |