Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2014-11-06 14:23:08 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fa53250202230809c18a8863df5b86893d1670ad
fa532502
1 parent
8521762c
refine the macro, use int as version type. 2.0.8
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
58 行增加
和
40 行删除
trunk/research/st/srs.c
trunk/src/core/srs_core.hpp
trunk/src/libs/srs_librtmp.cpp
trunk/src/main/srs_main_server.cpp
trunk/research/st/srs.c
查看文件 @
fa53250
...
...
@@ -11,6 +11,12 @@
#include "public.h"
#if !defined(__ia64__)
#error "IA64 not supported"
#else
#error "Only IA64 supported"
#endif
#define srs_trace(msg, ...) printf(msg, ##__VA_ARGS__);printf("\n")
int
io_port
=
1990
;
...
...
trunk/src/core/srs_core.hpp
查看文件 @
fa53250
...
...
@@ -29,10 +29,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
// current release version
#define VERSION_MAJOR "2"
#define VERSION_MINOR "0"
#define VERSION_REVISION "7"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
#define VERSION_MAJOR 2
#define VERSION_MINOR 0
#define VERSION_REVISION 8
// 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,
...
...
trunk/src/libs/srs_librtmp.cpp
查看文件 @
fa53250
...
...
@@ -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
()
...
...
trunk/src/main/srs_main_server.cpp
查看文件 @
fa53250
...
...
@@ -60,75 +60,87 @@ SrsServer* _srs_server = new SrsServer();
void
show_macro_features
()
{
#ifdef SRS_AUTO_SSL
srs_trace
(
"rtmp handshake: on"
);
srs_trace
(
"
check feature
rtmp handshake: on"
);
#else
srs_warn
(
"rtmp handshake: off"
);
srs_warn
(
"
check feature
rtmp handshake: off"
);
#endif
#ifdef SRS_AUTO_HLS
srs_trace
(
"hls: on"
);
srs_trace
(
"
check feature
hls: on"
);
#else
srs_warn
(
"hls: off"
);
srs_warn
(
"
check feature
hls: off"
);
#endif
#ifdef SRS_AUTO_HTTP_CALLBACK
srs_trace
(
"http callback: on"
);
srs_trace
(
"
check feature
http callback: on"
);
#else
srs_warn
(
"http callback: off"
);
srs_warn
(
"
check feature
http callback: off"
);
#endif
#ifdef SRS_AUTO_HTTP_API
srs_trace
(
"http api: on"
);
srs_trace
(
"
check feature
http api: on"
);
#else
srs_warn
(
"http api: off"
);
srs_warn
(
"
check feature
http api: off"
);
#endif
#ifdef SRS_AUTO_HTTP_SERVER
srs_trace
(
"http server: on"
);
srs_trace
(
"
check feature
http server: on"
);
#else
srs_warn
(
"http server: off"
);
srs_warn
(
"
check feature
http server: off"
);
#endif
#ifdef SRS_AUTO_HTTP_PARSER
srs_trace
(
"http parser: on"
);
srs_trace
(
"
check feature
http parser: on"
);
#else
srs_warn
(
"http parser: off"
);
srs_warn
(
"
check feature
http parser: off"
);
#endif
#ifdef SRS_AUTO_DVR
srs_trace
(
"dvr: on"
);
srs_trace
(
"
check feature
dvr: on"
);
#else
srs_warn
(
"dvr: off"
);
srs_warn
(
"
check feature
dvr: off"
);
#endif
#ifdef SRS_AUTO_TRANSCODE
srs_trace
(
"transcode: on"
);
srs_trace
(
"
check feature
transcode: on"
);
#else
srs_warn
(
"transcode: off"
);
srs_warn
(
"
check feature
transcode: off"
);
#endif
#ifdef SRS_AUTO_INGEST
srs_trace
(
"ingest: on"
);
srs_trace
(
"
check feature
ingest: on"
);
#else
srs_warn
(
"ingest: off"
);
srs_warn
(
"
check feature
ingest: off"
);
#endif
#ifdef SRS_AUTO_STAT
srs_trace
(
"system stat: on"
);
srs_trace
(
"
check feature
system stat: on"
);
#else
srs_warn
(
"system stat: off"
);
srs_warn
(
"
check feature
system stat: off"
);
#endif
#ifdef SRS_AUTO_NGINX
srs_trace
(
"compile nginx: on"
);
srs_trace
(
"c
heck feature c
ompile nginx: on"
);
#else
srs_warn
(
"compile nginx: off"
);
srs_warn
(
"c
heck feature c
ompile nginx: off"
);
#endif
#ifdef SRS_AUTO_FFMPEG_TOOL
srs_trace
(
"compile ffmpeg: on"
);
srs_trace
(
"c
heck feature c
ompile ffmpeg: on"
);
#else
srs_warn
(
"compile ffmpeg: off"
);
srs_warn
(
"check feature compile ffmpeg: off"
);
#endif
}
void
check_macro_features
()
{
// for special features.
#ifdef SRS_AUTO_HTTP_SERVER
srs_warn
(
"http server is dev feature, @see %s"
,
RTMP_SIG_SRS_HTTP_SERVER
);
#endif
#if VERSION_MAJOR > 1
srs_warn
(
"SRS %s is develop branch, please use %s instead"
,
RTMP_SIG_SRS_VERSION
,
RTMP_SIG_SRS_RELEASE
);
#endif
}
...
...
@@ -149,14 +161,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,12 +200,7 @@ int main(int argc, char** argv)
// features
show_macro_features
();
// for special features.
#ifdef SRS_AUTO_HTTP_SERVER
srs_warn
(
"http server is dev feature, "
"@see https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_HTTPServer#feature"
);
#endif
check_macro_features
();
/**
* we do nothing in the constructor of server,
...
...
请
注册
或
登录
后发表评论