OLD | NEW |
(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 #ifndef MEDIA_BASE_MOCK_FFMPEG_H_ |
| 6 #define MEDIA_BASE_MOCK_FFMPEG_H_ |
| 7 |
| 8 #include "testing/gmock/include/gmock/gmock.h" |
| 9 |
| 10 struct AVCodec; |
| 11 struct AVCodecContext; |
| 12 struct AVFrame; |
| 13 struct AVPacket; |
| 14 enum CodecID; |
| 15 |
| 16 namespace media { |
| 17 |
| 18 class MockFFmpeg { |
| 19 public: |
| 20 MOCK_METHOD1(AVCodecFindDecoder, AVCodec*(enum CodecID id)); |
| 21 MOCK_METHOD2(AVCodecOpen, int(AVCodecContext* avctx, AVCodec* codec)); |
| 22 MOCK_METHOD2(AVCodecThreadInit, int(AVCodecContext* avctx, int threads)); |
| 23 |
| 24 // Setter/getter for the global instance of MockFFmpeg. |
| 25 static void set(MockFFmpeg* instance); |
| 26 static MockFFmpeg* get(); |
| 27 |
| 28 private: |
| 29 static MockFFmpeg* instance_; |
| 30 }; |
| 31 |
| 32 } // namespace media |
| 33 |
| 34 #endif // MEDIA_BASE_MOCK_FFMPEG_H_ |
OLD | NEW |