blob: 90d1ff71f5fbb66589783ead8de9f8346ef35a0c [file] [log] [blame]
//
// VideoDecoder.h
// DecoderWrapper
//
// Copyright 2010 Dropcam. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreVideo/CoreVideo.h>
#import <UIKit/UIKit.h>
#import "DecodedFrame.h"
enum VideoCodecType {
kVCT_H264
};
enum VideoColorSpace {
VideoColorSpaceRGB,
VideoColorSpaceYUV
};
typedef void (*LogCallbackfn)(int level, const char *module, const char* logLine);
@interface VideoDecoder : NSObject
+ (void)staticInitialize;
+ (void)registerLogCallback:(LogCallbackfn)fn;
- (id)initWithCodec:(enum VideoCodecType)codecType
colorSpace:(enum VideoColorSpace)colorSpace
width:(int)width
height:(int)height
privateData:(NSData*)privateData
allowChunks:(BOOL)allowChunks;
- (void)decodeFrame:(NSData*)frameData hasStartCode:(BOOL)hasStartCode PTS:(int64_t)PTS;
- (BOOL)isFrameReady;
- (UIImage *)getDecodedRGBFrame;
- (DecodedFrame *)getDecodedFrame;
- (NSUInteger)getDecodedFrameWidth;
- (NSUInteger)getDecodedFrameHeight;
@end