Merge branch 'development' into LTS_development
# Conflicts: # src/output/output_hss.cpp
This commit is contained in:
commit
bf1e2c8083
3 changed files with 24 additions and 1 deletions
|
@ -218,7 +218,7 @@ namespace Mist {
|
||||||
size_t curOffset = pagesByTrack[tid][curPageNum[tid]].curOffset;
|
size_t curOffset = pagesByTrack[tid][curPageNum[tid]].curOffset;
|
||||||
//Do nothing when there is not enough free space on the page to add the packet.
|
//Do nothing when there is not enough free space on the page to add the packet.
|
||||||
if (pagesByTrack[tid][curPageNum[tid]].dataSize - curOffset < pack.getDataLen()) {
|
if (pagesByTrack[tid][curPageNum[tid]].dataSize - curOffset < pack.getDataLen()) {
|
||||||
INFO_MSG("Trying to buffer a packet on page %lu for track %lu~>%lu, but we have a size mismatch", curPageNum[tid], tid, mapTid);
|
FAIL_MSG("Trying to buffer a packet on page %lu for track %lu~>%lu, but we have a size mismatch. The packet is %lu bytes long, so won't fit at offset %lu on a page of %lu bytes!", curPageNum[tid], tid, mapTid, pack.getDataLen(), curOffset, pagesByTrack[tid][curPageNum[tid]].dataSize);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -175,6 +175,17 @@ namespace Mist {
|
||||||
return;
|
return;
|
||||||
} //crossdomain.xml
|
} //crossdomain.xml
|
||||||
|
|
||||||
|
if (H.method == "OPTIONS"){
|
||||||
|
H.Clean();
|
||||||
|
H.SetHeader("Content-Type", "application/octet-stream");
|
||||||
|
H.SetHeader("Cache-Control", "no-cache");
|
||||||
|
H.setCORSHeaders();
|
||||||
|
H.SetBody("");
|
||||||
|
H.SendResponse("200", "OK", myConn);
|
||||||
|
H.Clean();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (H.url.find("hls") == std::string::npos){
|
if (H.url.find("hls") == std::string::npos){
|
||||||
myConn.close();
|
myConn.close();
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -313,6 +313,7 @@ namespace Mist {
|
||||||
|
|
||||||
H.Clean();
|
H.Clean();
|
||||||
H.SetHeader("Content-Type", "video/mp4");
|
H.SetHeader("Content-Type", "video/mp4");
|
||||||
|
H.setCORSHeaders();
|
||||||
H.StartResponse(H, myConn);
|
H.StartResponse(H, myConn);
|
||||||
H.Chunkify(moof_box.asBox(), moof_box.boxedSize(), myConn);
|
H.Chunkify(moof_box.asBox(), moof_box.boxedSize(), myConn);
|
||||||
int size = htonl(keySize + 8);
|
int size = htonl(keySize + 8);
|
||||||
|
@ -505,12 +506,23 @@ namespace Mist {
|
||||||
|
|
||||||
|
|
||||||
void OutHSS::onHTTP() {
|
void OutHSS::onHTTP() {
|
||||||
|
if (H.method == "OPTIONS"){
|
||||||
|
H.Clean();
|
||||||
|
H.SetHeader("Content-Type", "application/octet-stream");
|
||||||
|
H.SetHeader("Cache-Control", "no-cache");
|
||||||
|
H.setCORSHeaders();
|
||||||
|
H.SetBody("");
|
||||||
|
H.SendResponse("200", "OK", myConn);
|
||||||
|
H.Clean();
|
||||||
|
return;
|
||||||
|
}
|
||||||
initialize();
|
initialize();
|
||||||
if (H.url.find("Manifest") != std::string::npos) {
|
if (H.url.find("Manifest") != std::string::npos) {
|
||||||
//Manifest, direct reply
|
//Manifest, direct reply
|
||||||
H.Clean();
|
H.Clean();
|
||||||
H.SetHeader("Content-Type", "text/xml");
|
H.SetHeader("Content-Type", "text/xml");
|
||||||
H.SetHeader("Cache-Control", "no-cache");
|
H.SetHeader("Cache-Control", "no-cache");
|
||||||
|
H.setCORSHeaders();
|
||||||
/*LTS
|
/*LTS
|
||||||
std::string manifest = smoothIndex();
|
std::string manifest = smoothIndex();
|
||||||
LTS*/
|
LTS*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue