| 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. | 8 // TODO(scherkus): See if we can remove ffmpeg_common from this file. |
| 9 #include "media/filters/ffmpeg_common.h" | 9 #include "media/filters/ffmpeg_common.h" |
| 10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 MOCK_METHOD2(AVReadFrame, int(AVFormatContext* format, AVPacket* packet)); | 40 MOCK_METHOD2(AVReadFrame, int(AVFormatContext* format, AVPacket* packet)); |
| 41 MOCK_METHOD4(AVSeekFrame, int(AVFormatContext *format, | 41 MOCK_METHOD4(AVSeekFrame, int(AVFormatContext *format, |
| 42 int stream_index, | 42 int stream_index, |
| 43 int64_t timestamp, | 43 int64_t timestamp, |
| 44 int flags)); | 44 int flags)); |
| 45 | 45 |
| 46 MOCK_METHOD1(AVInitPacket, void(AVPacket* pkt)); | 46 MOCK_METHOD1(AVInitPacket, void(AVPacket* pkt)); |
| 47 MOCK_METHOD2(AVNewPacket, int(AVPacket* packet, int size)); | 47 MOCK_METHOD2(AVNewPacket, int(AVPacket* packet, int size)); |
| 48 MOCK_METHOD1(AVFreePacket, void(AVPacket* packet)); | 48 MOCK_METHOD1(AVFreePacket, void(AVPacket* packet)); |
| 49 MOCK_METHOD1(AVFree, void(void* ptr)); | 49 MOCK_METHOD1(AVFree, void(void* ptr)); |
| 50 MOCK_METHOD1(AVDupPacket, int(AVPacket* packet)); |
| 50 | 51 |
| 51 // Used for verifying check points during tests. | 52 // Used for verifying check points during tests. |
| 52 MOCK_METHOD1(CheckPoint, void(int id)); | 53 MOCK_METHOD1(CheckPoint, void(int id)); |
| 53 | 54 |
| 54 // Setter/getter for the global instance of MockFFmpeg. | 55 // Setter/getter for the global instance of MockFFmpeg. |
| 55 static void set(MockFFmpeg* instance); | 56 static void set(MockFFmpeg* instance); |
| 56 static MockFFmpeg* get(); | 57 static MockFFmpeg* get(); |
| 57 | 58 |
| 58 // Returns the URLProtocol registered by the FFmpegGlue singleton. | 59 // Returns the URLProtocol registered by the FFmpegGlue singleton. |
| 59 static URLProtocol* protocol(); | 60 static URLProtocol* protocol(); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 arg0->destruct(arg0); | 115 arg0->destruct(arg0); |
| 115 } | 116 } |
| 116 | 117 |
| 117 // Decrement number of packets allocated. | 118 // Decrement number of packets allocated. |
| 118 MockFFmpeg::get()->dec_outstanding_packets(); | 119 MockFFmpeg::get()->dec_outstanding_packets(); |
| 119 } | 120 } |
| 120 | 121 |
| 121 } // namespace media | 122 } // namespace media |
| 122 | 123 |
| 123 #endif // MEDIA_BASE_MOCK_FFMPEG_H_ | 124 #endif // MEDIA_BASE_MOCK_FFMPEG_H_ |
| OLD | NEW |