shithub: openh264

Download patch

ref: 19efc59faea66fb0ba76a9e8d67736dc4a0ca7b0
parent: 45a8e60873c688890e880131ddeb544aa4491730
author: Martin Storsjö <[email protected]>
date: Wed Feb 19 10:05:04 EST 2014

Remove the WELSAPI definition

There's no need to specify a custom calling convention for
these functions.

--- a/codec/encoder/core/src/wels_preprocess.cpp
+++ b/codec/encoder/core/src/wels_preprocess.cpp
@@ -46,8 +46,8 @@
 #include "utils.h"
 
 #ifdef NO_DYNAMIC_VP
-EResult WELSAPI CreateVpInterface (void** ppCtx, int iVersion);
-EResult WELSAPI DestroyVpInterface (void** ppCtx, int iVersion);
+EResult CreateVpInterface (void** ppCtx, int iVersion);
+EResult DestroyVpInterface (void** ppCtx, int iVersion);
 #endif
 
 namespace WelsSVCEnc {
@@ -56,8 +56,8 @@
 
 
 //***** entry API declaration ************************************************************************//
-typedef EResult (WELSAPI* pfnCreateVpInterface) (void**, int);
-typedef EResult (WELSAPI* pfnDestroyVpInterface) (void*, int);
+typedef EResult (* pfnCreateVpInterface) (void**, int);
+typedef EResult (* pfnDestroyVpInterface) (void*, int);
 
 int32_t WelsInitScaledPic (SWelsSvcCodingParam* pParam,  Scaled_Picture*  pScaledPic, CMemoryAlign* pMemoryAlign);
 bool  JudgeNeedOfScaling (SWelsSvcCodingParam* pParam, Scaled_Picture* pScaledPic);
--- a/codec/processing/interface/IWelsVP.h
+++ b/codec/processing/interface/IWelsVP.h
@@ -47,12 +47,6 @@
 #ifndef IWELSVP_H_
 #define IWELSVP_H_
 
-#ifdef _WIN32
-#define WELSAPI __stdcall
-#else
-#define WELSAPI
-#endif
-
 #define WELSVP_MAJOR_VERSION   1
 #define WELSVP_MINOR_VERSION   1
 #define WELSVP_VERSION         ((WELSVP_MAJOR_VERSION << 8) + WELSVP_MINOR_VERSION)
@@ -276,8 +270,8 @@
 #endif
 
 WELSVP_EXTERNC_BEGIN
-EResult WELSAPI CreateVpInterface (void** ppCtx, int iVersion /*= WELSVP_INTERFACE_VERION*/);
-EResult WELSAPI DestroyVpInterface (void* pCtx , int iVersion /*= WELSVP_INTERFACE_VERION*/);
+EResult CreateVpInterface (void** ppCtx, int iVersion /*= WELSVP_INTERFACE_VERION*/);
+EResult DestroyVpInterface (void* pCtx , int iVersion /*= WELSVP_INTERFACE_VERION*/);
 WELSVP_EXTERNC_END
 
 //////////////////////////////////////////////////////////////////////////////////////////////
--- a/codec/processing/src/common/WelsFrameWork.cpp
+++ b/codec/processing/src/common/WelsFrameWork.cpp
@@ -43,7 +43,7 @@
 
 /* interface API implement */
 
-EResult WELSAPI CreateVpInterface (void** ppCtx, int iVersion) {
+EResult CreateVpInterface (void** ppCtx, int iVersion) {
   if (iVersion & 0x8000)
     return nsWelsVP::CreateSpecificVpInterface ((IWelsVP**)ppCtx);
   else if (iVersion & 0x7fff)
@@ -52,7 +52,7 @@
     return RET_INVALIDPARAM;
 }
 
-EResult WELSAPI DestroyVpInterface (void* pCtx, int iVersion) {
+EResult DestroyVpInterface (void* pCtx, int iVersion) {
   if (iVersion & 0x8000)
     return nsWelsVP::DestroySpecificVpInterface ((IWelsVP*)pCtx);
   else if (iVersion & 0x7fff)