Added "isFixed" function.

This commit is contained in:
Erik Zandvliet 2013-10-10 09:09:27 +02:00 committed by Thulinma
parent 6889e8910b
commit da583bedba
2 changed files with 11 additions and 0 deletions

View file

@ -1038,3 +1038,13 @@ DTSC::File::~File(){
F = 0; F = 0;
} }
} }
bool DTSC::isFixed(JSON::Value & metadata){
for (JSON::ObjIter it = metadata["tracks"].ObjBegin(); it != metadata["tracks"].ObjEnd(); it++){
if (!(it->second.isMember("keys") && it->second["keys"].isArray() && it->second["keys"][0u].isMember("bpos"))){
return false;
}
}
return true;
}

View file

@ -50,6 +50,7 @@
/// - nalu_end (int, if set, is a end-of-sequence) /// - nalu_end (int, if set, is a end-of-sequence)
/// - offset (int, unsigned version of signed int! Holds the ms offset between timestamp and proper display time for B-frames) /// - offset (int, unsigned version of signed int! Holds the ms offset between timestamp and proper display time for B-frames)
namespace DTSC { namespace DTSC {
bool isFixed(JSON::Value & metadata);
/// This enum holds all possible datatypes for DTSC packets. /// This enum holds all possible datatypes for DTSC packets.
enum datatype{ enum datatype{