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> | |
11 #include <vector> | |
12 | 10 |
13 #include "base/bind.h" | 11 #include "base/bind.h" |
14 #include "base/callback.h" | 12 #include "base/callback.h" |
15 #include "base/callback_helpers.h" | 13 #include "base/callback_helpers.h" |
16 #include "base/debug/alias.h" | 14 #include "base/debug/alias.h" |
17 #include "base/debug/crash_logging.h" | 15 #include "base/debug/crash_logging.h" |
18 #include "base/metrics/histogram.h" | 16 #include "base/metrics/histogram.h" |
19 #include "base/single_thread_task_runner.h" | 17 #include "base/single_thread_task_runner.h" |
20 #include "base/synchronization/waitable_event.h" | 18 #include "base/synchronization/waitable_event.h" |
21 #include "base/thread_task_runner_handle.h" | 19 #include "base/thread_task_runner_handle.h" |
22 #include "base/trace_event/trace_event.h" | 20 #include "base/trace_event/trace_event.h" |
23 #include "cc/blink/web_layer_impl.h" | 21 #include "cc/blink/web_layer_impl.h" |
24 #include "cc/layers/video_layer.h" | 22 #include "cc/layers/video_layer.h" |
25 #include "gpu/blink/webgraphicscontext3d_impl.h" | 23 #include "gpu/blink/webgraphicscontext3d_impl.h" |
26 #include "media/audio/null_audio_sink.h" | 24 #include "media/audio/null_audio_sink.h" |
27 #include "media/base/bind_to_current_loop.h" | 25 #include "media/base/bind_to_current_loop.h" |
28 #include "media/base/cdm_context.h" | 26 #include "media/base/cdm_context.h" |
29 #include "media/base/limits.h" | 27 #include "media/base/limits.h" |
30 #include "media/base/media_log.h" | 28 #include "media/base/media_log.h" |
31 #include "media/base/pipeline.h" | |
32 #include "media/base/text_renderer.h" | 29 #include "media/base/text_renderer.h" |
33 #include "media/base/video_frame.h" | 30 #include "media/base/video_frame.h" |
34 #include "media/blink/buffered_data_source.h" | |
35 #include "media/blink/encrypted_media_player_support.h" | |
36 #include "media/blink/texttrack_impl.h" | 31 #include "media/blink/texttrack_impl.h" |
37 #include "media/blink/webaudiosourceprovider_impl.h" | 32 #include "media/blink/webaudiosourceprovider_impl.h" |
38 #include "media/blink/webcontentdecryptionmodule_impl.h" | 33 #include "media/blink/webcontentdecryptionmodule_impl.h" |
39 #include "media/blink/webinbandtexttrack_impl.h" | 34 #include "media/blink/webinbandtexttrack_impl.h" |
40 #include "media/blink/webmediaplayer_delegate.h" | 35 #include "media/blink/webmediaplayer_delegate.h" |
41 #include "media/blink/webmediaplayer_util.h" | 36 #include "media/blink/webmediaplayer_util.h" |
42 #include "media/blink/webmediasource_impl.h" | 37 #include "media/blink/webmediasource_impl.h" |
43 #include "media/filters/chunk_demuxer.h" | 38 #include "media/filters/chunk_demuxer.h" |
44 #include "media/filters/ffmpeg_demuxer.h" | 39 #include "media/filters/ffmpeg_demuxer.h" |
45 #include "third_party/WebKit/public/platform/WebEncryptedMediaTypes.h" | 40 #include "third_party/WebKit/public/platform/WebEncryptedMediaTypes.h" |
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 | 1010 |
1016 // pause() may be called after playback has ended and the HTMLMediaElement | 1011 // pause() may be called after playback has ended and the HTMLMediaElement |
1017 // requires that currentTime() == duration() after ending. We want to ensure | 1012 // requires that currentTime() == duration() after ending. We want to ensure |
1018 // |paused_time_| matches currentTime() in this case or a future seek() may | 1013 // |paused_time_| matches currentTime() in this case or a future seek() may |
1019 // incorrectly discard what it thinks is a seek to the existing time. | 1014 // incorrectly discard what it thinks is a seek to the existing time. |
1020 paused_time_ = | 1015 paused_time_ = |
1021 ended_ ? pipeline_.GetMediaDuration() : pipeline_.GetMediaTime(); | 1016 ended_ ? pipeline_.GetMediaDuration() : pipeline_.GetMediaTime(); |
1022 } | 1017 } |
1023 | 1018 |
1024 } // namespace media | 1019 } // namespace media |
OLD | NEW |