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

Side by Side Diff: media/base/mock_ffmpeg.cc

Issue 854006: Revert 41386 - Removed custom FFmpegLock. Removed ffmpeg headers from third_p... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/base/mock_ffmpeg.h ('k') | media/ffmpeg/ffmpeg_common.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "media/base/mock_ffmpeg.h" 5 #include "media/base/mock_ffmpeg.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "media/ffmpeg/ffmpeg_common.h" 8 #include "media/ffmpeg/ffmpeg_common.h"
9 9
10 using ::testing::_; 10 using ::testing::_;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 86
87 int av_register_protocol(URLProtocol* protocol) { 87 int av_register_protocol(URLProtocol* protocol) {
88 return media::MockFFmpeg::get()->AVRegisterProtocol(protocol); 88 return media::MockFFmpeg::get()->AVRegisterProtocol(protocol);
89 } 89 }
90 90
91 void av_register_all() { 91 void av_register_all() {
92 media::MockFFmpeg::get()->AVRegisterAll(); 92 media::MockFFmpeg::get()->AVRegisterAll();
93 } 93 }
94 94
95 int av_lockmgr_register(int (*cb)(void**, enum AVLockOp)) {
96 media::MockFFmpeg* mock = media::MockFFmpeg::get();
97 // Here |mock| may be NULL when this function is called from ~FFmpegGlue().
98 if (mock != NULL) {
99 return media::MockFFmpeg::get()->AVRegisterLockManager(cb);
100 } else {
101 return 0;
102 }
103 }
104
105 AVCodec* avcodec_find_decoder(enum CodecID id) { 95 AVCodec* avcodec_find_decoder(enum CodecID id) {
106 return media::MockFFmpeg::get()->AVCodecFindDecoder(id); 96 return media::MockFFmpeg::get()->AVCodecFindDecoder(id);
107 } 97 }
108 98
109 int avcodec_open(AVCodecContext* avctx, AVCodec* codec) { 99 int avcodec_open(AVCodecContext* avctx, AVCodec* codec) {
110 return media::MockFFmpeg::get()->AVCodecOpen(avctx, codec); 100 return media::MockFFmpeg::get()->AVCodecOpen(avctx, codec);
111 } 101 }
112 102
113 int avcodec_close(AVCodecContext* avctx) { 103 int avcodec_close(AVCodecContext* avctx) {
114 return media::MockFFmpeg::get()->AVCodecClose(avctx); 104 return media::MockFFmpeg::get()->AVCodecClose(avctx);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 media::MockFFmpeg::get()->AVLogSetLevel(level); 205 media::MockFFmpeg::get()->AVLogSetLevel(level);
216 } 206 }
217 207
218 void av_destruct_packet(AVPacket *pkt) { 208 void av_destruct_packet(AVPacket *pkt) {
219 media::MockFFmpeg::get()->AVDestructPacket(pkt); 209 media::MockFFmpeg::get()->AVDestructPacket(pkt);
220 } 210 }
221 211
222 } // extern "C" 212 } // extern "C"
223 213
224 } // namespace media 214 } // namespace media
OLDNEW
« 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