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

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

Issue 10835044: Cancel pending seek in ChunkDemuxer when a new seek occurs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: response to CR Created 8 years, 4 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
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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 render_loop_->PostTask(FROM_HERE, base::Bind( 182 render_loop_->PostTask(FROM_HERE, base::Bind(
183 &WebMediaPlayerProxy::NeedKeyTask, this, "", "", 183 &WebMediaPlayerProxy::NeedKeyTask, this, "", "",
184 base::Passed(&init_data), init_data_size)); 184 base::Passed(&init_data), init_data_size));
185 } 185 }
186 186
187 void WebMediaPlayerProxy::DemuxerStartWaitingForSeek() { 187 void WebMediaPlayerProxy::DemuxerStartWaitingForSeek() {
188 if (chunk_demuxer_.get()) 188 if (chunk_demuxer_.get())
189 chunk_demuxer_->StartWaitingForSeek(); 189 chunk_demuxer_->StartWaitingForSeek();
190 } 190 }
191 191
192 void WebMediaPlayerProxy::DemuxerCancelPendingSeek() {
193 if (chunk_demuxer_.get())
194 chunk_demuxer_->CancelPendingSeek();
195 }
196
192 media::ChunkDemuxer::Status WebMediaPlayerProxy::DemuxerAddId( 197 media::ChunkDemuxer::Status WebMediaPlayerProxy::DemuxerAddId(
193 const std::string& id, 198 const std::string& id,
194 const std::string& type, 199 const std::string& type,
195 std::vector<std::string>& codecs) { 200 std::vector<std::string>& codecs) {
196 return chunk_demuxer_->AddId(id, type, codecs); 201 return chunk_demuxer_->AddId(id, type, codecs);
197 } 202 }
198 203
199 bool WebMediaPlayerProxy::DemuxerSetTimestampOffset( 204 bool WebMediaPlayerProxy::DemuxerSetTimestampOffset(
200 const std::string& id, double offset) { 205 const std::string& id, double offset) {
201 return chunk_demuxer_->SetTimestampOffset(id, offset); 206 return chunk_demuxer_->SetTimestampOffset(id, offset);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 const std::string& session_id, 312 const std::string& session_id,
308 scoped_array<uint8> init_data, 313 scoped_array<uint8> init_data,
309 int init_data_size) { 314 int init_data_size) {
310 DCHECK(render_loop_->BelongsToCurrentThread()); 315 DCHECK(render_loop_->BelongsToCurrentThread());
311 if (webmediaplayer_) 316 if (webmediaplayer_)
312 webmediaplayer_->OnNeedKey(key_system, session_id, 317 webmediaplayer_->OnNeedKey(key_system, session_id,
313 init_data.Pass(), init_data_size); 318 init_data.Pass(), init_data_size);
314 } 319 }
315 320
316 } // namespace webkit_media 321 } // namespace webkit_media
OLDNEW
« media/filters/chunk_demuxer.cc ('K') | « webkit/media/webmediaplayer_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698