From 145775818375bafcf191a7b4986e57a00b41ac68 Mon Sep 17 00:00:00 2001 From: kartofen Date: Tue, 18 Oct 2022 23:25:46 +0300 Subject: use glfw and some minor refactoring --- src/talker.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/talker.c') 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; } -- cgit v1.2.3