Renumber vtable entries in the C ABI test

This commit is contained in:
Martin Storsjö 2014-02-26 22:13:59 +02:00
parent c7ff8876bb
commit a5f5b37a25
2 changed files with 16 additions and 16 deletions

View File

@ -12,14 +12,14 @@ typedef void(*CheckFunc)(int, int, const char*);
void CheckEncoderInterface(ISVCEncoder* p, CheckFunc check) {
CHECK(1, p, Initialize);
CHECK(2, p, InitializeExt);
CHECK(10, p, GetDefaultParams);
CHECK(3, p, Uninitialize);
CHECK(4, p, EncodeFrame);
CHECK(5, p, EncodeParameterSets);
CHECK(6, p, PauseFrame);
CHECK(7, p, ForceIntraFrame);
CHECK(8, p, SetOption);
CHECK(9, p, GetOption);
CHECK(3, p, GetDefaultParams);
CHECK(4, p, Uninitialize);
CHECK(5, p, EncodeFrame);
CHECK(6, p, EncodeParameterSets);
CHECK(7, p, PauseFrame);
CHECK(8, p, ForceIntraFrame);
CHECK(9, p, SetOption);
CHECK(10, p, GetOption);
}
void CheckDecoderInterface(ISVCDecoder* p, CheckFunc check) {

View File

@ -32,37 +32,37 @@ struct SVCEncoderImpl : public ISVCEncoder {
}
virtual int EXTAPI GetDefaultParams(SEncParamExt* pParam) {
EXPECT_TRUE(gThis == this);
return 10;
return 3;
}
virtual int EXTAPI Uninitialize() {
EXPECT_TRUE(gThis == this);
return 3;
return 4;
}
virtual int EXTAPI EncodeFrame(const SSourcePicture* kpSrcPic,
SFrameBSInfo* pBsInfo) {
EXPECT_TRUE(gThis == this);
return 4;
return 5;
}
virtual int EXTAPI EncodeParameterSets(SFrameBSInfo* pBsInfo) {
EXPECT_TRUE(gThis == this);
return 5;
return 6;
}
virtual int EXTAPI PauseFrame(const SSourcePicture* kpSrcPic,
SFrameBSInfo* pBsInfo) {
EXPECT_TRUE(gThis == this);
return 6;
return 7;
}
virtual int EXTAPI ForceIntraFrame(bool bIDR) {
EXPECT_TRUE(gThis == this);
return 7;
return 8;
}
virtual int EXTAPI SetOption(ENCODER_OPTION eOptionId, void* pOption) {
EXPECT_TRUE(gThis == this);
return 8;
return 9;
}
virtual int EXTAPI GetOption(ENCODER_OPTION eOptionId, void* pOption) {
EXPECT_TRUE(gThis == this);
return 9;
return 10;
}
};