jwwang | 8247eef | 2014-01-14 15:48:20 +0800 | [diff] [blame] | 1 | #ifndef __BASEENCODERTEST_H__ |
| 2 | #define __BASEENCODERTEST_H__ |
| 3 | |
| 4 | #include "codec_api.h" |
| 5 | #include "codec_app_def.h" |
jwwang | 0c2227e | 2014-01-18 19:31:54 +0800 | [diff] [blame^] | 6 | #include "utils/InputStream.h" |
jwwang | 8247eef | 2014-01-14 15:48:20 +0800 | [diff] [blame] | 7 | |
| 8 | class BaseEncoderTest { |
| 9 | public: |
| 10 | struct Callback { |
| 11 | virtual void onEncodeFrame(const SFrameBSInfo& frameInfo) = 0; |
| 12 | }; |
| 13 | |
| 14 | BaseEncoderTest(); |
| 15 | void SetUp(); |
| 16 | void TearDown(); |
| 17 | void EncodeFile(const char* fileName, int width, int height, float frameRate, Callback* cbk); |
jwwang | 0c2227e | 2014-01-18 19:31:54 +0800 | [diff] [blame^] | 18 | void EncodeStream(InputStream* in, int width, int height, float frameRate, Callback* cbk); |
jwwang | 8247eef | 2014-01-14 15:48:20 +0800 | [diff] [blame] | 19 | |
| 20 | private: |
| 21 | ISVCEncoder* encoder_; |
| 22 | }; |
| 23 | |
| 24 | #endif //__BASEENCODERTEST_H__ |