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-05-22 10:23:12 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d4b8fee61a312295b4a92dbe7c1c575912c2f7ff
d4b8fee6
1 parent
f37faf72
fix bug #73, http callback api support authentication in tcUrl
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
5 行增加
和
3 行删除
trunk/conf/full.conf
trunk/research/api-server/server.py
trunk/src/app/srs_app_http_hooks.cpp
trunk/src/core/srs_core.hpp
trunk/conf/full.conf
查看文件 @
d4b8fee
...
...
@@ -297,6 +297,7 @@ vhost hooks.callback.srs.com {
# "action": "on_connect",
# "client_id": 1985,
# "ip": "192.168.1.10", "vhost": "video.test.com", "app": "live",
# "tcUrl": "rtmp://video.test.com/live?key=d2fa801d08e3f90ed1e1670e6e52651a",
# "pageUrl": "http://www.test.com/live.html"
# }
# if valid, the hook must return HTTP code 200(Stauts OK) and response
...
...
trunk/research/api-server/server.py
查看文件 @
d4b8fee
...
...
@@ -133,8 +133,8 @@ class RESTClients(object):
def
__on_connect
(
self
,
req
):
code
=
Error
.
success
trace
(
"srs
%
s: client id=
%
s, ip=
%
s, vhost=
%
s, app=
%
s, pageUrl=
%
s"
%
(
req
[
"action"
],
req
[
"client_id"
],
req
[
"ip"
],
req
[
"vhost"
],
req
[
"app"
],
req
[
"pageUrl"
]
trace
(
"srs
%
s: client id=
%
s, ip=
%
s, vhost=
%
s, app=
%
s, tcUrl=
%
s, pageUrl=
%
s"
%
(
req
[
"action"
],
req
[
"client_id"
],
req
[
"ip"
],
req
[
"vhost"
],
req
[
"app"
],
req
[
"tcUrl"
],
req
[
"pageUrl"
]
))
# TODO: process the on_connect event
...
...
trunk/src/app/srs_app_http_hooks.cpp
查看文件 @
d4b8fee
...
...
@@ -69,6 +69,7 @@ int SrsHttpHooks::on_connect(string url, int client_id, string ip, SrsRequest* r
<<
JFIELD_STR
(
"ip"
,
ip
)
<<
JFIELD_CONT
<<
JFIELD_STR
(
"vhost"
,
req
->
vhost
)
<<
JFIELD_CONT
<<
JFIELD_STR
(
"app"
,
req
->
app
)
<<
JFIELD_CONT
<<
JFIELD_STR
(
"tcUrl"
,
req
->
tcUrl
)
<<
JFIELD_CONT
<<
JFIELD_STR
(
"pageUrl"
,
req
->
pageUrl
)
<<
JOBJECT_END
;
std
::
string
data
=
ss
.
str
();
...
...
trunk/src/core/srs_core.hpp
查看文件 @
d4b8fee
...
...
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR "0"
#define VERSION_MINOR "9"
#define VERSION_REVISION "10
8
"
#define VERSION_REVISION "10
9
"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
...
...
请
注册
或
登录
后发表评论