Merge pull request #1651 from mstorsjo/improve-version-header

Improve version header
This commit is contained in:
sijchen 2014-12-19 09:32:48 +08:00
commit 0dc461541a
7 changed files with 20 additions and 8 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

@ -70,7 +70,7 @@ typedef struct _tagVersion
unsigned int uMinor; ///< The minor version number
unsigned int uRevision; ///< The revision number
unsigned int uReserved; ///< The reserved number, it should be 0.
}Openh264Version;
} OpenH264Version;
/**
* @brief Decoding status

View File

@ -4,8 +4,8 @@
#include "codec_app_def.h"
static const Openh264Version g_stCodecVersion = {1,3,0,0};
static const char* g_strCodecVer = "Openh264 version:1.3.0.0";
static const OpenH264Version g_stCodecVersion = {1,3,0,0};
static const char* g_strCodecVer = "OpenH264 version:1.3.0.0";
#define OPENH264_MAJOR (1)
#define OPENH264_MINOR (3)

View File

@ -27,12 +27,12 @@ echo "" >>codec_ver.h
echo "#include \"codec_app_def.h\"" >>codec_ver.h
echo "" >>codec_ver.h
echo "static const Openh264Version g_stCodecVersion = {$1};"|tr '.' ',' >>codec_ver.h
echo "static const char* g_strCodecVer = \"Openh264 version:$1\";" >>codec_ver.h
echo "static const OpenH264Version g_stCodecVersion = {$1};"|tr '.' ',' >>codec_ver.h
echo "static const char* g_strCodecVer = \"OpenH264 version:$1\";" >>codec_ver.h
#if [ "$2"x = ""x ]; then
#echo "static const char* g_strCodecBuildNum = \"Openh264 revision:$revision\";" >> codec_ver.h
#echo "static const char* g_strCodecBuildNum = \"OpenH264 revision:$revision\";" >> codec_ver.h
#else
#echo "static const char* g_strCodecBuildNum = \"Openh264 build:$2, OpenH264 revision:$revision\";" >> codec_ver.h
#echo "static const char* g_strCodecBuildNum = \"OpenH264 build:$2, OpenH264 revision:$revision\";" >> codec_ver.h
#fi
echo "" >>codec_ver.h

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