Merge branch 'development' into LTS_development
# Conflicts: # src/input/input_buffer.cpp
This commit is contained in:
commit
53febd82d1
10 changed files with 91 additions and 36 deletions
|
@ -683,10 +683,11 @@ namespace Mist {
|
|||
VERYHIGH_MSG("Updating meta for track %d", tNum);
|
||||
//Store a reference for easier access
|
||||
std::map<unsigned long, DTSCPageData> & locations = bufferLocations[tNum];
|
||||
char * mappedPointer = metaPages[tNum].mapped;
|
||||
|
||||
//First detect all entries on metaPage
|
||||
for (int i = 0; i < 8192; i += 8){
|
||||
int * tmpOffset = (int *)(metaPages[tNum].mapped + i);
|
||||
for (int i = 0; i < 8192; i += 8) {
|
||||
int * tmpOffset = (int *)(mappedPointer + i);
|
||||
if (tmpOffset[0] == 0 && tmpOffset[1] == 0){
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -139,6 +139,14 @@ namespace Mist {
|
|||
}
|
||||
/*LTS-END*/
|
||||
}
|
||||
|
||||
std::string Output::getConnectedHost(){
|
||||
return myConn.getHost();
|
||||
}
|
||||
|
||||
std::string Output::getConnectedBinHost(){
|
||||
return myConn.getBinHost();
|
||||
}
|
||||
|
||||
/// Connects or reconnects to the stream.
|
||||
/// Assumes streamName class member has been set already.
|
||||
|
@ -1002,7 +1010,7 @@ namespace Mist {
|
|||
IPC::statExchange tmpEx(statsPage.getData());
|
||||
tmpEx.now(now);
|
||||
if (setHost){
|
||||
tmpEx.host(myConn.getBinHost());
|
||||
tmpEx.host(getConnectedBinHost());
|
||||
setHost = false;
|
||||
}
|
||||
tmpEx.crc(crc);
|
||||
|
|
|
@ -95,6 +95,11 @@ namespace Mist {
|
|||
bool sought;///<If a seek has been done, this is set to true. Used for seeking on prepareNext().
|
||||
bool completeKeyReadyTimeOut;//a bool to see if there has been a keyframe TimeOut for complete keys in Live
|
||||
protected://these are to be messed with by child classes
|
||||
|
||||
virtual std::string getConnectedHost();
|
||||
virtual std::string getConnectedBinHost();
|
||||
|
||||
|
||||
IPC::sharedClient statsPage;///< Shared memory used for statistics reporting.
|
||||
bool isBlocking;///< If true, indicates that myConn is blocking.
|
||||
unsigned int crc;///< Checksum, if any, for usage in the stats.
|
||||
|
|
|
@ -308,7 +308,7 @@ namespace Mist {
|
|||
DEBUG_MSG(DLVL_HIGH, "Connector found: %s", connector.c_str());
|
||||
//build arguments for starting output process
|
||||
|
||||
std::string temphost=myConn.getHost();
|
||||
std::string temphost=getConnectedHost();
|
||||
std::string debuglevel = JSON::Value((long long)Util::Config::printDebugLevel).asString();
|
||||
std::string tmparg = Util::getMyPath() + std::string("MistOut") + connector;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
namespace Mist {
|
||||
OutHTTP::OutHTTP(Socket::Connection & conn) : HTTPOutput(conn){
|
||||
if (myConn.getPureSocket() >= 0){
|
||||
std::string host = myConn.getHost();
|
||||
std::string host = getConnectedHost();
|
||||
dup2(myConn.getSocket(), STDIN_FILENO);
|
||||
dup2(myConn.getSocket(), STDOUT_FILENO);
|
||||
myConn.drop();
|
||||
|
@ -15,6 +15,7 @@ namespace Mist {
|
|||
myConn.setHost(host);
|
||||
}
|
||||
}
|
||||
|
||||
OutHTTP::~OutHTTP() {}
|
||||
|
||||
bool OutHTTP::listenMode(){
|
||||
|
|
|
@ -563,13 +563,13 @@ namespace Mist {
|
|||
/*LTS-END*/
|
||||
if (IP != ""){
|
||||
if (!myConn.isAddress(IP)){
|
||||
DEBUG_MSG(DLVL_FAIL, "Push from %s to %s rejected - source host not whitelisted", myConn.getHost().c_str(), streamName.c_str());
|
||||
DEBUG_MSG(DLVL_FAIL, "Push from %s to %s rejected - source host not whitelisted", getConnectedHost().c_str(), streamName.c_str());
|
||||
myConn.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
DEBUG_MSG(DLVL_FAIL, "Push from %s rejected - stream '%s' not configured.", myConn.getHost().c_str(), streamName.c_str());
|
||||
DEBUG_MSG(DLVL_FAIL, "Push from %s rejected - stream '%s' not configured.", getConnectedHost().c_str(), streamName.c_str());
|
||||
myConn.close();
|
||||
}
|
||||
configLock.post();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue