Merge branch 'development' into LTS_development
This commit is contained in:
commit
7f6b919e4f
11 changed files with 211 additions and 228 deletions
|
@ -556,6 +556,7 @@ namespace Mist {
|
|||
nProxy.curPage[trackId].init(id, DEFAULT_DATA_PAGE_SIZE);
|
||||
if (!(nProxy.curPage[trackId].mapped)){
|
||||
FAIL_MSG("Initializing page %s failed", nProxy.curPage[trackId].name.c_str());
|
||||
currKeyOpen.erase(trackId);
|
||||
return;
|
||||
}
|
||||
currKeyOpen[trackId] = pageNum;
|
||||
|
@ -978,7 +979,7 @@ namespace Mist {
|
|||
}
|
||||
//if this is a live stream, we might have just reached the live point.
|
||||
//check where the next key is
|
||||
nxtKeyNum[nxt.tid] = getKeyForTime(nxt.tid, thisPacket.getTime());
|
||||
nxtKeyNum[nxt.tid] = getKeyForTime(nxt.tid, nxt.time);
|
||||
int nextPage = pageNumForKey(nxt.tid, nxtKeyNum[nxt.tid]+1);
|
||||
//if the next key hasn't shown up on another page, then we're waiting.
|
||||
//VoD might be slow, so we check VoD case also, just in case
|
||||
|
|
|
@ -426,7 +426,11 @@ namespace Mist {
|
|||
data_len += dheader_len;
|
||||
|
||||
unsigned int timestamp = thisPacket.getTime() - rtmpOffset;
|
||||
if (rtmpOffset > thisPacket.getTime()){timestamp = 0;}//make sure we don't go negative
|
||||
//make sure we don't go negative
|
||||
if (rtmpOffset > thisPacket.getTime()){
|
||||
timestamp = 0;
|
||||
rtmpOffset = thisPacket.getTime();
|
||||
}
|
||||
|
||||
bool allow_short = RTMPStream::lastsend.count(4);
|
||||
RTMPStream::Chunk & prev = RTMPStream::lastsend[4];
|
||||
|
@ -1153,16 +1157,18 @@ namespace Mist {
|
|||
}else{
|
||||
amf_storage = &(pushMeta.begin()->second);
|
||||
}
|
||||
JSON::Value pack_out = F.toJSON(myMeta, *amf_storage, next.cs_id*3 + (F.data[0] == 0x09 ? 0 : (F.data[0] == 0x08 ? 1 : 2) ));
|
||||
if ( !pack_out.isNull()){
|
||||
|
||||
unsigned int reTrack = next.cs_id*3 + (F.data[0] == 0x09 ? 1 : (F.data[0] == 0x08 ? 2 : 3));
|
||||
F.toMeta(myMeta, *amf_storage, reTrack);
|
||||
if (F.getDataLen() && !(F.needsInitData() && F.isInitData())){
|
||||
thisPacket.genericFill(F.tagTime(), F.offset(), reTrack, F.getData(), F.getDataLen(), 0, F.isKeyframe);
|
||||
if (!nProxy.userClient.getData()){
|
||||
char userPageName[NAME_BUFFER_SIZE];
|
||||
snprintf(userPageName, NAME_BUFFER_SIZE, SHM_USERS, streamName.c_str());
|
||||
nProxy.userClient = IPC::sharedClient(userPageName, PLAY_EX_SIZE, true);
|
||||
}
|
||||
continueNegotiate(pack_out["trackid"].asInt());
|
||||
nProxy.streamName = streamName;
|
||||
bufferLivePacket(pack_out);
|
||||
bufferLivePacket(thisPacket);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue