| 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 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1094 media::AddTextTrackCB add_text_track_cb; | 1094 media::AddTextTrackCB add_text_track_cb; |
| 1095 | 1095 |
| 1096 if (cmd_line->HasSwitch(switches::kEnableInbandTextTracks)) { | 1096 if (cmd_line->HasSwitch(switches::kEnableInbandTextTracks)) { |
| 1097 add_text_track_cb = | 1097 add_text_track_cb = |
| 1098 base::Bind(&WebMediaPlayerImpl::OnTextTrack, base::Unretained(this)); | 1098 base::Bind(&WebMediaPlayerImpl::OnTextTrack, base::Unretained(this)); |
| 1099 } | 1099 } |
| 1100 | 1100 |
| 1101 chunk_demuxer_ = new media::ChunkDemuxer( | 1101 chunk_demuxer_ = new media::ChunkDemuxer( |
| 1102 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnDemuxerOpened), | 1102 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnDemuxerOpened), |
| 1103 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnNeedKey), | 1103 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnNeedKey), |
| 1104 add_text_track_cb, | 1104 add_text_track_cb, media_log_, |
| 1105 base::Bind(&LogMediaSourceError, media_log_)); | 1105 base::Bind(&LogMediaSourceError, media_log_)); |
| 1106 demuxer_.reset(chunk_demuxer_); | 1106 demuxer_.reset(chunk_demuxer_); |
| 1107 | 1107 |
| 1108 #if !defined(OS_CHROMEOS) | 1108 #if !defined(OS_CHROMEOS) |
| 1109 // Disable GpuVideoDecoder creation on platforms other than CrOS until | 1109 // Disable GpuVideoDecoder creation on platforms other than CrOS until |
| 1110 // they support codec config changes. | 1110 // they support codec config changes. |
| 1111 // TODO(acolwell): Remove this once http://crbug.com/151045 is fixed. | 1111 // TODO(acolwell): Remove this once http://crbug.com/151045 is fixed. |
| 1112 gpu_factories_ = NULL; | 1112 gpu_factories_ = NULL; |
| 1113 #endif | 1113 #endif |
| 1114 | 1114 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1318 // The |current_frame_| wasn't painted, it is being replaced, and we haven't | 1318 // The |current_frame_| wasn't painted, it is being replaced, and we haven't |
| 1319 // even gotten the chance to request a repaint for it yet. Mark it as dropped. | 1319 // even gotten the chance to request a repaint for it yet. Mark it as dropped. |
| 1320 TRACE_EVENT0("media", "WebMediaPlayerImpl:frameDropped"); | 1320 TRACE_EVENT0("media", "WebMediaPlayerImpl:frameDropped"); |
| 1321 DVLOG(1) << "Frame dropped before being painted: " | 1321 DVLOG(1) << "Frame dropped before being painted: " |
| 1322 << current_frame_->GetTimestamp().InSecondsF(); | 1322 << current_frame_->GetTimestamp().InSecondsF(); |
| 1323 if (frames_dropped_before_paint_ < kuint32max) | 1323 if (frames_dropped_before_paint_ < kuint32max) |
| 1324 frames_dropped_before_paint_++; | 1324 frames_dropped_before_paint_++; |
| 1325 } | 1325 } |
| 1326 | 1326 |
| 1327 } // namespace content | 1327 } // namespace content |
| OLD | NEW |