Added "isFixed" function.
This commit is contained in:
		
							parent
							
								
									6889e8910b
								
							
						
					
					
						commit
						da583bedba
					
				
					 2 changed files with 11 additions and 0 deletions
				
			
		
							
								
								
									
										10
									
								
								lib/dtsc.cpp
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								lib/dtsc.cpp
									
										
									
									
									
								
							|  | @ -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; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | @ -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{ | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Erik Zandvliet
						Erik Zandvliet