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

Unified Diff: media/filters/ffmpeg_video_decoder.cc

Issue 10969028: Add video decoding methods in Decryptor and add DecryptingVideoDecoder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reorder methods in the unittest Created 8 years, 2 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/decrypting_video_decoder_unittest.cc ('k') | media/media.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_video_decoder.cc
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
index ff44bf8a70c6cca00dc561e181d98736767bcabe..3ad262f55250e4ae2b59c73a11f1ceada8cea692 100644
--- a/media/filters/ffmpeg_video_decoder.cc
+++ b/media/filters/ffmpeg_video_decoder.cc
@@ -179,11 +179,12 @@ void FFmpegVideoDecoder::Reset(const base::Closure& closure) {
return;
}
+ DCHECK(reset_cb_.is_null());
+ reset_cb_ = closure;
+
if (decryptor_)
decryptor_->CancelDecrypt();
- reset_cb_ = closure;
-
// Defer the reset if a read is pending.
if (!read_cb_.is_null())
return;
@@ -207,16 +208,18 @@ void FFmpegVideoDecoder::Stop(const base::Closure& closure) {
return;
}
+ DCHECK(stop_cb_.is_null());
+
if (state_ == kUninitialized) {
closure.Run();
return;
}
+ stop_cb_ = closure;
+
if (decryptor_)
decryptor_->CancelDecrypt();
- stop_cb_ = closure;
-
// Defer stopping if a read is pending.
if (!read_cb_.is_null())
return;
« no previous file with comments | « media/filters/decrypting_video_decoder_unittest.cc ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698