zhengfl

refine code: 删除srs_app_edge中的user_stat相关代码。因为没有任何作用。

... ... @@ -705,7 +705,6 @@ int SrsEdgeForwarder::connect_app(string ep_server, string ep_port)
SrsPlayEdge::SrsPlayEdge()
{
state = SrsEdgeStateInit;
user_state = SrsEdgeUserStateInit;
ingester = new SrsEdgeIngester();
}
... ... @@ -729,14 +728,6 @@ int SrsPlayEdge::on_client_play()
{
int ret = ERROR_SUCCESS;
// error state.
if (user_state != SrsEdgeUserStateInit) {
ret = ERROR_RTMP_EDGE_PLAY_STATE;
srs_error("invalid state for client to pull stream on edge. "
"state=%d, user_state=%d, ret=%d", state, user_state, ret);
return ret;
}
// start ingest when init state.
if (state == SrsEdgeStateInit) {
state = SrsEdgeStatePlay;
... ... @@ -782,7 +773,6 @@ int SrsPlayEdge::on_ingest_play()
SrsPublishEdge::SrsPublishEdge()
{
state = SrsEdgeStateInit;
user_state = SrsEdgeUserStateInit;
forwarder = new SrsEdgeForwarder();
}
... ... @@ -816,19 +806,11 @@ int SrsPublishEdge::on_client_publish()
{
int ret = ERROR_SUCCESS;
// error state.
if (user_state != SrsEdgeUserStateInit) {
ret = ERROR_RTMP_EDGE_PUBLISH_STATE;
srs_error("invalid state for client to publish stream on edge. "
"state=%d, user_state=%d, ret=%d", state, user_state, ret);
return ret;
}
// error when not init state.
if (state != SrsEdgeStateInit) {
ret = ERROR_RTMP_EDGE_PUBLISH_STATE;
srs_error("invalid state for client to publish stream on edge. "
"state=%d, user_state=%d, ret=%d", state, user_state, ret);
"state=%d, ret=%d", state, ret);
return ret;
}
... ...
... ... @@ -163,7 +163,6 @@ class SrsPlayEdge
{
private:
SrsEdgeState state;
SrsEdgeUserState user_state;
SrsEdgeIngester* ingester;
public:
SrsPlayEdge();
... ... @@ -198,7 +197,6 @@ class SrsPublishEdge
{
private:
SrsEdgeState state;
SrsEdgeUserState user_state;
SrsEdgeForwarder* forwarder;
public:
SrsPublishEdge();
... ...