正在显示
8 个修改的文件
包含
48 行增加
和
45 行删除
@@ -122,7 +122,7 @@ vhost dvr.srs.com { | @@ -122,7 +122,7 @@ vhost dvr.srs.com { | ||
122 | # start to record to file when encoder publish, | 122 | # start to record to file when encoder publish, |
123 | # reap flv according by specified dvr_plan. | 123 | # reap flv according by specified dvr_plan. |
124 | # http callbacks: | 124 | # http callbacks: |
125 | - # @see http callback on_dvr_reap_flv on http_hooks section. | 125 | + # @see http callback on_dvr_hss_reap_flv on http_hooks section. |
126 | dvr { | 126 | dvr { |
127 | # whether enabled dvr features | 127 | # whether enabled dvr features |
128 | # default: off | 128 | # default: off |
@@ -142,6 +142,7 @@ vhost dvr.srs.com { | @@ -142,6 +142,7 @@ vhost dvr.srs.com { | ||
142 | # the dvr plan. canbe: | 142 | # the dvr plan. canbe: |
143 | # session reap flv when session end(unpublish). | 143 | # session reap flv when session end(unpublish). |
144 | # segment reap flv when flv duration exceed the specified dvr_duration. | 144 | # segment reap flv when flv duration exceed the specified dvr_duration. |
145 | + # hss reap flv required by bravo(chnvideo.com) p2p system. | ||
145 | # default: session | 146 | # default: session |
146 | dvr_plan session; | 147 | dvr_plan session; |
147 | # the param for plan(segment), in seconds. | 148 | # the param for plan(segment), in seconds. |
@@ -347,10 +348,12 @@ vhost hooks.callback.srs.com { | @@ -347,10 +348,12 @@ vhost hooks.callback.srs.com { | ||
347 | # support multiple api hooks, format: | 348 | # support multiple api hooks, format: |
348 | # on_stop http://xxx/api0 http://xxx/api1 http://xxx/apiN | 349 | # on_stop http://xxx/api0 http://xxx/api1 http://xxx/apiN |
349 | on_stop http://127.0.0.1:8085/api/v1/sessions http://localhost:8085/api/v1/sessions; | 350 | on_stop http://127.0.0.1:8085/api/v1/sessions http://localhost:8085/api/v1/sessions; |
351 | + # | ||
352 | + # for dvr(dvr_plan is hss). | ||
350 | # when dvr got flv header, call the hook, | 353 | # when dvr got flv header, call the hook, |
351 | # the request in the POST data string is a object encode by json: | 354 | # the request in the POST data string is a object encode by json: |
352 | # { | 355 | # { |
353 | - # "action": "on_dvr_reap_flv_header", | 356 | + # "action": "on_dvr_hss_reap_flv_header", |
354 | # "vhost": "video.test.com", "app": "live", | 357 | # "vhost": "video.test.com", "app": "live", |
355 | # "stream": "livestream", | 358 | # "stream": "livestream", |
356 | # "segment": { | 359 | # "segment": { |
@@ -361,7 +364,7 @@ vhost hooks.callback.srs.com { | @@ -361,7 +364,7 @@ vhost hooks.callback.srs.com { | ||
361 | # when dvr reap flv file, call the hook, | 364 | # when dvr reap flv file, call the hook, |
362 | # the request in the POST data string is a object encode by json: | 365 | # the request in the POST data string is a object encode by json: |
363 | # { | 366 | # { |
364 | - # "action": "on_dvr_reap_flv", | 367 | + # "action": "on_dvr_hss_reap_flv", |
365 | # "vhost": "video.test.com", "app": "live", | 368 | # "vhost": "video.test.com", "app": "live", |
366 | # "stream": "livestream", | 369 | # "stream": "livestream", |
367 | # "segment": { | 370 | # "segment": { |
@@ -376,7 +379,7 @@ vhost hooks.callback.srs.com { | @@ -376,7 +379,7 @@ vhost hooks.callback.srs.com { | ||
376 | # 0 | 379 | # 0 |
377 | # support multiple api hooks, format: | 380 | # support multiple api hooks, format: |
378 | # on_stop http://xxx/api0 http://xxx/api1 http://xxx/apiN | 381 | # on_stop http://xxx/api0 http://xxx/api1 http://xxx/apiN |
379 | - on_dvr_reap_flv http://127.0.0.1:8085/api/v1/dvrs http://localhost:8085/api/v1/dvrs; | 382 | + on_dvr_hss_reap_flv http://127.0.0.1:8085/api/v1/dvrs http://localhost:8085/api/v1/dvrs; |
380 | } | 383 | } |
381 | } | 384 | } |
382 | 385 |
@@ -113,14 +113,14 @@ int proxy(srs_rtmp_t irtmp, srs_rtmp_t ortmp) | @@ -113,14 +113,14 @@ int proxy(srs_rtmp_t irtmp, srs_rtmp_t ortmp) | ||
113 | trace("irtmp get packet failed. ret=%d", ret); | 113 | trace("irtmp get packet failed. ret=%d", ret); |
114 | return ret; | 114 | return ret; |
115 | } | 115 | } |
116 | - verbose("irtmp got packet: type=%s, time=%d, size=%d", | 116 | + trace("irtmp got packet: type=%s, time=%d, size=%d", |
117 | srs_type2string(type), timestamp, size); | 117 | srs_type2string(type), timestamp, size); |
118 | 118 | ||
119 | if ((ret = srs_write_packet(ortmp, type, timestamp, data, size)) != 0) { | 119 | if ((ret = srs_write_packet(ortmp, type, timestamp, data, size)) != 0) { |
120 | trace("irtmp get packet failed. ret=%d", ret); | 120 | trace("irtmp get packet failed. ret=%d", ret); |
121 | return ret; | 121 | return ret; |
122 | } | 122 | } |
123 | - verbose("ortmp sent packet: type=%s, time=%d, size=%d", | 123 | + trace("ortmp sent packet: type=%s, time=%d, size=%d", |
124 | srs_type2string(type), timestamp, size); | 124 | srs_type2string(type), timestamp, size); |
125 | } | 125 | } |
126 | 126 |
@@ -1587,7 +1587,7 @@ SrsConfDirective* SrsConfig::get_vhost_on_stop(string vhost) | @@ -1587,7 +1587,7 @@ SrsConfDirective* SrsConfig::get_vhost_on_stop(string vhost) | ||
1587 | return conf->get("on_stop"); | 1587 | return conf->get("on_stop"); |
1588 | } | 1588 | } |
1589 | 1589 | ||
1590 | -SrsConfDirective* SrsConfig::get_vhost_on_dvr_reap_flv(string vhost) | 1590 | +SrsConfDirective* SrsConfig::get_vhost_on_dvr_hss_reap_flv(string vhost) |
1591 | { | 1591 | { |
1592 | SrsConfDirective* conf = get_vhost(vhost); | 1592 | SrsConfDirective* conf = get_vhost(vhost); |
1593 | 1593 | ||
@@ -1605,7 +1605,7 @@ SrsConfDirective* SrsConfig::get_vhost_on_dvr_reap_flv(string vhost) | @@ -1605,7 +1605,7 @@ SrsConfDirective* SrsConfig::get_vhost_on_dvr_reap_flv(string vhost) | ||
1605 | return NULL; | 1605 | return NULL; |
1606 | } | 1606 | } |
1607 | 1607 | ||
1608 | - return conf->get("on_dvr_reap_flv"); | 1608 | + return conf->get("on_dvr_hss_reap_flv"); |
1609 | } | 1609 | } |
1610 | 1610 | ||
1611 | bool SrsConfig::get_vhost_enabled(string vhost) | 1611 | bool SrsConfig::get_vhost_enabled(string vhost) |
@@ -177,7 +177,7 @@ public: | @@ -177,7 +177,7 @@ public: | ||
177 | virtual SrsConfDirective* get_vhost_on_unpublish(std::string vhost); | 177 | virtual SrsConfDirective* get_vhost_on_unpublish(std::string vhost); |
178 | virtual SrsConfDirective* get_vhost_on_play(std::string vhost); | 178 | virtual SrsConfDirective* get_vhost_on_play(std::string vhost); |
179 | virtual SrsConfDirective* get_vhost_on_stop(std::string vhost); | 179 | virtual SrsConfDirective* get_vhost_on_stop(std::string vhost); |
180 | - virtual SrsConfDirective* get_vhost_on_dvr_reap_flv(std::string vhost); | 180 | + virtual SrsConfDirective* get_vhost_on_dvr_hss_reap_flv(std::string vhost); |
181 | virtual bool get_gop_cache(std::string vhost); | 181 | virtual bool get_gop_cache(std::string vhost); |
182 | virtual bool get_atc(std::string vhost); | 182 | virtual bool get_atc(std::string vhost); |
183 | virtual double get_queue_length(std::string vhost); | 183 | virtual double get_queue_length(std::string vhost); |
@@ -565,7 +565,7 @@ int SrsDvrPlan::flv_close() | @@ -565,7 +565,7 @@ int SrsDvrPlan::flv_close() | ||
565 | } | 565 | } |
566 | 566 | ||
567 | #ifdef SRS_AUTO_HTTP_CALLBACK | 567 | #ifdef SRS_AUTO_HTTP_CALLBACK |
568 | - if ((ret = on_dvr_reap_flv()) != ERROR_SUCCESS) { | 568 | + if ((ret = on_dvr_hss_reap_flv()) != ERROR_SUCCESS) { |
569 | return ret; | 569 | return ret; |
570 | } | 570 | } |
571 | #endif | 571 | #endif |
@@ -612,21 +612,21 @@ int SrsDvrPlan::write_flv_header() | @@ -612,21 +612,21 @@ int SrsDvrPlan::write_flv_header() | ||
612 | return ret; | 612 | return ret; |
613 | } | 613 | } |
614 | 614 | ||
615 | -int SrsDvrPlan::on_dvr_reap_flv() | 615 | +int SrsDvrPlan::on_dvr_hss_reap_flv() |
616 | { | 616 | { |
617 | int ret = ERROR_SUCCESS; | 617 | int ret = ERROR_SUCCESS; |
618 | 618 | ||
619 | #ifdef SRS_AUTO_HTTP_CALLBACK | 619 | #ifdef SRS_AUTO_HTTP_CALLBACK |
620 | - // HTTP: on_dvr_reap_flv | ||
621 | - SrsConfDirective* on_dvr_reap_flv = _srs_config->get_vhost_on_dvr_reap_flv(_req->vhost); | ||
622 | - if (!on_dvr_reap_flv) { | ||
623 | - srs_info("ignore the empty http callback: on_dvr_reap_flv"); | 620 | + // HTTP: on_dvr_hss_reap_flv |
621 | + SrsConfDirective* on_dvr_hss_reap_flv = _srs_config->get_vhost_on_dvr_hss_reap_flv(_req->vhost); | ||
622 | + if (!on_dvr_hss_reap_flv) { | ||
623 | + srs_info("ignore the empty http callback: on_dvr_hss_reap_flv"); | ||
624 | return ret; | 624 | return ret; |
625 | } | 625 | } |
626 | 626 | ||
627 | - for (int i = 0; i < (int)on_dvr_reap_flv->args.size(); i++) { | ||
628 | - std::string url = on_dvr_reap_flv->args.at(i); | ||
629 | - SrsHttpHooks::on_dvr_reap_flv(url, _req, segment); | 627 | + for (int i = 0; i < (int)on_dvr_hss_reap_flv->args.size(); i++) { |
628 | + std::string url = on_dvr_hss_reap_flv->args.at(i); | ||
629 | + SrsHttpHooks::on_dvr_hss_reap_flv(url, _req, segment); | ||
630 | } | 630 | } |
631 | #endif | 631 | #endif |
632 | 632 | ||
@@ -842,7 +842,7 @@ int SrsDvrHssPlan::on_meta_data(SrsOnMetaDataPacket* metadata) | @@ -842,7 +842,7 @@ int SrsDvrHssPlan::on_meta_data(SrsOnMetaDataPacket* metadata) | ||
842 | } | 842 | } |
843 | 843 | ||
844 | #ifdef SRS_AUTO_HTTP_CALLBACK | 844 | #ifdef SRS_AUTO_HTTP_CALLBACK |
845 | - if ((ret = on_dvr_reap_flv_header(path.str())) != ERROR_SUCCESS) { | 845 | + if ((ret = on_dvr_hss_reap_flv_header(path.str())) != ERROR_SUCCESS) { |
846 | return ret; | 846 | return ret; |
847 | } | 847 | } |
848 | #endif | 848 | #endif |
@@ -882,21 +882,21 @@ int64_t SrsDvrHssPlan::filter_timestamp(int64_t timestamp) | @@ -882,21 +882,21 @@ int64_t SrsDvrHssPlan::filter_timestamp(int64_t timestamp) | ||
882 | return segment->stream_starttime + timestamp; | 882 | return segment->stream_starttime + timestamp; |
883 | } | 883 | } |
884 | 884 | ||
885 | -int SrsDvrHssPlan::on_dvr_reap_flv_header(string path) | 885 | +int SrsDvrHssPlan::on_dvr_hss_reap_flv_header(string path) |
886 | { | 886 | { |
887 | int ret = ERROR_SUCCESS; | 887 | int ret = ERROR_SUCCESS; |
888 | 888 | ||
889 | #ifdef SRS_AUTO_HTTP_CALLBACK | 889 | #ifdef SRS_AUTO_HTTP_CALLBACK |
890 | - // HTTP: on_dvr_reap_flv_header | ||
891 | - SrsConfDirective* on_dvr_reap_flv = _srs_config->get_vhost_on_dvr_reap_flv(_req->vhost); | ||
892 | - if (!on_dvr_reap_flv) { | ||
893 | - srs_info("ignore the empty http callback: on_dvr_reap_flv"); | 890 | + // HTTP: on_dvr_hss_reap_flv_header |
891 | + SrsConfDirective* on_dvr_hss_reap_flv = _srs_config->get_vhost_on_dvr_hss_reap_flv(_req->vhost); | ||
892 | + if (!on_dvr_hss_reap_flv) { | ||
893 | + srs_info("ignore the empty http callback: on_dvr_hss_reap_flv"); | ||
894 | return ret; | 894 | return ret; |
895 | } | 895 | } |
896 | 896 | ||
897 | - for (int i = 0; i < (int)on_dvr_reap_flv->args.size(); i++) { | ||
898 | - std::string url = on_dvr_reap_flv->args.at(i); | ||
899 | - SrsHttpHooks::on_dvr_reap_flv_header(url, _req, path); | 897 | + for (int i = 0; i < (int)on_dvr_hss_reap_flv->args.size(); i++) { |
898 | + std::string url = on_dvr_hss_reap_flv->args.at(i); | ||
899 | + SrsHttpHooks::on_dvr_hss_reap_flv_header(url, _req, path); | ||
900 | } | 900 | } |
901 | #endif | 901 | #endif |
902 | 902 |
@@ -200,7 +200,7 @@ private: | @@ -200,7 +200,7 @@ private: | ||
200 | /** | 200 | /** |
201 | * when srs reap the flv(close the segment), notice the api. | 201 | * when srs reap the flv(close the segment), notice the api. |
202 | */ | 202 | */ |
203 | - virtual int on_dvr_reap_flv(); | 203 | + virtual int on_dvr_hss_reap_flv(); |
204 | public: | 204 | public: |
205 | static SrsDvrPlan* create_plan(std::string vhost); | 205 | static SrsDvrPlan* create_plan(std::string vhost); |
206 | }; | 206 | }; |
@@ -259,7 +259,7 @@ protected: | @@ -259,7 +259,7 @@ protected: | ||
259 | virtual int on_video_keyframe(); | 259 | virtual int on_video_keyframe(); |
260 | virtual int64_t filter_timestamp(int64_t timestamp); | 260 | virtual int64_t filter_timestamp(int64_t timestamp); |
261 | private: | 261 | private: |
262 | - virtual int on_dvr_reap_flv_header(std::string path); | 262 | + virtual int on_dvr_hss_reap_flv_header(std::string path); |
263 | virtual int update_duration(SrsSharedPtrMessage* msg); | 263 | virtual int update_duration(SrsSharedPtrMessage* msg); |
264 | }; | 264 | }; |
265 | 265 |
@@ -459,7 +459,7 @@ void SrsHttpHooks::on_stop(string url, int client_id, string ip, SrsRequest* req | @@ -459,7 +459,7 @@ void SrsHttpHooks::on_stop(string url, int client_id, string ip, SrsRequest* req | ||
459 | return; | 459 | return; |
460 | } | 460 | } |
461 | 461 | ||
462 | -void SrsHttpHooks::on_dvr_reap_flv_header(std::string url, SrsRequest* req, std::string header_file) | 462 | +void SrsHttpHooks::on_dvr_hss_reap_flv_header(std::string url, SrsRequest* req, std::string header_file) |
463 | { | 463 | { |
464 | int ret = ERROR_SUCCESS; | 464 | int ret = ERROR_SUCCESS; |
465 | 465 | ||
@@ -467,14 +467,14 @@ void SrsHttpHooks::on_dvr_reap_flv_header(std::string url, SrsRequest* req, std: | @@ -467,14 +467,14 @@ void SrsHttpHooks::on_dvr_reap_flv_header(std::string url, SrsRequest* req, std: | ||
467 | 467 | ||
468 | SrsHttpUri uri; | 468 | SrsHttpUri uri; |
469 | if ((ret = uri.initialize(url)) != ERROR_SUCCESS) { | 469 | if ((ret = uri.initialize(url)) != ERROR_SUCCESS) { |
470 | - srs_warn("http uri parse on_dvr_reap_flv_header url failed, ignored. " | 470 | + srs_warn("http uri parse on_dvr_hss_reap_flv_header url failed, ignored. " |
471 | "url=%s, ret=%d", url.c_str(), ret); | 471 | "url=%s, ret=%d", url.c_str(), ret); |
472 | return; | 472 | return; |
473 | } | 473 | } |
474 | 474 | ||
475 | std::stringstream ss; | 475 | std::stringstream ss; |
476 | ss << JOBJECT_START | 476 | ss << JOBJECT_START |
477 | - << JFIELD_STR("action", "on_dvr_reap_flv_header") << JFIELD_CONT | 477 | + << JFIELD_STR("action", "on_dvr_hss_reap_flv_header") << JFIELD_CONT |
478 | << JFIELD_STR("vhost", req->vhost) << JFIELD_CONT | 478 | << JFIELD_STR("vhost", req->vhost) << JFIELD_CONT |
479 | << JFIELD_STR("app", req->app) << JFIELD_CONT | 479 | << JFIELD_STR("app", req->app) << JFIELD_CONT |
480 | << JFIELD_STR("stream", req->stream) << JFIELD_CONT | 480 | << JFIELD_STR("stream", req->stream) << JFIELD_CONT |
@@ -488,7 +488,7 @@ void SrsHttpHooks::on_dvr_reap_flv_header(std::string url, SrsRequest* req, std: | @@ -488,7 +488,7 @@ void SrsHttpHooks::on_dvr_reap_flv_header(std::string url, SrsRequest* req, std: | ||
488 | 488 | ||
489 | SrsHttpClient http; | 489 | SrsHttpClient http; |
490 | if ((ret = http.post(&uri, data, res)) != ERROR_SUCCESS) { | 490 | if ((ret = http.post(&uri, data, res)) != ERROR_SUCCESS) { |
491 | - srs_warn("http post on_dvr_reap_flv_header uri failed, ignored. " | 491 | + srs_warn("http post on_dvr_hss_reap_flv_header uri failed, ignored. " |
492 | "url=%s, request=%s, response=%s, ret=%d", | 492 | "url=%s, request=%s, response=%s, ret=%d", |
493 | url.c_str(), data.c_str(), res.c_str(), ret); | 493 | url.c_str(), data.c_str(), res.c_str(), ret); |
494 | return; | 494 | return; |
@@ -496,19 +496,19 @@ void SrsHttpHooks::on_dvr_reap_flv_header(std::string url, SrsRequest* req, std: | @@ -496,19 +496,19 @@ void SrsHttpHooks::on_dvr_reap_flv_header(std::string url, SrsRequest* req, std: | ||
496 | 496 | ||
497 | if (res.empty() || res != SRS_HTTP_RESPONSE_OK) { | 497 | if (res.empty() || res != SRS_HTTP_RESPONSE_OK) { |
498 | ret = ERROR_HTTP_DATA_INVLIAD; | 498 | ret = ERROR_HTTP_DATA_INVLIAD; |
499 | - srs_warn("http hook on_dvr_reap_flv_header validate failed, ignored. " | 499 | + srs_warn("http hook on_dvr_hss_reap_flv_header validate failed, ignored. " |
500 | "res=%s, ret=%d", res.c_str(), ret); | 500 | "res=%s, ret=%d", res.c_str(), ret); |
501 | return; | 501 | return; |
502 | } | 502 | } |
503 | 503 | ||
504 | - srs_info("http hook on_dvr_reap_flv_header success. " | 504 | + srs_info("http hook on_dvr_hss_reap_flv_header success. " |
505 | "url=%s, request=%s, response=%s, ret=%d", | 505 | "url=%s, request=%s, response=%s, ret=%d", |
506 | url.c_str(), data.c_str(), res.c_str(), ret); | 506 | url.c_str(), data.c_str(), res.c_str(), ret); |
507 | 507 | ||
508 | return; | 508 | return; |
509 | } | 509 | } |
510 | 510 | ||
511 | -void SrsHttpHooks::on_dvr_reap_flv(string url, SrsRequest* req, SrsFlvSegment* segment) | 511 | +void SrsHttpHooks::on_dvr_hss_reap_flv(string url, SrsRequest* req, SrsFlvSegment* segment) |
512 | { | 512 | { |
513 | int ret = ERROR_SUCCESS; | 513 | int ret = ERROR_SUCCESS; |
514 | 514 | ||
@@ -520,14 +520,14 @@ void SrsHttpHooks::on_dvr_reap_flv(string url, SrsRequest* req, SrsFlvSegment* s | @@ -520,14 +520,14 @@ void SrsHttpHooks::on_dvr_reap_flv(string url, SrsRequest* req, SrsFlvSegment* s | ||
520 | 520 | ||
521 | SrsHttpUri uri; | 521 | SrsHttpUri uri; |
522 | if ((ret = uri.initialize(url)) != ERROR_SUCCESS) { | 522 | if ((ret = uri.initialize(url)) != ERROR_SUCCESS) { |
523 | - srs_warn("http uri parse on_dvr_reap_flv url failed, ignored. " | 523 | + srs_warn("http uri parse on_dvr_hss_reap_flv url failed, ignored. " |
524 | "url=%s, ret=%d", url.c_str(), ret); | 524 | "url=%s, ret=%d", url.c_str(), ret); |
525 | return; | 525 | return; |
526 | } | 526 | } |
527 | 527 | ||
528 | std::stringstream ss; | 528 | std::stringstream ss; |
529 | ss << JOBJECT_START | 529 | ss << JOBJECT_START |
530 | - << JFIELD_STR("action", "on_dvr_reap_flv") << JFIELD_CONT | 530 | + << JFIELD_STR("action", "on_dvr_hss_reap_flv") << JFIELD_CONT |
531 | << JFIELD_STR("vhost", req->vhost) << JFIELD_CONT | 531 | << JFIELD_STR("vhost", req->vhost) << JFIELD_CONT |
532 | << JFIELD_STR("app", req->app) << JFIELD_CONT | 532 | << JFIELD_STR("app", req->app) << JFIELD_CONT |
533 | << JFIELD_STR("stream", req->stream) << JFIELD_CONT | 533 | << JFIELD_STR("stream", req->stream) << JFIELD_CONT |
@@ -545,7 +545,7 @@ void SrsHttpHooks::on_dvr_reap_flv(string url, SrsRequest* req, SrsFlvSegment* s | @@ -545,7 +545,7 @@ void SrsHttpHooks::on_dvr_reap_flv(string url, SrsRequest* req, SrsFlvSegment* s | ||
545 | 545 | ||
546 | SrsHttpClient http; | 546 | SrsHttpClient http; |
547 | if ((ret = http.post(&uri, data, res)) != ERROR_SUCCESS) { | 547 | if ((ret = http.post(&uri, data, res)) != ERROR_SUCCESS) { |
548 | - srs_warn("http post on_dvr_reap_flv uri failed, ignored. " | 548 | + srs_warn("http post on_dvr_hss_reap_flv uri failed, ignored. " |
549 | "url=%s, request=%s, response=%s, ret=%d", | 549 | "url=%s, request=%s, response=%s, ret=%d", |
550 | url.c_str(), data.c_str(), res.c_str(), ret); | 550 | url.c_str(), data.c_str(), res.c_str(), ret); |
551 | return; | 551 | return; |
@@ -553,12 +553,12 @@ void SrsHttpHooks::on_dvr_reap_flv(string url, SrsRequest* req, SrsFlvSegment* s | @@ -553,12 +553,12 @@ void SrsHttpHooks::on_dvr_reap_flv(string url, SrsRequest* req, SrsFlvSegment* s | ||
553 | 553 | ||
554 | if (res.empty() || res != SRS_HTTP_RESPONSE_OK) { | 554 | if (res.empty() || res != SRS_HTTP_RESPONSE_OK) { |
555 | ret = ERROR_HTTP_DATA_INVLIAD; | 555 | ret = ERROR_HTTP_DATA_INVLIAD; |
556 | - srs_warn("http hook on_dvr_reap_flv validate failed, ignored. " | 556 | + srs_warn("http hook on_dvr_hss_reap_flv validate failed, ignored. " |
557 | "res=%s, ret=%d", res.c_str(), ret); | 557 | "res=%s, ret=%d", res.c_str(), ret); |
558 | return; | 558 | return; |
559 | } | 559 | } |
560 | 560 | ||
561 | - srs_info("http hook on_dvr_reap_flv success. " | 561 | + srs_info("http hook on_dvr_hss_reap_flv success. " |
562 | "url=%s, request=%s, response=%s, ret=%d", | 562 | "url=%s, request=%s, response=%s, ret=%d", |
563 | url.c_str(), data.c_str(), res.c_str(), ret); | 563 | url.c_str(), data.c_str(), res.c_str(), ret); |
564 | 564 |
@@ -124,19 +124,19 @@ public: | @@ -124,19 +124,19 @@ public: | ||
124 | static void on_stop(std::string url, int client_id, std::string ip, SrsRequest* req); | 124 | static void on_stop(std::string url, int client_id, std::string ip, SrsRequest* req); |
125 | public: | 125 | public: |
126 | /** | 126 | /** |
127 | - * on_dvr_reap_flv_header hook, when dvr write flv file header. | 127 | + * on_dvr_hss_reap_flv_header hook, when dvr write flv file header. |
128 | * @param url the api server url, to process the event. | 128 | * @param url the api server url, to process the event. |
129 | * ignore if empty. | 129 | * ignore if empty. |
130 | * @param header_file the flv header file. | 130 | * @param header_file the flv header file. |
131 | */ | 131 | */ |
132 | - static void on_dvr_reap_flv_header(std::string url, SrsRequest* req, std::string header_file); | 132 | + static void on_dvr_hss_reap_flv_header(std::string url, SrsRequest* req, std::string header_file); |
133 | /** | 133 | /** |
134 | - * on_dvr_reap_flv hook, when dvr close flv file. | 134 | + * on_dvr_hss_reap_flv hook, when dvr close flv file. |
135 | * @param url the api server url, to process the event. | 135 | * @param url the api server url, to process the event. |
136 | * ignore if empty. | 136 | * ignore if empty. |
137 | * @param segment the current flv segment. | 137 | * @param segment the current flv segment. |
138 | */ | 138 | */ |
139 | - static void on_dvr_reap_flv(std::string url, SrsRequest* req, SrsFlvSegment* segment); | 139 | + static void on_dvr_hss_reap_flv(std::string url, SrsRequest* req, SrsFlvSegment* segment); |
140 | }; | 140 | }; |
141 | 141 | ||
142 | #endif | 142 | #endif |
-
请 注册 或 登录 后发表评论