mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
merge from bravo code, fix some warnings.
This commit is contained in:
parent
44bc7976ac
commit
5d7b0edccc
11 changed files with 80 additions and 26 deletions
|
@ -45,6 +45,7 @@ using namespace std;
|
|||
#include <srs_app_hds.hpp>
|
||||
#include <srs_app_statistic.hpp>
|
||||
#include <srs_core_autofree.hpp>
|
||||
#include <srs_rtmp_utility.hpp>
|
||||
|
||||
#define CONST_MAX_JITTER_MS 500
|
||||
#define DEFAULT_FRAME_TIME_MS 40
|
||||
|
@ -759,6 +760,20 @@ SrsSource* SrsSource::fetch(SrsRequest* r)
|
|||
return source;
|
||||
}
|
||||
|
||||
SrsSource* SrsSource::fetch(std::string vhost, std::string app, std::string stream)
|
||||
{
|
||||
SrsSource* source = NULL;
|
||||
string stream_url = srs_generate_stream_url(vhost, app, stream);
|
||||
|
||||
if (pool.find(stream_url) == pool.end()) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
source = pool[stream_url];
|
||||
|
||||
return source;
|
||||
}
|
||||
|
||||
void SrsSource::destroy()
|
||||
{
|
||||
std::map<std::string, SrsSource*>::iterator it;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue