30 lines
636 B
Objective-C
30 lines
636 B
Objective-C
//
|
|
// H264DecodeTool.h
|
|
// VideoToolBoxDecodeH264
|
|
//made in zhongdao Copyright © 2018年 AnDong. All rights reserved.
|
|
//
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import <AVFoundation/AVFoundation.h>
|
|
#import <VideoToolbox/VideoToolbox.h>
|
|
|
|
@protocol H264DecodeFrameCallbackDelegate <NSObject>
|
|
|
|
//回调sps和pps数据
|
|
- (void)gotDecodedFrame:(CVImageBufferRef )imageBuffer;
|
|
|
|
@end
|
|
|
|
@interface H264DecodeTool : NSObject
|
|
|
|
-(BOOL)initH264Decoder;
|
|
|
|
//解码nalu
|
|
-(void)decodeNalu:(uint8_t *)frame size:(uint32_t)frameSize alive:(BOOL)isAlive;
|
|
|
|
- (void)endDecode;
|
|
|
|
@property (weak, nonatomic) id<H264DecodeFrameCallbackDelegate> delegate;
|
|
|
|
@end
|