From 69171cc1230a2cf82d31b2d19131968c74fcdab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=A6=B9?= Date: Wed, 18 Nov 2020 17:18:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Classes/MP4Parser/QGMP4Parser.m | 40 ------------------- 1 file changed, 40 deletions(-) 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;