diff --git a/src/analysers/ogg_analyser.cpp b/src/analysers/ogg_analyser.cpp index eb0d04d0..e035566d 100644 --- a/src/analysers/ogg_analyser.cpp +++ b/src/analysers/ogg_analyser.cpp @@ -1,13 +1,17 @@ #include +#include #include #include #include +#include #include #include #include +#include namespace Analysers{ int analyseOGG(){ + std::map sn2Codec; std::string oggBuffer; OGG::Page oggPage; //Read all of std::cin to oggBuffer @@ -18,6 +22,13 @@ namespace Analysers{ } //while OGG::page check function read while (oggPage.read(oggBuffer)){//reading ogg to string + oggPage.setInternalCodec(""); + if (oggPage.getHeaderType() & 0x02){ + if (memcmp("theora",oggPage.getFullPayload() + 1,6) == 0){ + sn2Codec[oggPage.getBitstreamSerialNumber()] = "theora"; + } + } + oggPage.setInternalCodec(sn2Codec[oggPage.getBitstreamSerialNumber()]); std::cout << oggPage.toPrettyString() << std::endl; } }