ref: 328740f2942227dacf2618b1b5c406d15fbbde8e
parent: 2f840d46c4412abfb1ae60183b5b2e6c40d8c9ab
author: Andoni Morales Alastruey <[email protected]>
date: Tue Mar 25 13:36:47 EDT 2014
Prefix API with the Wels namespace
--- a/codec/api/svc/codec_api.h
+++ b/codec/api/svc/codec_api.h
@@ -192,11 +192,11 @@
#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
}
--- a/codec/console/dec/src/h264dec.cpp
+++ b/codec/console/dec/src/h264dec.cpp
@@ -411,7 +411,7 @@
- if (CreateDecoder (&pDecoder) || (NULL == pDecoder)) {
+ if (WelsCreateDecoder (&pDecoder) || (NULL == pDecoder)) {
printf ("Create Decoder failed.\n");
return 1;
}
@@ -437,7 +437,7 @@
if (pDecoder) {
pDecoder->Uninitialize();
- DestroyDecoder (pDecoder);
+ WelsDestroyDecoder (pDecoder);
}
return 0;
--- a/codec/console/enc/src/welsenc.cpp
+++ b/codec/console/enc/src/welsenc.cpp
@@ -1095,13 +1095,13 @@
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 @@
iRet = CreateSVCEncHandle (&pSVCEncoder);
if (iRet) {
- cout << "CreateSVCEncoder() failed!!" << endl;
+ cout << "WelsCreateSVCEncoder() failed!!" << endl;
goto exit;
}
--- a/codec/decoder/plus/src/welsDecoderExt.cpp
+++ b/codec/decoder/plus/src/welsDecoderExt.cpp
@@ -435,10 +435,10 @@
/* 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 @@
}
/*
-* DestroyDecoder
+* WelsDestroyDecoder
*/
-void DestroyDecoder (ISVCDecoder* pDecoder) {
+void WelsDestroyDecoder (ISVCDecoder* pDecoder) {
if (NULL != pDecoder) {
delete (CWelsDecoder*)pDecoder;
}
--- a/codec/decoder/plus/src/wels_dec_export.def
+++ b/codec/decoder/plus/src/wels_dec_export.def
@@ -1,3 +1,3 @@
EXPORTS
- CreateDecoder
- DestroyDecoder
\ No newline at end of file
+ WelsCreateDecoder
+ WelsDestroyDecoder
\ No newline at end of file
--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -1151,7 +1151,7 @@
using namespace WelsSVCEnc;
-int32_t CreateSVCEncoder (ISVCEncoder** ppEncoder) {
+int32_t WelsCreateSVCEncoder (ISVCEncoder** ppEncoder) {
if ((*ppEncoder = new CWelsH264SVCEncoder()) != NULL) {
return 0;
}
@@ -1159,7 +1159,7 @@
return 1;
}
-void DestroySVCEncoder (ISVCEncoder* pEncoder) {
+void WelsDestroySVCEncoder (ISVCEncoder* pEncoder) {
CWelsH264SVCEncoder* pSVCEncoder = (CWelsH264SVCEncoder*)pEncoder;
if (pSVCEncoder) {
--- a/codec/encoder/plus/src/wels_enc_export.def
+++ b/codec/encoder/plus/src/wels_enc_export.def
@@ -1,3 +1,3 @@
EXPORTS
- CreateSVCEncoder
- DestroySVCEncoder
\ No newline at end of file
+ WelsCreateSVCEncoder
+ WelsDestroySVCEncoder
\ No newline at end of file
--- a/test/api/BaseDecoderTest.cpp
+++ b/test/api/BaseDecoderTest.cpp
@@ -47,7 +47,7 @@
: 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::TearDown() {
if (decoder_ != NULL) {
decoder_->Uninitialize();
- DestroyDecoder(decoder_);
+ WelsDestroyDecoder(decoder_);
}
}
--- a/test/api/BaseEncoderTest.cpp
+++ b/test/api/BaseEncoderTest.cpp
@@ -47,7 +47,7 @@
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::TearDown() {
if (encoder_) {
encoder_->Uninitialize();
- DestroySVCEncoder(encoder_);
+ WelsDestroySVCEncoder(encoder_);
}
}
--- a/wels.def
+++ b/wels.def
@@ -1,5 +1,5 @@
EXPORTS
- CreateDecoder
- DestroyDecoder
- CreateSVCEncoder
- DestroySVCEncoder
+ WelsCreateDecoder
+ WelsDestroyDecoder
+ WelsCreateSVCEncoder
+ WelsDestroySVCEncoder