diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-15 23:50:57 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-15 23:50:57 +0000 |
commit | 5942fbfe6efa448722685c6ec3f157a8dd996228 (patch) | |
tree | 95f3001e63ada59e0d4b57d62025425012ed2545 /media/base/mock_ffmpeg.h | |
parent | 9f1591d628b6b90e5bad4ad00264300188b29194 (diff) | |
download | chromium_src-5942fbfe6efa448722685c6ec3f157a8dd996228.zip chromium_src-5942fbfe6efa448722685c6ec3f157a8dd996228.tar.gz chromium_src-5942fbfe6efa448722685c6ec3f157a8dd996228.tar.bz2 |
Moving MockFFmpeg to its own file and some media.gyp cleanup.
Step one of having a completely mocked FFmpeg library.
Review URL: http://codereview.chromium.org/126160
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18455 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/mock_ffmpeg.h')
-rw-r--r-- | media/base/mock_ffmpeg.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/media/base/mock_ffmpeg.h b/media/base/mock_ffmpeg.h new file mode 100644 index 0000000..62b085c --- /dev/null +++ b/media/base/mock_ffmpeg.h @@ -0,0 +1,34 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef MEDIA_BASE_MOCK_FFMPEG_H_ +#define MEDIA_BASE_MOCK_FFMPEG_H_ + +#include "testing/gmock/include/gmock/gmock.h" + +struct AVCodec; +struct AVCodecContext; +struct AVFrame; +struct AVPacket; +enum CodecID; + +namespace media { + +class MockFFmpeg { + public: + MOCK_METHOD1(AVCodecFindDecoder, AVCodec*(enum CodecID id)); + MOCK_METHOD2(AVCodecOpen, int(AVCodecContext* avctx, AVCodec* codec)); + MOCK_METHOD2(AVCodecThreadInit, int(AVCodecContext* avctx, int threads)); + + // Setter/getter for the global instance of MockFFmpeg. + static void set(MockFFmpeg* instance); + static MockFFmpeg* get(); + + private: + static MockFFmpeg* instance_; +}; + +} // namespace media + +#endif // MEDIA_BASE_MOCK_FFMPEG_H_ |