mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
merge from srs2.
This commit is contained in:
commit
973194c663
7 changed files with 33 additions and 10 deletions
|
@ -21,4 +21,9 @@ CONTRIBUTORS ordered by first contribution.
|
||||||
* allspace<allspace@gmail.com> "The srs-librtmp windows support"
|
* allspace<allspace@gmail.com> "The srs-librtmp windows support"
|
||||||
* niesongsong<nie950@gmail.com> "Configure support relative path"
|
* niesongsong<nie950@gmail.com> "Configure support relative path"
|
||||||
* rudeb0t<nimrod@themanxgroup.tw> "Bug fixed"
|
* rudeb0t<nimrod@themanxgroup.tw> "Bug fixed"
|
||||||
|
* CallMeNP<np.liamg@gmail.com> "Bug fixed"
|
||||||
|
* synote<synote@qq.com> "Bug fixed"
|
||||||
|
* lovecat<littlefawn@163.com> "Bug fixed"
|
||||||
|
* panda1986<542638787@qq.com> "Bug fixed"
|
||||||
|
* YueHonghui<hongf.yue@hotmail.com> "Bug fixed"
|
||||||
|
|
||||||
|
|
|
@ -3440,7 +3440,7 @@ int SrsConfig::parse_argv(int& i, char** argv)
|
||||||
void SrsConfig::print_help(char** argv)
|
void SrsConfig::print_help(char** argv)
|
||||||
{
|
{
|
||||||
printf(
|
printf(
|
||||||
RTMP_SIG_SRS_NAME" "RTMP_SIG_SRS_VERSION" "RTMP_SIG_SRS_COPYRIGHT"\n"
|
RTMP_SIG_SRS_SERVER" "RTMP_SIG_SRS_COPYRIGHT"\n"
|
||||||
"License: "RTMP_SIG_SRS_LICENSE"\n"
|
"License: "RTMP_SIG_SRS_LICENSE"\n"
|
||||||
"Primary: "RTMP_SIG_SRS_PRIMARY"\n"
|
"Primary: "RTMP_SIG_SRS_PRIMARY"\n"
|
||||||
"Authors: "RTMP_SIG_SRS_AUTHROS"\n"
|
"Authors: "RTMP_SIG_SRS_AUTHROS"\n"
|
||||||
|
|
|
@ -282,7 +282,7 @@ int SrsHttpResponseWriter::send_header(char* data, int size)
|
||||||
|
|
||||||
// set server if not set.
|
// set server if not set.
|
||||||
if (hdr->get("Server").empty()) {
|
if (hdr->get("Server").empty()) {
|
||||||
hdr->set("Server", RTMP_SIG_SRS_KEY"/"RTMP_SIG_SRS_VERSION);
|
hdr->set("Server", RTMP_SIG_SRS_SERVER);
|
||||||
}
|
}
|
||||||
|
|
||||||
// chunked encoding
|
// chunked encoding
|
||||||
|
|
|
@ -33,22 +33,27 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#define VERSION_MINOR 0
|
#define VERSION_MINOR 0
|
||||||
#define VERSION_REVISION 6
|
#define VERSION_REVISION 6
|
||||||
|
|
||||||
// server info.
|
// generated by configure, only macros.
|
||||||
|
#include <srs_auto_headers.hpp>
|
||||||
|
|
||||||
|
// provider info.
|
||||||
#define RTMP_SIG_SRS_KEY "SRS"
|
#define RTMP_SIG_SRS_KEY "SRS"
|
||||||
#define RTMP_SIG_SRS_CODE "OuXuli"
|
#define RTMP_SIG_SRS_CODE "OuXuli"
|
||||||
|
#define RTMP_SIG_SRS_AUTHROS "winlin,wenjie.zhao"
|
||||||
|
// contact info.
|
||||||
|
#define RTMP_SIG_SRS_WEB "http://ossrs.net"
|
||||||
|
#define RTMP_SIG_SRS_EMAIL "winlin@vip.126.com"
|
||||||
|
// debug info.
|
||||||
#define RTMP_SIG_SRS_ROLE "cluster"
|
#define RTMP_SIG_SRS_ROLE "cluster"
|
||||||
#define RTMP_SIG_SRS_NAME RTMP_SIG_SRS_KEY"(Simple RTMP Server)"
|
#define RTMP_SIG_SRS_NAME RTMP_SIG_SRS_KEY"(Simple RTMP Server)"
|
||||||
#define RTMP_SIG_SRS_URL_SHORT "github.com/ossrs/srs"
|
#define RTMP_SIG_SRS_URL_SHORT "github.com/ossrs/srs"
|
||||||
#define RTMP_SIG_SRS_URL "https://"RTMP_SIG_SRS_URL_SHORT
|
#define RTMP_SIG_SRS_URL "https://"RTMP_SIG_SRS_URL_SHORT
|
||||||
#define RTMP_SIG_SRS_WEB "http://ossrs.net"
|
|
||||||
#define RTMP_SIG_SRS_EMAIL "winlin@vip.126.com"
|
|
||||||
#define RTMP_SIG_SRS_LICENSE "The MIT License (MIT)"
|
#define RTMP_SIG_SRS_LICENSE "The MIT License (MIT)"
|
||||||
#define RTMP_SIG_SRS_COPYRIGHT "Copyright (c) 2013-2016 SRS(ossrs)"
|
#define RTMP_SIG_SRS_COPYRIGHT "Copyright (c) 2013-2016 SRS(ossrs)"
|
||||||
#define RTMP_SIG_SRS_PRIMARY "SRS/"VERSION_STABLE_BRANCH
|
#define RTMP_SIG_SRS_PRIMARY "SRS/"VERSION_STABLE_BRANCH
|
||||||
#define RTMP_SIG_SRS_AUTHROS "winlin,wenjie.zhao"
|
|
||||||
#define RTMP_SIG_SRS_CONTRIBUTORS_URL RTMP_SIG_SRS_URL"/blob/master/AUTHORS.txt"
|
#define RTMP_SIG_SRS_CONTRIBUTORS_URL RTMP_SIG_SRS_URL"/blob/master/AUTHORS.txt"
|
||||||
#define RTMP_SIG_SRS_HANDSHAKE RTMP_SIG_SRS_KEY"("RTMP_SIG_SRS_VERSION")"
|
#define RTMP_SIG_SRS_HANDSHAKE RTMP_SIG_SRS_KEY"("RTMP_SIG_SRS_VERSION")"
|
||||||
#define RTMP_SIG_SRS_RELEASE RTMP_SIG_SRS_URL"/tree/1.0release"
|
#define RTMP_SIG_SRS_RELEASE RTMP_SIG_SRS_URL"/tree/"VERSION_STABLE_BRANCH".0release"
|
||||||
#define RTMP_SIG_SRS_ISSUES(id) RTMP_SIG_SRS_URL"/issues/"#id
|
#define RTMP_SIG_SRS_ISSUES(id) RTMP_SIG_SRS_URL"/issues/"#id
|
||||||
#define RTMP_SIG_SRS_VERSION SRS_XSTR(VERSION_MAJOR)"."SRS_XSTR(VERSION_MINOR)"."SRS_XSTR(VERSION_REVISION)
|
#define RTMP_SIG_SRS_VERSION SRS_XSTR(VERSION_MAJOR)"."SRS_XSTR(VERSION_MINOR)"."SRS_XSTR(VERSION_REVISION)
|
||||||
#define RTMP_SIG_SRS_SERVER RTMP_SIG_SRS_KEY"/"RTMP_SIG_SRS_VERSION"("RTMP_SIG_SRS_CODE")"
|
#define RTMP_SIG_SRS_SERVER RTMP_SIG_SRS_KEY"/"RTMP_SIG_SRS_VERSION"("RTMP_SIG_SRS_CODE")"
|
||||||
|
@ -90,8 +95,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
// generated by configure.
|
|
||||||
#include <srs_auto_headers.hpp>
|
|
||||||
// important performance options.
|
// important performance options.
|
||||||
#include <srs_core_performance.hpp>
|
#include <srs_core_performance.hpp>
|
||||||
|
|
||||||
|
|
|
@ -348,6 +348,16 @@ bool srs_string_contains(string str, string flag)
|
||||||
return str.find(flag) != string::npos;
|
return str.find(flag) != string::npos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool srs_string_contains(string str, string flag0, string flag1)
|
||||||
|
{
|
||||||
|
return str.find(flag0) != string::npos || str.find(flag1) != string::npos;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool srs_string_contains(string str, string flag0, string flag1, string flag2)
|
||||||
|
{
|
||||||
|
return str.find(flag0) != string::npos || str.find(flag1) != string::npos || str.find(flag2) != string::npos;
|
||||||
|
}
|
||||||
|
|
||||||
vector<string> srs_string_split(string str, string flag)
|
vector<string> srs_string_split(string str, string flag)
|
||||||
{
|
{
|
||||||
vector<string> arr;
|
vector<string> arr;
|
||||||
|
|
|
@ -88,6 +88,8 @@ extern bool srs_string_starts_with(std::string str, std::string flag0, std::stri
|
||||||
extern bool srs_string_starts_with(std::string str, std::string flag0, std::string flag1, std::string flag2, std::string flag3);
|
extern bool srs_string_starts_with(std::string str, std::string flag0, std::string flag1, std::string flag2, std::string flag3);
|
||||||
// whether string contains with
|
// whether string contains with
|
||||||
extern bool srs_string_contains(std::string str, std::string flag);
|
extern bool srs_string_contains(std::string str, std::string flag);
|
||||||
|
extern bool srs_string_contains(std::string str, std::string flag0, std::string flag1);
|
||||||
|
extern bool srs_string_contains(std::string str, std::string flag0, std::string flag1, std::string flag2);
|
||||||
// find the min match in str for flags.
|
// find the min match in str for flags.
|
||||||
extern std::string srs_string_min_match(std::string str, std::vector<std::string> flags);
|
extern std::string srs_string_min_match(std::string str, std::vector<std::string> flags);
|
||||||
// split the string by flag to array.
|
// split the string by flag to array.
|
||||||
|
|
|
@ -228,6 +228,9 @@ void show_macro_features()
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
int ret = ERROR_SUCCESS;
|
int ret = ERROR_SUCCESS;
|
||||||
|
|
||||||
|
// first hello message.
|
||||||
|
srs_trace(RTMP_SIG_SRS_SERVER);
|
||||||
|
|
||||||
// TODO: support both little and big endian.
|
// TODO: support both little and big endian.
|
||||||
srs_assert(srs_is_little_endian());
|
srs_assert(srs_is_little_endian());
|
||||||
|
@ -266,7 +269,7 @@ int main(int argc, char** argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
// config already applied to log.
|
// config already applied to log.
|
||||||
srs_trace("srs(ossrs) "RTMP_SIG_SRS_VERSION", stable is "RTMP_SIG_SRS_PRIMARY);
|
srs_trace(RTMP_SIG_SRS_SERVER", stable is "RTMP_SIG_SRS_PRIMARY);
|
||||||
srs_trace("license: "RTMP_SIG_SRS_LICENSE", "RTMP_SIG_SRS_COPYRIGHT);
|
srs_trace("license: "RTMP_SIG_SRS_LICENSE", "RTMP_SIG_SRS_COPYRIGHT);
|
||||||
srs_trace("authors: "RTMP_SIG_SRS_AUTHROS);
|
srs_trace("authors: "RTMP_SIG_SRS_AUTHROS);
|
||||||
srs_trace("contributors: "SRS_AUTO_CONSTRIBUTORS);
|
srs_trace("contributors: "SRS_AUTO_CONSTRIBUTORS);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue