Fixed compile errors.

This commit is contained in:
Thulinma 2014-01-30 13:37:36 +01:00
parent f0b126ee9c
commit b5ff0eb0e4
8 changed files with 6 additions and 69 deletions

View file

@ -162,10 +162,6 @@ converters: MistDTSC2SRT
MistDTSC2SRT: src/converters/dtsc2srt.cpp
$(CXX) $(LDFLAGS) $(CPPFLAGS) $^ $(LDLIBS) -o $@
converters: MistDTSC2MP4
MistDTSC2MP4: src/converters/dtsc2mp4.cpp
$(CXX) $(LDFLAGS) $(CPPFLAGS) $^ $(LDLIBS) -o $@
BUILT_SOURCES=controller/server.html.h connectors/embed.js.h
lspSOURCES=lsp/jquery.js lsp/placeholder.js lsp/md5.js lsp/main.js lsp/pages.js lsp/tablesort.js
lspDATA=lsp/header.html lsp/main.css lsp/footer.html

View file

@ -19,6 +19,7 @@
#include <mist/base64.h>
#include <mist/amf.h>
#include <mist/mp4.h>
#include <mist/mp4_adobe.h>
#include <mist/config.h>
#include <sstream>
#include <mist/stream.h>

View file

@ -17,6 +17,7 @@
#include <mist/json.h>
#include <mist/dtsc.h>
#include <mist/mp4.h>
#include <mist/mp4_generic.h>
#include <mist/config.h>
#include <sstream>
#include <mist/stream.h>

View file

@ -43,7 +43,6 @@ namespace Connector_HTTP {
std::map <long long unsigned int, std::vector<JSON::Value> > DTSCBuffer;
//std::map <long long unsigned int, long long unsigned int> prevGran;
std::vector<unsigned int> curSegTable;
long long int currID = 0;
std::string sendBuffer;
unsigned int lastStats = 0;//Indicates the last time that we have sent stats to the server socket.

View file

@ -21,6 +21,8 @@
#include <mist/base64.h>
#include <mist/amf.h>
#include <mist/mp4.h>
#include <mist/mp4_ms.h>
#include <mist/mp4_generic.h>
#include <mist/config.h>
#include <mist/stream.h>
#include <mist/timing.h>

View file

@ -22,6 +22,7 @@
#include <mist/ts_packet.h> //TS support
#include <mist/dtsc.h> //DTSC support
#include <mist/mp4.h> //For initdata conversion
#include <mist/mp4_generic.h>
///\brief Holds everything unique to the TS Connector
namespace Connector_TS {

View file

@ -1,64 +0,0 @@
/// \file dtsc2mp4.cpp
/// Contains the code that will transform any valid DTSC input into valid MP4s.
#include <iostream>
#include <algorithm>
#include <sstream>
#include <string>
#include <vector>
#include <cstdlib>
#include <cstdio>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <mist/json.h>
#include <mist/dtsc.h> //DTSC support
#include <mist/mp4.h> //MP4 support
#include <mist/config.h>
///\brief Holds everything unique to converters.
namespace Converters {
///\brief Converts DTSC from file to MP4 on stdout.
///\return The return code for the converter.
int DTSC2MP4(Util::Config & conf){
DTSC::File input(conf.getString("filename"));//DTSC input
//DTSC::readOnlyMeta fileMeta = input.getMeta();
DTSC::Meta giveMeta(input.getMeta());
MP4::DTSC2MP4Converter Conv;//DTSC to MP4 converter class will handle header creation and media parsing
std::cout << Conv.DTSCMeta2MP4Header(giveMeta);//Creating and outputting MP4 header from DTSC file
//initialising JSON input
std::set<int> selector;
JSON::Value tmp = input.getMeta().toJSON();
for (JSON::ObjIter trackIt = tmp["tracks"].ObjBegin(); trackIt != tmp["tracks"].ObjEnd(); trackIt++){
selector.insert(trackIt->second["trackid"].asInt());
}
input.selectTracks(selector);
input.seek_time(0);
input.seekNext();
//Parsing rest of file
while (input.getJSON()){//as long as the file goes
Conv.parseDTSC(input.getJSON());//parse 1 file DTSC packet
if(Conv.sendReady()){//if the converter has a part to send out
std::cout << Conv.sendString();//send out and clear Converter buffer
}
input.seekNext();//get next DTSC packet
}
//output remaining buffer
std::cout << Conv.purgeBuffer();
return 0;
} //DTSC2MP4
} //Converter namespace
/// Entry point for DTSC2FLV, simply calls Converters::DTSC2FLV().
int main(int argc, char ** argv){
Util::Config conf = Util::Config(argv[0], PACKAGE_VERSION);
conf.addOption("filename", JSON::fromString("{\"arg_num\":1, \"arg\":\"string\", \"help\":\"Filename of the input file to convert.\"}"));
conf.parseArgs(argc, argv);
return Converters::DTSC2MP4(conf);
} //main

View file

@ -10,6 +10,7 @@
#include <mist/ts_packet.h> //TS support
#include <mist/dtsc.h> //DTSC support
#include <mist/mp4.h> //For initdata conversion
#include <mist/mp4_generic.h> //For initdata conversion
#include <mist/config.h>
///\brief Holds everything unique to converters.