1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

SRT: Use thread-safe log for multiple-threading SRT module. (#2474)

* solve srt push bugs

* solve h264 mutiple nalus in srt when obs is configured in zerolatency

* optimize error code

* optimize error code

* optimize error code

* add commemnt:we only skip pps/sps frame and send left nalus in srt

* add commemnt:we only skip pps/sps frame and send left nalus in srt

* optimize srt log system

* update conf

* update srt hpp

Co-authored-by: shiwei <shiwei05@kuaishou.com>
This commit is contained in:
Alex.CR 2021-07-21 10:15:24 +08:00 committed by winlin
parent 4ca433d3f8
commit 4b7ba0e1e9
12 changed files with 268 additions and 62 deletions

View file

@ -24,6 +24,7 @@
#include "srt_data.hpp"
#include "ts_demux.hpp"
#include "srt_log.hpp"
#define SRT_VIDEO_MSG_TYPE 0x01
#define SRT_AUDIO_MSG_TYPE 0x02
@ -134,12 +135,14 @@ public:
void insert_data_message(unsigned char* data_p, unsigned int len, const std::string& key_path);
void insert_ctrl_message(unsigned int msg_type, const std::string& key_path);
void insert_log_message(LOGGER_LEVEL level, const std::string& log_content);
private:
SRT_DATA_MSG_PTR get_data_message();
virtual srs_error_t cycle();
void handle_ts_data(SRT_DATA_MSG_PTR data_ptr);
void handle_close_rtmpsession(const std::string& key_path);
void handle_log_data(SRT_DATA_MSG_PTR data_ptr);
void check_rtmp_alive();
private: