36 lines
862 B
Objective-C
36 lines
862 B
Objective-C
#import <Foundation/Foundation.h>
|
|
#import <VideoToolbox/VideoToolbox.h>
|
|
|
|
#import "Frame.h"
|
|
#import "FloatBuffer.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@interface FrameQueue : NSObject
|
|
|
|
@property (nonatomic, readonly) NSUInteger count;
|
|
@property (nonatomic) FloatBuffer *frameDropMetrics;
|
|
@property (nonatomic) int highWaterMark;
|
|
@property (nonatomic, readonly) int maxCapacity;
|
|
@property (atomic) BOOL paused;
|
|
|
|
+ (instancetype)sharedInstance;
|
|
|
|
- (instancetype)init NS_UNAVAILABLE;
|
|
+ (instancetype)new NS_UNAVAILABLE;
|
|
- (BOOL)isEmpty;
|
|
- (void)clear;
|
|
- (int)enqueue:(Frame *)frame;
|
|
- (int)enqueue:(Frame *)frame withSlackSize:(int)slack;
|
|
- (nullable Frame *)dequeue;
|
|
- (nullable Frame *)dequeueWithTimeout:(CFTimeInterval)timeout;
|
|
- (CFTimeInterval)estimatedFramerate;
|
|
- (int)currentSoftCap;
|
|
- (void)waitForEnqueue;
|
|
- (void)start;
|
|
- (void)stop;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|