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

Unified Diff: media/base/mock_ffmpeg.cc

Issue 1289003: Removed custom FFmpegLock. Removed ffmpeg headers from third_party/ffmpeg/include. (Closed)
Patch Set: Created 10 years, 9 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/base/mock_ffmpeg.h ('k') | media/ffmpeg/ffmpeg_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/mock_ffmpeg.cc
diff --git a/media/base/mock_ffmpeg.cc b/media/base/mock_ffmpeg.cc
index 0d87206809fb63ba1739a91bb8b235270a96687b..5f29a55ec2eab94d1c358a5de2990384a877f0b3 100644
--- a/media/base/mock_ffmpeg.cc
+++ b/media/base/mock_ffmpeg.cc
@@ -40,6 +40,11 @@ MockFFmpeg::MockFFmpeg()
.Times(AtMost(1))
.WillOnce(Return());
}
+ // av_lockmgr_register() is also called from ~FFmpegLock(), so we expect
+ // it to be called at the end.
+ EXPECT_CALL(*this, AVRegisterLockManager(_))
+ .Times(AtMost(2))
+ .WillRepeatedly(Return(0));
}
MockFFmpeg::~MockFFmpeg() {
@@ -92,6 +97,16 @@ void av_register_all() {
media::MockFFmpeg::get()->AVRegisterAll();
}
+int av_lockmgr_register(int (*cb)(void**, enum AVLockOp)) {
+ media::MockFFmpeg* mock = media::MockFFmpeg::get();
+ // Here |mock| may be NULL when this function is called from ~FFmpegGlue().
+ if (mock != NULL) {
+ return mock->AVRegisterLockManager(cb);
+ } else {
+ return 0;
+ }
+}
+
AVCodec* avcodec_find_decoder(enum CodecID id) {
return media::MockFFmpeg::get()->AVCodecFindDecoder(id);
}
« no previous file with comments | « media/base/mock_ffmpeg.h ('k') | media/ffmpeg/ffmpeg_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698