正在显示
30 个修改的文件
包含
21 行增加
和
92 行删除
| @@ -23,11 +23,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -23,11 +23,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 23 | 23 | ||
| 24 | #include <srs_app_avc_aac.hpp> | 24 | #include <srs_app_avc_aac.hpp> |
| 25 | 25 | ||
| 26 | -#include <stdlib.h> | ||
| 27 | - | ||
| 28 | #include <srs_kernel_error.hpp> | 26 | #include <srs_kernel_error.hpp> |
| 29 | #include <srs_kernel_log.hpp> | 27 | #include <srs_kernel_log.hpp> |
| 30 | -#include <srs_kernel_codec.hpp> | ||
| 31 | #include <srs_kernel_stream.hpp> | 28 | #include <srs_kernel_stream.hpp> |
| 32 | #include <srs_protocol_amf0.hpp> | 29 | #include <srs_protocol_amf0.hpp> |
| 33 | 30 |
| @@ -30,9 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -30,9 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 30 | using namespace std; | 30 | using namespace std; |
| 31 | 31 | ||
| 32 | #include <srs_protocol_rtmp.hpp> | 32 | #include <srs_protocol_rtmp.hpp> |
| 33 | -#include <srs_kernel_error.hpp> | ||
| 34 | #include <srs_protocol_amf0.hpp> | 33 | #include <srs_protocol_amf0.hpp> |
| 35 | -#include <srs_protocol_stack.hpp> | ||
| 36 | #include <srs_app_config.hpp> | 34 | #include <srs_app_config.hpp> |
| 37 | #include <srs_core_autofree.hpp> | 35 | #include <srs_core_autofree.hpp> |
| 38 | #include <srs_kernel_utility.hpp> | 36 | #include <srs_kernel_utility.hpp> |
| @@ -319,7 +317,7 @@ int SrsBandwidth::play_checking(SrsBandwidthSample* sample, SrsKbpsLimit* limit) | @@ -319,7 +317,7 @@ int SrsBandwidth::play_checking(SrsBandwidthSample* sample, SrsKbpsLimit* limit) | ||
| 319 | return ret; | 317 | return ret; |
| 320 | } | 318 | } |
| 321 | 319 | ||
| 322 | -int SrsBandwidth::play_stop(SrsBandwidthSample* sample, SrsKbpsLimit* limit) | 320 | +int SrsBandwidth::play_stop(SrsBandwidthSample* sample, SrsKbpsLimit* /*limit*/) |
| 323 | { | 321 | { |
| 324 | int ret = ERROR_SUCCESS; | 322 | int ret = ERROR_SUCCESS; |
| 325 | 323 | ||
| @@ -405,7 +403,7 @@ int SrsBandwidth::publish_checking(SrsBandwidthSample* sample, SrsKbpsLimit* lim | @@ -405,7 +403,7 @@ int SrsBandwidth::publish_checking(SrsBandwidthSample* sample, SrsKbpsLimit* lim | ||
| 405 | return ret; | 403 | return ret; |
| 406 | } | 404 | } |
| 407 | 405 | ||
| 408 | -int SrsBandwidth::publish_stop(SrsBandwidthSample* sample, SrsKbpsLimit* limit) | 406 | +int SrsBandwidth::publish_stop(SrsBandwidthSample* sample, SrsKbpsLimit* /*limit*/) |
| 409 | { | 407 | { |
| 410 | int ret = ERROR_SUCCESS; | 408 | int ret = ERROR_SUCCESS; |
| 411 | 409 |
| @@ -23,8 +23,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -23,8 +23,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 23 | 23 | ||
| 24 | #include <srs_app_conn.hpp> | 24 | #include <srs_app_conn.hpp> |
| 25 | 25 | ||
| 26 | -#include <arpa/inet.h> | ||
| 27 | - | ||
| 28 | #include <srs_kernel_log.hpp> | 26 | #include <srs_kernel_log.hpp> |
| 29 | #include <srs_kernel_error.hpp> | 27 | #include <srs_kernel_error.hpp> |
| 30 | #include <srs_app_server.hpp> | 28 | #include <srs_app_server.hpp> |
| @@ -30,12 +30,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -30,12 +30,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 30 | using namespace std; | 30 | using namespace std; |
| 31 | 31 | ||
| 32 | #include <srs_app_config.hpp> | 32 | #include <srs_app_config.hpp> |
| 33 | -#include <srs_kernel_error.hpp> | ||
| 34 | #include <srs_protocol_rtmp.hpp> | 33 | #include <srs_protocol_rtmp.hpp> |
| 35 | -#include <srs_protocol_stack.hpp> | ||
| 36 | -#include <srs_app_source.hpp> | ||
| 37 | #include <srs_core_autofree.hpp> | 34 | #include <srs_core_autofree.hpp> |
| 38 | -#include <srs_kernel_stream.hpp> | ||
| 39 | #include <srs_kernel_utility.hpp> | 35 | #include <srs_kernel_utility.hpp> |
| 40 | #include <srs_app_http_hooks.hpp> | 36 | #include <srs_app_http_hooks.hpp> |
| 41 | #include <srs_kernel_codec.hpp> | 37 | #include <srs_kernel_codec.hpp> |
| @@ -268,7 +264,7 @@ int SrsDvrPlan::on_video(SrsSharedPtrMessage* video) | @@ -268,7 +264,7 @@ int SrsDvrPlan::on_video(SrsSharedPtrMessage* video) | ||
| 268 | return ret; | 264 | return ret; |
| 269 | } | 265 | } |
| 270 | 266 | ||
| 271 | -int SrsDvrPlan::on_reload_vhost_dvr(std::string vhost) | 267 | +int SrsDvrPlan::on_reload_vhost_dvr(std::string /*vhost*/) |
| 272 | { | 268 | { |
| 273 | int ret = ERROR_SUCCESS; | 269 | int ret = ERROR_SUCCESS; |
| 274 | 270 |
| @@ -32,20 +32,14 @@ using namespace std; | @@ -32,20 +32,14 @@ using namespace std; | ||
| 32 | 32 | ||
| 33 | #include <srs_kernel_error.hpp> | 33 | #include <srs_kernel_error.hpp> |
| 34 | #include <srs_protocol_rtmp.hpp> | 34 | #include <srs_protocol_rtmp.hpp> |
| 35 | -#include <srs_kernel_log.hpp> | ||
| 36 | -#include <srs_protocol_rtmp.hpp> | ||
| 37 | #include <srs_protocol_io.hpp> | 35 | #include <srs_protocol_io.hpp> |
| 38 | #include <srs_app_config.hpp> | 36 | #include <srs_app_config.hpp> |
| 39 | #include <srs_protocol_utility.hpp> | 37 | #include <srs_protocol_utility.hpp> |
| 40 | -#include <srs_protocol_rtmp.hpp> | ||
| 41 | #include <srs_app_st_socket.hpp> | 38 | #include <srs_app_st_socket.hpp> |
| 42 | -#include <srs_protocol_stack.hpp> | ||
| 43 | #include <srs_app_source.hpp> | 39 | #include <srs_app_source.hpp> |
| 44 | #include <srs_app_pithy_print.hpp> | 40 | #include <srs_app_pithy_print.hpp> |
| 45 | #include <srs_core_autofree.hpp> | 41 | #include <srs_core_autofree.hpp> |
| 46 | -#include <srs_app_st_socket.hpp> | ||
| 47 | #include <srs_app_kbps.hpp> | 42 | #include <srs_app_kbps.hpp> |
| 48 | -#include <srs_kernel_utility.hpp> | ||
| 49 | #include <srs_protocol_msg_array.hpp> | 43 | #include <srs_protocol_msg_array.hpp> |
| 50 | #include <srs_app_utility.hpp> | 44 | #include <srs_app_utility.hpp> |
| 51 | #include <srs_protocol_amf0.hpp> | 45 | #include <srs_protocol_amf0.hpp> |
| @@ -31,10 +31,8 @@ using namespace std; | @@ -31,10 +31,8 @@ using namespace std; | ||
| 31 | #include <srs_app_config.hpp> | 31 | #include <srs_app_config.hpp> |
| 32 | #include <srs_protocol_rtmp.hpp> | 32 | #include <srs_protocol_rtmp.hpp> |
| 33 | #include <srs_app_pithy_print.hpp> | 33 | #include <srs_app_pithy_print.hpp> |
| 34 | -#include <srs_protocol_stack.hpp> | ||
| 35 | #include <srs_app_ffmpeg.hpp> | 34 | #include <srs_app_ffmpeg.hpp> |
| 36 | #include <srs_kernel_utility.hpp> | 35 | #include <srs_kernel_utility.hpp> |
| 37 | -#include <srs_kernel_consts.hpp> | ||
| 38 | 36 | ||
| 39 | #ifdef SRS_AUTO_TRANSCODE | 37 | #ifdef SRS_AUTO_TRANSCODE |
| 40 | 38 |
| @@ -35,9 +35,6 @@ using namespace std; | @@ -35,9 +35,6 @@ using namespace std; | ||
| 35 | #include <srs_kernel_error.hpp> | 35 | #include <srs_kernel_error.hpp> |
| 36 | #include <srs_kernel_log.hpp> | 36 | #include <srs_kernel_log.hpp> |
| 37 | #include <srs_app_config.hpp> | 37 | #include <srs_app_config.hpp> |
| 38 | -#include <srs_protocol_rtmp.hpp> | ||
| 39 | -#include <srs_app_pithy_print.hpp> | ||
| 40 | -#include <srs_protocol_stack.hpp> | ||
| 41 | 38 | ||
| 42 | #ifdef SRS_AUTO_FFMPEG | 39 | #ifdef SRS_AUTO_FFMPEG |
| 43 | 40 |
| @@ -31,18 +31,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -31,18 +31,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 31 | using namespace std; | 31 | using namespace std; |
| 32 | 32 | ||
| 33 | #include <srs_app_source.hpp> | 33 | #include <srs_app_source.hpp> |
| 34 | -#include <srs_core_autofree.hpp> | ||
| 35 | #include <srs_app_st_socket.hpp> | 34 | #include <srs_app_st_socket.hpp> |
| 36 | #include <srs_kernel_error.hpp> | 35 | #include <srs_kernel_error.hpp> |
| 37 | #include <srs_kernel_log.hpp> | 36 | #include <srs_kernel_log.hpp> |
| 38 | #include <srs_app_config.hpp> | 37 | #include <srs_app_config.hpp> |
| 39 | #include <srs_app_pithy_print.hpp> | 38 | #include <srs_app_pithy_print.hpp> |
| 40 | #include <srs_protocol_rtmp.hpp> | 39 | #include <srs_protocol_rtmp.hpp> |
| 41 | -#include <srs_protocol_stack.hpp> | ||
| 42 | #include <srs_protocol_utility.hpp> | 40 | #include <srs_protocol_utility.hpp> |
| 43 | -#include <srs_protocol_rtmp.hpp> | ||
| 44 | #include <srs_app_kbps.hpp> | 41 | #include <srs_app_kbps.hpp> |
| 45 | -#include <srs_kernel_utility.hpp> | ||
| 46 | #include <srs_protocol_msg_array.hpp> | 42 | #include <srs_protocol_msg_array.hpp> |
| 47 | #include <srs_app_utility.hpp> | 43 | #include <srs_app_utility.hpp> |
| 48 | #include <srs_protocol_amf0.hpp> | 44 | #include <srs_protocol_amf0.hpp> |
| @@ -679,7 +679,7 @@ int SrsHlsMuxer::flush_audio(SrsMpegtsFrame* af, SrsBuffer* ab) | @@ -679,7 +679,7 @@ int SrsHlsMuxer::flush_audio(SrsMpegtsFrame* af, SrsBuffer* ab) | ||
| 679 | return ret; | 679 | return ret; |
| 680 | } | 680 | } |
| 681 | 681 | ||
| 682 | -int SrsHlsMuxer::flush_video(SrsMpegtsFrame* af, SrsBuffer* ab, SrsMpegtsFrame* vf, SrsBuffer* vb) | 682 | +int SrsHlsMuxer::flush_video(SrsMpegtsFrame* /*af*/, SrsBuffer* /*ab*/, SrsMpegtsFrame* vf, SrsBuffer* vb) |
| 683 | { | 683 | { |
| 684 | int ret = ERROR_SUCCESS; | 684 | int ret = ERROR_SUCCESS; |
| 685 | 685 |
| @@ -30,11 +30,9 @@ using namespace std; | @@ -30,11 +30,9 @@ using namespace std; | ||
| 30 | 30 | ||
| 31 | #include <srs_kernel_log.hpp> | 31 | #include <srs_kernel_log.hpp> |
| 32 | #include <srs_kernel_error.hpp> | 32 | #include <srs_kernel_error.hpp> |
| 33 | -#include <srs_app_http.hpp> | ||
| 34 | #include <srs_app_st_socket.hpp> | 33 | #include <srs_app_st_socket.hpp> |
| 35 | #include <srs_core_autofree.hpp> | 34 | #include <srs_core_autofree.hpp> |
| 36 | #include <srs_app_json.hpp> | 35 | #include <srs_app_json.hpp> |
| 37 | -#include <srs_app_config.hpp> | ||
| 38 | #include <srs_kernel_utility.hpp> | 36 | #include <srs_kernel_utility.hpp> |
| 39 | #include <srs_app_utility.hpp> | 37 | #include <srs_app_utility.hpp> |
| 40 | 38 | ||
| @@ -62,7 +60,7 @@ bool SrsApiRoot::is_handler_valid(SrsHttpMessage* req, int& status_code, std::st | @@ -62,7 +60,7 @@ bool SrsApiRoot::is_handler_valid(SrsHttpMessage* req, int& status_code, std::st | ||
| 62 | return true; | 60 | return true; |
| 63 | } | 61 | } |
| 64 | 62 | ||
| 65 | -bool SrsApiRoot::can_handle(const char* path, int length, const char** pchild) | 63 | +bool SrsApiRoot::can_handle(const char* path, int /*length*/, const char** pchild) |
| 66 | { | 64 | { |
| 67 | // reset the child path to path, | 65 | // reset the child path to path, |
| 68 | // for child to reparse the path. | 66 | // for child to reparse the path. |
| @@ -36,9 +36,7 @@ using namespace std; | @@ -36,9 +36,7 @@ using namespace std; | ||
| 36 | #include <srs_kernel_log.hpp> | 36 | #include <srs_kernel_log.hpp> |
| 37 | #include <srs_kernel_error.hpp> | 37 | #include <srs_kernel_error.hpp> |
| 38 | #include <srs_app_st_socket.hpp> | 38 | #include <srs_app_st_socket.hpp> |
| 39 | -#include <srs_app_http.hpp> | ||
| 40 | #include <srs_core_autofree.hpp> | 39 | #include <srs_core_autofree.hpp> |
| 41 | -#include <srs_app_json.hpp> | ||
| 42 | #include <srs_app_config.hpp> | 40 | #include <srs_app_config.hpp> |
| 43 | #include <srs_kernel_flv.hpp> | 41 | #include <srs_kernel_flv.hpp> |
| 44 | #include <srs_kernel_utility.hpp> | 42 | #include <srs_kernel_utility.hpp> |
| @@ -116,7 +114,7 @@ int SrsHttpRoot::best_match(const char* path, int length, SrsHttpHandlerMatch** | @@ -116,7 +114,7 @@ int SrsHttpRoot::best_match(const char* path, int length, SrsHttpHandlerMatch** | ||
| 116 | return ERROR_HTTP_HANDLER_MATCH_URL; | 114 | return ERROR_HTTP_HANDLER_MATCH_URL; |
| 117 | } | 115 | } |
| 118 | 116 | ||
| 119 | -bool SrsHttpRoot::is_handler_valid(SrsHttpMessage* req, int& status_code, std::string& reason_phrase) | 117 | +bool SrsHttpRoot::is_handler_valid(SrsHttpMessage* /*req*/, int& status_code, std::string& reason_phrase) |
| 120 | { | 118 | { |
| 121 | status_code = SRS_CONSTS_HTTP_InternalServerError; | 119 | status_code = SRS_CONSTS_HTTP_InternalServerError; |
| 122 | reason_phrase = SRS_CONSTS_HTTP_InternalServerError_str; | 120 | reason_phrase = SRS_CONSTS_HTTP_InternalServerError_str; |
| @@ -124,7 +122,7 @@ bool SrsHttpRoot::is_handler_valid(SrsHttpMessage* req, int& status_code, std::s | @@ -124,7 +122,7 @@ bool SrsHttpRoot::is_handler_valid(SrsHttpMessage* req, int& status_code, std::s | ||
| 124 | return false; | 122 | return false; |
| 125 | } | 123 | } |
| 126 | 124 | ||
| 127 | -int SrsHttpRoot::do_process_request(SrsStSocket* skt, SrsHttpMessage* req) | 125 | +int SrsHttpRoot::do_process_request(SrsStSocket* /*skt*/, SrsHttpMessage* /*req*/) |
| 128 | { | 126 | { |
| 129 | int ret = ERROR_SUCCESS; | 127 | int ret = ERROR_SUCCESS; |
| 130 | return ret; | 128 | return ret; |
| @@ -30,12 +30,10 @@ using namespace std; | @@ -30,12 +30,10 @@ using namespace std; | ||
| 30 | 30 | ||
| 31 | #include <srs_kernel_error.hpp> | 31 | #include <srs_kernel_error.hpp> |
| 32 | #include <srs_protocol_rtmp.hpp> | 32 | #include <srs_protocol_rtmp.hpp> |
| 33 | -#include <srs_kernel_log.hpp> | ||
| 34 | #include <srs_app_st_socket.hpp> | 33 | #include <srs_app_st_socket.hpp> |
| 35 | #include <srs_app_http.hpp> | 34 | #include <srs_app_http.hpp> |
| 36 | #include <srs_app_json.hpp> | 35 | #include <srs_app_json.hpp> |
| 37 | #include <srs_app_dvr.hpp> | 36 | #include <srs_app_dvr.hpp> |
| 38 | -#include <srs_app_config.hpp> | ||
| 39 | #include <srs_app_http_client.hpp> | 37 | #include <srs_app_http_client.hpp> |
| 40 | 38 | ||
| 41 | #define SRS_HTTP_RESPONSE_OK "0" | 39 | #define SRS_HTTP_RESPONSE_OK "0" |
| @@ -33,7 +33,6 @@ using namespace std; | @@ -33,7 +33,6 @@ using namespace std; | ||
| 33 | #include <srs_app_ffmpeg.hpp> | 33 | #include <srs_app_ffmpeg.hpp> |
| 34 | #include <srs_app_pithy_print.hpp> | 34 | #include <srs_app_pithy_print.hpp> |
| 35 | #include <srs_kernel_utility.hpp> | 35 | #include <srs_kernel_utility.hpp> |
| 36 | -#include <srs_kernel_consts.hpp> | ||
| 37 | 36 | ||
| 38 | // when error, ingester sleep for a while and retry. | 37 | // when error, ingester sleep for a while and retry. |
| 39 | // ingest never sleep a long time, for we must start the stream ASAP. | 38 | // ingest never sleep a long time, for we must start the stream ASAP. |
| @@ -26,7 +26,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -26,7 +26,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 26 | using namespace std; | 26 | using namespace std; |
| 27 | 27 | ||
| 28 | #include <srs_kernel_log.hpp> | 28 | #include <srs_kernel_log.hpp> |
| 29 | -#include <srs_kernel_error.hpp> | ||
| 30 | 29 | ||
| 31 | #ifdef __SRS_JSON_USE_NXJSON | 30 | #ifdef __SRS_JSON_USE_NXJSON |
| 32 | 31 |
| @@ -23,9 +23,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -23,9 +23,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 23 | 23 | ||
| 24 | #include <srs_app_kbps.hpp> | 24 | #include <srs_app_kbps.hpp> |
| 25 | 25 | ||
| 26 | -#include <srs_kernel_error.hpp> | ||
| 27 | -#include <srs_kernel_log.hpp> | ||
| 28 | -#include <srs_protocol_io.hpp> | ||
| 29 | #include <srs_kernel_utility.hpp> | 26 | #include <srs_kernel_utility.hpp> |
| 30 | #include <srs_app_st.hpp> | 27 | #include <srs_app_st.hpp> |
| 31 | 28 |
| @@ -28,7 +28,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -28,7 +28,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 28 | 28 | ||
| 29 | #include <srs_kernel_log.hpp> | 29 | #include <srs_kernel_log.hpp> |
| 30 | #include <srs_app_config.hpp> | 30 | #include <srs_app_config.hpp> |
| 31 | -#include <srs_app_reload.hpp> | ||
| 32 | #include <srs_kernel_error.hpp> | 31 | #include <srs_kernel_error.hpp> |
| 33 | #include <srs_kernel_utility.hpp> | 32 | #include <srs_kernel_utility.hpp> |
| 34 | 33 |
| @@ -33,7 +33,6 @@ using namespace std; | @@ -33,7 +33,6 @@ using namespace std; | ||
| 33 | #include <srs_kernel_error.hpp> | 33 | #include <srs_kernel_error.hpp> |
| 34 | #include <srs_kernel_log.hpp> | 34 | #include <srs_kernel_log.hpp> |
| 35 | #include <srs_protocol_rtmp.hpp> | 35 | #include <srs_protocol_rtmp.hpp> |
| 36 | -#include <srs_protocol_stack.hpp> | ||
| 37 | #include <srs_core_autofree.hpp> | 36 | #include <srs_core_autofree.hpp> |
| 38 | #include <srs_app_source.hpp> | 37 | #include <srs_app_source.hpp> |
| 39 | #include <srs_app_server.hpp> | 38 | #include <srs_app_server.hpp> |
| @@ -46,13 +45,9 @@ using namespace std; | @@ -46,13 +45,9 @@ using namespace std; | ||
| 46 | #include <srs_app_st_socket.hpp> | 45 | #include <srs_app_st_socket.hpp> |
| 47 | #include <srs_app_http_hooks.hpp> | 46 | #include <srs_app_http_hooks.hpp> |
| 48 | #include <srs_app_edge.hpp> | 47 | #include <srs_app_edge.hpp> |
| 49 | -#include <srs_app_kbps.hpp> | ||
| 50 | #include <srs_app_utility.hpp> | 48 | #include <srs_app_utility.hpp> |
| 51 | -#include <srs_protocol_utility.hpp> | ||
| 52 | -#include <srs_kernel_utility.hpp> | ||
| 53 | #include <srs_protocol_msg_array.hpp> | 49 | #include <srs_protocol_msg_array.hpp> |
| 54 | #include <srs_protocol_amf0.hpp> | 50 | #include <srs_protocol_amf0.hpp> |
| 55 | -#include <srs_app_utility.hpp> | ||
| 56 | 51 | ||
| 57 | // when stream is busy, for example, streaming is already | 52 | // when stream is busy, for example, streaming is already |
| 58 | // publishing, when a new client to request to publish, | 53 | // publishing, when a new client to request to publish, |
| @@ -987,7 +982,7 @@ int SrsRtmpConn::check_edge_token_traverse_auth() | @@ -987,7 +982,7 @@ int SrsRtmpConn::check_edge_token_traverse_auth() | ||
| 987 | SrsStSocket* io = new SrsStSocket(stsock); | 982 | SrsStSocket* io = new SrsStSocket(stsock); |
| 988 | SrsRtmpClient* client = new SrsRtmpClient(io); | 983 | SrsRtmpClient* client = new SrsRtmpClient(io); |
| 989 | 984 | ||
| 990 | - ret = do_token_traverse_auth(io, client); | 985 | + ret = do_token_traverse_auth(client); |
| 991 | 986 | ||
| 992 | srs_freep(client); | 987 | srs_freep(client); |
| 993 | srs_freep(io); | 988 | srs_freep(io); |
| @@ -1030,7 +1025,7 @@ int SrsRtmpConn::connect_server(int origin_index, st_netfd_t* pstsock) | @@ -1030,7 +1025,7 @@ int SrsRtmpConn::connect_server(int origin_index, st_netfd_t* pstsock) | ||
| 1030 | return ret; | 1025 | return ret; |
| 1031 | } | 1026 | } |
| 1032 | 1027 | ||
| 1033 | -int SrsRtmpConn::do_token_traverse_auth(SrsStSocket* io, SrsRtmpClient* client) | 1028 | +int SrsRtmpConn::do_token_traverse_auth(SrsRtmpClient* client) |
| 1034 | { | 1029 | { |
| 1035 | int ret = ERROR_SUCCESS; | 1030 | int ret = ERROR_SUCCESS; |
| 1036 | 1031 |
| @@ -97,7 +97,7 @@ private: | @@ -97,7 +97,7 @@ private: | ||
| 97 | private: | 97 | private: |
| 98 | virtual int check_edge_token_traverse_auth(); | 98 | virtual int check_edge_token_traverse_auth(); |
| 99 | virtual int connect_server(int origin_index, st_netfd_t* pstsock); | 99 | virtual int connect_server(int origin_index, st_netfd_t* pstsock); |
| 100 | - virtual int do_token_traverse_auth(SrsStSocket* io, SrsRtmpClient* client); | 100 | + virtual int do_token_traverse_auth(SrsRtmpClient* client); |
| 101 | private: | 101 | private: |
| 102 | virtual int http_hooks_on_connect(); | 102 | virtual int http_hooks_on_connect(); |
| 103 | virtual void http_hooks_on_close(); | 103 | virtual void http_hooks_on_close(); |
| @@ -40,12 +40,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -40,12 +40,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 40 | #include <srs_kernel_utility.hpp> | 40 | #include <srs_kernel_utility.hpp> |
| 41 | #include <srs_app_http_api.hpp> | 41 | #include <srs_app_http_api.hpp> |
| 42 | #include <srs_app_http_conn.hpp> | 42 | #include <srs_app_http_conn.hpp> |
| 43 | -#include <srs_app_http.hpp> | ||
| 44 | #include <srs_app_ingest.hpp> | 43 | #include <srs_app_ingest.hpp> |
| 45 | #include <srs_app_source.hpp> | 44 | #include <srs_app_source.hpp> |
| 46 | #include <srs_app_utility.hpp> | 45 | #include <srs_app_utility.hpp> |
| 47 | #include <srs_app_heartbeat.hpp> | 46 | #include <srs_app_heartbeat.hpp> |
| 48 | -#include <srs_app_kbps.hpp> | ||
| 49 | 47 | ||
| 50 | // signal defines. | 48 | // signal defines. |
| 51 | #define SIGNAL_RELOAD SIGHUP | 49 | #define SIGNAL_RELOAD SIGHUP |
| @@ -971,7 +969,7 @@ int SrsServer::on_reload_vhost_added(std::string vhost) | @@ -971,7 +969,7 @@ int SrsServer::on_reload_vhost_added(std::string vhost) | ||
| 971 | return ret; | 969 | return ret; |
| 972 | } | 970 | } |
| 973 | 971 | ||
| 974 | -int SrsServer::on_reload_vhost_removed(std::string vhost) | 972 | +int SrsServer::on_reload_vhost_removed(std::string /*vhost*/) |
| 975 | { | 973 | { |
| 976 | int ret = ERROR_SUCCESS; | 974 | int ret = ERROR_SUCCESS; |
| 977 | 975 |
| @@ -29,7 +29,6 @@ using namespace std; | @@ -29,7 +29,6 @@ using namespace std; | ||
| 29 | 29 | ||
| 30 | #include <srs_kernel_log.hpp> | 30 | #include <srs_kernel_log.hpp> |
| 31 | #include <srs_protocol_stack.hpp> | 31 | #include <srs_protocol_stack.hpp> |
| 32 | -#include <srs_core_autofree.hpp> | ||
| 33 | #include <srs_protocol_amf0.hpp> | 32 | #include <srs_protocol_amf0.hpp> |
| 34 | #include <srs_kernel_codec.hpp> | 33 | #include <srs_kernel_codec.hpp> |
| 35 | #include <srs_app_hls.hpp> | 34 | #include <srs_app_hls.hpp> |
| @@ -24,7 +24,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -24,7 +24,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 24 | #include <srs_app_st_socket.hpp> | 24 | #include <srs_app_st_socket.hpp> |
| 25 | 25 | ||
| 26 | #include <srs_kernel_error.hpp> | 26 | #include <srs_kernel_error.hpp> |
| 27 | -#include <srs_kernel_utility.hpp> | ||
| 28 | 27 | ||
| 29 | SrsStSocket::SrsStSocket(st_netfd_t client_stfd) | 28 | SrsStSocket::SrsStSocket(st_netfd_t client_stfd) |
| 30 | { | 29 | { |
| @@ -26,10 +26,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -26,10 +26,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 26 | #include <srs_kernel_error.hpp> | 26 | #include <srs_kernel_error.hpp> |
| 27 | #include <srs_kernel_log.hpp> | 27 | #include <srs_kernel_log.hpp> |
| 28 | 28 | ||
| 29 | -// const time for st to convert to us | ||
| 30 | -#define SRS_TIME_MILLISECONDS 1000 | ||
| 31 | -#define SRS_TIME_SECONDS 1000000 | ||
| 32 | - | ||
| 33 | ISrsThreadHandler::ISrsThreadHandler() | 29 | ISrsThreadHandler::ISrsThreadHandler() |
| 34 | { | 30 | { |
| 35 | } | 31 | } |
| @@ -105,7 +101,7 @@ int SrsThread::start() | @@ -105,7 +101,7 @@ int SrsThread::start() | ||
| 105 | 101 | ||
| 106 | // wait for cid to ready, for parent thread to get the cid. | 102 | // wait for cid to ready, for parent thread to get the cid. |
| 107 | while (_cid < 0 && loop) { | 103 | while (_cid < 0 && loop) { |
| 108 | - st_usleep(10 * SRS_TIME_MILLISECONDS); | 104 | + st_usleep(10 * 1000); |
| 109 | } | 105 | } |
| 110 | 106 | ||
| 111 | // now, cycle thread can run. | 107 | // now, cycle thread can run. |
| @@ -154,7 +150,7 @@ void SrsThread::thread_cycle() | @@ -154,7 +150,7 @@ void SrsThread::thread_cycle() | ||
| 154 | 150 | ||
| 155 | // wait for cid to ready, for parent thread to get the cid. | 151 | // wait for cid to ready, for parent thread to get the cid. |
| 156 | while (!can_run && loop) { | 152 | while (!can_run && loop) { |
| 157 | - st_usleep(10 * SRS_TIME_MILLISECONDS); | 153 | + st_usleep(10 * 1000); |
| 158 | } | 154 | } |
| 159 | 155 | ||
| 160 | while (loop) { | 156 | while (loop) { |
| @@ -36,7 +36,6 @@ using namespace std; | @@ -36,7 +36,6 @@ using namespace std; | ||
| 36 | #include <srs_kernel_error.hpp> | 36 | #include <srs_kernel_error.hpp> |
| 37 | #include <srs_app_kbps.hpp> | 37 | #include <srs_app_kbps.hpp> |
| 38 | #include <srs_app_json.hpp> | 38 | #include <srs_app_json.hpp> |
| 39 | -#include <srs_kernel_consts.hpp> | ||
| 40 | 39 | ||
| 41 | int srs_socket_connect(std::string server, int port, int64_t timeout, st_netfd_t* pstfd) | 40 | int srs_socket_connect(std::string server, int port, int64_t timeout, st_netfd_t* pstfd) |
| 42 | { | 41 | { |
| @@ -92,18 +91,18 @@ failed: | @@ -92,18 +91,18 @@ failed: | ||
| 92 | 91 | ||
| 93 | int srs_get_log_level(std::string level) | 92 | int srs_get_log_level(std::string level) |
| 94 | { | 93 | { |
| 95 | - if ("verbose" == _srs_config->get_log_level()) { | 94 | + if ("verbose" == level) { |
| 96 | return SrsLogLevel::Verbose; | 95 | return SrsLogLevel::Verbose; |
| 97 | - } else if ("info" == _srs_config->get_log_level()) { | 96 | + } else if ("info" == level) { |
| 98 | return SrsLogLevel::Info; | 97 | return SrsLogLevel::Info; |
| 99 | - } else if ("trace" == _srs_config->get_log_level()) { | 98 | + } else if ("trace" == level) { |
| 100 | return SrsLogLevel::Trace; | 99 | return SrsLogLevel::Trace; |
| 101 | - } else if ("warn" == _srs_config->get_log_level()) { | 100 | + } else if ("warn" == level) { |
| 102 | return SrsLogLevel::Warn; | 101 | return SrsLogLevel::Warn; |
| 103 | - } else if ("error" == _srs_config->get_log_level()) { | 102 | + } else if ("error" == level) { |
| 104 | return SrsLogLevel::Error; | 103 | return SrsLogLevel::Error; |
| 105 | } else { | 104 | } else { |
| 106 | - return SrsLogLevel::Trace; | 105 | + return SrsLogLevel::Disabled; |
| 107 | } | 106 | } |
| 108 | } | 107 | } |
| 109 | 108 | ||
| @@ -995,8 +994,6 @@ string srs_get_local_ip(int fd) | @@ -995,8 +994,6 @@ string srs_get_local_ip(int fd) | ||
| 995 | 994 | ||
| 996 | int srs_get_local_port(int fd) | 995 | int srs_get_local_port(int fd) |
| 997 | { | 996 | { |
| 998 | - std::string ip; | ||
| 999 | - | ||
| 1000 | // discovery client information | 997 | // discovery client information |
| 1001 | sockaddr_in addr; | 998 | sockaddr_in addr; |
| 1002 | socklen_t addrlen = sizeof(addr); | 999 | socklen_t addrlen = sizeof(addr); |
| @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 31 | // current release version | 31 | // current release version |
| 32 | #define VERSION_MAJOR "0" | 32 | #define VERSION_MAJOR "0" |
| 33 | #define VERSION_MINOR "9" | 33 | #define VERSION_MINOR "9" |
| 34 | -#define VERSION_REVISION "218" | 34 | +#define VERSION_REVISION "219" |
| 35 | #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION | 35 | #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION |
| 36 | // server info. | 36 | // server info. |
| 37 | #define RTMP_SIG_SRS_KEY "SRS" | 37 | #define RTMP_SIG_SRS_KEY "SRS" |
| @@ -26,11 +26,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -26,11 +26,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 26 | #include <string.h> | 26 | #include <string.h> |
| 27 | #include <stdlib.h> | 27 | #include <stdlib.h> |
| 28 | 28 | ||
| 29 | -#include <srs_kernel_error.hpp> | ||
| 30 | -#include <srs_kernel_stream.hpp> | ||
| 31 | -#include <srs_kernel_log.hpp> | ||
| 32 | -#include <srs_core_autofree.hpp> | ||
| 33 | - | ||
| 34 | SrsFlvCodec::SrsFlvCodec() | 29 | SrsFlvCodec::SrsFlvCodec() |
| 35 | { | 30 | { |
| 36 | } | 31 | } |
| @@ -30,9 +30,7 @@ using namespace std; | @@ -30,9 +30,7 @@ using namespace std; | ||
| 30 | 30 | ||
| 31 | #include <srs_kernel_log.hpp> | 31 | #include <srs_kernel_log.hpp> |
| 32 | #include <srs_kernel_error.hpp> | 32 | #include <srs_kernel_error.hpp> |
| 33 | -#include <srs_core_autofree.hpp> | ||
| 34 | #include <srs_kernel_stream.hpp> | 33 | #include <srs_kernel_stream.hpp> |
| 35 | -#include <srs_kernel_utility.hpp> | ||
| 36 | #include <srs_kernel_file.hpp> | 34 | #include <srs_kernel_file.hpp> |
| 37 | 35 | ||
| 38 | #define SRS_FLV_TAG_HEADER_SIZE 11 | 36 | #define SRS_FLV_TAG_HEADER_SIZE 11 |
| @@ -499,7 +499,6 @@ void SrsUnSortedHashtable::copy(SrsUnSortedHashtable* src) | @@ -499,7 +499,6 @@ void SrsUnSortedHashtable::copy(SrsUnSortedHashtable* src) | ||
| 499 | SrsAmf0ObjectEOF::SrsAmf0ObjectEOF() | 499 | SrsAmf0ObjectEOF::SrsAmf0ObjectEOF() |
| 500 | { | 500 | { |
| 501 | marker = RTMP_AMF0_ObjectEnd; | 501 | marker = RTMP_AMF0_ObjectEnd; |
| 502 | - utf8_empty = 0x00; | ||
| 503 | } | 502 | } |
| 504 | 503 | ||
| 505 | SrsAmf0ObjectEOF::~SrsAmf0ObjectEOF() | 504 | SrsAmf0ObjectEOF::~SrsAmf0ObjectEOF() |
| @@ -756,8 +756,6 @@ namespace _srs_internal | @@ -756,8 +756,6 @@ namespace _srs_internal | ||
| 756 | class SrsAmf0ObjectEOF : public SrsAmf0Any | 756 | class SrsAmf0ObjectEOF : public SrsAmf0Any |
| 757 | { | 757 | { |
| 758 | public: | 758 | public: |
| 759 | - int16_t utf8_empty; | ||
| 760 | - public: | ||
| 761 | SrsAmf0ObjectEOF(); | 759 | SrsAmf0ObjectEOF(); |
| 762 | virtual ~SrsAmf0ObjectEOF(); | 760 | virtual ~SrsAmf0ObjectEOF(); |
| 763 | public: | 761 | public: |
| @@ -24,12 +24,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -24,12 +24,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 24 | #include <srs_protocol_rtmp.hpp> | 24 | #include <srs_protocol_rtmp.hpp> |
| 25 | 25 | ||
| 26 | #include <srs_core_autofree.hpp> | 26 | #include <srs_core_autofree.hpp> |
| 27 | -#include <srs_kernel_log.hpp> | ||
| 28 | -#include <srs_kernel_error.hpp> | ||
| 29 | #include <srs_protocol_io.hpp> | 27 | #include <srs_protocol_io.hpp> |
| 30 | #include <srs_protocol_amf0.hpp> | 28 | #include <srs_protocol_amf0.hpp> |
| 31 | #include <srs_protocol_handshake.hpp> | 29 | #include <srs_protocol_handshake.hpp> |
| 32 | -#include <srs_protocol_stack.hpp> | ||
| 33 | #include <srs_protocol_utility.hpp> | 30 | #include <srs_protocol_utility.hpp> |
| 34 | #include <srs_kernel_stream.hpp> | 31 | #include <srs_kernel_stream.hpp> |
| 35 | #include <srs_kernel_utility.hpp> | 32 | #include <srs_kernel_utility.hpp> |
| @@ -929,7 +926,7 @@ int SrsRtmpServer::response_connect_app(SrsRequest *req, const char* server_ip) | @@ -929,7 +926,7 @@ int SrsRtmpServer::response_connect_app(SrsRequest *req, const char* server_ip) | ||
| 929 | return ret; | 926 | return ret; |
| 930 | } | 927 | } |
| 931 | 928 | ||
| 932 | -void SrsRtmpServer::response_connect_reject(SrsRequest *req, const char* desc) | 929 | +void SrsRtmpServer::response_connect_reject(SrsRequest* /*req*/, const char* desc) |
| 933 | { | 930 | { |
| 934 | int ret = ERROR_SUCCESS; | 931 | int ret = ERROR_SUCCESS; |
| 935 | 932 |
| @@ -23,15 +23,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -23,15 +23,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 23 | 23 | ||
| 24 | #include <srs_protocol_stack.hpp> | 24 | #include <srs_protocol_stack.hpp> |
| 25 | 25 | ||
| 26 | -#include <srs_kernel_log.hpp> | ||
| 27 | #include <srs_protocol_amf0.hpp> | 26 | #include <srs_protocol_amf0.hpp> |
| 28 | -#include <srs_kernel_error.hpp> | ||
| 29 | #include <srs_protocol_io.hpp> | 27 | #include <srs_protocol_io.hpp> |
| 30 | -#include <srs_kernel_buffer.hpp> | ||
| 31 | #include <srs_kernel_stream.hpp> | 28 | #include <srs_kernel_stream.hpp> |
| 32 | #include <srs_core_autofree.hpp> | 29 | #include <srs_core_autofree.hpp> |
| 33 | #include <srs_kernel_utility.hpp> | 30 | #include <srs_kernel_utility.hpp> |
| 34 | -#include <srs_kernel_consts.hpp> | ||
| 35 | 31 | ||
| 36 | using namespace std; | 32 | using namespace std; |
| 37 | 33 |
-
请 注册 或 登录 后发表评论