#include #include #include #include #include #include "socket.h" #include "display.h" #include "audio.h" #include "typedef.h" char *cam_data; void *display_thread(void *arg) { (void)arg; int c = 1; char *name = "./display"; display(&c, &name); pthread_exit(0); } void on_recv(char *buf, int numbytes) { cam_data = &(buf[REC_CAP]); usleep(100000); // audio_play(buf); } int main(void) { // char empty[1024] = {0}; // cam_data = empty; pthread_t tid; pthread_create(&tid, NULL, display_thread, NULL); return listener("4950", &on_recv); }