Milestone, fix black screen and initial frame issues
This commit is contained in:
parent
f4fa723863
commit
0a250b05f3
11 changed files with 708 additions and 47 deletions
|
|
@ -3,13 +3,18 @@
|
|||
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#define FRAME_QUEUE_CAPACITY 4
|
||||
#define FRAME_QUEUE_CAPACITY 8
|
||||
|
||||
typedef struct FrameData {
|
||||
unsigned char *pixels;
|
||||
unsigned char *buffer;
|
||||
unsigned char *plane_y;
|
||||
unsigned char *plane_u;
|
||||
unsigned char *plane_v;
|
||||
int width;
|
||||
int height;
|
||||
int stride;
|
||||
int pitch_y;
|
||||
int pitch_u;
|
||||
int pitch_v;
|
||||
double pts_seconds;
|
||||
} FrameData;
|
||||
|
||||
|
|
@ -26,6 +31,8 @@ void frame_queue_destroy(FrameQueue *queue);
|
|||
void frame_queue_clear(FrameQueue *queue);
|
||||
int frame_queue_push(FrameQueue *queue, FrameData *frame);
|
||||
int frame_queue_pop_latest(FrameQueue *queue, FrameData *out);
|
||||
int frame_queue_peek_first(FrameQueue *queue, FrameData *out);
|
||||
int frame_queue_pop_first(FrameQueue *queue, FrameData *out);
|
||||
void frame_data_free(FrameData *frame);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue