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

Unified Diff: media/filters/rtc_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/rtc_video_decoder.h ('k') | media/filters/rtc_video_decoder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/rtc_video_decoder.cc
diff --git a/media/filters/rtc_video_decoder.cc b/media/filters/rtc_video_decoder.cc
index 0ddf630bc5b1eb0ebc6ec23aa95abf1c610bc7c2..674456983ae80a6e4218e6012a664c08d564e17b 100644
--- a/media/filters/rtc_video_decoder.cc
+++ b/media/filters/rtc_video_decoder.cc
@@ -113,14 +113,11 @@ void RTCVideoDecoder::Stop(FilterCallback* callback) {
// TODO(ronghuawu): Stop rtc
}
-void RTCVideoDecoder::Seek(base::TimeDelta time,
- FilterCallback* callback) {
+void RTCVideoDecoder::Seek(base::TimeDelta time, const FilterStatusCB& cb) {
if (MessageLoop::current() != message_loop_) {
message_loop_->PostTask(FROM_HERE,
- NewRunnableMethod(this,
- &RTCVideoDecoder::Seek,
- time,
- callback));
+ NewRunnableMethod(this, &RTCVideoDecoder::Seek,
+ time, cb));
return;
}
@@ -165,8 +162,7 @@ void RTCVideoDecoder::Seek(base::TimeDelta time,
state_ = kNormal;
- callback->Run();
- delete callback;
+ cb.Run(PIPELINE_OK);
// TODO(ronghuawu): Start rtc
}
« no previous file with comments | « media/filters/rtc_video_decoder.h ('k') | media/filters/rtc_video_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698