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

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

Issue 126160: Moving MockFFmpeg to its own file and some media.gyp cleanup. (Closed)
Patch Set: Not ready for mac and linux yet Created 11 years, 6 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
« no previous file with comments | « media/base/mock_ffmpeg.h ('k') | media/filters/ffmpeg_video_decoder_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "media/base/mock_ffmpeg.h"
6
7 #include "base/logging.h"
8 #include "media/filters/ffmpeg_common.h"
9
10 namespace media {
11
12 MockFFmpeg* MockFFmpeg::instance_ = NULL;
13
14 // static
15 void MockFFmpeg::set(MockFFmpeg* instance) {
16 instance_ = instance;
17 }
18
19 // static
20 MockFFmpeg* MockFFmpeg::get() {
21 return instance_;
22 }
23
24 // FFmpeg stubs that delegate to the FFmpegMock instance.
25 extern "C" {
26
27 AVCodec* avcodec_find_decoder(enum CodecID id) {
28 return media::MockFFmpeg::get()->AVCodecFindDecoder(id);
29 }
30
31 int avcodec_open(AVCodecContext* avctx, AVCodec* codec) {
32 return media::MockFFmpeg::get()->AVCodecOpen(avctx, codec);
33 }
34
35 int avcodec_thread_init(AVCodecContext* avctx, int threads) {
36 return media::MockFFmpeg::get()->AVCodecThreadInit(avctx, threads);
37 }
38
39 void avcodec_flush_buffers(AVCodecContext* avctx) {
40 NOTREACHED();
41 }
42
43 AVFrame* avcodec_alloc_frame() {
44 NOTREACHED();
45 return NULL;
46 }
47
48 int avcodec_decode_video2(AVCodecContext* avctx, AVFrame* picture,
49 int* got_picture_ptr, AVPacket* avpkt) {
50 NOTREACHED();
51 return 0;
52 }
53
54 void av_init_packet(AVPacket* pkt) {
55 NOTREACHED();
56 }
57
58 } // extern "C"
59
60 } // namespace media
OLDNEW
« no previous file with comments | « media/base/mock_ffmpeg.h ('k') | media/filters/ffmpeg_video_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698