Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(574)

Side by Side Diff: content/renderer/media/webmediaplayer_impl.cc

Issue 27420004: Remove threading from RendererGpuVideoAcceleratorFactories (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dthread
Patch Set: cf596ded Rebase. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 DCHECK(main_loop_->BelongsToCurrentThread()); 1197 DCHECK(main_loop_->BelongsToCurrentThread());
1198 1198
1199 // Abort any pending IO so stopping the pipeline doesn't get blocked. 1199 // Abort any pending IO so stopping the pipeline doesn't get blocked.
1200 if (data_source_) 1200 if (data_source_)
1201 data_source_->Abort(); 1201 data_source_->Abort();
1202 if (chunk_demuxer_) { 1202 if (chunk_demuxer_) {
1203 chunk_demuxer_->Shutdown(); 1203 chunk_demuxer_->Shutdown();
1204 chunk_demuxer_ = NULL; 1204 chunk_demuxer_ = NULL;
1205 } 1205 }
1206 1206
1207 if (gpu_factories_.get()) { 1207 gpu_factories_ = NULL;
1208 gpu_factories_->Abort();
1209 gpu_factories_ = NULL;
1210 }
1211 1208
1212 // Make sure to kill the pipeline so there's no more media threads running. 1209 // Make sure to kill the pipeline so there's no more media threads running.
1213 // Note: stopping the pipeline might block for a long time. 1210 // Note: stopping the pipeline might block for a long time.
1214 base::WaitableEvent waiter(false, false); 1211 base::WaitableEvent waiter(false, false);
1215 pipeline_->Stop(base::Bind( 1212 pipeline_->Stop(base::Bind(
1216 &base::WaitableEvent::Signal, base::Unretained(&waiter))); 1213 &base::WaitableEvent::Signal, base::Unretained(&waiter)));
1217 waiter.Wait(); 1214 waiter.Wait();
1218 1215
1219 // Let V8 know we are not using extra resources anymore. 1216 // Let V8 know we are not using extra resources anymore.
1220 if (incremented_externally_allocated_memory_) { 1217 if (incremented_externally_allocated_memory_) {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
1306 1303
1307 if (web_cdm_) { 1304 if (web_cdm_) {
1308 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); 1305 decryptor_ready_cb.Run(web_cdm_->GetDecryptor());
1309 return; 1306 return;
1310 } 1307 }
1311 1308
1312 decryptor_ready_cb_ = decryptor_ready_cb; 1309 decryptor_ready_cb_ = decryptor_ready_cb;
1313 } 1310 }
1314 1311
1315 } // namespace content 1312 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/rtc_video_encoder_factory.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698