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

Enhance HLS: support http callback on_play/stop, support statistic (#2578)

* Enhance HLS: support http callback on_play/stop, support statistic

* make code readable

* make code readable

* rename secret
This commit is contained in:
Haibo Chen 2021-09-23 13:31:45 +08:00 committed by GitHub
parent 40f8460929
commit f901831362
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 277 additions and 5 deletions

View file

@ -39,6 +39,7 @@ public:
string mock_http_response(int status, string content);
string mock_http_response2(int status, string content);
bool is_string_contain(string substr, string str);
#define __MOCK_HTTP_EXPECT_STREQ(status, text, w) \
EXPECT_STREQ(mock_http_response(status, text).c_str(), HELPER_BUFFER2STR(&w.io.out_buffer).c_str())
@ -46,5 +47,8 @@ string mock_http_response2(int status, string content);
#define __MOCK_HTTP_EXPECT_STREQ2(status, text, w) \
EXPECT_STREQ(mock_http_response2(status, text).c_str(), HELPER_BUFFER2STR(&w.io.out_buffer).c_str())
#define __MOCK_HTTP_EXPECT_STRCT(status, text, w) \
EXPECT_PRED2(is_string_contain, text, HELPER_BUFFER2STR(&w.io.out_buffer).c_str())
#endif