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
|
@ -99,15 +99,7 @@ void SrsRequest::update_auth(SrsRequest* req)
|
|||
|
||||
string SrsRequest::get_stream_url()
|
||||
{
|
||||
std::string url = "";
|
||||
|
||||
url += vhost;
|
||||
url += "/";
|
||||
url += app;
|
||||
url += "/";
|
||||
url += stream;
|
||||
|
||||
return url;
|
||||
return srs_generate_stream_url(vhost, app, stream);
|
||||
}
|
||||
|
||||
void SrsRequest::strip()
|
||||
|
|
|
@ -31,6 +31,7 @@ using namespace std;
|
|||
#include <srs_kernel_stream.hpp>
|
||||
#include <srs_rtmp_stack.hpp>
|
||||
#include <srs_kernel_codec.hpp>
|
||||
#include <srs_kernel_consts.hpp>
|
||||
|
||||
void srs_discovery_tc_url(
|
||||
string tcUrl,
|
||||
|
@ -346,3 +347,18 @@ int srs_rtmp_create_msg(char type, u_int32_t timestamp, char* data, int size, in
|
|||
return ret;
|
||||
}
|
||||
|
||||
std::string srs_generate_stream_url(std::string vhost, std::string app, std::string stream)
|
||||
{
|
||||
std::string url = "";
|
||||
|
||||
if (SRS_CONSTS_RTMP_DEFAULT_VHOST != vhost){
|
||||
url += vhost;
|
||||
}
|
||||
url += "/";
|
||||
url += app;
|
||||
url += "/";
|
||||
url += stream;
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
|
|
|
@ -120,5 +120,8 @@ extern int srs_chunk_header_c3(
|
|||
*/
|
||||
extern int srs_rtmp_create_msg(char type, u_int32_t timestamp, char* data, int size, int stream_id, SrsSharedPtrMessage** ppmsg);
|
||||
|
||||
// get the stream identify, vhost/app/stream.
|
||||
extern std::string srs_generate_stream_url(std::string vhost, std::string app, std::string stream);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue