Merge branch 'master' of octo.ddvtech.com:pls
This commit is contained in:
		
						commit
						013f6c1d17
					
				
					 2 changed files with 25 additions and 3 deletions
				
			
		| 
						 | 
					@ -43,6 +43,27 @@ bool FLV::is_header(char * header){
 | 
				
			||||||
  return true;
 | 
					  return true;
 | 
				
			||||||
}//FLV::is_header
 | 
					}//FLV::is_header
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/// True if current tag is init data for this media type.
 | 
				
			||||||
 | 
					bool FLV::Tag::isInitData(){
 | 
				
			||||||
 | 
					  switch (data[0]){
 | 
				
			||||||
 | 
					    case 0x09:
 | 
				
			||||||
 | 
					      switch (data[11] & 0xF0){
 | 
				
			||||||
 | 
					        case 0x50: return true; break;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      if ((data[11] & 0x0F) == 7){
 | 
				
			||||||
 | 
					        switch (data[12]){
 | 
				
			||||||
 | 
					          case 0: return true; break;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      break;
 | 
				
			||||||
 | 
					    case 0x08:
 | 
				
			||||||
 | 
					      if ((data[12] == 0) && ((data[11] & 0xF0) == 0xA0)){
 | 
				
			||||||
 | 
					        return true;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      break;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  return false;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// Returns a std::string describing the tag in detail.
 | 
					/// Returns a std::string describing the tag in detail.
 | 
				
			||||||
/// The string includes information about whether the tag is
 | 
					/// The string includes information about whether the tag is
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,6 +22,7 @@ namespace FLV {
 | 
				
			||||||
      int len; ///< Actual length of tag.
 | 
					      int len; ///< Actual length of tag.
 | 
				
			||||||
      bool isKeyframe; ///< True if current tag is a video keyframe.
 | 
					      bool isKeyframe; ///< True if current tag is a video keyframe.
 | 
				
			||||||
      char * data; ///< Pointer to tag buffer.
 | 
					      char * data; ///< Pointer to tag buffer.
 | 
				
			||||||
 | 
					      bool isInitData(); ///< True if current tag is init data for this media type.
 | 
				
			||||||
      std::string tagType(); ///< Returns a std::string describing the tag in detail.
 | 
					      std::string tagType(); ///< Returns a std::string describing the tag in detail.
 | 
				
			||||||
      unsigned int tagTime(); ///< Returns the 32-bit timestamp of this tag.
 | 
					      unsigned int tagTime(); ///< Returns the 32-bit timestamp of this tag.
 | 
				
			||||||
      void tagTime(unsigned int T); ///< Sets the 32-bit timestamp of this tag.
 | 
					      void tagTime(unsigned int T); ///< Sets the 32-bit timestamp of this tag.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue