Add a new public function WelsGetCodecVersionEx
This function doesn't return a struct, but fills in a struct via a provided pointer. The ABI of returning a struct is different between MSVC and mingw. This allows using the same function from mingw, even though the DLL has been built with MSVC.
This commit is contained in:
parent
47d8a840c0
commit
50dc4757e4
@ -532,10 +532,16 @@ long WelsCreateDecoder (ISVCDecoder** ppDecoder);
|
||||
void WelsDestroyDecoder (ISVCDecoder* pDecoder);
|
||||
|
||||
/** @brief Get codec version
|
||||
* Note, this function isn't ABI compatible between MSVC and Mingw.
|
||||
* @return The linked codec version
|
||||
*/
|
||||
OpenH264Version WelsGetCodecVersion ();
|
||||
|
||||
/** @brief Get codec version
|
||||
* @param pVersion struct to fill in with the version
|
||||
*/
|
||||
void WelsGetCodecVersionEx (OpenH264Version *pVersion);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -1231,4 +1231,8 @@ OpenH264Version WelsGetCodecVersion() {
|
||||
(void) g_strCodecVer; // Avoid warnings about unused static variables
|
||||
return g_stCodecVersion;
|
||||
}
|
||||
|
||||
void WelsGetCodecVersionEx (OpenH264Version* pVersion) {
|
||||
*pVersion = g_stCodecVersion;
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -2,3 +2,4 @@ EXPORTS
|
||||
WelsCreateSVCEncoder
|
||||
WelsDestroySVCEncoder
|
||||
WelsGetCodecVersion
|
||||
WelsGetCodecVersionEx
|
||||
|
@ -4,3 +4,4 @@ EXPORTS
|
||||
WelsCreateSVCEncoder
|
||||
WelsDestroySVCEncoder
|
||||
WelsGetCodecVersion
|
||||
WelsGetCodecVersionEx
|
||||
|
Loading…
Reference in New Issue
Block a user