Merge branch 'development' into LTS_development
# Conflicts: # lib/stream.cpp
This commit is contained in:
commit
0e1a18986a
6 changed files with 358 additions and 250 deletions
|
@ -571,13 +571,16 @@ namespace Mist {
|
|||
}
|
||||
}
|
||||
updateMeta();
|
||||
if (streamStatus){streamStatus.mapped[0] = hasPush ? STRMSTAT_READY : STRMSTAT_WAIT;}
|
||||
if (config->is_active){
|
||||
if (streamStatus){streamStatus.mapped[0] = hasPush ? STRMSTAT_READY : STRMSTAT_WAIT;}
|
||||
}
|
||||
static bool everHadPush = false;
|
||||
if (hasPush) {
|
||||
hasPush = false;
|
||||
everHadPush = true;
|
||||
} else if (everHadPush && !resumeMode && config->is_active) {
|
||||
INFO_MSG("Shutting down buffer because resume mode is disabled and the source disconnected");
|
||||
if (streamStatus){streamStatus.mapped[0] = STRMSTAT_SHUTDOWN;}
|
||||
config->is_active = false;
|
||||
userPage.finishEach();
|
||||
}
|
||||
|
@ -818,6 +821,8 @@ namespace Mist {
|
|||
if (!myMeta.tracks.count(finalMap)) {
|
||||
DEBUG_MSG(DLVL_MEDIUM, "Inserting metadata for track number %d", finalMap);
|
||||
myMeta.tracks[finalMap] = trackMeta.tracks.begin()->second;
|
||||
myMeta.tracks[finalMap].firstms = 0;
|
||||
myMeta.tracks[finalMap].lastms = 0;
|
||||
myMeta.tracks[finalMap].trackID = finalMap;
|
||||
}
|
||||
//Write the final mapped track number and keyframe number to the user page element
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <mist/defines.h>
|
||||
#include <mist/http_parser.h>
|
||||
#include <mist/timing.h>
|
||||
#include <mist/util.h>
|
||||
#include "output.h"
|
||||
|
||||
/*LTS-START*/
|
||||
|
@ -553,7 +554,7 @@ namespace Mist{
|
|||
VERYHIGH_MSG("Loading track %lu, containing key %lld", trackId, keyNum);
|
||||
unsigned int timeout = 0;
|
||||
unsigned long pageNum = pageNumForKey(trackId, keyNum);
|
||||
while (pageNum == -1){
|
||||
while (config->is_active && myConn && pageNum == -1){
|
||||
if (!timeout){
|
||||
HIGH_MSG("Requesting page with key %lu:%lld", trackId, keyNum);
|
||||
}
|
||||
|
@ -1274,6 +1275,10 @@ namespace Mist{
|
|||
bool Output::connectToFile(std::string file){
|
||||
int flags = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
|
||||
int mode = O_RDWR | O_CREAT | O_TRUNC;
|
||||
if (!Util::createPathFor(file)){
|
||||
ERROR_MSG("Cannot not create file %s: could not create parent folder", file.c_str());
|
||||
return false;
|
||||
}
|
||||
int outFile = open(file.c_str(), mode, flags);
|
||||
if (outFile < 0){
|
||||
ERROR_MSG("Failed to open file %s, error: %s", file.c_str(), strerror(errno));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue