jwwang | 8247eef | 2014-01-14 15:48:20 +0800 | [diff] [blame] | 1 | #ifndef __BASEDECODERTEST_H__ |
| 2 | #define __BASEDECODERTEST_H__ |
| 3 | |
| 4 | #include <stdint.h> |
| 5 | #include <limits.h> |
| 6 | #include "codec_api.h" |
| 7 | |
| 8 | class BaseDecoderTest { |
| 9 | public: |
| 10 | struct Plane { |
| 11 | const uint8_t* data; |
| 12 | int width; |
| 13 | int height; |
| 14 | int stride; |
| 15 | }; |
| 16 | |
| 17 | struct Frame { |
| 18 | Plane y; |
| 19 | Plane u; |
| 20 | Plane v; |
| 21 | }; |
| 22 | |
| 23 | struct Callback { |
| 24 | virtual void onDecodeFrame(const Frame& frame) = 0; |
| 25 | }; |
| 26 | |
| 27 | BaseDecoderTest(); |
| 28 | void SetUp(); |
| 29 | void TearDown(); |
| 30 | void DecodeFile(const char* fileName, Callback* cbk); |
| 31 | |
| 32 | private: |
| 33 | void DecodeFrame(const uint8_t* src, int sliceSize, Callback* cbk); |
| 34 | |
| 35 | ISVCDecoder* decoder_; |
| 36 | }; |
| 37 | |
| 38 | #endif //__BASEDECODERTEST_H__ |