Merge branch 'development' into LTS_development
# Conflicts: # src/input/input_buffer.cpp
This commit is contained in:
commit
8eb518606a
5 changed files with 15 additions and 19 deletions
|
@ -653,13 +653,13 @@ namespace IPC {
|
|||
|
||||
///\brief Sets checksum field
|
||||
void statExchange::crc(unsigned int sum) {
|
||||
htobl(data + 186, sum);
|
||||
htobl(data + 168, sum);
|
||||
}
|
||||
|
||||
///\brief Gets checksum field
|
||||
unsigned int statExchange::crc() {
|
||||
unsigned int result;
|
||||
btohl(data + 186, result);
|
||||
btohl(data + 168, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include <semaphore.h>
|
||||
#endif
|
||||
|
||||
#define STAT_EX_SIZE 172
|
||||
#define STAT_EX_SIZE 174
|
||||
#define PLAY_EX_SIZE 2+6*SIMUL_TRACKS
|
||||
|
||||
namespace IPC {
|
||||
|
|
|
@ -167,6 +167,7 @@ namespace Mist {
|
|||
long long unsigned int firstms = 0xFFFFFFFFFFFFFFFFull;
|
||||
long long unsigned int lastms = 0;
|
||||
for (std::map<unsigned int, DTSC::Track>::iterator it = myMeta.tracks.begin(); it != myMeta.tracks.end(); it++){
|
||||
if (it->second.type == "meta" || !it->second.type.size()){continue;}
|
||||
if (it->second.init.size()){
|
||||
if (!initData.count(it->first) || initData[it->first] != it->second.init){
|
||||
initData[it->first] = it->second.init;
|
||||
|
|
|
@ -144,7 +144,7 @@ namespace Mist {
|
|||
/// Assumes streamName class member has been set already.
|
||||
/// Will start input if not currently active, calls onFail() if this does not succeed.
|
||||
/// After assuring stream is online, clears metaPages, then sets metaPages[0], statsPage and userClient to (hopefully) valid handles.
|
||||
/// Finally, calls updateMeta()
|
||||
/// Finally, calls updateMeta() and stats()
|
||||
void Output::reconnect(){
|
||||
if (!Util::startInput(streamName)){
|
||||
DEBUG_MSG(DLVL_FAIL, "Opening stream failed - aborting initalization");
|
||||
|
@ -170,6 +170,7 @@ namespace Mist {
|
|||
char userPageName[NAME_BUFFER_SIZE];
|
||||
snprintf(userPageName, NAME_BUFFER_SIZE, SHM_USERS, streamName.c_str());
|
||||
userClient = IPC::sharedClient(userPageName, PLAY_EX_SIZE, true);
|
||||
stats();
|
||||
updateMeta();
|
||||
}
|
||||
|
||||
|
|
|
@ -75,13 +75,8 @@ namespace Mist {
|
|||
lines.push_back(line.str());
|
||||
}
|
||||
|
||||
//skip the first fragment if live and there are more than 2 fragments.
|
||||
unsigned int skippedLines = 0;
|
||||
if (myMeta.live){
|
||||
if (lines.size() > 2){
|
||||
lines.pop_front();
|
||||
skippedLines++;
|
||||
}
|
||||
//only print the last segment when VoD
|
||||
lines.pop_back();
|
||||
/*LTS-START*/
|
||||
|
@ -149,16 +144,15 @@ namespace Mist {
|
|||
if ( !myMeta.tracks.size()){
|
||||
return 1;
|
||||
}
|
||||
//loop trough all the tracks
|
||||
for (std::map<unsigned int,DTSC::Track>::iterator it = myMeta.tracks.begin(); it != myMeta.tracks.end(); it++){
|
||||
//return "too late" if one track is past this point
|
||||
if (ms < it->second.firstms){
|
||||
return -1;
|
||||
}
|
||||
//return "too early" if one track is not yet at this point
|
||||
if (ms > it->second.lastms){
|
||||
return 1;
|
||||
}
|
||||
//check main track
|
||||
DTSC::Track & mainTrack = myMeta.tracks[*selectedTracks.begin()];
|
||||
//return "too late" if one track is past this point
|
||||
if (ms < mainTrack.firstms){
|
||||
return -1;
|
||||
}
|
||||
//return "too early" if one track is not yet at this point
|
||||
if (ms > mainTrack.lastms){
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue