Add a public function for getting the codec version

If the codec library is loaded dynamically, it may be necessary that
the loaded library actually matches the version that was used when
it was built, to avoid issues due to ABI differences. Therefore add
a public function to allow getting the version of the currently
loaded library.
This commit is contained in:
Martin Storsjö 2014-12-18 13:20:33 +02:00
parent 4fb442a983
commit 8bfeae27a4
4 changed files with 13 additions and 1 deletions

View File

@ -531,6 +531,11 @@ long WelsCreateDecoder (ISVCDecoder** ppDecoder);
*/
void WelsDestroyDecoder (ISVCDecoder* pDecoder);
/** @brief Get codec version
* @return The linked codec version
*/
OpenH264Version WelsGetCodecVersion ();
#ifdef __cplusplus
}
#endif

View File

@ -40,6 +40,7 @@
#include "version.h"
#include "crt_util_safe_x.h" // Safe CRT routines like util for cross platforms
#include "ref_list_mgr_svc.h"
#include "codec_ver.h"
#include <time.h>
#include <measure_time.h>
@ -1258,4 +1259,8 @@ void WelsDestroySVCEncoder (ISVCEncoder* pEncoder) {
pSVCEncoder = NULL;
}
}
OpenH264Version WelsGetCodecVersion () {
return g_stCodecVersion;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -1,3 +1,4 @@
EXPORTS
WelsCreateSVCEncoder
WelsDestroySVCEncoder
WelsDestroySVCEncoder
WelsGetCodecVersion

View File

@ -3,3 +3,4 @@ EXPORTS
WelsDestroyDecoder
WelsCreateSVCEncoder
WelsDestroySVCEncoder
WelsGetCodecVersion