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/webmediaplayer_impl.h" | 5 #include "content/renderer/media/webmediaplayer_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1053 | 1053 |
1054 scoped_ptr<WebKit::WebMediaSource> ms(media_source); | 1054 scoped_ptr<WebKit::WebMediaSource> ms(media_source); |
1055 chunk_demuxer_ = new media::ChunkDemuxer( | 1055 chunk_demuxer_ = new media::ChunkDemuxer( |
1056 BIND_TO_RENDER_LOOP_1(&WebMediaPlayerImpl::OnDemuxerOpened, | 1056 BIND_TO_RENDER_LOOP_1(&WebMediaPlayerImpl::OnDemuxerOpened, |
1057 base::Passed(&ms)), | 1057 base::Passed(&ms)), |
1058 BIND_TO_RENDER_LOOP_1(&WebMediaPlayerImpl::OnNeedKey, ""), | 1058 BIND_TO_RENDER_LOOP_1(&WebMediaPlayerImpl::OnNeedKey, ""), |
1059 add_text_track_cb, | 1059 add_text_track_cb, |
1060 base::Bind(&LogMediaSourceError, media_log_)); | 1060 base::Bind(&LogMediaSourceError, media_log_)); |
1061 demuxer_.reset(chunk_demuxer_); | 1061 demuxer_.reset(chunk_demuxer_); |
1062 | 1062 |
1063 #if !defined(OS_CHROMEOS) || !defined(ARCH_CPU_X86_FAMILY) | 1063 #if !defined(OS_CHROMEOS) |
1064 // Disable GpuVideoDecoder creation on platforms other than CrOS x86 until | 1064 // Disable GpuVideoDecoder creation on platforms other than CrOS until |
1065 // they support codec config changes. | 1065 // they support codec config changes. |
1066 // TODO(acolwell): Remove this once http://crbug.com/151045 is fixed. | 1066 // TODO(acolwell): Remove this once http://crbug.com/151045 is fixed. |
1067 gpu_factories_ = NULL; | 1067 gpu_factories_ = NULL; |
1068 #endif | 1068 #endif |
1069 | 1069 |
1070 // Disable preroll increases on underflow since the web application has no | 1070 // Disable preroll increases on underflow since the web application has no |
1071 // way to detect that this is happening and runs the risk of triggering | 1071 // way to detect that this is happening and runs the risk of triggering |
1072 // unwanted garbage collection if it is to aggressive about appending data. | 1072 // unwanted garbage collection if it is to aggressive about appending data. |
1073 // TODO(acolwell): Remove this once http://crbug.com/144683 is fixed. | 1073 // TODO(acolwell): Remove this once http://crbug.com/144683 is fixed. |
1074 increase_preroll_on_underflow = false; | 1074 increase_preroll_on_underflow = false; |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1240 | 1240 |
1241 if (pending_repaint_) | 1241 if (pending_repaint_) |
1242 return; | 1242 return; |
1243 | 1243 |
1244 pending_repaint_ = true; | 1244 pending_repaint_ = true; |
1245 main_loop_->PostTask(FROM_HERE, base::Bind( | 1245 main_loop_->PostTask(FROM_HERE, base::Bind( |
1246 &WebMediaPlayerImpl::Repaint, AsWeakPtr())); | 1246 &WebMediaPlayerImpl::Repaint, AsWeakPtr())); |
1247 } | 1247 } |
1248 | 1248 |
1249 } // namespace content | 1249 } // namespace content |
OLD | NEW |