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-25 10:41:55 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e7ccbce47239a82ccbc9f48bbf1c0cf20a8dc17c
e7ccbce4
1 parent
3c46bcbd
update PRIMARY, AUTHORS, CONTRIBUTORS rule. 2.0.32.
显示空白字符变更
内嵌
并排对比
正在显示
22 个修改的文件
包含
119 行增加
和
63 行删除
AUTHORS.txt
README.md
trunk/research/librtmp/srs_bandwidth_check.c
trunk/research/players/srs_bwt/release/srs_bwt.swf
trunk/research/players/srs_bwt/src/SrsBandwidth.as
trunk/research/players/srs_bwt/src/srs.bandwidth.js
trunk/research/players/srs_bwt/src/srs_bwt.as
trunk/research/players/srs_player/release/srs_player.swf
trunk/research/players/srs_player/src/srs_player.as
trunk/research/players/srs_publisher/release/srs_publisher.swf
trunk/research/players/srs_publisher/src/srs_publisher.as
trunk/src/app/srs_app_config.cpp
trunk/src/app/srs_app_edge.cpp
trunk/src/app/srs_app_forward.cpp
trunk/src/app/srs_app_http_api.cpp
trunk/src/app/srs_app_source.cpp
trunk/src/core/srs_core.hpp
trunk/src/libs/srs_librtmp.cpp
trunk/src/libs/srs_librtmp.hpp
trunk/src/main/srs_main_server.cpp
trunk/src/rtmp/srs_protocol_rtmp.cpp
trunk/src/rtmp/srs_protocol_rtmp.hpp
AUTHORS.txt
查看文件 @
e7ccbce
There are three types of people that have contributed to the SRS project:
1. PRIMARY: Contribute important features and >10% code. Names of all PRIMARY response in NetConnection.connect and metadata.
2. AUTHORS: Contribute features and 1%~10% code. Names of all PRIMARY response in NetConnection.connect and metadata.
3. CONTRIBUTORS: Submit patches, report bugs, add translations, help answer newbie questions, and generally make SRS that much better.
PRIMARY ordered by first contribution.
* winlin<winlin@vip.126.com> "Plan, arch, implement SRS1.0 and SRS2.0"
...
...
README.md
查看文件 @
e7ccbce
...
...
@@ -485,6 +485,7 @@ Supported operating systems and hardware:
*
2013-10-17, Created.
<br/>
## History
*
v2.0, 2014-11-25, update PRIMARY, AUTHORS, CONTRIBUTORS rule. 2.0.32.
*
v2.0, 2014-11-24, fix
[
#212
](
https://github.com/winlinvip/simple-rtmp-server/issues/212
)
, support publish aac adts raw stream. 2.0.31.
*
v2.0, 2014-11-22, fix
[
#217
](
https://github.com/winlinvip/simple-rtmp-server/issues/217
)
, remove timeout recv, support 7.5k+ 250kbps clients. 2.0.30.
*
v2.0, 2014-11-21, srs-librtmp add rtmp prefix for rtmp/utils/human apis. 2.0.29.
...
...
trunk/research/librtmp/srs_bandwidth_check.c
查看文件 @
e7ccbce
...
...
@@ -43,7 +43,8 @@ int main(int argc, char** argv)
// srs debug info.
char
srs_server_ip
[
128
];
char
srs_server
[
128
];
char
srs_primary_authors
[
128
];
char
srs_primary
[
128
];
char
srs_authors
[
128
];
char
srs_version
[
32
];
int
srs_id
=
0
;
int
srs_pid
=
0
;
...
...
@@ -60,7 +61,8 @@ int main(int argc, char** argv)
// set to zero.
srs_server_ip
[
0
]
=
0
;
srs_server
[
0
]
=
0
;
srs_primary_authors
[
0
]
=
0
;
srs_primary
[
0
]
=
0
;
srs_authors
[
0
]
=
0
;
srs_version
[
0
]
=
0
;
printf
(
"RTMP bandwidth check/test with server.
\n
"
);
...
...
@@ -90,7 +92,8 @@ int main(int argc, char** argv)
srs_human_trace
(
"simple handshake success"
);
if
((
ret
=
srs_rtmp_connect_app2
(
rtmp
,
srs_server_ip
,
srs_server
,
srs_primary_authors
,
srs_version
,
&
srs_id
,
&
srs_pid
))
!=
0
)
{
srs_server_ip
,
srs_server
,
srs_primary
,
srs_authors
,
srs_version
,
&
srs_id
,
&
srs_pid
))
!=
0
)
{
srs_human_trace
(
"connect vhost/app failed."
);
goto
rtmp_destroy
;
}
...
...
@@ -105,12 +108,12 @@ int main(int argc, char** argv)
}
srs_human_trace
(
"bandwidth check/test success"
);
srs_human_trace
(
"
\n
%s, %s
\n
"
srs_human_trace
(
"
\n
%s, %s
, %s
\n
"
"%s, %s, srs_pid=%d, srs_id=%d
\n
"
"duration: %dms(%d+%d)
\n
"
"play: %dkbps
\n
"
"publish: %dkbps"
,
(
char
*
)
srs_server
,
(
char
*
)
srs_primary_authors
,
(
char
*
)
srs_server
,
(
char
*
)
srs_primary
,
(
char
*
)
srs
_authors
,
(
char
*
)
srs_server_ip
,
(
char
*
)
srs_version
,
srs_pid
,
srs_id
,
(
int
)(
end_time
-
start_time
),
play_duration
,
publish_duration
,
play_kbps
,
...
...
@@ -121,7 +124,8 @@ rtmp_destroy:
fprintf
(
stderr
,
"{
\"
code
\"
:%d,"
"
\"
srs_server
\"
:
\"
%s
\"
, "
"
\"
srs_primary_authors
\"
:
\"
%s
\"
, "
"
\"
srs_primary
\"
:
\"
%s
\"
, "
"
\"
srs_authors
\"
:
\"
%s
\"
, "
"
\"
srs_server_ip
\"
:
\"
%s
\"
, "
"
\"
srs_version
\"
:
\"
%s
\"
, "
"
\"
srs_pid
\"
:%d, "
...
...
@@ -132,7 +136,7 @@ rtmp_destroy:
"
\"
publish_kbps
\"
:%d"
"}"
,
ret
,
(
char
*
)
srs_server
,
(
char
*
)
srs_primary_authors
,
(
char
*
)
srs_server
,
(
char
*
)
srs_primary
,
(
char
*
)
srs
_authors
,
(
char
*
)
srs_server_ip
,
(
char
*
)
srs_version
,
srs_pid
,
srs_id
,
(
int
)(
end_time
-
start_time
),
play_duration
,
publish_duration
,
play_kbps
,
publish_kbps
);
...
...
trunk/research/players/srs_bwt/release/srs_bwt.swf
查看文件 @
e7ccbce
不能预览此文件类型
trunk/research/players/srs_bwt/src/SrsBandwidth.as
查看文件 @
e7ccbce
...
...
@@ -88,9 +88,10 @@ package
* "", otherwise empty string.
* @param as_on_progress_change, function(percent:Number):void, where:
* percent, the progress percent, 0 means 0%, 100 means 100%.
* @param as_on_srs_info, function(srs_server:String, srs_primary_authors:String, srs_id:String, srs_pid:String, srs_server_ip:String):void, where:
* @param as_on_srs_info, function(srs_server:String, srs_primary
:String, srs
_authors:String, srs_id:String, srs_pid:String, srs_server_ip:String):void, where:
* srs_server: the srs server info.
* srs_primary_authors: the srs version info.
* srs_primary: the srs primary authors info.
* srs_authors: the srs authors info.
* srs_id: the tracable log id, to direclty grep the log..
* srs_pid: the srs process id, to direclty grep the log.
* srs_server_ip: the srs server ip, where client connected at.
...
...
@@ -112,7 +113,7 @@ package
* @param js_on_ready, function(js_id:String):void, callback when bandwidth tool is ready to run.
* @param js_on_status_change, function(js_id:String, code:String, data:String):void
* @param as_on_progress_change, function(js_id:String, percent:Number):void
* @param as_on_srs_info, function(js_id:String, srs_server:String, srs_primary_authors:String, srs_id:String, srs_pid:String, srs_server_ip:String):void
* @param as_on_srs_info, function(js_id:String, srs_server:String, srs_primary
:String, srs
_authors:String, srs_id:String, srs_pid:String, srs_server_ip:String):void
* @param as_on_complete, function(js_id:String, start_time:Number, end_time:Number, play_kbps:Number, publish_kbps:Number, play_bytes:Number, publish_bytes:Number, play_time:Number, publish_time:Number):void
*
* the js export functions.
...
...
@@ -268,7 +269,8 @@ package
* srs debug infos
*/
private
var
srs_server
:
String
=
null
;
private
var
srs_primary_authors
:
String
=
null
;
private
var
srs_primary
:
String
=
null
;
private
var
srs_authors
:
String
=
null
;
private
var
srs_id
:
String
=
null
;
private
var
srs_pid
:
String
=
null
;
private
var
srs_server_ip
:
String
=
null
;
...
...
@@ -486,8 +488,11 @@ package
if
(
evt
.
info
.
data
.
hasOwnProperty
(
"srs_server"
))
{
srs_server
=
evt
.
info
.
data
.
srs_server
;
}
if
(
evt
.
info
.
data
.
hasOwnProperty
(
"srs_primary_authors"
))
{
srs_primary_authors
=
evt
.
info
.
data
.
srs_primary_authors
;
if
(
evt
.
info
.
data
.
hasOwnProperty
(
"srs_primary"
))
{
srs_primary
=
evt
.
info
.
data
.
srs_primary
;
}
if
(
evt
.
info
.
data
.
hasOwnProperty
(
"srs_authors"
))
{
srs_authors
=
evt
.
info
.
data
.
srs_authors
;
}
if
(
evt
.
info
.
data
.
hasOwnProperty
(
"srs_id"
))
{
srs_id
=
evt
.
info
.
data
.
srs_id
;
...
...
@@ -500,11 +505,11 @@ package
}
if
(
this
.
as_on_srs_info
!=
null
)
{
this
.
as_on_srs_info
(
srs_server
,
srs_primary_authors
,
srs_id
,
srs_pid
,
srs_server_ip
)
;
this
.
as_on_srs_info
(
srs_server
,
srs_primary
,
srs
_authors
,
srs_id
,
srs_pid
,
srs_server_ip
)
;
}
if
(
this
.
js_on_srs_info
!=
null
)
{
flash
.
external
.
ExternalInterface
.
call
(
this
.
js_on_srs_info
,
this
.
js_id
,
srs_server
,
srs_primary_authors
,
srs_id
,
srs_pid
,
srs_server_ip
)
;
srs_server
,
srs_primary
,
srs
_authors
,
srs_id
,
srs_pid
,
srs_server_ip
)
;
}
}
if
(
evt
.
info
.
code
)
{
...
...
trunk/research/players/srs_bwt/src/srs.bandwidth.js
查看文件 @
e7ccbce
...
...
@@ -39,9 +39,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
bandwidth.on_update_status = function(status) {
// console.log(status);
}
bandwidth.on_srs_info = function(srs_server, srs_primary_authors, srs_id, srs_pid, srs_server_ip) {
bandwidth.on_srs_info = function(srs_server, srs_primary
, srs
_authors, srs_id, srs_pid, srs_server_ip) {
// console.log(
// "server:" + srs_server + ",
authors:" + srs_primary
_authors +
// "server:" + srs_server + ",
primary:" + srs_primary + ", authors:" + srs
_authors +
// ", srs_id:" + srs_id + ", srs_pid:" + srs_pid + ", ip:" + srs_server_ip
//);
}
...
...
@@ -160,7 +160,7 @@ SrsBandwidth.prototype.on_update_progress = function(percent) {
}
SrsBandwidth
.
prototype
.
on_update_status
=
function
(
status
)
{
}
SrsBandwidth
.
prototype
.
on_srs_info
=
function
(
srs_server
,
srs_primary_authors
,
srs_id
,
srs_pid
,
srs_server_ip
)
{
SrsBandwidth
.
prototype
.
on_srs_info
=
function
(
srs_server
,
srs_primary
,
srs
_authors
,
srs_id
,
srs_pid
,
srs_server_ip
)
{
}
SrsBandwidth
.
prototype
.
on_complete
=
function
(
start_time
,
end_time
,
play_kbps
,
publish_kbps
,
play_bytes
,
publish_bytes
,
play_time
,
publish_time
)
{
}
...
...
@@ -233,11 +233,11 @@ function __srs_on_update_status(id, code, data) {
bandwidth
.
status
=
status
;
bandwidth
.
on_update_status
(
status
);
}
function
__srs_on_srs_info
(
id
,
srs_server
,
srs_primary_authors
,
srs_id
,
srs_pid
,
srs_server_ip
)
{
function
__srs_on_srs_info
(
id
,
srs_server
,
srs_primary
,
srs
_authors
,
srs_id
,
srs_pid
,
srs_server_ip
)
{
var
bandwidth
=
__srs_find_bandwidth
(
id
);
bandwidth
.
status
=
status
;
bandwidth
.
server
=
srs_server_ip
;
bandwidth
.
on_srs_info
(
srs_server
,
srs_primary_authors
,
srs_id
,
srs_pid
,
srs_server_ip
);
bandwidth
.
on_srs_info
(
srs_server
,
srs_primary
,
srs
_authors
,
srs_id
,
srs_pid
,
srs_server_ip
);
}
function
__srs_on_complete
(
id
,
start_time
,
end_time
,
play_kbps
,
publish_kbps
,
play_bytes
,
publish_bytes
,
play_time
,
publish_time
)
{
var
bandwidth
=
__srs_find_bandwidth
(
id
);
...
...
trunk/research/players/srs_bwt/src/srs_bwt.as
查看文件 @
e7ccbce
...
...
@@ -101,8 +101,8 @@ package
var
as_on_progress_change
:
Function
=
function
(
percent
:
Number
)
:
void
{
self
.
on_progress
(
percent
)
;
}
;
var
as_on_srs_info
:
Function
=
function
(
srs_server
:
String
,
srs_primary_authors
:
String
,
srs_id
:
String
,
srs_pid
:
String
,
srs_server_ip
:
String
)
:
void
{
self
.
update_context_items
(
srs_server
,
srs_primary_authors
,
srs_id
,
srs_pid
,
srs_server_ip
)
;
var
as_on_srs_info
:
Function
=
function
(
srs_server
:
String
,
srs_primary
,
srs_authors
:
String
,
srs_id
:
String
,
srs_pid
:
String
,
srs_server_ip
:
String
)
:
void
{
self
.
update_context_items
(
srs_server
,
srs_primary
,
srs_authors
,
srs_id
,
srs_pid
,
srs_server_ip
)
;
}
;
var
as_on_complete
:
Function
=
function
(
start_time
:
Number
,
end_time
:
Number
,
play_kbps
:
Number
,
publish_kbps
:
Number
,
play_bytes
:
Number
,
publish_bytes
:
Number
,
play_time
:
Number
,
publish_time
:
Number
)
:
void
{
self
.
on_complete
(
start_time
,
end_time
,
play_kbps
,
publish_kbps
,
play_bytes
,
publish_bytes
,
play_time
,
publish_time
)
;
...
...
@@ -130,7 +130,7 @@ package
trace
(
"progress:"
+
percent
+
"%"
)
;
}
private
function
update_context_items
(
srs_server
:
String
,
srs_primary_authors
:
String
,
srs_server
:
String
,
srs_primary
:
String
,
srs
_authors
:
String
,
srs_id
:
String
,
srs_pid
:
String
,
srs_server_ip
:
String
)
:
void
{
// for context menu
...
...
@@ -138,8 +138,11 @@ package
if
(
srs_server
!=
null
)
{
customItems
.
push
(
new
ContextMenuItem
(
"Server: "
+
srs_server
))
;
}
if
(
srs_primary_authors
!=
null
)
{
customItems
.
push
(
new
ContextMenuItem
(
"PrimaryAuthors: "
+
srs_primary_authors
))
;
if
(
srs_primary
!=
null
)
{
customItems
.
push
(
new
ContextMenuItem
(
"PrimaryAuthors: "
+
srs_primary
))
;
}
if
(
srs_authors
!=
null
)
{
customItems
.
push
(
new
ContextMenuItem
(
"Authors: "
+
srs_authors
))
;
}
if
(
srs_server_ip
!=
null
)
{
customItems
.
push
(
new
ContextMenuItem
(
"SrsIp: "
+
srs_server_ip
))
;
...
...
trunk/research/players/srs_player/release/srs_player.swf
查看文件 @
e7ccbce
不能预览此文件类型
trunk/research/players/srs_player/src/srs_player.as
查看文件 @
e7ccbce
...
...
@@ -152,8 +152,11 @@ package
if
(
srs_server
!=
null
)
{
obj
.
server
=
srs_server
;
}
if
(
srs_primary_authors
!=
null
)
{
obj
.
contributor
=
srs_primary_authors
;
if
(
srs_primary
!=
null
)
{
obj
.
contributor
=
srs_primary
;
}
if
(
srs_authors
!=
null
)
{
obj
.
contributor
=
srs_authors
;
}
var
code
:
int
=
flash
.
external
.
ExternalInterface
.
call
(
js_on_player_metadata
,
js_id
,
obj
)
;
...
...
@@ -267,7 +270,8 @@ package
// srs infos
private
var
srs_server
:
String
=
null
;
private
var
srs_primary_authors
:
String
=
null
;
private
var
srs_primary
:
String
=
null
;
private
var
srs_authors
:
String
=
null
;
private
var
srs_id
:
String
=
null
;
private
var
srs_pid
:
String
=
null
;
private
var
srs_server_ip
:
String
=
null
;
...
...
@@ -277,8 +281,11 @@ package
if
(
srs_server
!=
null
)
{
customItems
.
push
(
new
ContextMenuItem
(
"Server: "
+
srs_server
))
;
}
if
(
srs_primary_authors
!=
null
)
{
customItems
.
push
(
new
ContextMenuItem
(
"PrimaryAuthors: "
+
srs_primary_authors
))
;
if
(
srs_primary
!=
null
)
{
customItems
.
push
(
new
ContextMenuItem
(
"PrimaryAuthors: "
+
srs_primary
))
;
}
if
(
srs_authors
!=
null
)
{
customItems
.
push
(
new
ContextMenuItem
(
"Authors: "
+
srs_authors
))
;
}
if
(
srs_server_ip
!=
null
)
{
customItems
.
push
(
new
ContextMenuItem
(
"SrsIp: "
+
srs_server_ip
))
;
...
...
@@ -318,8 +325,11 @@ package
if
(
evt
.
info
.
data
.
hasOwnProperty
(
"srs_server"
))
{
srs_server
=
evt
.
info
.
data
.
srs_server
;
}
if
(
evt
.
info
.
data
.
hasOwnProperty
(
"srs_primary_authors"
))
{
srs_primary_authors
=
evt
.
info
.
data
.
srs_primary_authors
;
if
(
evt
.
info
.
data
.
hasOwnProperty
(
"srs_primary"
))
{
srs_primary
=
evt
.
info
.
data
.
srs_primary
;
}
if
(
evt
.
info
.
data
.
hasOwnProperty
(
"srs_authors"
))
{
srs_authors
=
evt
.
info
.
data
.
srs_authors
;
}
if
(
evt
.
info
.
data
.
hasOwnProperty
(
"srs_id"
))
{
srs_id
=
evt
.
info
.
data
.
srs_id
;
...
...
trunk/research/players/srs_publisher/release/srs_publisher.swf
查看文件 @
e7ccbce
不能预览此文件类型
trunk/research/players/srs_publisher/src/srs_publisher.as
查看文件 @
e7ccbce
...
...
@@ -136,7 +136,8 @@ package
// srs infos
private
var
srs_server
:
String
=
null
;
private
var
srs_primary_authors
:
String
=
null
;
private
var
srs_primary
:
String
=
null
;
private
var
srs_authors
:
String
=
null
;
private
var
srs_id
:
String
=
null
;
private
var
srs_pid
:
String
=
null
;
private
var
srs_server_ip
:
String
=
null
;
...
...
@@ -146,8 +147,11 @@ package
if
(
srs_server
!=
null
)
{
customItems
.
push
(
new
ContextMenuItem
(
"Server: "
+
srs_server
))
;
}
if
(
srs_primary_authors
!=
null
)
{
customItems
.
push
(
new
ContextMenuItem
(
"PrimaryAuthors: "
+
srs_primary_authors
))
;
if
(
srs_primary
!=
null
)
{
customItems
.
push
(
new
ContextMenuItem
(
"PrimaryAuthors: "
+
srs_primary
))
;
}
if
(
srs_authors
!=
null
)
{
customItems
.
push
(
new
ContextMenuItem
(
"Authors: "
+
srs_authors
))
;
}
if
(
srs_server_ip
!=
null
)
{
customItems
.
push
(
new
ContextMenuItem
(
"SrsIp: "
+
srs_server_ip
))
;
...
...
@@ -217,8 +221,11 @@ package
if
(
evt
.
info
.
data
.
hasOwnProperty
(
"srs_server"
))
{
srs_server
=
evt
.
info
.
data
.
srs_server
;
}
if
(
evt
.
info
.
data
.
hasOwnProperty
(
"srs_primary_authors"
))
{
srs_primary_authors
=
evt
.
info
.
data
.
srs_primary_authors
;
if
(
evt
.
info
.
data
.
hasOwnProperty
(
"srs_primary"
))
{
srs_primary
=
evt
.
info
.
data
.
srs_primary
;
}
if
(
evt
.
info
.
data
.
hasOwnProperty
(
"srs_authors"
))
{
srs_authors
=
evt
.
info
.
data
.
srs_authors
;
}
if
(
evt
.
info
.
data
.
hasOwnProperty
(
"srs_id"
))
{
srs_id
=
evt
.
info
.
data
.
srs_id
;
...
...
trunk/src/app/srs_app_config.cpp
查看文件 @
e7ccbce
...
...
@@ -1167,7 +1167,8 @@ void SrsConfig::print_help(char** argv)
printf
(
RTMP_SIG_SRS_NAME
" "
RTMP_SIG_SRS_VERSION
" "
RTMP_SIG_SRS_COPYRIGHT
"
\n
"
"License: "
RTMP_SIG_SRS_LICENSE
"
\n
"
"Primary Authors: "
RTMP_SIG_SRS_PRIMARY_AUTHROS
"
\n
"
"Primary: "
RTMP_SIG_SRS_PRIMARY
"
\n
"
"Authors: "
RTMP_SIG_SRS_AUTHROS
"
\n
"
"Build: "
SRS_AUTO_BUILD_DATE
" Configuration:"
SRS_AUTO_USER_CONFIGURE
"
\n
"
"Features:"
SRS_AUTO_CONFIGURE
"
\n
""
\n
"
"Usage: %s [-h?vV] [[-t] -c <filename>]
\n
"
...
...
trunk/src/app/srs_app_edge.cpp
查看文件 @
e7ccbce
...
...
@@ -227,7 +227,8 @@ int SrsEdgeIngester::connect_app(string ep_server, string ep_port)
data
->
set
(
"srs_site"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_WEB
));
data
->
set
(
"srs_email"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_EMAIL
));
data
->
set
(
"srs_copyright"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_COPYRIGHT
));
data
->
set
(
"srs_primary_authors"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_PRIMARY_AUTHROS
));
data
->
set
(
"srs_primary"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_PRIMARY
));
data
->
set
(
"srs_authors"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_AUTHROS
));
// for edge to directly get the id of client.
data
->
set
(
"srs_pid"
,
SrsAmf0Any
::
number
(
getpid
()));
data
->
set
(
"srs_id"
,
SrsAmf0Any
::
number
(
_srs_context
->
get_id
()));
...
...
@@ -647,7 +648,8 @@ int SrsEdgeForwarder::connect_app(string ep_server, string ep_port)
data
->
set
(
"srs_site"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_WEB
));
data
->
set
(
"srs_email"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_EMAIL
));
data
->
set
(
"srs_copyright"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_COPYRIGHT
));
data
->
set
(
"srs_primary_authors"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_PRIMARY_AUTHROS
));
data
->
set
(
"srs_primary"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_PRIMARY
));
data
->
set
(
"srs_authors"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_AUTHROS
));
// for edge to directly get the id of client.
data
->
set
(
"srs_pid"
,
SrsAmf0Any
::
number
(
getpid
()));
data
->
set
(
"srs_id"
,
SrsAmf0Any
::
number
(
_srs_context
->
get_id
()));
...
...
trunk/src/app/srs_app_forward.cpp
查看文件 @
e7ccbce
...
...
@@ -344,7 +344,8 @@ int SrsForwarder::connect_app(string ep_server, string ep_port)
data
->
set
(
"srs_site"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_WEB
));
data
->
set
(
"srs_email"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_EMAIL
));
data
->
set
(
"srs_copyright"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_COPYRIGHT
));
data
->
set
(
"srs_primary_authors"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_PRIMARY_AUTHROS
));
data
->
set
(
"srs_primary"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_PRIMARY
));
data
->
set
(
"srs_authors"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_AUTHROS
));
// for edge to directly get the id of client.
data
->
set
(
"srs_pid"
,
SrsAmf0Any
::
number
(
getpid
()));
data
->
set
(
"srs_id"
,
SrsAmf0Any
::
number
(
_srs_context
->
get_id
()));
...
...
trunk/src/app/srs_app_http_api.cpp
查看文件 @
e7ccbce
...
...
@@ -490,7 +490,8 @@ int SrsApiAuthors::do_process_request(SrsStSocket* skt, SrsHttpMessage* req)
ss
<<
__SRS_JOBJECT_START
<<
__SRS_JFIELD_ERROR
(
ERROR_SUCCESS
)
<<
__SRS_JFIELD_CONT
<<
__SRS_JFIELD_ORG
(
"data"
,
__SRS_JOBJECT_START
)
<<
__SRS_JFIELD_STR
(
"primary_authors"
,
RTMP_SIG_SRS_PRIMARY_AUTHROS
)
<<
__SRS_JFIELD_CONT
<<
__SRS_JFIELD_STR
(
"primary"
,
RTMP_SIG_SRS_PRIMARY
)
<<
__SRS_JFIELD_CONT
<<
__SRS_JFIELD_STR
(
"authors"
,
RTMP_SIG_SRS_AUTHROS
)
<<
__SRS_JFIELD_CONT
<<
__SRS_JFIELD_STR
(
"contributors_link"
,
RTMP_SIG_SRS_CONTRIBUTORS_URL
)
<<
__SRS_JFIELD_CONT
<<
__SRS_JFIELD_STR
(
"contributors"
,
SRS_AUTO_CONSTRIBUTORS
)
<<
__SRS_JOBJECT_END
...
...
trunk/src/app/srs_app_source.cpp
查看文件 @
e7ccbce
...
...
@@ -957,7 +957,8 @@ int SrsSource::on_meta_data(SrsMessage* msg, SrsOnMetaDataPacket* metadata)
// add server info to metadata
metadata
->
metadata
->
set
(
"server"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_KEY
" "
RTMP_SIG_SRS_VERSION
" ("
RTMP_SIG_SRS_URL_SHORT
")"
));
metadata
->
metadata
->
set
(
"authors"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_PRIMARY_AUTHROS
));
metadata
->
metadata
->
set
(
"srs_primary"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_PRIMARY
));
metadata
->
metadata
->
set
(
"srs_authors"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_AUTHROS
));
// version, for example, 1.0.0
// add version to metadata, please donot remove it, for debug.
...
...
trunk/src/core/srs_core.hpp
查看文件 @
e7ccbce
...
...
@@ -31,7 +31,7 @@ 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 3
1
#define VERSION_REVISION 3
2
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
#define RTMP_SIG_SRS_ROLE "origin/edge server"
...
...
@@ -42,7 +42,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define RTMP_SIG_SRS_EMAIL "winlin@vip.126.com"
#define RTMP_SIG_SRS_LICENSE "The MIT License (MIT)"
#define RTMP_SIG_SRS_COPYRIGHT "Copyright (c) 2013-2014 winlin"
#define RTMP_SIG_SRS_PRIMARY_AUTHROS "winlin,wenjie.zhao"
#define RTMP_SIG_SRS_PRIMARY "winlin"
#define RTMP_SIG_SRS_AUTHROS "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"
...
...
trunk/src/libs/srs_librtmp.cpp
查看文件 @
e7ccbce
...
...
@@ -655,12 +655,14 @@ int srs_rtmp_connect_app(srs_rtmp_t rtmp)
}
int
srs_rtmp_connect_app2
(
srs_rtmp_t
rtmp
,
char
srs_server_ip
[
128
],
char
srs_server
[
128
],
char
srs_primary_authors
[
128
],
char
srs_server_ip
[
128
],
char
srs_server
[
128
],
char
srs_primary
[
128
],
char
srs_authors
[
128
],
char
srs_version
[
32
],
int
*
srs_id
,
int
*
srs_pid
)
{
srs_server_ip
[
0
]
=
0
;
srs_server
[
0
]
=
0
;
srs_primary_authors
[
0
]
=
0
;
srs_primary
[
0
]
=
0
;
srs_authors
[
0
]
=
0
;
srs_version
[
0
]
=
0
;
*
srs_id
=
0
;
*
srs_pid
=
0
;
...
...
@@ -675,16 +677,17 @@ int srs_rtmp_connect_app2(srs_rtmp_t rtmp,
context
->
param
);
std
::
string
sip
,
sserver
,
sauthors
,
sversion
;
std
::
string
sip
,
sserver
,
s
primary
,
s
authors
,
sversion
;
if
((
ret
=
context
->
rtmp
->
connect_app2
(
context
->
app
,
tcUrl
,
NULL
,
true
,
sip
,
sserver
,
sauthors
,
sversion
,
*
srs_id
,
*
srs_pid
))
!=
ERROR_SUCCESS
)
{
sip
,
sserver
,
s
primary
,
s
authors
,
sversion
,
*
srs_id
,
*
srs_pid
))
!=
ERROR_SUCCESS
)
{
return
ret
;
}
snprintf
(
srs_server_ip
,
128
,
"%s"
,
sip
.
c_str
());
snprintf
(
srs_server
,
128
,
"%s"
,
sserver
.
c_str
());
snprintf
(
srs_primary_authors
,
128
,
"%s"
,
sauthors
.
c_str
());
snprintf
(
srs_primary
,
128
,
"%s"
,
sprimary
.
c_str
());
snprintf
(
srs_authors
,
128
,
"%s"
,
sauthors
.
c_str
());
snprintf
(
srs_version
,
32
,
"%s"
,
sversion
.
c_str
());
return
ret
;
...
...
trunk/src/libs/srs_librtmp.hpp
查看文件 @
e7ccbce
...
...
@@ -176,7 +176,8 @@ extern int srs_rtmp_connect_app(srs_rtmp_t rtmp);
* SRS debug info:
* @param srs_server_ip, 128bytes, debug info, server ip client connected at.
* @param srs_server, 128bytes, server info.
* @param srs_primary_authors, 128bytes, primary authors.
* @param srs_primary, 128bytes, primary authors.
* @param srs_authors, 128bytes, authors.
* @param srs_version, 32bytes, server version.
* @param srs_id, int, debug info, client id in server log.
* @param srs_pid, int, debug info, server pid in log.
...
...
@@ -184,7 +185,8 @@ extern int srs_rtmp_connect_app(srs_rtmp_t rtmp);
* @return 0, success; otherswise, failed.
*/
extern
int
srs_rtmp_connect_app2
(
srs_rtmp_t
rtmp
,
char
srs_server_ip
[
128
],
char
srs_server
[
128
],
char
srs_primary_authors
[
128
],
char
srs_server_ip
[
128
],
char
srs_server
[
128
],
char
srs_primary
[
128
],
char
srs_authors
[
128
],
char
srs_version
[
32
],
int
*
srs_id
,
int
*
srs_pid
);
...
...
trunk/src/main/srs_main_server.cpp
查看文件 @
e7ccbce
...
...
@@ -188,7 +188,8 @@ int main(int argc, char** argv)
srs_trace
(
"srs(simple-rtmp-server) "
RTMP_SIG_SRS_VERSION
);
srs_trace
(
"license: "
RTMP_SIG_SRS_LICENSE
);
srs_trace
(
"authors: "
RTMP_SIG_SRS_PRIMARY_AUTHROS
);
srs_trace
(
"primary: "
RTMP_SIG_SRS_PRIMARY
);
srs_trace
(
"authors: "
RTMP_SIG_SRS_AUTHROS
);
srs_trace
(
"contributors: "
SRS_AUTO_CONSTRIBUTORS
);
srs_trace
(
"uname: "
SRS_AUTO_UNAME
);
srs_trace
(
"build: %s, %s"
,
SRS_AUTO_BUILD_DATE
,
srs_is_little_endian
()
?
"little-endian"
:
"big-endian"
);
...
...
trunk/src/rtmp/srs_protocol_rtmp.cpp
查看文件 @
e7ccbce
...
...
@@ -444,20 +444,22 @@ int SrsRtmpClient::connect_app(string app, string tc_url,
{
std
::
string
srs_server_ip
;
std
::
string
srs_server
;
std
::
string
srs_primary_authors
;
std
::
string
srs_primary
;
std
::
string
srs_authors
;
std
::
string
srs_version
;
int
srs_id
=
0
;
int
srs_pid
=
0
;
return
connect_app2
(
app
,
tc_url
,
req
,
debug_srs_upnode
,
srs_server_ip
,
srs_server
,
srs_primary
_authors
,
srs_server_ip
,
srs_server
,
srs_primary
,
srs_authors
,
srs_version
,
srs_id
,
srs_pid
);
}
int
SrsRtmpClient
::
connect_app2
(
string
app
,
string
tc_url
,
SrsRequest
*
req
,
bool
debug_srs_upnode
,
string
&
srs_server_ip
,
string
&
srs_server
,
string
&
srs_primary_authors
,
string
&
srs_version
,
int
&
srs_id
,
int
&
srs_pid
string
&
srs_server_ip
,
string
&
srs_server
,
string
&
srs_primary
,
string
&
srs_authors
,
string
&
srs_version
,
int
&
srs_id
,
int
&
srs_pid
){
int
ret
=
ERROR_SUCCESS
;
...
...
@@ -522,8 +524,11 @@ int SrsRtmpClient::connect_app2(
SrsAmf0EcmaArray
*
arr
=
data
->
to_ecma_array
();
SrsAmf0Any
*
prop
=
NULL
;
if
((
prop
=
arr
->
ensure_property_string
(
"srs_primary_authors"
))
!=
NULL
)
{
srs_primary_authors
=
prop
->
to_str
();
if
((
prop
=
arr
->
ensure_property_string
(
"srs_primary"
))
!=
NULL
)
{
srs_primary
=
prop
->
to_str
();
}
if
((
prop
=
arr
->
ensure_property_string
(
"srs_authors"
))
!=
NULL
)
{
srs_authors
=
prop
->
to_str
();
}
if
((
prop
=
arr
->
ensure_property_string
(
"srs_version"
))
!=
NULL
)
{
srs_version
=
prop
->
to_str
();
...
...
@@ -927,7 +932,8 @@ int SrsRtmpServer::response_connect_app(SrsRequest *req, const char* server_ip)
data
->
set
(
"srs_site"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_WEB
));
data
->
set
(
"srs_email"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_EMAIL
));
data
->
set
(
"srs_copyright"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_COPYRIGHT
));
data
->
set
(
"srs_primary_authors"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_PRIMARY_AUTHROS
));
data
->
set
(
"srs_primary"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_PRIMARY
));
data
->
set
(
"srs_authors"
,
SrsAmf0Any
::
str
(
RTMP_SIG_SRS_AUTHROS
));
if
(
server_ip
)
{
data
->
set
(
"srs_server_ip"
,
SrsAmf0Any
::
str
(
server_ip
));
...
...
trunk/src/rtmp/srs_protocol_rtmp.hpp
查看文件 @
e7ccbce
...
...
@@ -268,14 +268,16 @@ public:
* SRS debug info:
* @param srs_server_ip, debug info, server ip client connected at.
* @param srs_server, server info.
* @param srs_primary_authors, primary authors.
* @param srs_primary, primary authors.
* @param srs_authors, authors.
* @param srs_id, int, debug info, client id in server log.
* @param srs_pid, int, debug info, server pid in log.
*/
virtual
int
connect_app2
(
std
::
string
app
,
std
::
string
tc_url
,
SrsRequest
*
req
,
bool
debug_srs_upnode
,
std
::
string
&
srs_server_ip
,
std
::
string
&
srs_server
,
std
::
string
&
srs_primary_authors
,
std
::
string
&
srs_version
,
int
&
srs_id
,
int
&
srs_pid
std
::
string
&
srs_server_ip
,
std
::
string
&
srs_server
,
std
::
string
&
srs_primary
,
std
::
string
&
srs_authors
,
std
::
string
&
srs_version
,
int
&
srs_id
,
int
&
srs_pid
);
/**
* create a stream, then play/publish data over this stream.
...
...
请
注册
或
登录
后发表评论