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

Side by Side Diff: webkit/media/webmediaplayer_proxy.cc

Issue 10123005: Revert 132965 - this change seems to break media_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « webkit/media/webmediaplayer_proxy.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/media/webmediaplayer_proxy.h" 5 #include "webkit/media/webmediaplayer_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "media/base/pipeline_status.h" 10 #include "media/base/pipeline_status.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 void WebMediaPlayerProxy::DemuxerClosed() { 180 void WebMediaPlayerProxy::DemuxerClosed() {
181 render_loop_->PostTask(FROM_HERE, base::Bind( 181 render_loop_->PostTask(FROM_HERE, base::Bind(
182 &WebMediaPlayerProxy::DemuxerClosedTask, this)); 182 &WebMediaPlayerProxy::DemuxerClosedTask, this));
183 } 183 }
184 184
185 void WebMediaPlayerProxy::DemuxerFlush() { 185 void WebMediaPlayerProxy::DemuxerFlush() {
186 if (chunk_demuxer_.get()) 186 if (chunk_demuxer_.get())
187 chunk_demuxer_->FlushData(); 187 chunk_demuxer_->FlushData();
188 } 188 }
189 189
190 media::ChunkDemuxer::Status WebMediaPlayerProxy::DemuxerAddId( 190 bool WebMediaPlayerProxy::DemuxerAppend(const uint8* data, size_t length) {
191 const std::string& id, 191 if (chunk_demuxer_.get())
192 const std::string& type) { 192 return chunk_demuxer_->AppendData(data, length);
193 return chunk_demuxer_->AddId(id, type); 193 return false;
194 }
195
196 bool WebMediaPlayerProxy::DemuxerRemoveId(const std::string& id) {
197 return chunk_demuxer_->RemoveId(id);
198 }
199
200 bool WebMediaPlayerProxy::DemuxerAppend(const std::string& id,
201 const uint8* data,
202 size_t length) {
203 return chunk_demuxer_->AppendData(id, data, length);
204 } 194 }
205 195
206 void WebMediaPlayerProxy::DemuxerEndOfStream(media::PipelineStatus status) { 196 void WebMediaPlayerProxy::DemuxerEndOfStream(media::PipelineStatus status) {
207 chunk_demuxer_->EndOfStream(status); 197 if (chunk_demuxer_.get())
198 chunk_demuxer_->EndOfStream(status);
208 } 199 }
209 200
210 void WebMediaPlayerProxy::DemuxerShutdown() { 201 void WebMediaPlayerProxy::DemuxerShutdown() {
211 if (chunk_demuxer_.get()) 202 if (chunk_demuxer_.get())
212 chunk_demuxer_->Shutdown(); 203 chunk_demuxer_->Shutdown();
213 } 204 }
214 205
215 void WebMediaPlayerProxy::DemuxerOpenedTask( 206 void WebMediaPlayerProxy::DemuxerOpenedTask(
216 const scoped_refptr<media::ChunkDemuxer>& demuxer) { 207 const scoped_refptr<media::ChunkDemuxer>& demuxer) {
217 DCHECK(render_loop_->BelongsToCurrentThread()); 208 DCHECK(render_loop_->BelongsToCurrentThread());
218 chunk_demuxer_ = demuxer; 209 chunk_demuxer_ = demuxer;
219 if (webmediaplayer_) 210 if (webmediaplayer_)
220 webmediaplayer_->OnDemuxerOpened(); 211 webmediaplayer_->OnDemuxerOpened();
221 } 212 }
222 213
223 void WebMediaPlayerProxy::DemuxerClosedTask() { 214 void WebMediaPlayerProxy::DemuxerClosedTask() {
224 chunk_demuxer_ = NULL; 215 chunk_demuxer_ = NULL;
225 } 216 }
226 217
227 } // namespace webkit_media 218 } // namespace webkit_media
OLDNEW
« no previous file with comments | « webkit/media/webmediaplayer_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698