From 388c570d2c0285e7378e06f37b70f65483f88b83 Mon Sep 17 00:00:00 2001 From: lishu Date: Tue, 20 Aug 2019 17:30:38 +0800 Subject: construct frag survey --- src/main.c | 9 +++++---- src/message.c | 14 +++++++++++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/main.c b/src/main.c index ca13264..05f7a8f 100644 --- a/src/main.c +++ b/src/main.c @@ -43,8 +43,8 @@ const char* frag_rssb_version_time = "2018-08-13T09:00:00"; const char* frag_rssb_version_des = "MESA@iie rssb_maskey"; int FRAG_RSSB_VERSION_1_0_20190425 = 0; -const char* frag_rssb_version_time_in = "2019-04-25"; -const char* frag_rssb_version_des_in = "adjust local_eth opt"; +const char* frag_rssb_version_time_in = "2019-08-20"; +const char* frag_rssb_version_des_in = "construct frag survey"; void frag_rssb_history() { //2015.11.15 v1.0 create the project @@ -227,10 +227,11 @@ void frag_rssb_history() //2018.12.10 v4.0//1.recv_msg_fd not unix 2.MsgPort //2018.12.11 v4.0//1.file mediatype //2018.12.11 v4.0//resp_checkresult_search_media_cb add K_PROJECT,and delete send_json_log - //2018.12.24 v4.0//send_voip_full_json_log add survey judgement for K + //2018.12.24 v4.0//send_voip_full_json_log add survey judgement for K //2019.01.21 v4.0//support youtube; update req_frag and template //2019.03.15 v4.0//keepalive; support udp send - //2019.04.25 v4.0//media_info:local_nr opt + //2019.04.25 v4.0//media_info:local_nr opt + //2019.08.20 v4.0//construct frag survey } frag_rssb_parameter_t g_frag_run; diff --git a/src/message.c b/src/message.c index c2eed5b..35b8f45 100644 --- a/src/message.c +++ b/src/message.c @@ -805,7 +805,14 @@ long resp_checkresult_search_media_cb(void *data, const uint8_t *key, uint size, { g_frag_stat.stat_info[RESP_CHECKRESULT_FRAG_SURVEY][TOTAL_PKTS]++; g_frag_stat.stat_info[RESP_CHECKRESULT_FRAG_SURVEY][TOTAL_BYTES] += buflen; - } + } + /*debug: create index_url*/ +#if 0 + const char* index_url = "edge.hls.ll.hitbox.tv/hls/spacemonkeylive_480p/index.m3u8?st=H9iOon5FeXHqrKzb0tDJjA;ci=OnmyO4BON-CkyznTBeG4pw"; + mdi->opt[MEDIA_OPT_INDEX_URL][mdi->url_opt_index] = (opt_in_t*)malloc(sizeof(opt_in_t)); + mdi->opt[MEDIA_OPT_INDEX_URL][mdi->url_opt_index]->opt_value = (char*)index_url; + mdi->opt[MEDIA_OPT_INDEX_URL][mdi->url_opt_index]->opt_len = strlen(index_url); +#endif if(mdi->media_service_type==MEDIA_SERVICE_TYPE_FRAG && mdi->opt[MEDIA_OPT_INDEX_URL][mdi->url_opt_index]!=NULL) { /*碎片化管控V1版本: 子串管控*/ @@ -892,6 +899,11 @@ long resp_checkresult_search_media_cb(void *data, const uint8_t *key, uint size, g_frag_stat.stat_info[RESP_CHECKRESULT_INDEX_SURVEY][TOTAL_PKTS]++; g_frag_stat.stat_info[RESP_CHECKRESULT_INDEX_SURVEY][TOTAL_BYTES] += buflen; } + +#if 0 + free(mdi->opt[MEDIA_OPT_INDEX_URL][mdi->url_opt_index]); + mdi->opt[MEDIA_OPT_INDEX_URL][mdi->url_opt_index]=NULL; +#endif /*给前端发建议*/ #if K_PROJECT -- cgit v1.2.3