diff options
author | kartofen <mladenovnasko0@gmail.com> | 2022-10-18 23:25:46 +0300 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2022-10-18 23:25:46 +0300 |
commit | 145775818375bafcf191a7b4986e57a00b41ac68 (patch) | |
tree | b539525328515401be6bc2a6c9fb17841b8a16d1 /src/talker.c | |
parent | 7e64d0c78e8a21f2ede7eab1303758391001c0dc (diff) |
use glfw and some minor refactoring
Diffstat (limited to 'src/talker.c')
-rw-r--r-- | src/talker.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/talker.c b/src/talker.c index 0ba2994..c481570 100644 --- a/src/talker.c +++ b/src/talker.c @@ -31,21 +31,18 @@ void on_send(char *buf, int *bytes) int main(void) { - int ret = 1; - camera_params params = {0}; - params.device = "/dev/video0"; + params.device = CAM; params.x_res = 160; params.y_res = 120; camera_init(&cam_handle, params); if(talker("4950", "localhost", &on_send) != 0) { - goto finish; + err("talker: failed\n"); + return 1; } - ret = 0; -finish: camera_deinit(&cam_handle); - return ret; + return 0; } |