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

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

Issue 212803004: Separate DemuxerHost from DataSourceHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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
« no previous file with comments | « no previous file | media/base/data_source.h » ('j') | media/base/demuxer.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 data_source_.reset(new BufferedDataSource( 309 data_source_.reset(new BufferedDataSource(
310 main_loop_, 310 main_loop_,
311 frame_, 311 frame_,
312 media_log_.get(), 312 media_log_.get(),
313 base::Bind(&WebMediaPlayerImpl::NotifyDownloading, AsWeakPtr()))); 313 base::Bind(&WebMediaPlayerImpl::NotifyDownloading, AsWeakPtr())));
314 data_source_->Initialize( 314 data_source_->Initialize(
315 url, static_cast<BufferedResourceLoader::CORSMode>(cors_mode), 315 url, static_cast<BufferedResourceLoader::CORSMode>(cors_mode),
316 base::Bind( 316 base::Bind(
317 &WebMediaPlayerImpl::DataSourceInitialized, 317 &WebMediaPlayerImpl::DataSourceInitialized,
318 AsWeakPtr(), gurl)); 318 AsWeakPtr(), gurl));
319 data_source_->set_host(&pipeline_);
319 320
320 is_local_source_ = !gurl.SchemeIsHTTPOrHTTPS(); 321 is_local_source_ = !gurl.SchemeIsHTTPOrHTTPS();
321 } 322 }
322 323
323 void WebMediaPlayerImpl::play() { 324 void WebMediaPlayerImpl::play() {
324 DCHECK(main_loop_->BelongsToCurrentThread()); 325 DCHECK(main_loop_->BelongsToCurrentThread());
325 326
326 paused_ = false; 327 paused_ = false;
327 pipeline_.SetPlaybackRate(playback_rate_); 328 pipeline_.SetPlaybackRate(playback_rate_);
328 if (data_source_) 329 if (data_source_)
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 1313
1313 if (web_cdm_) { 1314 if (web_cdm_) {
1314 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); 1315 decryptor_ready_cb.Run(web_cdm_->GetDecryptor());
1315 return; 1316 return;
1316 } 1317 }
1317 1318
1318 decryptor_ready_cb_ = decryptor_ready_cb; 1319 decryptor_ready_cb_ = decryptor_ready_cb;
1319 } 1320 }
1320 1321
1321 } // namespace content 1322 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/base/data_source.h » ('j') | media/base/demuxer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698