正在显示
2 个修改的文件
包含
1 行增加
和
21 行删除
trunk/src/app/srs_app_edge.cpp
100644 → 100755
@@ -705,7 +705,6 @@ int SrsEdgeForwarder::connect_app(string ep_server, string ep_port) | @@ -705,7 +705,6 @@ int SrsEdgeForwarder::connect_app(string ep_server, string ep_port) | ||
705 | SrsPlayEdge::SrsPlayEdge() | 705 | SrsPlayEdge::SrsPlayEdge() |
706 | { | 706 | { |
707 | state = SrsEdgeStateInit; | 707 | state = SrsEdgeStateInit; |
708 | - user_state = SrsEdgeUserStateInit; | ||
709 | ingester = new SrsEdgeIngester(); | 708 | ingester = new SrsEdgeIngester(); |
710 | } | 709 | } |
711 | 710 | ||
@@ -729,14 +728,6 @@ int SrsPlayEdge::on_client_play() | @@ -729,14 +728,6 @@ int SrsPlayEdge::on_client_play() | ||
729 | { | 728 | { |
730 | int ret = ERROR_SUCCESS; | 729 | int ret = ERROR_SUCCESS; |
731 | 730 | ||
732 | - // error state. | ||
733 | - if (user_state != SrsEdgeUserStateInit) { | ||
734 | - ret = ERROR_RTMP_EDGE_PLAY_STATE; | ||
735 | - srs_error("invalid state for client to pull stream on edge. " | ||
736 | - "state=%d, user_state=%d, ret=%d", state, user_state, ret); | ||
737 | - return ret; | ||
738 | - } | ||
739 | - | ||
740 | // start ingest when init state. | 731 | // start ingest when init state. |
741 | if (state == SrsEdgeStateInit) { | 732 | if (state == SrsEdgeStateInit) { |
742 | state = SrsEdgeStatePlay; | 733 | state = SrsEdgeStatePlay; |
@@ -782,7 +773,6 @@ int SrsPlayEdge::on_ingest_play() | @@ -782,7 +773,6 @@ int SrsPlayEdge::on_ingest_play() | ||
782 | SrsPublishEdge::SrsPublishEdge() | 773 | SrsPublishEdge::SrsPublishEdge() |
783 | { | 774 | { |
784 | state = SrsEdgeStateInit; | 775 | state = SrsEdgeStateInit; |
785 | - user_state = SrsEdgeUserStateInit; | ||
786 | forwarder = new SrsEdgeForwarder(); | 776 | forwarder = new SrsEdgeForwarder(); |
787 | } | 777 | } |
788 | 778 | ||
@@ -816,19 +806,11 @@ int SrsPublishEdge::on_client_publish() | @@ -816,19 +806,11 @@ int SrsPublishEdge::on_client_publish() | ||
816 | { | 806 | { |
817 | int ret = ERROR_SUCCESS; | 807 | int ret = ERROR_SUCCESS; |
818 | 808 | ||
819 | - // error state. | ||
820 | - if (user_state != SrsEdgeUserStateInit) { | ||
821 | - ret = ERROR_RTMP_EDGE_PUBLISH_STATE; | ||
822 | - srs_error("invalid state for client to publish stream on edge. " | ||
823 | - "state=%d, user_state=%d, ret=%d", state, user_state, ret); | ||
824 | - return ret; | ||
825 | - } | ||
826 | - | ||
827 | // error when not init state. | 809 | // error when not init state. |
828 | if (state != SrsEdgeStateInit) { | 810 | if (state != SrsEdgeStateInit) { |
829 | ret = ERROR_RTMP_EDGE_PUBLISH_STATE; | 811 | ret = ERROR_RTMP_EDGE_PUBLISH_STATE; |
830 | srs_error("invalid state for client to publish stream on edge. " | 812 | srs_error("invalid state for client to publish stream on edge. " |
831 | - "state=%d, user_state=%d, ret=%d", state, user_state, ret); | 813 | + "state=%d, ret=%d", state, ret); |
832 | return ret; | 814 | return ret; |
833 | } | 815 | } |
834 | 816 |
trunk/src/app/srs_app_edge.hpp
100644 → 100755
@@ -163,7 +163,6 @@ class SrsPlayEdge | @@ -163,7 +163,6 @@ class SrsPlayEdge | ||
163 | { | 163 | { |
164 | private: | 164 | private: |
165 | SrsEdgeState state; | 165 | SrsEdgeState state; |
166 | - SrsEdgeUserState user_state; | ||
167 | SrsEdgeIngester* ingester; | 166 | SrsEdgeIngester* ingester; |
168 | public: | 167 | public: |
169 | SrsPlayEdge(); | 168 | SrsPlayEdge(); |
@@ -198,7 +197,6 @@ class SrsPublishEdge | @@ -198,7 +197,6 @@ class SrsPublishEdge | ||
198 | { | 197 | { |
199 | private: | 198 | private: |
200 | SrsEdgeState state; | 199 | SrsEdgeState state; |
201 | - SrsEdgeUserState user_state; | ||
202 | SrsEdgeForwarder* forwarder; | 200 | SrsEdgeForwarder* forwarder; |
203 | public: | 201 | public: |
204 | SrsPublishEdge(); | 202 | SrsPublishEdge(); |
-
请 注册 或 登录 后发表评论