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 13 matching lines...) Expand all Loading... |
24 | 24 |
25 using media::DemuxerStream; | 25 using media::DemuxerStream; |
26 using media::DemuxerConfigs; | 26 using media::DemuxerConfigs; |
27 using media::DemuxerData; | 27 using media::DemuxerData; |
28 using blink::WebMediaPlayer; | 28 using blink::WebMediaPlayer; |
29 using blink::WebString; | 29 using blink::WebString; |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 // The size of the access unit to transfer in an IPC in case of MediaSource. | 33 // The size of the access unit to transfer in an IPC in case of MediaSource. |
34 // 16: approximately 250ms of content in 60 fps movies. | 34 // 4: approximately 64ms of content in 60 fps movies. |
35 const size_t kAccessUnitSizeForMediaSource = 16; | 35 const size_t kAccessUnitSizeForMediaSource = 4; |
36 | 36 |
37 const uint8 kVorbisPadding[] = { 0xff, 0xff, 0xff, 0xff }; | 37 const uint8 kVorbisPadding[] = { 0xff, 0xff, 0xff, 0xff }; |
38 | 38 |
39 } // namespace | 39 } // namespace |
40 | 40 |
41 namespace content { | 41 namespace content { |
42 | 42 |
43 static void LogMediaSourceError(const scoped_refptr<media::MediaLog>& media_log, | 43 static void LogMediaSourceError(const scoped_refptr<media::MediaLog>& media_log, |
44 const std::string& error) { | 44 const std::string& error) { |
45 media_log->AddEvent(media_log->CreateMediaSourceErrorEvent(error)); | 45 media_log->AddEvent(media_log->CreateMediaSourceErrorEvent(error)); |
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 // current time have been garbage collected or removed by the web app, this is | 765 // current time have been garbage collected or removed by the web app, this is |
766 // unlikely. This may cause unexpected playback stall due to seek pending an | 766 // unlikely. This may cause unexpected playback stall due to seek pending an |
767 // append for a GOP prior to the last GOP demuxed. | 767 // append for a GOP prior to the last GOP demuxed. |
768 // TODO(wolenetz): Remove the possibility for this seek to cause unexpected | 768 // TODO(wolenetz): Remove the possibility for this seek to cause unexpected |
769 // player stall by replaying cached data since last keyframe in browser player | 769 // player stall by replaying cached data since last keyframe in browser player |
770 // rather than issuing browser seek. See http://crbug.com/304234. | 770 // rather than issuing browser seek. See http://crbug.com/304234. |
771 return seek_time; | 771 return seek_time; |
772 } | 772 } |
773 | 773 |
774 } // namespace content | 774 } // namespace content |
OLD | NEW |