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 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1215 destroy_reason_ |= reason; | 1215 destroy_reason_ |= reason; |
1216 | 1216 |
1217 // Abort any pending IO so stopping the pipeline doesn't get blocked. | 1217 // Abort any pending IO so stopping the pipeline doesn't get blocked. |
1218 if (data_source_) | 1218 if (data_source_) |
1219 data_source_->Abort(); | 1219 data_source_->Abort(); |
1220 if (chunk_demuxer_) { | 1220 if (chunk_demuxer_) { |
1221 chunk_demuxer_->Shutdown(); | 1221 chunk_demuxer_->Shutdown(); |
1222 chunk_demuxer_ = NULL; | 1222 chunk_demuxer_ = NULL; |
1223 } | 1223 } |
1224 | 1224 |
1225 if (gpu_factories_.get()) { | 1225 gpu_factories_ = NULL; |
1226 gpu_factories_->Abort(); | |
1227 gpu_factories_ = NULL; | |
1228 } | |
1229 | 1226 |
1230 if (pipeline_) { | 1227 if (pipeline_) { |
1231 // Make sure to kill the pipeline so there's no more media threads running. | 1228 // Make sure to kill the pipeline so there's no more media threads running. |
1232 // Note: stopping the pipeline might block for a long time. | 1229 // Note: stopping the pipeline might block for a long time. |
1233 base::WaitableEvent waiter(false, false); | 1230 base::WaitableEvent waiter(false, false); |
1234 pipeline_->Stop( | 1231 pipeline_->Stop( |
1235 base::Bind(&base::WaitableEvent::Signal, base::Unretained(&waiter))); | 1232 base::Bind(&base::WaitableEvent::Signal, base::Unretained(&waiter))); |
1236 waiter.Wait(); | 1233 waiter.Wait(); |
1237 | 1234 |
1238 // Let V8 know we are not using extra resources anymore. | 1235 // Let V8 know we are not using extra resources anymore. |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1326 | 1323 |
1327 if (web_cdm_) { | 1324 if (web_cdm_) { |
1328 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); | 1325 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); |
1329 return; | 1326 return; |
1330 } | 1327 } |
1331 | 1328 |
1332 decryptor_ready_cb_ = decryptor_ready_cb; | 1329 decryptor_ready_cb_ = decryptor_ready_cb; |
1333 } | 1330 } |
1334 | 1331 |
1335 } // namespace content | 1332 } // namespace content |
OLD | NEW |