feat: video reconnect (wip egl error 3003)
This commit is contained in:
+12
-7
@@ -130,6 +130,8 @@ typedef struct ShaderProgram {
|
||||
unsigned int in_count;
|
||||
#ifdef VIDEO_IN
|
||||
EGLDisplay egl_display;
|
||||
EGLImageKHR dma_images[MAX_VIDEO];
|
||||
EGLImageKHR dma_images_swap[MAX_VIDEO];
|
||||
#endif /* VIDEO_IN */
|
||||
} ShaderProgram;
|
||||
|
||||
@@ -138,7 +140,11 @@ typedef struct ShaderProgram {
|
||||
typedef struct VideoCapture {
|
||||
char name[STR_LEN];
|
||||
bool error;
|
||||
bool disconnected;
|
||||
bool needs_reload;
|
||||
bool with_swap;
|
||||
bool swap;
|
||||
unsigned int fps;
|
||||
int fd;
|
||||
int exp_fd;
|
||||
int exp_fd_swap;
|
||||
@@ -149,12 +155,13 @@ typedef struct VideoCapture {
|
||||
#ifdef VIDEO_IN
|
||||
struct v4l2_buffer buf;
|
||||
struct v4l2_buffer buf_swap;
|
||||
EGLImageKHR dma_image;
|
||||
EGLImageKHR dma_image_swap;
|
||||
#endif /* VIDEO_IN */
|
||||
} VideoCapture;
|
||||
|
||||
typedef ARRAY(VideoCaptureArray, VideoCapture);
|
||||
typedef struct VideoCaptureArray {
|
||||
VideoCapture values[MAX_VIDEO];
|
||||
unsigned int length;
|
||||
} VideoCaptureArray;
|
||||
|
||||
// window.c
|
||||
|
||||
@@ -193,9 +200,7 @@ typedef struct SharedContext {
|
||||
unsigned int auto_random_cycle;
|
||||
unsigned int seeds[MAX_FRAG];
|
||||
unsigned int fps;
|
||||
unsigned int input_formats[MAX_VIDEO];
|
||||
unsigned int input_fps[MAX_VIDEO];
|
||||
bool input_swap[MAX_VIDEO];
|
||||
VideoCaptureArray inputs;
|
||||
bool stop;
|
||||
} SharedContext;
|
||||
|
||||
@@ -277,4 +282,4 @@ typedef struct Project {
|
||||
File fragment_shaders[MAX_FRAG][MAX_SUB_FILE + 1];
|
||||
} Project;
|
||||
|
||||
#endif /* TYPES_H */
|
||||
#endif /* TYPES_H */
|
||||
|
||||
Reference in New Issue
Block a user