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

Unified Diff: media/filters/omx_video_decoder.cc

Issue 6969026: Convert Filter::Seek() to use new callback system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More CR fixes Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/omx_video_decoder.h ('k') | media/filters/rtc_video_decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/omx_video_decoder.cc
diff --git a/media/filters/omx_video_decoder.cc b/media/filters/omx_video_decoder.cc
index 43f8100faf0cda2c81af265695e03ae18033dfb5..b185965c1d0c586761850192d06ea46bf9c327a4 100644
--- a/media/filters/omx_video_decoder.cc
+++ b/media/filters/omx_video_decoder.cc
@@ -156,30 +156,29 @@ void OmxVideoDecoder::OnFlushComplete() {
pts_stream_.Flush();
}
-void OmxVideoDecoder::Seek(base::TimeDelta time,
- FilterCallback* callback) {
+void OmxVideoDecoder::Seek(base::TimeDelta time, const FilterStatusCB& cb) {
if (MessageLoop::current() != message_loop_) {
message_loop_->PostTask(FROM_HERE,
NewRunnableMethod(this,
&OmxVideoDecoder::Seek,
time,
- callback));
+ cb));
return;
}
DCHECK_EQ(MessageLoop::current(), message_loop_);
- DCHECK(!seek_callback_.get());
+ DCHECK(seek_cb_.is_null());
pts_stream_.Seek(time);
- seek_callback_.reset(callback);
+ seek_cb_ = cb;
decode_engine_->Seek();
}
void OmxVideoDecoder::OnSeekComplete() {
DCHECK_EQ(MessageLoop::current(), message_loop_);
- DCHECK(seek_callback_.get());
+ DCHECK(!seek_cb_.is_null());
- AutoCallbackRunner done_runner(seek_callback_.release());
+ ResetAndRunCB(&seek_cb_, PIPELINE_OK);
}
void OmxVideoDecoder::OnError() {
« no previous file with comments | « media/filters/omx_video_decoder.h ('k') | media/filters/rtc_video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698