diff --git a/README.md b/README.md index 353fbed03..dae637c09 100755 --- a/README.md +++ b/README.md @@ -201,6 +201,9 @@ For previous versions, please read: ## V3 changes +* v3.0, 2020-10-31, Remove some global elements for debugging. 3.0.152 +* v3.0, 2020-10-31, Use global _srs_server for debugging. 3.0.151 +* v3.0, 2020-10-31, Refine source cid, track previous one. 3.0.150 * v3.0, 2020-10-25, Add hls.realtime.conf for low-latency HLS. 3.0.149 * v3.0, 2020-10-24, Refine script and startup logs. 3.0.148 * v3.0, 2020-10-23, Allow FFmpeg if exists at /usr/local/bin/ffmpeg. 3.0.147 diff --git a/trunk/src/app/srs_app_bandwidth.cpp b/trunk/src/app/srs_app_bandwidth.cpp index 6dc156ddf..5fd77c7db 100644 --- a/trunk/src/app/srs_app_bandwidth.cpp +++ b/trunk/src/app/srs_app_bandwidth.cpp @@ -91,7 +91,7 @@ bool _bandwidth_is_stopped_publish(SrsBandwidthPacket* pkt) { return pkt->is_stopped_publish(); } -srs_error_t _srs_expect_bandwidth_packet(SrsRtmpServer* rtmp, _CheckPacketType pfn) +srs_error_t srs_expect_bandwidth_packet(SrsRtmpServer* rtmp, _CheckPacketType pfn) { srs_error_t err = srs_success; @@ -241,7 +241,7 @@ srs_error_t SrsBandwidth::play_start(SrsBandwidthSample* sample, SrsKbpsLimit* l } } - if ((err = _srs_expect_bandwidth_packet(_rtmp, _bandwidth_is_starting_play)) != srs_success) { + if ((err = srs_expect_bandwidth_packet(_rtmp, _bandwidth_is_starting_play)) != srs_success) { return srs_error_wrap(err, "expect bandwidth"); } @@ -304,7 +304,7 @@ srs_error_t SrsBandwidth::play_stop(SrsBandwidthSample* sample, SrsKbpsLimit* /* } } - if ((err = _srs_expect_bandwidth_packet(_rtmp, _bandwidth_is_stopped_play)) != srs_success) { + if ((err = srs_expect_bandwidth_packet(_rtmp, _bandwidth_is_stopped_play)) != srs_success) { return srs_error_wrap(err, "expect bandwidth"); } @@ -328,7 +328,7 @@ srs_error_t SrsBandwidth::publish_start(SrsBandwidthSample* sample, SrsKbpsLimit } } - if ((err = _srs_expect_bandwidth_packet(_rtmp, _bandwidth_is_starting_publish)) != srs_success) { + if ((err = srs_expect_bandwidth_packet(_rtmp, _bandwidth_is_starting_publish)) != srs_success) { return srs_error_wrap(err, "expect packet"); } @@ -388,7 +388,7 @@ srs_error_t SrsBandwidth::publish_stop(SrsBandwidthSample* sample, SrsKbpsLimit* // we just ignore the packet and send the bandwidth test data. bool is_flash = (_req->swfUrl != ""); if (!is_flash) { - if ((err = _srs_expect_bandwidth_packet(_rtmp, _bandwidth_is_stopped_publish)) != srs_success) { + if ((err = srs_expect_bandwidth_packet(_rtmp, _bandwidth_is_stopped_publish)) != srs_success) { return srs_error_wrap(err, "expect bandwidth"); } } @@ -422,7 +422,7 @@ srs_error_t SrsBandwidth::do_final(SrsBandwidthSample& play_sample, SrsBandwidth bool is_flash = (_req->swfUrl != ""); if (!is_flash) { // ignore any error. - err = _srs_expect_bandwidth_packet(_rtmp, _bandwidth_is_final); + err = srs_expect_bandwidth_packet(_rtmp, _bandwidth_is_final); srs_error_reset(err); } diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index 41de78be0..f88e4fd66 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -57,7 +57,7 @@ using namespace std; #include #include -using namespace _srs_internal; +using namespace srs_internal; // @global the version to identify the core. const char* _srs_version = "XCORE-" RTMP_SIG_SRS_SERVER; @@ -92,7 +92,7 @@ bool is_common_space(char ch) return (ch == ' ' || ch == '\t' || ch == SRS_CR || ch == SRS_LF); } -namespace _srs_internal +namespace srs_internal { SrsConfigBuffer::SrsConfigBuffer() { @@ -5272,20 +5272,20 @@ int SrsConfig::get_time_jitter(string vhost) SrsConfDirective* conf = get_vhost(vhost); if (!conf) { - return _srs_time_jitter_string2int(DEFAULT); + return srs_time_jitter_string2int(DEFAULT); } conf = conf->get("play"); if (!conf) { - return _srs_time_jitter_string2int(DEFAULT); + return srs_time_jitter_string2int(DEFAULT); } conf = conf->get("time_jitter"); if (!conf || conf->arg0().empty()) { - return _srs_time_jitter_string2int(DEFAULT); + return srs_time_jitter_string2int(DEFAULT); } - return _srs_time_jitter_string2int(conf->arg0()); + return srs_time_jitter_string2int(conf->arg0()); } bool SrsConfig::get_mix_correct(string vhost) @@ -7505,15 +7505,15 @@ int SrsConfig::get_dvr_time_jitter(string vhost) SrsConfDirective* conf = get_dvr(vhost); if (!conf) { - return _srs_time_jitter_string2int(DEFAULT); + return srs_time_jitter_string2int(DEFAULT); } conf = conf->get("time_jitter"); if (!conf || conf->arg0().empty()) { - return _srs_time_jitter_string2int(DEFAULT); + return srs_time_jitter_string2int(DEFAULT); } - return _srs_time_jitter_string2int(conf->arg0()); + return srs_time_jitter_string2int(conf->arg0()); } bool SrsConfig::get_http_api_enabled() diff --git a/trunk/src/app/srs_app_config.hpp b/trunk/src/app/srs_app_config.hpp index 974dd05f5..6b7fb77c1 100644 --- a/trunk/src/app/srs_app_config.hpp +++ b/trunk/src/app/srs_app_config.hpp @@ -77,7 +77,7 @@ bool srs_vector_actual_equals(const std::vector& a, const std::vector& b) return true; } -namespace _srs_internal +namespace srs_internal { // The buffer of config content. class SrsConfigBuffer @@ -229,7 +229,7 @@ public: // Parse utilities public: // Parse config directive from file buffer. - virtual srs_error_t parse(_srs_internal::SrsConfigBuffer* buffer); + virtual srs_error_t parse(srs_internal::SrsConfigBuffer* buffer); // Marshal the directive to writer. // @param level, the root is level0, all its directives are level1, and so on. virtual srs_error_t persistence(SrsFileWriter* writer, int level); @@ -253,13 +253,13 @@ private: // 1. read a token(directive args and a ret flag), // 2. initialize the directive by args, args[0] is name, args[1-N] is args of directive, // 3. if ret flag indicates there are child-directives, read_conf(directive, block) recursively. - virtual srs_error_t parse_conf(_srs_internal::SrsConfigBuffer* buffer, SrsDirectiveType type); + virtual srs_error_t parse_conf(srs_internal::SrsConfigBuffer* buffer, SrsDirectiveType type); // Read a token from buffer. // A token, is the directive args and a flag indicates whether has child-directives. // @param args, the output directive args, the first is the directive name, left is the args. // @param line_start, the actual start line of directive. // @return, an error code indicates error or has child-directives. - virtual srs_error_t read_token(_srs_internal::SrsConfigBuffer* buffer, std::vector& args, int& line_start); + virtual srs_error_t read_token(srs_internal::SrsConfigBuffer* buffer, std::vector& args, int& line_start); }; // The config service provider. @@ -425,7 +425,7 @@ protected: // Parse config from the buffer. // @param buffer, the config buffer, user must delete it. // @remark, use protected for the utest to override with mock. - virtual srs_error_t parse_buffer(_srs_internal::SrsConfigBuffer* buffer); + virtual srs_error_t parse_buffer(srs_internal::SrsConfigBuffer* buffer); // global env public: // Get the current work directory. diff --git a/trunk/src/app/srs_app_http_stream.cpp b/trunk/src/app/srs_app_http_stream.cpp index 661af7575..63370449c 100755 --- a/trunk/src/app/srs_app_http_stream.cpp +++ b/trunk/src/app/srs_app_http_stream.cpp @@ -1141,9 +1141,9 @@ srs_error_t SrsHttpStreamServer::hijack(ISrsHttpMessage* request, ISrsHttpHandle // trigger edge to fetch from origin. bool vhost_is_edge = _srs_config->get_vhost_is_edge(r->vhost); - srs_trace("flv: source url=%s, is_edge=%d, source_id=[%d][%s]", - r->get_stream_url().c_str(), vhost_is_edge, ::getpid(), s->source_id().c_str()); - + srs_trace("flv: source url=%s, is_edge=%d, source_id=%s/%s", + r->get_stream_url().c_str(), vhost_is_edge, s->source_id().c_str(), s->pre_source_id().c_str()); + return err; } diff --git a/trunk/src/app/srs_app_rtmp_conn.cpp b/trunk/src/app/srs_app_rtmp_conn.cpp index ae38ebcce..209f4022e 100644 --- a/trunk/src/app/srs_app_rtmp_conn.cpp +++ b/trunk/src/app/srs_app_rtmp_conn.cpp @@ -524,8 +524,8 @@ srs_error_t SrsRtmpConn::stream_service_cycle() } bool enabled_cache = _srs_config->get_gop_cache(req->vhost); - srs_trace("source url=%s, ip=%s, cache=%d, is_edge=%d, source_id=[%d][%s]", - req->get_stream_url().c_str(), ip.c_str(), enabled_cache, info->edge, ::getpid(), source->source_id().c_str()); + srs_trace("source url=%s, ip=%s, cache=%d, is_edge=%d, source_id=%s/%s", + req->get_stream_url().c_str(), ip.c_str(), enabled_cache, info->edge, source->source_id().c_str(), source->pre_source_id().c_str()); source->set_cache(enabled_cache); switch (info->type) { diff --git a/trunk/src/app/srs_app_source.cpp b/trunk/src/app/srs_app_source.cpp index 84f5d5578..1147f6a15 100755 --- a/trunk/src/app/srs_app_source.cpp +++ b/trunk/src/app/srs_app_source.cpp @@ -66,7 +66,7 @@ using namespace std; // the time to cleanup source. #define SRS_SOURCE_CLEANUP (30 * SRS_UTIME_SECONDS) -int _srs_time_jitter_string2int(std::string time_jitter) +int srs_time_jitter_string2int(std::string time_jitter) { if (time_jitter == "full") { return SrsRtmpJitterAlgorithmFULL; @@ -519,7 +519,7 @@ srs_error_t SrsConsumer::dump_packets(SrsMessageArray* msgs, int& count) count = 0; if (should_update_source_id) { - srs_trace("update source_id=%s[%s]", source->source_id().c_str(), source->source_id().c_str()); + srs_trace("update source_id=%s/%s", source->source_id().c_str(), source->pre_source_id().c_str()); should_update_source_id = false; } @@ -2070,13 +2070,10 @@ srs_error_t SrsSource::on_source_id_changed(SrsContextId id) if (!_source_id.compare(id)) { return err; } - + if (_pre_source_id.empty()) { _pre_source_id = id; - } else if (_pre_source_id.compare(_source_id)) { - _pre_source_id = _source_id; } - _source_id = id; // notice all consumer @@ -2559,7 +2556,10 @@ void SrsSource::on_unpublish() _can_publish = true; _source_id = SrsContextId(); - + if (!_source_id.empty()) { + _pre_source_id = _source_id; + } + // notify the handler. srs_assert(handler); SrsStatistic* stat = SrsStatistic::instance(); diff --git a/trunk/src/app/srs_app_source.hpp b/trunk/src/app/srs_app_source.hpp index d9e731ccc..4a58eb954 100644 --- a/trunk/src/app/srs_app_source.hpp +++ b/trunk/src/app/srs_app_source.hpp @@ -72,7 +72,7 @@ enum SrsRtmpJitterAlgorithm SrsRtmpJitterAlgorithmZERO, SrsRtmpJitterAlgorithmOFF }; -int _srs_time_jitter_string2int(std::string time_jitter); +int srs_time_jitter_string2int(std::string time_jitter); // Time jitter detect and correct, to ensure the rtmp stream is monotonically. class SrsRtmpJitter diff --git a/trunk/src/core/srs_core_version3.hpp b/trunk/src/core/srs_core_version3.hpp index 5c15fd973..4f7a26305 100644 --- a/trunk/src/core/srs_core_version3.hpp +++ b/trunk/src/core/srs_core_version3.hpp @@ -24,6 +24,6 @@ #ifndef SRS_CORE_VERSION3_HPP #define SRS_CORE_VERSION3_HPP -#define SRS_VERSION3_REVISION 149 +#define SRS_VERSION3_REVISION 152 #endif diff --git a/trunk/src/kernel/srs_kernel_file.cpp b/trunk/src/kernel/srs_kernel_file.cpp index 27702f9e6..e884113b2 100644 --- a/trunk/src/kernel/srs_kernel_file.cpp +++ b/trunk/src/kernel/srs_kernel_file.cpp @@ -37,11 +37,11 @@ using namespace std; #include // For utest to mock it. -_srs_open_t _srs_open_fn = ::open; -_srs_write_t _srs_write_fn = ::write; -_srs_read_t _srs_read_fn = ::read; -_srs_lseek_t _srs_lseek_fn = ::lseek; -_srs_close_t _srs_close_fn = ::close; +srs_open_t _srs_open_fn = ::open; +srs_write_t _srs_write_fn = ::write; +srs_read_t _srs_read_fn = ::read; +srs_lseek_t _srs_lseek_fn = ::lseek; +srs_close_t _srs_close_fn = ::close; SrsFileWriter::SrsFileWriter() { diff --git a/trunk/src/kernel/srs_kernel_file.hpp b/trunk/src/kernel/srs_kernel_file.hpp index b8ed2a15f..46ed18b48 100644 --- a/trunk/src/kernel/srs_kernel_file.hpp +++ b/trunk/src/kernel/srs_kernel_file.hpp @@ -121,11 +121,11 @@ public: }; // For utest to mock it. -typedef int (*_srs_open_t)(const char* path, int oflag, ...); -typedef ssize_t (*_srs_write_t)(int fildes, const void* buf, size_t nbyte); -typedef ssize_t (*_srs_read_t)(int fildes, void* buf, size_t nbyte); -typedef off_t (*_srs_lseek_t)(int fildes, off_t offset, int whence); -typedef int (*_srs_close_t)(int fildes); +typedef int (*srs_open_t)(const char* path, int oflag, ...); +typedef ssize_t (*srs_write_t)(int fildes, const void* buf, size_t nbyte); +typedef ssize_t (*srs_read_t)(int fildes, void* buf, size_t nbyte); +typedef off_t (*srs_lseek_t)(int fildes, off_t offset, int whence); +typedef int (*srs_close_t)(int fildes); #endif diff --git a/trunk/src/kernel/srs_kernel_utility.cpp b/trunk/src/kernel/srs_kernel_utility.cpp index 4af0defa6..ef723dd3b 100644 --- a/trunk/src/kernel/srs_kernel_utility.cpp +++ b/trunk/src/kernel/srs_kernel_utility.cpp @@ -125,7 +125,7 @@ srs_utime_t srs_get_system_startup_time() // For utest to mock it. #ifndef SRS_OSX -_srs_gettimeofday_t _srs_gettimeofday = (_srs_gettimeofday_t)::gettimeofday; +srs_gettimeofday_t _srs_gettimeofday = (srs_gettimeofday_t)::gettimeofday; #endif srs_utime_t srs_update_system_time() diff --git a/trunk/src/kernel/srs_kernel_utility.hpp b/trunk/src/kernel/srs_kernel_utility.hpp index e6a2f3371..dbab921c0 100644 --- a/trunk/src/kernel/srs_kernel_utility.hpp +++ b/trunk/src/kernel/srs_kernel_utility.hpp @@ -174,7 +174,7 @@ extern int srs_chunk_header_c3(int perfer_cid, uint32_t timestamp, char* cache, #ifdef SRS_OSX #define _srs_gettimeofday gettimeofday #else - typedef int (*_srs_gettimeofday_t) (struct timeval* tv, struct timezone* tz); + typedef int (*srs_gettimeofday_t) (struct timeval* tv, struct timezone* tz); #endif #endif diff --git a/trunk/src/main/srs_main_server.cpp b/trunk/src/main/srs_main_server.cpp index 8a09ca7e6..65fc1cb65 100644 --- a/trunk/src/main/srs_main_server.cpp +++ b/trunk/src/main/srs_main_server.cpp @@ -77,6 +77,9 @@ SrsConfig* _srs_config = new SrsConfig(); // @global version of srs, which can grep keyword "XCORE" extern const char* _srs_version; +// @global main SRS server, for debugging +SrsServer* _srs_server = NULL; + /** * main entrance. */ diff --git a/trunk/src/protocol/srs_protocol_amf0.cpp b/trunk/src/protocol/srs_protocol_amf0.cpp index c0a478c1f..96b95f862 100644 --- a/trunk/src/protocol/srs_protocol_amf0.cpp +++ b/trunk/src/protocol/srs_protocol_amf0.cpp @@ -33,7 +33,7 @@ using namespace std; #include #include -using namespace _srs_internal; +using namespace srs_internal; // AMF0 marker #define RTMP_AMF0_Number 0x00 @@ -1703,7 +1703,7 @@ srs_error_t srs_amf0_write_undefined(SrsBuffer* stream) return err; } -namespace _srs_internal +namespace srs_internal { srs_error_t srs_amf0_read_utf8(SrsBuffer* stream, string& value) { diff --git a/trunk/src/protocol/srs_protocol_amf0.hpp b/trunk/src/protocol/srs_protocol_amf0.hpp index 7af7c700b..7ab16fc3c 100644 --- a/trunk/src/protocol/srs_protocol_amf0.hpp +++ b/trunk/src/protocol/srs_protocol_amf0.hpp @@ -36,7 +36,7 @@ class SrsAmf0StrictArray; class SrsJsonAny; // internal objects, user should never use it. -namespace _srs_internal +namespace srs_internal { class SrsUnSortedHashtable; class SrsAmf0ObjectEOF; @@ -335,8 +335,8 @@ public: class SrsAmf0Object : public SrsAmf0Any { private: - _srs_internal::SrsUnSortedHashtable* properties; - _srs_internal::SrsAmf0ObjectEOF* eof; + srs_internal::SrsUnSortedHashtable* properties; + srs_internal::SrsAmf0ObjectEOF* eof; private: friend class SrsAmf0Any; /** @@ -425,8 +425,8 @@ public: class SrsAmf0EcmaArray : public SrsAmf0Any { private: - _srs_internal::SrsUnSortedHashtable* properties; - _srs_internal::SrsAmf0ObjectEOF* eof; + srs_internal::SrsUnSortedHashtable* properties; + srs_internal::SrsAmf0ObjectEOF* eof; int32_t _count; private: friend class SrsAmf0Any; @@ -626,7 +626,7 @@ extern srs_error_t srs_amf0_read_undefined(SrsBuffer* stream); extern srs_error_t srs_amf0_write_undefined(SrsBuffer* stream); // internal objects, user should never use it. -namespace _srs_internal +namespace srs_internal { /** * read amf0 string from stream. diff --git a/trunk/src/protocol/srs_rtmp_handshake.cpp b/trunk/src/protocol/srs_rtmp_handshake.cpp index 9a419a6ce..6736cf64f 100644 --- a/trunk/src/protocol/srs_rtmp_handshake.cpp +++ b/trunk/src/protocol/srs_rtmp_handshake.cpp @@ -34,7 +34,7 @@ #include #include -using namespace _srs_internal; +using namespace srs_internal; // for openssl_HMACsha256 #include @@ -112,7 +112,7 @@ static int DH_set_length(DH *dh, long length) #endif -namespace _srs_internal +namespace srs_internal { // 68bytes FMS key which is used to sign the sever packet. uint8_t SrsGenuineFMSKey[] = { diff --git a/trunk/src/protocol/srs_rtmp_handshake.hpp b/trunk/src/protocol/srs_rtmp_handshake.hpp index 49100fb4c..75eef9305 100644 --- a/trunk/src/protocol/srs_rtmp_handshake.hpp +++ b/trunk/src/protocol/srs_rtmp_handshake.hpp @@ -40,7 +40,7 @@ extern HMAC_CTX *HMAC_CTX_new(void); extern void HMAC_CTX_free(HMAC_CTX *ctx); #endif -namespace _srs_internal +namespace srs_internal { // The digest key generate size. #define SRS_OpensslHashSize 512 diff --git a/trunk/src/utest/srs_utest_amf0.cpp b/trunk/src/utest/srs_utest_amf0.cpp index b3ef54212..9c322d227 100644 --- a/trunk/src/utest/srs_utest_amf0.cpp +++ b/trunk/src/utest/srs_utest_amf0.cpp @@ -32,7 +32,7 @@ using namespace std; #include #include #include -using namespace _srs_internal; +using namespace srs_internal; /** * main scenario to use amf0. diff --git a/trunk/src/utest/srs_utest_config.hpp b/trunk/src/utest/srs_utest_config.hpp index b3355691c..fc07fb97a 100644 --- a/trunk/src/utest/srs_utest_config.hpp +++ b/trunk/src/utest/srs_utest_config.hpp @@ -35,7 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define _MIN_OK_CONF "listen 1935; " -class MockSrsConfigBuffer : public _srs_internal::SrsConfigBuffer +class MockSrsConfigBuffer : public srs_internal::SrsConfigBuffer { public: MockSrsConfigBuffer(std::string buf); diff --git a/trunk/src/utest/srs_utest_kernel.cpp b/trunk/src/utest/srs_utest_kernel.cpp index deab330cb..13caea980 100644 --- a/trunk/src/utest/srs_utest_kernel.cpp +++ b/trunk/src/utest/srs_utest_kernel.cpp @@ -3713,11 +3713,11 @@ VOID TEST(KernelFileTest, FileWriteReader) } // Mock the system call hooks. -extern _srs_open_t _srs_open_fn; -extern _srs_write_t _srs_write_fn; -extern _srs_read_t _srs_read_fn; -extern _srs_lseek_t _srs_lseek_fn; -extern _srs_close_t _srs_close_fn; +extern srs_open_t _srs_open_fn; +extern srs_write_t _srs_write_fn; +extern srs_read_t _srs_read_fn; +extern srs_lseek_t _srs_lseek_fn; +extern srs_close_t _srs_close_fn; int mock_open(const char* /*path*/, int /*oflag*/, ...) { return -1; @@ -3742,13 +3742,13 @@ int mock_close(int /*fildes*/) { class MockSystemIO { private: - _srs_open_t oo; - _srs_write_t ow; - _srs_read_t _or; - _srs_lseek_t os; - _srs_close_t oc; + srs_open_t oo; + srs_write_t ow; + srs_read_t _or; + srs_lseek_t os; + srs_close_t oc; public: - MockSystemIO(_srs_open_t o = NULL, _srs_write_t w = NULL, _srs_read_t r = NULL, _srs_lseek_t s = NULL, _srs_close_t c = NULL) { + MockSystemIO(srs_open_t o = NULL, srs_write_t w = NULL, srs_read_t r = NULL, srs_lseek_t s = NULL, srs_close_t c = NULL) { oo = _srs_open_fn; ow = _srs_write_fn; os = _srs_lseek_fn; @@ -4191,7 +4191,7 @@ VOID TEST(KernelUtilityTest, CoverBitsBufferAll) } #ifndef SRS_OSX -extern _srs_gettimeofday_t _srs_gettimeofday; +extern srs_gettimeofday_t _srs_gettimeofday; int mock_gettimeofday(struct timeval* /*tp*/, struct timezone* /*tzp*/) { return -1; } @@ -4199,9 +4199,9 @@ int mock_gettimeofday(struct timeval* /*tp*/, struct timezone* /*tzp*/) { class MockTime { private: - _srs_gettimeofday_t ot; + srs_gettimeofday_t ot; public: - MockTime(_srs_gettimeofday_t t = NULL) { + MockTime(srs_gettimeofday_t t = NULL) { ot = _srs_gettimeofday; if (t) { _srs_gettimeofday = t; diff --git a/trunk/src/utest/srs_utest_protocol.cpp b/trunk/src/utest/srs_utest_protocol.cpp index 86e901b84..0c7a40e34 100644 --- a/trunk/src/utest/srs_utest_protocol.cpp +++ b/trunk/src/utest/srs_utest_protocol.cpp @@ -352,7 +352,7 @@ VOID TEST(ProtocolHandshakeTest, OpensslSha256) // verify the dh key VOID TEST(ProtocolHandshakeTest, DHKey) { - _srs_internal::SrsDH dh; + srs_internal::SrsDH dh; ASSERT_TRUE(ERROR_SUCCESS == dh.initialize(true)); @@ -368,7 +368,7 @@ VOID TEST(ProtocolHandshakeTest, DHKey) EXPECT_TRUE(srs_bytes_equals(pub_key1, pub_key2, 128)); // another dh - _srs_internal::SrsDH dh0; + srs_internal::SrsDH dh0; ASSERT_TRUE(ERROR_SUCCESS == dh0.initialize(true)); diff --git a/trunk/src/utest/srs_utest_protocol.hpp b/trunk/src/utest/srs_utest_protocol.hpp index 4a133127d..f81b3eb3b 100644 --- a/trunk/src/utest/srs_utest_protocol.hpp +++ b/trunk/src/utest/srs_utest_protocol.hpp @@ -37,7 +37,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -using namespace _srs_internal; +using namespace srs_internal; #include