forked from lincolnhard/v4l2-framebuffer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlive.c
32 lines (29 loc) · 715 Bytes
/
live.c
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
/*
============================================================================
Name : live.c
Author : LincolnHard
Version :
Copyright : free and open
Description : Hello World in C, Ansi-style
============================================================================
*/
#include <stdio.h>
#include <stdlib.h>
#include "video_capture.h"
#include "draw_framebuffer.h"
int main(void) {
unsigned char src_image[IM_WIDTH * IM_HEIGHT * 3];
init_framebuffer();
init_video_capture();
char key = 0;
for(; ;){
key = video_capture(src_image);
draw_framebuffer(src_image);
if(key == 'q'){
break;
}
}
free_video_capture();
free_framebuffer();
return EXIT_SUCCESS;
}