Merge pull request #580 from ylatuya/api

Prefix API with the Wels namespace
This commit is contained in:
volvet 2014-03-26 15:45:02 -07:00
commit f7fba4b122
10 changed files with 27 additions and 27 deletions

View File

@ -192,11 +192,11 @@ struct ISVCDecoderVtbl {
#endif
int CreateSVCEncoder (ISVCEncoder** ppEncoder);
void DestroySVCEncoder (ISVCEncoder* pEncoder);
int WelsCreateSVCEncoder (ISVCEncoder** ppEncoder);
void WelsDestroySVCEncoder (ISVCEncoder* pEncoder);
long CreateDecoder (ISVCDecoder** ppDecoder);
void DestroyDecoder (ISVCDecoder* pDecoder);
long WelsCreateDecoder (ISVCDecoder** ppDecoder);
void WelsDestroyDecoder (ISVCDecoder* pDecoder);
#ifdef __cplusplus
}

View File

@ -411,7 +411,7 @@ int32_t main (int32_t iArgC, char* pArgV[]) {
if (CreateDecoder (&pDecoder) || (NULL == pDecoder)) {
if (WelsCreateDecoder (&pDecoder) || (NULL == pDecoder)) {
printf ("Create Decoder failed.\n");
return 1;
}
@ -437,7 +437,7 @@ int32_t main (int32_t iArgC, char* pArgV[]) {
if (pDecoder) {
pDecoder->Uninitialize();
DestroyDecoder (pDecoder);
WelsDestroyDecoder (pDecoder);
}
return 0;

View File

@ -1095,13 +1095,13 @@ void LockToSingleCore() {
long CreateSVCEncHandle (ISVCEncoder** ppEncoder) {
long ret = 0;
ret = CreateSVCEncoder (ppEncoder);
ret = WelsCreateSVCEncoder (ppEncoder);
return ret;
}
void DestroySVCEncHandle (ISVCEncoder* pEncoder) {
if (pEncoder) {
DestroySVCEncoder (pEncoder);
WelsDestroySVCEncoder (pEncoder);
}
}
@ -1131,7 +1131,7 @@ int main (int argc, char** argv)
iRet = CreateSVCEncHandle (&pSVCEncoder);
if (iRet) {
cout << "CreateSVCEncoder() failed!!" << endl;
cout << "WelsCreateSVCEncoder() failed!!" << endl;
goto exit;
}

View File

@ -435,10 +435,10 @@ using namespace WelsDec;
/* WINAPI is indeed in prefix due to sync to application layer callings!! */
/*
* CreateDecoder
* WelsCreateDecoder
* @return: success in return 0, otherwise failed.
*/
long CreateDecoder (ISVCDecoder** ppDecoder) {
long WelsCreateDecoder (ISVCDecoder** ppDecoder) {
if (NULL == ppDecoder) {
return ERR_INVALID_PARAMETERS;
@ -454,9 +454,9 @@ long CreateDecoder (ISVCDecoder** ppDecoder) {
}
/*
* DestroyDecoder
* WelsDestroyDecoder
*/
void DestroyDecoder (ISVCDecoder* pDecoder) {
void WelsDestroyDecoder (ISVCDecoder* pDecoder) {
if (NULL != pDecoder) {
delete (CWelsDecoder*)pDecoder;
}

View File

@ -1,3 +1,3 @@
EXPORTS
CreateDecoder
DestroyDecoder
WelsCreateDecoder
WelsDestroyDecoder

View File

@ -1151,7 +1151,7 @@ void CWelsH264SVCEncoder::DumpSrcPicture (const uint8_t* pSrc) {
using namespace WelsSVCEnc;
int32_t CreateSVCEncoder (ISVCEncoder** ppEncoder) {
int32_t WelsCreateSVCEncoder (ISVCEncoder** ppEncoder) {
if ((*ppEncoder = new CWelsH264SVCEncoder()) != NULL) {
return 0;
}
@ -1159,7 +1159,7 @@ int32_t CreateSVCEncoder (ISVCEncoder** ppEncoder) {
return 1;
}
void DestroySVCEncoder (ISVCEncoder* pEncoder) {
void WelsDestroySVCEncoder (ISVCEncoder* pEncoder) {
CWelsH264SVCEncoder* pSVCEncoder = (CWelsH264SVCEncoder*)pEncoder;
if (pSVCEncoder) {

View File

@ -1,3 +1,3 @@
EXPORTS
CreateSVCEncoder
DestroySVCEncoder
WelsCreateSVCEncoder
WelsDestroySVCEncoder

View File

@ -47,7 +47,7 @@ BaseDecoderTest::BaseDecoderTest()
: decoder_(NULL), decodeStatus_(OpenFile) {}
void BaseDecoderTest::SetUp() {
long rv = CreateDecoder(&decoder_);
long rv = WelsCreateDecoder(&decoder_);
ASSERT_EQ(0, rv);
ASSERT_TRUE(decoder_ != NULL);
@ -65,7 +65,7 @@ void BaseDecoderTest::SetUp() {
void BaseDecoderTest::TearDown() {
if (decoder_ != NULL) {
decoder_->Uninitialize();
DestroyDecoder(decoder_);
WelsDestroyDecoder(decoder_);
}
}

View File

@ -47,7 +47,7 @@ static int InitWithParam(ISVCEncoder* encoder, int width,
BaseEncoderTest::BaseEncoderTest() : encoder_(NULL) {}
void BaseEncoderTest::SetUp() {
int rv = CreateSVCEncoder(&encoder_);
int rv = WelsCreateSVCEncoder(&encoder_);
ASSERT_EQ(0, rv);
ASSERT_TRUE(encoder_ != NULL);
}
@ -55,7 +55,7 @@ void BaseEncoderTest::SetUp() {
void BaseEncoderTest::TearDown() {
if (encoder_) {
encoder_->Uninitialize();
DestroySVCEncoder(encoder_);
WelsDestroySVCEncoder(encoder_);
}
}

View File

@ -1,5 +1,5 @@
EXPORTS
CreateDecoder
DestroyDecoder
CreateSVCEncoder
DestroySVCEncoder
WelsCreateDecoder
WelsDestroyDecoder
WelsCreateSVCEncoder
WelsDestroySVCEncoder