winlin

refine config, remove the const string&

@@ -1570,7 +1570,7 @@ SrsConfDirective* SrsConfig::get_refer_publish(string vhost) @@ -1570,7 +1570,7 @@ SrsConfDirective* SrsConfig::get_refer_publish(string vhost)
1570 return conf->get("refer_publish"); 1570 return conf->get("refer_publish");
1571 } 1571 }
1572 1572
1573 -int SrsConfig::get_chunk_size(const string &vhost) 1573 +int SrsConfig::get_chunk_size(string vhost)
1574 { 1574 {
1575 SrsConfDirective* conf = get_vhost(vhost); 1575 SrsConfDirective* conf = get_vhost(vhost);
1576 1576
@@ -1751,7 +1751,7 @@ SrsConfDirective* SrsConfig::get_vhost_on_dvr_hss_reap_flv(string vhost) @@ -1751,7 +1751,7 @@ SrsConfDirective* SrsConfig::get_vhost_on_dvr_hss_reap_flv(string vhost)
1751 return conf->get("on_dvr_hss_reap_flv"); 1751 return conf->get("on_dvr_hss_reap_flv");
1752 } 1752 }
1753 1753
1754 -bool SrsConfig::get_bw_check_enabled(const string &vhost) 1754 +bool SrsConfig::get_bw_check_enabled(string vhost)
1755 { 1755 {
1756 SrsConfDirective* conf = get_vhost(vhost); 1756 SrsConfDirective* conf = get_vhost(vhost);
1757 1757
@@ -1772,7 +1772,7 @@ bool SrsConfig::get_bw_check_enabled(const string &vhost) @@ -1772,7 +1772,7 @@ bool SrsConfig::get_bw_check_enabled(const string &vhost)
1772 return true; 1772 return true;
1773 } 1773 }
1774 1774
1775 -string SrsConfig::get_bw_check_key(const string &vhost) 1775 +string SrsConfig::get_bw_check_key(string vhost)
1776 { 1776 {
1777 SrsConfDirective* conf = get_vhost(vhost); 1777 SrsConfDirective* conf = get_vhost(vhost);
1778 1778
@@ -1793,7 +1793,7 @@ string SrsConfig::get_bw_check_key(const string &vhost) @@ -1793,7 +1793,7 @@ string SrsConfig::get_bw_check_key(const string &vhost)
1793 return conf->arg0(); 1793 return conf->arg0();
1794 } 1794 }
1795 1795
1796 -int SrsConfig::get_bw_check_interval_ms(const string &vhost) 1796 +int SrsConfig::get_bw_check_interval_ms(string vhost)
1797 { 1797 {
1798 SrsConfDirective* conf = get_vhost(vhost); 1798 SrsConfDirective* conf = get_vhost(vhost);
1799 1799
@@ -1814,7 +1814,7 @@ int SrsConfig::get_bw_check_interval_ms(const string &vhost) @@ -1814,7 +1814,7 @@ int SrsConfig::get_bw_check_interval_ms(const string &vhost)
1814 return ::atof(conf->arg0().c_str()) * 1000; 1814 return ::atof(conf->arg0().c_str()) * 1000;
1815 } 1815 }
1816 1816
1817 -int SrsConfig::get_bw_check_limit_kbps(const string &vhost) 1817 +int SrsConfig::get_bw_check_limit_kbps(string vhost)
1818 { 1818 {
1819 SrsConfDirective* conf = get_vhost(vhost); 1819 SrsConfDirective* conf = get_vhost(vhost);
1820 1820
@@ -457,25 +457,29 @@ public: @@ -457,25 +457,29 @@ public:
457 */ 457 */
458 virtual int get_time_jitter(std::string vhost); 458 virtual int get_time_jitter(std::string vhost);
459 /** 459 /**
460 - * 460 + * get the cache queue length, in seconds.
  461 + * when exceed the queue length, drop packet util I frame.
461 */ 462 */
462 virtual double get_queue_length(std::string vhost); 463 virtual double get_queue_length(std::string vhost);
463 /** 464 /**
464 - * 465 + * get the refer antisuck directive.
  466 + * each args of directive is a refer config.
  467 + * when the client refer(pageUrl) not match the refer config,
  468 + * SRS will reject the connection.
465 */ 469 */
466 virtual SrsConfDirective* get_refer(std::string vhost); 470 virtual SrsConfDirective* get_refer(std::string vhost);
467 /** 471 /**
468 - * 472 + * get the play refer, refer for play clients.
469 */ 473 */
470 virtual SrsConfDirective* get_refer_play(std::string vhost); 474 virtual SrsConfDirective* get_refer_play(std::string vhost);
471 /** 475 /**
472 - * 476 + * get the publish refer, refer for publish clients.
473 */ 477 */
474 virtual SrsConfDirective* get_refer_publish(std::string vhost); 478 virtual SrsConfDirective* get_refer_publish(std::string vhost);
475 /** 479 /**
476 - * 480 + * get the chunk size of vhost.
477 */ 481 */
478 - virtual int get_chunk_size(const std::string& vhost); 482 + virtual int get_chunk_size(std::string vhost);
479 // forward section 483 // forward section
480 public: 484 public:
481 /** 485 /**
@@ -524,19 +528,19 @@ public: @@ -524,19 +528,19 @@ public:
524 /** 528 /**
525 * 529 *
526 */ 530 */
527 - virtual bool get_bw_check_enabled(const std::string& vhost); 531 + virtual bool get_bw_check_enabled(std::string vhost);
528 /** 532 /**
529 * 533 *
530 */ 534 */
531 - virtual std::string get_bw_check_key(const std::string& vhost); 535 + virtual std::string get_bw_check_key(std::string vhost);
532 /** 536 /**
533 * 537 *
534 */ 538 */
535 - virtual int get_bw_check_interval_ms(const std::string& vhost); 539 + virtual int get_bw_check_interval_ms(std::string vhost);
536 /** 540 /**
537 * 541 *
538 */ 542 */
539 - virtual int get_bw_check_limit_kbps(const std::string& vhost); 543 + virtual int get_bw_check_limit_kbps(std::string vhost);
540 // vhost edge section 544 // vhost edge section
541 public: 545 public:
542 /** 546 /**