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 "base/message_loop/message_loop_proxy.h" | 7 #include "base/message_loop/message_loop_proxy.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "content/renderer/media/android/webmediaplayer_proxy_android.h" | 9 #include "content/renderer/media/android/webmediaplayer_proxy_android.h" |
| 10 #include "content/renderer/media/webmediaplayer_util.h" |
| 11 #include "content/renderer/media/webmediasourceclient_impl.h" |
10 #include "media/base/android/demuxer_stream_player_params.h" | 12 #include "media/base/android/demuxer_stream_player_params.h" |
11 #include "media/base/bind_to_loop.h" | 13 #include "media/base/bind_to_loop.h" |
12 #include "media/base/demuxer_stream.h" | 14 #include "media/base/demuxer_stream.h" |
13 #include "media/base/media_log.h" | 15 #include "media/base/media_log.h" |
14 #include "media/filters/chunk_demuxer.h" | 16 #include "media/filters/chunk_demuxer.h" |
15 #include "third_party/WebKit/public/platform/WebString.h" | 17 #include "third_party/WebKit/public/platform/WebString.h" |
16 #include "third_party/WebKit/public/web/WebMediaSource.h" | 18 #include "third_party/WebKit/public/web/WebMediaSource.h" |
17 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | 19 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
18 #include "webkit/renderer/media/webmediaplayer_util.h" | |
19 #include "webkit/renderer/media/webmediasourceclient_impl.h" | |
20 | 20 |
21 using media::DemuxerStream; | 21 using media::DemuxerStream; |
22 using media::MediaPlayerHostMsg_DemuxerReady_Params; | 22 using media::MediaPlayerHostMsg_DemuxerReady_Params; |
23 using media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params; | 23 using media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params; |
24 using webkit_media::ConvertToWebTimeRanges; | |
25 using webkit_media::PipelineErrorToNetworkState; | |
26 using webkit_media::WebMediaSourceClientImpl; | |
27 using WebKit::WebMediaPlayer; | 24 using WebKit::WebMediaPlayer; |
28 using WebKit::WebString; | 25 using WebKit::WebString; |
29 | 26 |
30 namespace { | 27 namespace { |
31 | 28 |
32 // The size of the access unit to transfer in an IPC in case of MediaSource. | 29 // The size of the access unit to transfer in an IPC in case of MediaSource. |
33 // 16: approximately 250ms of content in 60 fps movies. | 30 // 16: approximately 250ms of content in 60 fps movies. |
34 const size_t kAccessUnitSizeForMediaSource = 16; | 31 const size_t kAccessUnitSizeForMediaSource = 16; |
35 | 32 |
36 const uint8 kVorbisPadding[] = { 0xff, 0xff, 0xff, 0xff }; | 33 const uint8 kVorbisPadding[] = { 0xff, 0xff, 0xff, 0xff }; |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 } | 479 } |
483 | 480 |
484 scoped_ptr<media::TextTrack> MediaSourceDelegate::OnAddTextTrack( | 481 scoped_ptr<media::TextTrack> MediaSourceDelegate::OnAddTextTrack( |
485 media::TextKind kind, | 482 media::TextKind kind, |
486 const std::string& label, | 483 const std::string& label, |
487 const std::string& language) { | 484 const std::string& language) { |
488 return scoped_ptr<media::TextTrack>(); | 485 return scoped_ptr<media::TextTrack>(); |
489 } | 486 } |
490 | 487 |
491 } // namespace content | 488 } // namespace content |
OLD | NEW |