-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathv4l2decode.h
33 lines (23 loc) · 1.02 KB
/
v4l2decode.h
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
typedef struct {
uint32_t width;
uint32_t height;
__u32 codec;
int decoderHandle;
int converterHandle;
int needConvert;
int outputBuffersCount;
int captureBuffersCount;
int converterBuffersCount;
v4l2_buffer_t *outputBuffers;
v4l2_buffer_t *captureBuffers;
v4l2_buffer_t *converterBuffers;
int captureWidth;
int captureHeight;
int headerProcessed;
pthread_t fimc_thread;
pthread_t mfc_thread;
} v4l2_decoder_t;
#define STREAM_BUFFER_SIZE 1572864 //compressed frame size. 1080p mpeg4 10Mb/s can be >256k in size, so this is to make sure frame fits into buffer
//for very unknown reason lesser than 1Mb buffer causes MFC to corrupt its own setup setting inapropriate values
#define STREAM_BUFFER_CNT 3 //3 input buffers. 2 is enough almost for everything, but on some heavy videos 3 makes a difference
#define CONVERTER_VIDEO_BUFFERS_CNT 3 //2 begins to be slow. maybe on video only, but not on convert.