| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 } | 105 } |
| 106 | 106 |
| 107 int avcodec_open(AVCodecContext* avctx, AVCodec* codec) { | 107 int avcodec_open(AVCodecContext* avctx, AVCodec* codec) { |
| 108 return MockFFmpeg::get()->AVCodecOpen(avctx, codec); | 108 return MockFFmpeg::get()->AVCodecOpen(avctx, codec); |
| 109 } | 109 } |
| 110 | 110 |
| 111 int avcodec_close(AVCodecContext* avctx) { | 111 int avcodec_close(AVCodecContext* avctx) { |
| 112 return MockFFmpeg::get()->AVCodecClose(avctx); | 112 return MockFFmpeg::get()->AVCodecClose(avctx); |
| 113 } | 113 } |
| 114 | 114 |
| 115 int avcodec_thread_init(AVCodecContext* avctx, int threads) { | |
| 116 return MockFFmpeg::get()->AVCodecThreadInit(avctx, threads); | |
| 117 } | |
| 118 | |
| 119 void avcodec_flush_buffers(AVCodecContext* avctx) { | 115 void avcodec_flush_buffers(AVCodecContext* avctx) { |
| 120 return MockFFmpeg::get()->AVCodecFlushBuffers(avctx); | 116 return MockFFmpeg::get()->AVCodecFlushBuffers(avctx); |
| 121 } | 117 } |
| 122 | 118 |
| 123 AVCodecContext* avcodec_alloc_context() { | 119 AVCodecContext* avcodec_alloc_context() { |
| 124 return MockFFmpeg::get()->AVCodecAllocContext(); | 120 return MockFFmpeg::get()->AVCodecAllocContext(); |
| 125 } | 121 } |
| 126 | 122 |
| 127 AVFrame* avcodec_alloc_frame() { | 123 AVFrame* avcodec_alloc_frame() { |
| 128 return MockFFmpeg::get()->AVCodecAllocFrame(); | 124 return MockFFmpeg::get()->AVCodecAllocFrame(); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 MockFFmpeg::get()->AVLogSetLevel(level); | 215 MockFFmpeg::get()->AVLogSetLevel(level); |
| 220 } | 216 } |
| 221 | 217 |
| 222 void av_destruct_packet(AVPacket *pkt) { | 218 void av_destruct_packet(AVPacket *pkt) { |
| 223 MockFFmpeg::get()->AVDestructPacket(pkt); | 219 MockFFmpeg::get()->AVDestructPacket(pkt); |
| 224 } | 220 } |
| 225 | 221 |
| 226 } // extern "C" | 222 } // extern "C" |
| 227 | 223 |
| 228 } // namespace media | 224 } // namespace media |
| OLD | NEW |