Fixes and improvements to generic push-input handling

This commit is contained in:
Thulinma 2017-04-07 15:34:41 +02:00
parent 7b1652498b
commit 5e2b29466b
5 changed files with 6 additions and 4 deletions

View file

@ -1387,6 +1387,7 @@ namespace DTSC {
} }
vod = (packBytePos > 0); vod = (packBytePos > 0);
live = !vod; live = !vod;
EXTREME_MSG("Updating meta with %lld@%lld+%lld", packTrack, packTime, packOffset);
if (packTrack > 0 && tracks.count(packTrack)){ if (packTrack > 0 && tracks.count(packTrack)){
tracks[packTrack].update(packTime, packOffset, packDataSize, packBytePos, isKeyframe, packSendSize, segment_size); tracks[packTrack].update(packTime, packOffset, packDataSize, packBytePos, isKeyframe, packSendSize, segment_size);
} }

View file

@ -213,6 +213,8 @@ namespace h264 {
unsigned int timeScale = bs.get(32); unsigned int timeScale = bs.get(32);
result.fps = (double)timeScale / (2 * unitsInTick); result.fps = (double)timeScale / (2 * unitsInTick);
bs.skip(1); bs.skip(1);
}else{
result.fps = 0;
} }
} }

View file

@ -305,9 +305,7 @@ namespace Mist {
if (myMeta.live){ if (myMeta.live){
//Update the metadata myMeta.update(pack);
DTSC::Packet updatePack(myPage.mapped + curOffset, size + 8, true);
myMeta.update(updatePack);
} }
//End of brain melt //End of brain melt
@ -402,6 +400,7 @@ namespace Mist {
myMeta.live = true; myMeta.live = true;
//Store the trackid for easier access //Store the trackid for easier access
unsigned long tid = packet.getTrackId(); unsigned long tid = packet.getTrackId();
VERYHIGH_MSG("Buffering %s packet on track %lu: %llums, %db", myMeta.tracks[tid].codec.c_str(), tid, packet.getTime(), packet.getPayloadLen());
//Do nothing if the trackid is invalid //Do nothing if the trackid is invalid
if (!tid) { if (!tid) {
WARN_MSG("Packet without trackid!"); WARN_MSG("Packet without trackid!");

View file

@ -198,6 +198,7 @@ namespace Mist{
if (nProxy.userClient.getData()){ if (nProxy.userClient.getData()){
nProxy.userClient.finish(); nProxy.userClient.finish();
} }
nProxy.streamName = streamName;
char userPageName[NAME_BUFFER_SIZE]; char userPageName[NAME_BUFFER_SIZE];
snprintf(userPageName, NAME_BUFFER_SIZE, SHM_USERS, streamName.c_str()); snprintf(userPageName, NAME_BUFFER_SIZE, SHM_USERS, streamName.c_str());
unsigned int attempts = 0; unsigned int attempts = 0;

View file

@ -927,7 +927,6 @@ namespace Mist {
snprintf(userPageName, NAME_BUFFER_SIZE, SHM_USERS, streamName.c_str()); snprintf(userPageName, NAME_BUFFER_SIZE, SHM_USERS, streamName.c_str());
nProxy.userClient = IPC::sharedClient(userPageName, PLAY_EX_SIZE, true); nProxy.userClient = IPC::sharedClient(userPageName, PLAY_EX_SIZE, true);
} }
nProxy.streamName = streamName;
bufferLivePacket(thisPacket); bufferLivePacket(thisPacket);
} }
break; break;