1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

use number for macro VERSION_MAJOR, VERSION_MINOR and VERSION_REVISION. 1.0.5.

This commit is contained in:
winlin 2014-11-06 14:28:03 +08:00
parent 2175102ea2
commit f2f259d050
4 changed files with 24 additions and 10 deletions

View file

@ -208,6 +208,7 @@ Supported operating systems and hardware:
* 2013-10-17, Created.<br/> * 2013-10-17, Created.<br/>
## History ## 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, 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-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. * 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.

View file

@ -29,10 +29,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
// current release version // current release version
#define VERSION_MAJOR "1" #define VERSION_MAJOR 1
#define VERSION_MINOR "0" #define VERSION_MINOR 0
#define VERSION_REVISION "4" #define VERSION_REVISION 5
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info. // server info.
#define RTMP_SIG_SRS_KEY "SRS" #define RTMP_SIG_SRS_KEY "SRS"
#define RTMP_SIG_SRS_ROLE "origin/edge server" #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_PRIMARY_AUTHROS "winlin,wenjie.zhao"
#define RTMP_SIG_SRS_CONTRIBUTORS_URL RTMP_SIG_SRS_URL"/blob/master/AUTHORS.txt" #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_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, * the core provides the common defined macros, utilities,

View file

@ -491,17 +491,17 @@ int srs_write_packet(srs_rtmp_t rtmp, int type, u_int32_t timestamp, char* data,
int srs_version_major() int srs_version_major()
{ {
return ::atoi(VERSION_MAJOR); return VERSION_MAJOR;
} }
int srs_version_minor() int srs_version_minor()
{ {
return ::atoi(VERSION_MINOR); return VERSION_MINOR;
} }
int srs_version_revision() int srs_version_revision()
{ {
return ::atoi(VERSION_REVISION); return VERSION_REVISION;
} }
int64_t srs_get_time_ms() int64_t srs_get_time_ms()

View file

@ -132,6 +132,13 @@ void show_macro_features()
#endif #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. * main entrance.
*/ */
@ -149,14 +156,12 @@ int main(int argc, char** argv)
ProfilerStart("gperf.srs.gcp"); ProfilerStart("gperf.srs.gcp");
#endif #endif
#ifdef SRS_AUTO_GPERF_MC #if defined(SRS_AUTO_GPERF_MC) && defined(SRS_AUTO_GPERF_MP)
#ifdef SRS_AUTO_GPERF_MP
srs_error("option --with-gmc confict with --with-gmp, " srs_error("option --with-gmc confict with --with-gmp, "
"@see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html\n" "@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, " "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"); "it is not possible to run both the heap-checker and heap profiler at the same time");
return -1; return -1;
#endif
#endif #endif
// never use srs log(srs_trace, srs_error, etc) before config parse the option, // 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 // features
show_macro_features(); show_macro_features();
check_macro_features();
// for special features. // for special features.
#ifdef SRS_AUTO_HTTP_SERVER #ifdef SRS_AUTO_HTTP_SERVER