mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
merge from srs2. for #513.
This commit is contained in:
parent
f30b3073a2
commit
664844b5f5
16 changed files with 25 additions and 553 deletions
|
@ -737,7 +737,7 @@ ISrsSourceHandler::~ISrsSourceHandler()
|
|||
|
||||
std::map<std::string, SrsSource*> SrsSource::pool;
|
||||
|
||||
int SrsSource::fetch_or_create(SrsRequest* r, ISrsSourceHandler* h, ISrsHlsHandler* hh, SrsSource** pps)
|
||||
int SrsSource::fetch_or_create(SrsRequest* r, ISrsSourceHandler* h, SrsSource** pps)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
|
@ -754,7 +754,7 @@ int SrsSource::fetch_or_create(SrsRequest* r, ISrsSourceHandler* h, ISrsHlsHandl
|
|||
srs_assert (pool.find(stream_url) == pool.end());
|
||||
|
||||
source = new SrsSource();
|
||||
if ((ret = source->initialize(r, h, hh)) != ERROR_SUCCESS) {
|
||||
if ((ret = source->initialize(r, h)) != ERROR_SUCCESS) {
|
||||
srs_freep(source);
|
||||
return ret;
|
||||
}
|
||||
|
@ -1058,12 +1058,11 @@ bool SrsSource::expired()
|
|||
return false;
|
||||
}
|
||||
|
||||
int SrsSource::initialize(SrsRequest* r, ISrsSourceHandler* h, ISrsHlsHandler* hh)
|
||||
int SrsSource::initialize(SrsRequest* r, ISrsSourceHandler* h)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
srs_assert(h);
|
||||
srs_assert(hh);
|
||||
srs_assert(!req);
|
||||
|
||||
handler = h;
|
||||
|
@ -1071,7 +1070,7 @@ int SrsSource::initialize(SrsRequest* r, ISrsSourceHandler* h, ISrsHlsHandler* h
|
|||
atc = _srs_config->get_atc(req->vhost);
|
||||
|
||||
#ifdef SRS_AUTO_HLS
|
||||
if ((ret = hls->initialize(this, hh, req)) != ERROR_SUCCESS) {
|
||||
if ((ret = hls->initialize(this, req)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue