Skip to content

Commit

Permalink
删除无用代码
Browse files Browse the repository at this point in the history
  • Loading branch information
张禹 committed Nov 23, 2020
1 parent 868f421 commit 69171cc
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions iOS/QGVAPlayer/QGVAPlayer/Classes/MP4Parser/QGMP4Parser.m
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 69171cc

Please sign in to comment.