blob: 6c9fb2ac8a8c5105b42aad3f67eb53206d871b81 [file] [log] [blame]
jwwang8247eef2014-01-14 15:48:20 +08001#ifndef __BASEENCODERTEST_H__
2#define __BASEENCODERTEST_H__
3
4#include "codec_api.h"
5#include "codec_app_def.h"
jwwang0c2227e2014-01-18 19:31:54 +08006#include "utils/InputStream.h"
jwwang8247eef2014-01-14 15:48:20 +08007
8class BaseEncoderTest {
9 public:
10 struct Callback {
huili2dc3fae42014-06-25 18:50:41 -070011 virtual void onEncodeFrame (const SFrameBSInfo& frameInfo) = 0;
jwwang8247eef2014-01-14 15:48:20 +080012 };
13
14 BaseEncoderTest();
15 void SetUp();
16 void TearDown();
huili2dc3fae42014-06-25 18:50:41 -070017 void EncodeFile (const char* fileName, EUsageType usageType, int width, int height, float frameRate,
18 SliceModeEnum slices, bool denoise, int layers, Callback* cbk);
19 void EncodeStream (InputStream* in, EUsageType usageType, int width, int height, float frameRate, SliceModeEnum slices,
20 bool denoise, int layers, Callback* cbk);
jwwang8247eef2014-01-14 15:48:20 +080021
22 private:
23 ISVCEncoder* encoder_;
24};
25
26#endif //__BASEENCODERTEST_H__