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

Side by Side Diff: webkit/glue/webmediaplayer_impl.cc

Issue 155713: Added reference counting to the Pipeline interface. (Closed)
Patch Set: Uploaded too much Created 11 years, 5 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 | « webkit/glue/webmediaplayer_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2008-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008-2009 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 "webkit/glue/webmediaplayer_impl.h" 5 #include "webkit/glue/webmediaplayer_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 #include "media/filters/ffmpeg_audio_decoder.h" 9 #include "media/filters/ffmpeg_audio_decoder.h"
10 #include "media/filters/ffmpeg_demuxer.h" 10 #include "media/filters/ffmpeg_demuxer.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 playback_rate_(0.0f), 132 playback_rate_(0.0f),
133 client_(client) { 133 client_(client) {
134 // Saves the current message loop. 134 // Saves the current message loop.
135 DCHECK(!main_loop_); 135 DCHECK(!main_loop_);
136 main_loop_ = MessageLoop::current(); 136 main_loop_ = MessageLoop::current();
137 137
138 // Create the pipeline and its thread. 138 // Create the pipeline and its thread.
139 if (!pipeline_thread_.Start()) { 139 if (!pipeline_thread_.Start()) {
140 NOTREACHED() << "Could not start PipelineThread"; 140 NOTREACHED() << "Could not start PipelineThread";
141 } else { 141 } else {
142 pipeline_.reset(new media::PipelineImpl(pipeline_thread_.message_loop())); 142 pipeline_ = new media::PipelineImpl(pipeline_thread_.message_loop());
143 } 143 }
144 144
145 // Also we want to be notified of |main_loop_| destruction. 145 // Also we want to be notified of |main_loop_| destruction.
146 main_loop_->AddDestructionObserver(this); 146 main_loop_->AddDestructionObserver(this);
147 147
148 // Creates the proxy. 148 // Creates the proxy.
149 proxy_ = new Proxy(main_loop_, this); 149 proxy_ = new Proxy(main_loop_, this);
150 150
151 // Add in the default filter factories. 151 // Add in the default filter factories.
152 filter_factory_->AddFactory(media::FFmpegDemuxer::CreateFilterFactory()); 152 filter_factory_->AddFactory(media::FFmpegDemuxer::CreateFilterFactory());
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 } 423 }
424 } 424 }
425 425
426 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { 426 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() {
427 DCHECK(MessageLoop::current() == main_loop_); 427 DCHECK(MessageLoop::current() == main_loop_);
428 DCHECK(client_); 428 DCHECK(client_);
429 return client_; 429 return client_;
430 } 430 }
431 431
432 } // namespace webkit_glue 432 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/webmediaplayer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698