Several bugfixes (HTTP dynamic seeking!) and updates to the MP4 lib.
This commit is contained in:
parent
a91e53e0bc
commit
521c19f932
8 changed files with 177 additions and 100 deletions
|
@ -1,7 +1,8 @@
|
|||
AM_CPPFLAGS = $(global_CFLAGS) $(MIST_CFLAGS)
|
||||
LDADD = $(MIST_LIBS)
|
||||
bin_PROGRAMS=MistAnalyserRTMP MistAnalyserFLV MistAnalyserDTSC MistAnalyserAMF
|
||||
bin_PROGRAMS=MistAnalyserRTMP MistAnalyserFLV MistAnalyserDTSC MistAnalyserAMF MistAnalyserMP4
|
||||
MistAnalyserRTMP_SOURCES=rtmp_analyser.cpp
|
||||
MistAnalyserFLV_SOURCES=flv_analyser.cpp
|
||||
MistAnalyserDTSC_SOURCES=dtsc_analyser.cpp
|
||||
MistAnalyserAMF_SOURCES=amf_analyser.cpp
|
||||
MistAnalyserMP4_SOURCES=mp4_analyser.cpp
|
||||
|
|
|
@ -13,8 +13,7 @@ int main(int argc, char ** argv){
|
|||
conf.addOption("filename", JSON::fromString("{\"arg_num\":1, \"arg\":\"string\", \"help\":\"Filename of the DTSC file to analyse.\"}"));
|
||||
conf.parseArgs(argc, argv);
|
||||
DTSC::File F(conf.getString("filename"));
|
||||
std::string loader = F.getHeader();
|
||||
JSON::Value meta = JSON::fromDTMI(loader);
|
||||
JSON::Value meta = F.getMeta();
|
||||
std::cout << meta.toPrettyString() << std::endl;
|
||||
JSON::Value pack;
|
||||
|
||||
|
|
29
src/analysers/mp4_analyser.cpp
Normal file
29
src/analysers/mp4_analyser.cpp
Normal file
|
@ -0,0 +1,29 @@
|
|||
/// \file mp4_analyser.cpp
|
||||
/// Debugging tool for MP4 data.
|
||||
/// Expects MP4 data through stdin, outputs human-readable information to stderr.
|
||||
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
#include <mist/mp4.h>
|
||||
#include <mist/config.h>
|
||||
|
||||
/// Debugging tool for MP4 data.
|
||||
/// Expects MP4 data through stdin, outputs human-readable information to stderr.
|
||||
int main(int argc, char ** argv) {
|
||||
Util::Config conf = Util::Config(argv[0], PACKAGE_VERSION);
|
||||
conf.parseArgs(argc, argv);
|
||||
|
||||
std::string temp;
|
||||
while (std::cin.good()){temp += std::cin.get();}//read all of std::cin to temp
|
||||
temp.erase(temp.size()-1, 1);//strip the invalid last character
|
||||
|
||||
MP4::Box mp4data;
|
||||
while (mp4data.read(temp)){
|
||||
std::cerr << mp4data.toPrettyString(0) << std::endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue