Made HLS and HSS be non-realtime, improved HLS debug messages.

This commit is contained in:
Thulinma 2014-09-25 10:57:41 +02:00
parent dfd914120e
commit 435633180c
2 changed files with 10 additions and 15 deletions

View file

@ -33,9 +33,7 @@ namespace Mist {
result << "/index.m3u8\r\n";
}
}
#if DEBUG >= 8
std::cerr << "Sending this index:" << std::endl << result.str() << std::endl;
#endif
DEBUG_MSG(DLVL_HIGH, "Sending this index: %s", result.str().c_str());
return result.str();
}
@ -88,7 +86,9 @@ namespace Mist {
OutHLS::OutHLS(Socket::Connection & conn) : Output(conn) {
haveAvcc = false;
realTime = 0;
myConn.setHost(config->getString("ip"));
myConn.setBlocking(true);
streamName = config->getString("streamname");
}
@ -194,16 +194,14 @@ namespace Mist {
currentPacket.getString("data", dataPointer, dataLen); //data
if (currentPacket.getTime() >= until){
DEBUG_MSG(DLVL_DEVEL, "(%d) Done sending fragment", getpid() );
stop();
wantRequest = true;
parseData = false;
HTTP_S.Chunkify("", 0, myConn);
HTTP_S.Clean();
return;
}
std::string bs;
//prepare bufferstring
if (myMeta.tracks[currentPacket.getTrackId()].type == "video"){
@ -250,9 +248,6 @@ namespace Mist {
fillPacket(first, 0, 0, AudioCounter);
}
}
}
int OutHLS::canSeekms(unsigned int ms){
@ -276,8 +271,7 @@ namespace Mist {
void OutHLS::onRequest(){
while (HTTP_R.Read(myConn)){
DEBUG_MSG(DLVL_DEVEL, "Received request: %s", HTTP_R.getUrl().c_str());
DEBUG_MSG(DLVL_MEDIUM, "Received request: %s", HTTP_R.getUrl().c_str());
if (HTTP_R.url == "/crossdomain.xml"){
HTTP_S.Clean();
HTTP_S.SetHeader("Content-Type", "text/xml");

View file

@ -45,6 +45,7 @@ std::string toUTF16(std::string original) {
namespace Mist {
OutHSS::OutHSS(Socket::Connection & conn) : Output(conn) {
realTime = 0;
myConn.setHost(config->getString("ip"));
streamName = config->getString("streamname");
}