//
//  BFVideoDecoder.h
//  BFFFmpeglib_Example
//
//  Created by ak on 2022/1/5.
//  Copyright © 2022 287971051@qq.com. All rights reserved.
//  功能：硬件解码视频帧


#import <Foundation/Foundation.h>
#import "BFAVParseHandler.h"

NS_ASSUME_NONNULL_BEGIN

@protocol BFVideoDecoderDelegate <NSObject>

@optional
- (void)getVideoDecodeDataCallback:(CMSampleBufferRef)sampleBuffer isFirstFrame:(BOOL)isFirstFrame;

@end

@interface BFVideoDecoder : NSObject

@property (weak, nonatomic) id<BFVideoDecoderDelegate> delegate;


/**
    
 */

/// 开始解码
/// @param videoInfo 视频帧信息
- (void)startDecodeVideoData:(struct XDXParseVideoDataInfo *)videoInfo;

/// 结束解码
- (void)stopDecoder;


/**
    Reset timestamp when you parse a new file (only use the decoder as global var)
 */
- (void)resetTimestamp;

@end

NS_ASSUME_NONNULL_END
