int rgb_process_start(rgb_t rgb, ps_buffer_t *from, ps_buffer_t *to) { int ret; if (unlikely(rgb->running)) return EAGAIN; if (likely(!(ret = glc_thread_create(rgb->glc, &rgb->thread, from, to)))) rgb->running = 1; return ret; }
int unpack_process_start(unpack_t unpack, ps_buffer_t *from, ps_buffer_t *to) { int ret; if (unlikely(unpack->running)) return EAGAIN; if (unlikely((ret = glc_thread_create(unpack->glc, &unpack->thread, from, to)))) return ret; unpack->running = 1; return 0; }
int alsa_play_process_start(alsa_play_t alsa_play, ps_buffer_t *from) { int ret; if (unlikely(alsa_play->running)) return EAGAIN; if ((ret = glc_thread_create(alsa_play->glc, &alsa_play->thread, from, NULL))) return ret; alsa_play->running = 1; return 0; }
int ycbcr_process_start(ycbcr_t ycbcr, ps_buffer_t *from, ps_buffer_t *to) { int ret; if (ycbcr->running) return EAGAIN; if ((ret = glc_thread_create(ycbcr->glc, &ycbcr->thread, from, to))) return ret; ycbcr->running = 1; return 0; }
int pack_process_start(pack_t pack, ps_buffer_t *from, ps_buffer_t *to) { int ret; if (unlikely(pack->running)) return EAGAIN; if (unlikely(!pack->compression)) { glc_log(pack->glc, GLC_ERROR, "pack", "attempt to start pack before setting the compression"); return EINVAL; } if (unlikely((ret = glc_thread_create(pack->glc, &pack->thread, from, to)))) return ret; pack->running = 1; return 0; }