shithub: openh264

Download patch

ref: 2ef9a8aee9bf529bc7802c90b61cc86afd7050e5
parent: 65e73d969ab7a501a58e3cb9666fa46c10b9cdb2
parent: 50dc4757e4f59a2407932aff111793a4c026c82b
author: ruil2 <[email protected]>
date: Sun Jan 4 04:14:29 EST 2015

Merge pull request #1692 from mstorsjo/improved-version-function

Add a new public function WelsGetCodecVersionEx

--- a/codec/api/svc/codec_api.h
+++ b/codec/api/svc/codec_api.h
@@ -532,9 +532,15 @@
 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 (void);
+
+/** @brief   Get codec version
+ *  @param   pVersion  struct to fill in with the version
+*/
+void WelsGetCodecVersionEx (OpenH264Version *pVersion);
 
 #ifdef __cplusplus
 }
--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -1231,4 +1231,8 @@
   (void) g_strCodecVer; // Avoid warnings about unused static variables
   return g_stCodecVersion;
 }
+
+void WelsGetCodecVersionEx (OpenH264Version* pVersion) {
+  *pVersion = g_stCodecVersion;
+}
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
--- a/codec/encoder/plus/src/wels_enc_export.def
+++ b/codec/encoder/plus/src/wels_enc_export.def
@@ -2,3 +2,4 @@
     WelsCreateSVCEncoder
     WelsDestroySVCEncoder
     WelsGetCodecVersion
+    WelsGetCodecVersionEx
--- a/openh264.def
+++ b/openh264.def
@@ -4,3 +4,4 @@
 	WelsCreateSVCEncoder
 	WelsDestroySVCEncoder
 	WelsGetCodecVersion
+	WelsGetCodecVersionEx