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-07-21 15:30:44 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d612597a8fad52245a2d5d509ddd1ea1b07d05df
d612597a
1 parent
77236920
refine log of edge push/pull
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
12 行增加
和
12 行删除
trunk/src/app/srs_app_edge.cpp
trunk/src/core/srs_core.hpp
trunk/src/app/srs_app_edge.cpp
查看文件 @
d612597
...
...
@@ -147,7 +147,7 @@ int SrsEdgeIngester::cycle()
}
if
((
ret
=
_source
->
on_publish
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"edge
ingester play
stream then publish to edge failed. ret=%d"
,
ret
);
srs_error
(
"edge
pull
stream then publish to edge failed. ret=%d"
,
ret
);
return
ret
;
}
...
...
@@ -192,7 +192,7 @@ int SrsEdgeIngester::ingest()
SrsMessage
*
msg
=
NULL
;
if
((
ret
=
client
->
recv_message
(
&
msg
))
!=
ERROR_SUCCESS
)
{
if
(
!
srs_is_client_gracefully_close
(
ret
))
{
srs_error
(
"
ingest recv
origin server message failed. ret=%d"
,
ret
);
srs_error
(
"
pull
origin server message failed. ret=%d"
,
ret
);
}
return
ret
;
}
...
...
@@ -297,7 +297,7 @@ int SrsEdgeIngester::connect_server()
// open socket.
int64_t
timeout
=
SRS_EDGE_INGESTER_TIMEOUT_US
;
if
((
ret
=
srs_socket_connect
(
server
,
port
,
timeout
,
&
stfd
))
!=
ERROR_SUCCESS
)
{
srs_warn
(
"edge
ingester
failed, stream=%s, tcUrl=%s to server=%s, port=%d, timeout=%"
PRId64
", ret=%d"
,
srs_warn
(
"edge
pull
failed, stream=%s, tcUrl=%s to server=%s, port=%d, timeout=%"
PRId64
", ret=%d"
,
_req
->
stream
.
c_str
(),
_req
->
tcUrl
.
c_str
(),
server
.
c_str
(),
port
,
timeout
,
ret
);
return
ret
;
}
...
...
@@ -433,7 +433,7 @@ int SrsEdgeForwarder::cycle()
srs_verbose
(
"edge loop recv message. ret=%d"
,
ret
);
if
(
ret
!=
ERROR_SUCCESS
&&
ret
!=
ERROR_SOCKET_TIMEOUT
)
{
srs_error
(
"edge
forwarder recv
server control message failed. ret=%d"
,
ret
);
srs_error
(
"edge
push get
server control message failed. ret=%d"
,
ret
);
send_error_code
=
ret
;
continue
;
}
...
...
@@ -444,7 +444,7 @@ int SrsEdgeForwarder::cycle()
// forward all messages.
int
count
=
0
;
if
((
ret
=
queue
->
dump_packets
(
msgs
.
size
,
msgs
.
msgs
,
count
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"get message to
forward
to origin failed. ret=%d"
,
ret
);
srs_error
(
"get message to
push
to origin failed. ret=%d"
,
ret
);
return
ret
;
}
...
...
@@ -462,7 +462,7 @@ int SrsEdgeForwarder::cycle()
// ignore when no messages.
if
(
count
<=
0
)
{
srs_verbose
(
"no packets to
forward
."
);
srs_verbose
(
"no packets to
push
."
);
continue
;
}
...
...
@@ -476,7 +476,7 @@ int SrsEdgeForwarder::cycle()
msgs
.
msgs
[
i
]
=
NULL
;
if
((
ret
=
client
->
send_and_free_message
(
msg
,
stream_id
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"edge publish
forwarder send
message to server failed. ret=%d"
,
ret
);
srs_error
(
"edge publish
push
message to server failed. ret=%d"
,
ret
);
return
ret
;
}
}
...
...
@@ -550,7 +550,7 @@ int SrsEdgeForwarder::connect_server()
// open socket.
int64_t
timeout
=
SRS_EDGE_FORWARDER_TIMEOUT_US
;
if
((
ret
=
srs_socket_connect
(
server
,
port
,
timeout
,
&
stfd
))
!=
ERROR_SUCCESS
)
{
srs_warn
(
"edge
forwarder
failed, stream=%s, tcUrl=%s to server=%s, port=%d, timeout=%"
PRId64
", ret=%d"
,
srs_warn
(
"edge
push
failed, stream=%s, tcUrl=%s to server=%s, port=%d, timeout=%"
PRId64
", ret=%d"
,
_req
->
stream
.
c_str
(),
_req
->
tcUrl
.
c_str
(),
server
.
c_str
(),
port
,
timeout
,
ret
);
return
ret
;
}
...
...
@@ -592,7 +592,7 @@ int SrsPlayEdge::on_client_play()
// error state.
if
(
user_state
!=
SrsEdgeUserStateInit
)
{
ret
=
ERROR_RTMP_EDGE_PLAY_STATE
;
srs_error
(
"invalid state for client to p
lay
stream on edge. "
srs_error
(
"invalid state for client to p
ull
stream on edge. "
"state=%d, user_state=%d, ret=%d"
,
state
,
user_state
,
ret
);
return
ret
;
}
...
...
@@ -634,7 +634,7 @@ int SrsPlayEdge::on_ingest_play()
SrsEdgeState
pstate
=
state
;
state
=
SrsEdgeStateIngestConnected
;
srs_trace
(
"edge change from %d to state %d (
ingest connected
)."
,
pstate
,
state
);
srs_trace
(
"edge change from %d to state %d (
pull
)."
,
pstate
,
state
);
return
ret
;
}
...
...
@@ -693,7 +693,7 @@ int SrsPublishEdge::on_client_publish()
SrsEdgeState
pstate
=
state
;
state
=
SrsEdgeStatePublish
;
srs_trace
(
"edge change from %d to state %d (
forward publi
sh)."
,
pstate
,
state
);
srs_trace
(
"edge change from %d to state %d (
pu
sh)."
,
pstate
,
state
);
return
ret
;
}
...
...
trunk/src/core/srs_core.hpp
查看文件 @
d612597
...
...
@@ -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 "16
5
"
#define VERSION_REVISION "16
6
"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
...
...
请
注册
或
登录
后发表评论