mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Improve test coverage for log service.
This commit is contained in:
parent
2cc021b2d7
commit
cc11f36940
4 changed files with 69 additions and 4 deletions
|
@ -82,6 +82,7 @@ void SrsThreadContext::clear_cid()
|
|||
}
|
||||
}
|
||||
|
||||
// LCOV_EXCL_START
|
||||
SrsConsoleLog::SrsConsoleLog(SrsLogLevel l, bool u)
|
||||
{
|
||||
level = l;
|
||||
|
@ -208,6 +209,7 @@ void SrsConsoleLog::error(const char* tag, int context_id, const char* fmt, ...)
|
|||
|
||||
fprintf(stderr, "%s\n", buffer);
|
||||
}
|
||||
// LCOV_EXCL_STOP
|
||||
|
||||
bool srs_log_header(char* buffer, int size, bool utc, bool dangerous, const char* tag, int cid, const char* level, int* psize)
|
||||
{
|
||||
|
|
|
@ -33,12 +33,12 @@ using namespace std;
|
|||
#include <srs_protocol_utility.hpp>
|
||||
#include <srs_service_utility.hpp>
|
||||
|
||||
SrsBasicRtmpClient::SrsBasicRtmpClient(string u, srs_utime_t ctm, srs_utime_t stm)
|
||||
SrsBasicRtmpClient::SrsBasicRtmpClient(string r, srs_utime_t ctm, srs_utime_t stm)
|
||||
{
|
||||
clk = new SrsWallClock();
|
||||
kbps = new SrsKbps(clk);
|
||||
|
||||
url = u;
|
||||
url = r;
|
||||
connect_timeout = ctm;
|
||||
stream_timeout = stm;
|
||||
|
||||
|
|
|
@ -60,10 +60,10 @@ private:
|
|||
int stream_id;
|
||||
public:
|
||||
// Constructor.
|
||||
// @param u The RTMP url, for example, rtmp://ip:port/app/stream?domain=vhost
|
||||
// @param r The RTMP url, for example, rtmp://ip:port/app/stream?domain=vhost
|
||||
// @param ctm The timeout in srs_utime_t to connect to server.
|
||||
// @param stm The timeout in srs_utime_t to delivery A/V stream.
|
||||
SrsBasicRtmpClient(std::string u, srs_utime_t ctm, srs_utime_t stm);
|
||||
SrsBasicRtmpClient(std::string r, srs_utime_t ctm, srs_utime_t stm);
|
||||
virtual ~SrsBasicRtmpClient();
|
||||
public:
|
||||
// Connect, handshake and connect app to RTMP server.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue