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