This commit is contained in:
parent
48bbb8afdb
commit
3af3a8d41d
2 changed files with 2 additions and 34 deletions
|
@ -1,10 +1,9 @@
|
||||||
AM_CPPFLAGS = $(global_CFLAGS) $(MIST_CFLAGS)
|
AM_CPPFLAGS = $(global_CFLAGS) $(MIST_CFLAGS)
|
||||||
LDADD = $(MIST_LIBS)
|
LDADD = $(MIST_LIBS)
|
||||||
bin_PROGRAMS=MistAnalyserRTMP MistAnalyserFLV MistAnalyserDTSC MistAnalyserAMF MistAnalyserMP4 MistAnalyserTS
|
bin_PROGRAMS=MistAnalyserRTMP MistAnalyserFLV MistAnalyserDTSC MistAnalyserAMF MistAnalyserMP4
|
||||||
MistAnalyserRTMP_SOURCES=rtmp_analyser.cpp
|
MistAnalyserRTMP_SOURCES=rtmp_analyser.cpp
|
||||||
MistAnalyserFLV_SOURCES=flv_analyser.cpp
|
MistAnalyserFLV_SOURCES=flv_analyser.cpp
|
||||||
MistAnalyserDTSC_SOURCES=dtsc_analyser.cpp
|
MistAnalyserDTSC_SOURCES=dtsc_analyser.cpp
|
||||||
MistAnalyserAMF_SOURCES=amf_analyser.cpp
|
MistAnalyserAMF_SOURCES=amf_analyser.cpp
|
||||||
MistAnalyserMP4_SOURCES=mp4_analyser.cpp
|
MistAnalyserMP4_SOURCES=mp4_analyser.cpp
|
||||||
MistAnalyserTS_SOURCES=ts_analyser.cpp
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#define DEBUG 5
|
|
||||||
/// \file conn_http_dynamic.cpp
|
/// \file conn_http_dynamic.cpp
|
||||||
/// Contains the main code for the HTTP Dynamic Connector
|
/// Contains the main code for the HTTP Dynamic Connector
|
||||||
|
|
||||||
|
@ -160,23 +159,9 @@ namespace Connector_HTTP {
|
||||||
Segment = atoi(HTTP_R.url.substr(temp, HTTP_R.url.find("_", temp) - temp).c_str());
|
Segment = atoi(HTTP_R.url.substr(temp, HTTP_R.url.find("_", temp) - temp).c_str());
|
||||||
temp = HTTP_R.url.find("_", temp) + 1;
|
temp = HTTP_R.url.find("_", temp) + 1;
|
||||||
int frameCount = atoi(HTTP_R.url.substr(temp, HTTP_R.url.find(".ts", temp) - temp).c_str());
|
int frameCount = atoi(HTTP_R.url.substr(temp, HTTP_R.url.find(".ts", temp) - temp).c_str());
|
||||||
//if( !fragIndices.size() ) {
|
|
||||||
//fragIndices = keyframesToFragments( Strm.metadata );
|
|
||||||
//}
|
|
||||||
|
|
||||||
#if DEBUG >= 4
|
|
||||||
fprintf(stderr, "Fragment number %d\n", Segment);
|
|
||||||
//fprintf( stderr, "Fragment indices %d\n", fragIndices.size() );
|
|
||||||
//fprintf( stderr, "Seeking to fragment %d\n", fragIndices[Segment-1] + 1 );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
std::stringstream sstream;
|
std::stringstream sstream;
|
||||||
sstream << "f " << Segment + 1 + frameCount << "\n";
|
|
||||||
sstream << "f " << Segment + 1 << "\n";
|
sstream << "f " << Segment + 1 << "\n";
|
||||||
|
|
||||||
#if DEBUG >= 4
|
|
||||||
fprintf(stderr, "Frame count %d\n", frameCount);
|
|
||||||
#endif
|
|
||||||
for (int i = 0; i < frameCount; i++){
|
for (int i = 0; i < frameCount; i++){
|
||||||
sstream << "o \n";
|
sstream << "o \n";
|
||||||
}
|
}
|
||||||
|
@ -293,7 +278,6 @@ namespace Connector_HTTP {
|
||||||
conn.SendNow(TSBuf.str().c_str(), TSBuf.str().size());
|
conn.SendNow(TSBuf.str().c_str(), TSBuf.str().size());
|
||||||
TSBuf.str("");
|
TSBuf.str("");
|
||||||
Flash_RequestPending--;
|
Flash_RequestPending--;
|
||||||
fprintf(stderr, "Sent %d packets\n", PacketNumber);
|
|
||||||
PacketNumber = 0;
|
PacketNumber = 0;
|
||||||
#if DEBUG >= 3
|
#if DEBUG >= 3
|
||||||
fprintf(stderr, "Done\n");
|
fprintf(stderr, "Done\n");
|
||||||
|
@ -309,7 +293,6 @@ namespace Connector_HTTP {
|
||||||
if (Strm.lastType() == DTSC::VIDEO){
|
if (Strm.lastType() == DTSC::VIDEO){
|
||||||
DTMIData = Strm.lastData();
|
DTMIData = Strm.lastData();
|
||||||
if (Strm.getPacket(0).isMember("keyframe")){
|
if (Strm.getPacket(0).isMember("keyframe")){
|
||||||
fprintf(stderr, " Received Keyframe of size %d\n", Strm.lastData().size());
|
|
||||||
IsKeyFrame = true;
|
IsKeyFrame = true;
|
||||||
FirstIDRInKeyFrame = true;
|
FirstIDRInKeyFrame = true;
|
||||||
}else{
|
}else{
|
||||||
|
@ -330,22 +313,8 @@ namespace Connector_HTTP {
|
||||||
ToPack += avccbox.asAnnexB();
|
ToPack += avccbox.asAnnexB();
|
||||||
FirstPic = false;
|
FirstPic = false;
|
||||||
}
|
}
|
||||||
if (IsKeyFrame){
|
|
||||||
//if( !FirstKeyFrame && FirstIDRInKeyFrame ) {
|
|
||||||
// ToPack += (char)0x00;
|
|
||||||
// FirstIDRInKeyFrame = false;
|
|
||||||
//}
|
|
||||||
ToPack.append(TS::NalHeader, 4);
|
|
||||||
}
|
|
||||||
}else if (TSType == 0x01){
|
|
||||||
if (FirstPic){
|
|
||||||
//ToPack += (char)0x00;
|
|
||||||
FirstPic = false;
|
|
||||||
}
|
}
|
||||||
ToPack.append(TS::NalHeader, 4);
|
ToPack.append(TS::NalHeader, 4);
|
||||||
}else{
|
|
||||||
ToPack.append(TS::NalHeader, 4);
|
|
||||||
}
|
|
||||||
ToPack.append(DTMIData, 0, ThisNaluSize);
|
ToPack.append(DTMIData, 0, ThisNaluSize);
|
||||||
DTMIData.erase(0, ThisNaluSize);
|
DTMIData.erase(0, ThisNaluSize);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue