Merge branch 'development' into LTS_development

# Conflicts:
#	src/controller/controller_statistics.cpp
#	src/input/input_buffer.cpp
#	src/input/input_dtsc.cpp
#	src/input/input_ebml.cpp
#	src/input/input_flv.cpp
#	src/input/input_mp3.cpp
#	src/output/output_httpts.cpp
#	src/output/output_progressive_mp3.cpp
#	src/output/output_progressive_mp4.cpp
This commit is contained in:
Thulinma 2019-01-25 23:57:42 +01:00
commit 9e1539a2b9
32 changed files with 95 additions and 111 deletions

View file

@ -45,7 +45,7 @@ namespace Mist{
option["long"] = "noinput";
option["short"] = "N";
option["help"] = "Do not start input if not already started";
option["value"].append(0ll);
option["value"].append(0);
cfg->addOption("noinput", option);
}

View file

@ -75,7 +75,7 @@ namespace Mist{
capa["codecs"][0u][2u].append("+JSON");
capa["methods"][0u]["handler"] = "http";
capa["methods"][0u]["type"] = "html5/video/webm";
capa["methods"][0u]["priority"] = 11ll;
capa["methods"][0u]["priority"] = 11;
//EBML will only work with VP8/VP9/Opus except on Chrome
JSON::Value blacklistNonChrome = JSON::fromString("[[\"blacklist\"], [\"whitelist\",[\"Chrome\",\"Chromium\"]], [\"blacklist\",[\"Edge\",\"OPR/\"]]]");
capa["exceptions"]["codec:H264"] = blacklistNonChrome;

View file

@ -163,7 +163,7 @@ namespace Mist {
capa["codecs"][0u][1u].append("ULAW");
capa["methods"][0u]["handler"] = "http";
capa["methods"][0u]["type"] = "flash/11";
capa["methods"][0u]["priority"] = 6ll;
capa["methods"][0u]["priority"] = 6;
capa["methods"][0u]["player_url"] = "/flashplayer.swf";
}

View file

@ -363,7 +363,7 @@ namespace Mist {
capa["codecs"][0u][1u].append("MP2");
capa["methods"][0u]["handler"] = "http";
capa["methods"][0u]["type"] = "html5/application/vnd.apple.mpegurl";
capa["methods"][0u]["priority"] = 9ll;
capa["methods"][0u]["priority"] = 9;
//MP3 only works on Edge/Apple
capa["exceptions"]["codec:MP3"] = JSON::fromString("[[\"blacklist\"],[\"whitelist\",[\"iPad\",\"iPhone\",\"iPod\",\"MacIntel\",\"Edge\"]]]");
capa["exceptions"]["codec:HEVC"] = JSON::fromString("[[\"blacklist\"],[\"whitelist\",[\"iPad\",\"iPhone\",\"iPod\",\"MacIntel\"]]]");

View file

@ -63,7 +63,7 @@ namespace Mist {
capa["codecs"][0u][1u].append("AAC");
capa["methods"][0u]["handler"] = "http";
capa["methods"][0u]["type"] = "silverlight";
capa["methods"][0u]["priority"] = 1ll;
capa["methods"][0u]["priority"] = 1;
}
void OutHSS::sendNext() {

View file

@ -231,7 +231,7 @@ namespace Mist {
std::string ua = H.GetVar("sessId");
crc = checksum::crc32(0, ua.data(), ua.size());
}else{
std::string ua = JSON::Value((long long)getpid()).asString();
std::string ua = JSON::Value(getpid()).asString();
crc = checksum::crc32(0, ua.data(), ua.size());
}
}else{
@ -379,7 +379,7 @@ namespace Mist {
int argnum = 0;
argarr[argnum++] = (char*)tmparg.c_str();
std::string temphost=getConnectedHost();
std::string debuglevel = JSON::Value((long long)Util::Config::printDebugLevel).asString();
std::string debuglevel = JSON::Value(Util::Config::printDebugLevel).asString();
argarr[argnum++] = (char*)"--ip";
argarr[argnum++] = (char*)(temphost.c_str());
argarr[argnum++] = (char*)"--stream";

View file

@ -401,9 +401,9 @@ namespace Mist {
}
}
if (json_resp["width"].asInt() < 1 || json_resp["height"].asInt() < 1){
json_resp["width"] = 640ll;
json_resp["height"] = 480ll;
if (!hasVideo){json_resp["height"] = 20ll;}
json_resp["width"] = 640;
json_resp["height"] = 480;
if (!hasVideo){json_resp["height"] = 20;}
}
if (myMeta.vod){
json_resp["type"] = "vod";
@ -596,7 +596,7 @@ namespace Mist {
if (!myConn){return;}
for (std::map<unsigned int, DTSC::Track>::iterator trit = myMeta.tracks.begin(); trit != myMeta.tracks.end(); trit++){
if (trit->second.type == "video"){
trackSources += " <video src='"+ streamName + "?track=" + JSON::Value((long long)trit->first).asString() + "' height='" + JSON::Value((long long)trit->second.height).asString() + "' system-bitrate='" + JSON::Value((long long)trit->second.bps).asString() + "' width='" + JSON::Value((long long)trit->second.width).asString() + "' />\n";
trackSources += " <video src='"+ streamName + "?track=" + JSON::Value(trit->first).asString() + "' height='" + JSON::Value(trit->second.height).asString() + "' system-bitrate='" + JSON::Value(trit->second.bps).asString() + "' width='" + JSON::Value(trit->second.width).asString() + "' />\n";
}
}
}

View file

@ -71,14 +71,14 @@ namespace Mist{
capa["codecs"][0u][1u].append("MP2");
capa["methods"][0u]["handler"] = "http";
capa["methods"][0u]["type"] = "html5/video/mpeg";
capa["methods"][0u]["priority"] = 1ll;
capa["methods"][0u]["priority"] = 1;
capa["push_urls"].append("/*.ts");
capa["push_urls"].append("ts-exec:*");
JSON::Value opt;
opt["arg"] = "string";
opt["default"] = "";
opt["arg_num"] = 1ll;
opt["arg_num"] = 1;
opt["help"] = "Target filename to store TS file as, or - for stdout.";
cfg->addOption("target", opt);
}

View file

@ -20,11 +20,11 @@ namespace Mist {
capa["codecs"][0u][0u].append("@+meta");
capa["methods"][0u]["handler"] = "http";
capa["methods"][0u]["type"] = "html5/text/javascript";
capa["methods"][0u]["priority"] = 0ll;
capa["methods"][0u]["priority"] = 0;
capa["methods"][0u]["url_rel"] = "/$.json";
capa["methods"][1u]["handler"] = "ws";
capa["methods"][1u]["type"] = "html5/text/javascript";
capa["methods"][1u]["priority"] = 0ll;
capa["methods"][1u]["priority"] = 0;
capa["methods"][1u]["url_rel"] = "/$.json";
}
@ -41,8 +41,8 @@ namespace Mist {
size_t dLen;
thisPacket.getString("data", dPtr, dLen);
jPack["data"] = JSON::fromString(dPtr, dLen);
jPack["time"] = (long long)thisPacket.getTime();
jPack["track"] = (long long)thisPacket.getTrackId();
jPack["time"] = thisPacket.getTime();
jPack["track"] = (uint64_t)thisPacket.getTrackId();
}else{
jPack = thisPacket.toJSON();
}

View file

@ -27,7 +27,7 @@ namespace Mist {
capa["codecs"][0u][1u].append("ULAW");
capa["methods"][0u]["handler"] = "http";
capa["methods"][0u]["type"] = "flash/7";
capa["methods"][0u]["priority"] = 5ll;
capa["methods"][0u]["priority"] = 5;
capa["methods"][0u]["player_url"] = "/oldflashplayer.swf";
capa["push_urls"].append("/*.flv");

View file

@ -13,12 +13,12 @@ namespace Mist {
capa["codecs"][0u][0u].append("MP3");
capa["methods"][0u]["handler"] = "http";
capa["methods"][0u]["type"] = "html5/audio/mp3";
capa["methods"][0u]["priority"] = 8ll;
capa["methods"][0u]["priority"] = 8;
JSON::Value opt;
opt["arg"] = "string";
opt["default"] = "";
opt["arg_num"] = 1ll;
opt["arg_num"] = 1;
opt["help"] = "Target filename to store MP3 file as, or - for stdout.";
cfg->addOption("target", opt);
}

View file

@ -29,7 +29,7 @@ namespace Mist{
capa["codecs"][0u][1u].append("AC3");
capa["methods"][0u]["handler"] = "http";
capa["methods"][0u]["type"] = "html5/video/mp4";
capa["methods"][0u]["priority"] = 10ll;
capa["methods"][0u]["priority"] = 10;
//MP4 live is broken on Apple
capa["exceptions"]["live"] = JSON::fromString("[[\"blacklist\",[\"iPad\",\"iPhone\",\"iPod\",\"Safari\"]], [\"whitelist\",[\"Chrome\",\"Chromium\"]]]");
}

View file

@ -23,7 +23,7 @@ namespace Mist {
capa["codecs"][0u][1u].append("opus");
capa["methods"][0u]["handler"] = "http";
capa["methods"][0u]["type"] = "html5/video/ogg";
capa["methods"][0u]["priority"] = 8ll;
capa["methods"][0u]["priority"] = 8;
capa["methods"][0u]["nolive"] = 1;
}

View file

@ -194,7 +194,7 @@ namespace Mist{
capa["codecs"][0u][1u].append("ULAW");
capa["methods"][0u]["handler"] = "rtmp";
capa["methods"][0u]["type"] = "flash/10";
capa["methods"][0u]["priority"] = 7ll;
capa["methods"][0u]["priority"] = 7;
capa["methods"][0u]["player_url"] = "/flashplayer.swf";
capa["optional"]["acceptable"]["name"] = "Acceptable connection types";
capa["optional"]["acceptable"]["help"] = "Whether to allow only incoming pushes (2), only outgoing pulls (1), or both (0, default)";

View file

@ -18,11 +18,11 @@ namespace Mist {
capa["codecs"][0u][0u].append("subtitle");
capa["methods"][0u]["handler"] = "http";
capa["methods"][0u]["type"] = "html5/text/plain";
capa["methods"][0u]["priority"] = 8ll;
capa["methods"][0u]["priority"] = 8;
capa["methods"][0u]["url_rel"] = "/$.srt";
capa["methods"][1u]["handler"] = "http";
capa["methods"][1u]["type"] = "html5/text/vtt";
capa["methods"][1u]["priority"] = 9ll;
capa["methods"][1u]["priority"] = 9;
capa["methods"][1u]["url_rel"] = "/$.vtt";
}