diff --git a/iOS/QGVAPlayer/QGVAPlayer/Classes/MP4Parser/QGMP4Parser.m b/iOS/QGVAPlayer/QGVAPlayer/Classes/MP4Parser/QGMP4Parser.m index 6431a0de..2b28ab91 100644 --- a/iOS/QGVAPlayer/QGVAPlayer/Classes/MP4Parser/QGMP4Parser.m +++ b/iOS/QGVAPlayer/QGVAPlayer/Classes/MP4Parser/QGMP4Parser.m @@ -240,22 +240,6 @@ - (double)duration { return _duration; } -//- (NSData *)spsData { -// -// if (!_spsData) { -// _spsData = [self readSPSData]; -// } -// return _spsData; -//} -// -//- (NSData *)ppsData { -// -// if (!_ppsData) { -// _ppsData = [self readPPSData]; -// } -// return _ppsData; -//} - - (NSArray *)videoSamples { if (_videoSamples) { @@ -404,20 +388,8 @@ - (void)parseHvccDecoderConfigRecord { } } -//- (NSData *)readSPSData { -// if (self.videoCodecID == QGMP4VideoStreamCodecIDH264) { -// return [self parseAvccSPSData]; -// } else if (self.videoCodecID == QGMP4VideoStreamCodecIDH265) { -// // h.265 -// return nil; -// } else { -// return nil; -// } -//} - - (NSData *)parseAvccSPSData { //boxsize(32)+boxtype(32)+prefix(40)+预留(3)+spsCount(5)+spssize(16)+...+ppscount(8)+ppssize(16)+... - //QGMP4BoxType boxType = self.videoCodecID == QGMP4VideoStreamCodecIDH264 ? QGMP4BoxType_avcC : QGMP4BoxType_hvcC; NSData *extraData = [_parser readDataForBox:[self.videoTrackBox subBoxOfType:QGMP4BoxType_avcC]]; if (extraData.length <= 8) { return nil; @@ -434,19 +406,7 @@ - (NSData *)parseAvccSPSData { return spsData; } -//- (NSData *)readPPSData { -// if (self.videoCodecID == QGMP4VideoStreamCodecIDH264) { -// return [self parseAvccPPSData]; -// } else if (self.videoCodecID == QGMP4VideoStreamCodecIDH265) { -// // h.265 -// return nil; -// } else { -// return nil; -// } -//} - - (NSData *)parseAvccPPSData { - //QGMP4BoxType boxType = self.videoCodecID == QGMP4VideoStreamCodecIDH264 ? QGMP4BoxType_avcC : QGMP4BoxType_hvcC; NSData *extraData = [_parser readDataForBox:[self.videoTrackBox subBoxOfType:QGMP4BoxType_avcC]]; if (extraData.length <= 8) { return nil;