-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathFFTFrameQueue.h
More file actions
42 lines (31 loc) · 976 Bytes
/
FFTFrameQueue.h
File metadata and controls
42 lines (31 loc) · 976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// FFTFrameQueue.h
// FFmpegTutorial-macOS
//
// Created by qianlongxu on 2022/7/27.
// Copyright © 2022 Matt Reach's Awesome FFmpeg Tutotial. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
typedef struct AVFrame AVFrame;
@interface FFFrameItem : NSObject
@property (nonatomic, assign) AVFrame *frame;
@property (nonatomic, assign) double pts;
@property (nonatomic, assign) double duration; //frame duration
- (instancetype)initWithAVFrame:(AVFrame *)frame;
@end
@interface FFTFrameQueue : NSObject
@property (nonatomic, assign, readonly) int capacity;
@property (nonatomic, assign) BOOL eof;
@property (nonatomic, assign) double streamTimeBase;
- (instancetype)initWithCapacity:(int)capacity NS_DESIGNATED_INITIALIZER;
- (void)push:(FFFrameItem *)frame;
- (void)pop;
- (int)count;
- (FFFrameItem *)peekLast;
- (FFFrameItem *)peek;
- (FFFrameItem *)peekNext;
- (void)cancel;
- (BOOL)isCanceled;
@end
NS_ASSUME_NONNULL_END