diff --git a/README.md b/README.md index 0a19548de..6aaffca38 100755 --- a/README.md +++ b/README.md @@ -208,6 +208,7 @@ Supported operating systems and hardware: * 2013-10-17, Created.
## History +* v1.0, 2014-11-06, use number for macro VERSION_MAJOR, VERSION_MINOR and VERSION_REVISION. 1.0.5. * v1.0, 2014-10-24, fix [#186](https://github.com/winlinvip/simple-rtmp-server/issues/186), hotfix for bug #186, drop connect args when not object. 1.0.3. * v1.0, 2014-10-24, rename wiki/xxx to wiki/v1_CN_xxx. 1.0.2. * v1.0, 2014-10-19, fix [#183](https://github.com/winlinvip/simple-rtmp-server/issues/183), hotfix for bug #183, donot support AnnexB when decoding RTMP body for HLS. 1.0.1. diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index 0e83da968..1b0fb3e60 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -29,10 +29,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ // current release version -#define VERSION_MAJOR "1" -#define VERSION_MINOR "0" -#define VERSION_REVISION "4" -#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION +#define VERSION_MAJOR 1 +#define VERSION_MINOR 0 +#define VERSION_REVISION 5 // server info. #define RTMP_SIG_SRS_KEY "SRS" #define RTMP_SIG_SRS_ROLE "origin/edge server" @@ -46,6 +45,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define RTMP_SIG_SRS_PRIMARY_AUTHROS "winlin,wenjie.zhao" #define RTMP_SIG_SRS_CONTRIBUTORS_URL RTMP_SIG_SRS_URL"/blob/master/AUTHORS.txt" #define RTMP_SIG_SRS_HANDSHAKE RTMP_SIG_SRS_KEY"("RTMP_SIG_SRS_VERSION")" +#define RTMP_SIG_SRS_RELEASE "https://github.com/winlinvip/simple-rtmp-server/tree/1.0release" +#define RTMP_SIG_SRS_HTTP_SERVER "https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_HTTPServer#feature" +#define RTMP_SIG_SRS_VERSION __SRS_XSTR(VERSION_MAJOR)"."__SRS_XSTR(VERSION_MINOR)"."__SRS_XSTR(VERSION_REVISION) + +// internal macros, covert macro values to str, +// see: read https://gcc.gnu.org/onlinedocs/cpp/Stringification.html#Stringification +#define __SRS_XSTR(v) __SRS_STR(v) +#define __SRS_STR(v) #v /** * the core provides the common defined macros, utilities, diff --git a/trunk/src/libs/srs_librtmp.cpp b/trunk/src/libs/srs_librtmp.cpp index c42056c5d..d1838f10e 100644 --- a/trunk/src/libs/srs_librtmp.cpp +++ b/trunk/src/libs/srs_librtmp.cpp @@ -491,17 +491,17 @@ int srs_write_packet(srs_rtmp_t rtmp, int type, u_int32_t timestamp, char* data, int srs_version_major() { - return ::atoi(VERSION_MAJOR); + return VERSION_MAJOR; } int srs_version_minor() { - return ::atoi(VERSION_MINOR); + return VERSION_MINOR; } int srs_version_revision() { - return ::atoi(VERSION_REVISION); + return VERSION_REVISION; } int64_t srs_get_time_ms() diff --git a/trunk/src/main/srs_main_server.cpp b/trunk/src/main/srs_main_server.cpp index 6cef9d9dd..a178fee18 100644 --- a/trunk/src/main/srs_main_server.cpp +++ b/trunk/src/main/srs_main_server.cpp @@ -132,6 +132,13 @@ void show_macro_features() #endif } +void check_macro_features() +{ +#if VERSION_MAJOR > 1 + srs_warn("SRS %s is develop branch, please use %s instead", RTMP_SIG_SRS_VERSION, RTMP_SIG_SRS_RELEASE); +#endif +} + /** * main entrance. */ @@ -149,14 +156,12 @@ int main(int argc, char** argv) ProfilerStart("gperf.srs.gcp"); #endif -#ifdef SRS_AUTO_GPERF_MC - #ifdef SRS_AUTO_GPERF_MP +#if defined(SRS_AUTO_GPERF_MC) && defined(SRS_AUTO_GPERF_MP) srs_error("option --with-gmc confict with --with-gmp, " "@see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html\n" "Note that since the heap-checker uses the heap-profiling framework internally, " "it is not possible to run both the heap-checker and heap profiler at the same time"); return -1; - #endif #endif // never use srs log(srs_trace, srs_error, etc) before config parse the option, @@ -190,6 +195,7 @@ int main(int argc, char** argv) // features show_macro_features(); + check_macro_features(); // for special features. #ifdef SRS_AUTO_HTTP_SERVER