正在显示
4 个修改的文件
包含
24 行增加
和
10 行删除
| @@ -208,6 +208,7 @@ Supported operating systems and hardware: | @@ -208,6 +208,7 @@ Supported operating systems and hardware: | ||
| 208 | * 2013-10-17, Created.<br/> | 208 | * 2013-10-17, Created.<br/> |
| 209 | 209 | ||
| 210 | ## History | 210 | ## History |
| 211 | +* v1.0, 2014-11-06, use number for macro VERSION_MAJOR, VERSION_MINOR and VERSION_REVISION. 1.0.5. | ||
| 211 | * 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. | 212 | * 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. |
| 212 | * v1.0, 2014-10-24, rename wiki/xxx to wiki/v1_CN_xxx. 1.0.2. | 213 | * v1.0, 2014-10-24, rename wiki/xxx to wiki/v1_CN_xxx. 1.0.2. |
| 213 | * 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. | 214 | * 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. |
| @@ -29,10 +29,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -29,10 +29,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 29 | */ | 29 | */ |
| 30 | 30 | ||
| 31 | // current release version | 31 | // current release version |
| 32 | -#define VERSION_MAJOR "1" | ||
| 33 | -#define VERSION_MINOR "0" | ||
| 34 | -#define VERSION_REVISION "4" | ||
| 35 | -#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION | 32 | +#define VERSION_MAJOR 1 |
| 33 | +#define VERSION_MINOR 0 | ||
| 34 | +#define VERSION_REVISION 5 | ||
| 36 | // server info. | 35 | // server info. |
| 37 | #define RTMP_SIG_SRS_KEY "SRS" | 36 | #define RTMP_SIG_SRS_KEY "SRS" |
| 38 | #define RTMP_SIG_SRS_ROLE "origin/edge server" | 37 | #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. | @@ -46,6 +45,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 46 | #define RTMP_SIG_SRS_PRIMARY_AUTHROS "winlin,wenjie.zhao" | 45 | #define RTMP_SIG_SRS_PRIMARY_AUTHROS "winlin,wenjie.zhao" |
| 47 | #define RTMP_SIG_SRS_CONTRIBUTORS_URL RTMP_SIG_SRS_URL"/blob/master/AUTHORS.txt" | 46 | #define RTMP_SIG_SRS_CONTRIBUTORS_URL RTMP_SIG_SRS_URL"/blob/master/AUTHORS.txt" |
| 48 | #define RTMP_SIG_SRS_HANDSHAKE RTMP_SIG_SRS_KEY"("RTMP_SIG_SRS_VERSION")" | 47 | #define RTMP_SIG_SRS_HANDSHAKE RTMP_SIG_SRS_KEY"("RTMP_SIG_SRS_VERSION")" |
| 48 | +#define RTMP_SIG_SRS_RELEASE "https://github.com/winlinvip/simple-rtmp-server/tree/1.0release" | ||
| 49 | +#define RTMP_SIG_SRS_HTTP_SERVER "https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_HTTPServer#feature" | ||
| 50 | +#define RTMP_SIG_SRS_VERSION __SRS_XSTR(VERSION_MAJOR)"."__SRS_XSTR(VERSION_MINOR)"."__SRS_XSTR(VERSION_REVISION) | ||
| 51 | + | ||
| 52 | +// internal macros, covert macro values to str, | ||
| 53 | +// see: read https://gcc.gnu.org/onlinedocs/cpp/Stringification.html#Stringification | ||
| 54 | +#define __SRS_XSTR(v) __SRS_STR(v) | ||
| 55 | +#define __SRS_STR(v) #v | ||
| 49 | 56 | ||
| 50 | /** | 57 | /** |
| 51 | * the core provides the common defined macros, utilities, | 58 | * the core provides the common defined macros, utilities, |
| @@ -491,17 +491,17 @@ int srs_write_packet(srs_rtmp_t rtmp, int type, u_int32_t timestamp, char* data, | @@ -491,17 +491,17 @@ int srs_write_packet(srs_rtmp_t rtmp, int type, u_int32_t timestamp, char* data, | ||
| 491 | 491 | ||
| 492 | int srs_version_major() | 492 | int srs_version_major() |
| 493 | { | 493 | { |
| 494 | - return ::atoi(VERSION_MAJOR); | 494 | + return VERSION_MAJOR; |
| 495 | } | 495 | } |
| 496 | 496 | ||
| 497 | int srs_version_minor() | 497 | int srs_version_minor() |
| 498 | { | 498 | { |
| 499 | - return ::atoi(VERSION_MINOR); | 499 | + return VERSION_MINOR; |
| 500 | } | 500 | } |
| 501 | 501 | ||
| 502 | int srs_version_revision() | 502 | int srs_version_revision() |
| 503 | { | 503 | { |
| 504 | - return ::atoi(VERSION_REVISION); | 504 | + return VERSION_REVISION; |
| 505 | } | 505 | } |
| 506 | 506 | ||
| 507 | int64_t srs_get_time_ms() | 507 | int64_t srs_get_time_ms() |
| @@ -132,6 +132,13 @@ void show_macro_features() | @@ -132,6 +132,13 @@ void show_macro_features() | ||
| 132 | #endif | 132 | #endif |
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | +void check_macro_features() | ||
| 136 | +{ | ||
| 137 | +#if VERSION_MAJOR > 1 | ||
| 138 | + srs_warn("SRS %s is develop branch, please use %s instead", RTMP_SIG_SRS_VERSION, RTMP_SIG_SRS_RELEASE); | ||
| 139 | +#endif | ||
| 140 | +} | ||
| 141 | + | ||
| 135 | /** | 142 | /** |
| 136 | * main entrance. | 143 | * main entrance. |
| 137 | */ | 144 | */ |
| @@ -149,14 +156,12 @@ int main(int argc, char** argv) | @@ -149,14 +156,12 @@ int main(int argc, char** argv) | ||
| 149 | ProfilerStart("gperf.srs.gcp"); | 156 | ProfilerStart("gperf.srs.gcp"); |
| 150 | #endif | 157 | #endif |
| 151 | 158 | ||
| 152 | -#ifdef SRS_AUTO_GPERF_MC | ||
| 153 | - #ifdef SRS_AUTO_GPERF_MP | 159 | +#if defined(SRS_AUTO_GPERF_MC) && defined(SRS_AUTO_GPERF_MP) |
| 154 | srs_error("option --with-gmc confict with --with-gmp, " | 160 | srs_error("option --with-gmc confict with --with-gmp, " |
| 155 | "@see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html\n" | 161 | "@see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html\n" |
| 156 | "Note that since the heap-checker uses the heap-profiling framework internally, " | 162 | "Note that since the heap-checker uses the heap-profiling framework internally, " |
| 157 | "it is not possible to run both the heap-checker and heap profiler at the same time"); | 163 | "it is not possible to run both the heap-checker and heap profiler at the same time"); |
| 158 | return -1; | 164 | return -1; |
| 159 | - #endif | ||
| 160 | #endif | 165 | #endif |
| 161 | 166 | ||
| 162 | // never use srs log(srs_trace, srs_error, etc) before config parse the option, | 167 | // never use srs log(srs_trace, srs_error, etc) before config parse the option, |
| @@ -190,6 +195,7 @@ int main(int argc, char** argv) | @@ -190,6 +195,7 @@ int main(int argc, char** argv) | ||
| 190 | 195 | ||
| 191 | // features | 196 | // features |
| 192 | show_macro_features(); | 197 | show_macro_features(); |
| 198 | + check_macro_features(); | ||
| 193 | 199 | ||
| 194 | // for special features. | 200 | // for special features. |
| 195 | #ifdef SRS_AUTO_HTTP_SERVER | 201 | #ifdef SRS_AUTO_HTTP_SERVER |
-
请 注册 或 登录 后发表评论