Loading src/camogm.c +93 −89 Original line number Diff line number Diff line Loading @@ -1630,15 +1630,19 @@ int listener_loop(camogm_state *state) ret = poll(&pfd,1,DEFAULT_POLL_TIMEOUT); if (ret==0){ D6(fprintf(debug_file, "Waiting for commands...\n")); D6(fprintf(debug_file, "Waiting for commands..., state->prog_state = %d, pfd.revents=%d\n",state->prog_state, (int) pfd.revents)); } if (pfd.revents & POLLIN){ cmd = parse_cmd(state, cmd_file); if (cmd) { if (cmd < 0) D0(fprintf(debug_file, "Unrecognized command\n")); } } else if (state->prog_state == STATE_RUNNING) { // no commands in queue, started D6(fprintf(debug_file, "state->prog_state == STATE_RUNNING ")); switch ((rslt = -sendImageFrame(state))) { D6(fprintf(debug_file, " ==> %d",rslt)); case 0: break; // frame sent OK, nothing to do (TODO: check file length/duration) case CAMOGM_FRAME_NOT_READY: // just wait for the frame to appear at the current pointer Loading Loading @@ -1727,7 +1731,7 @@ int listener_loop(camogm_state *state) state->rawdev.thread_state = STATE_RUNNING; usleep(COMMAND_LOOP_DELAY); // make it longer but interruptible by signals? } } // if pfd.revents & POLLIN // } // if pfd.revents & POLLIN } // while (process) // normally, we should not be here Loading Loading
src/camogm.c +93 −89 Original line number Diff line number Diff line Loading @@ -1630,15 +1630,19 @@ int listener_loop(camogm_state *state) ret = poll(&pfd,1,DEFAULT_POLL_TIMEOUT); if (ret==0){ D6(fprintf(debug_file, "Waiting for commands...\n")); D6(fprintf(debug_file, "Waiting for commands..., state->prog_state = %d, pfd.revents=%d\n",state->prog_state, (int) pfd.revents)); } if (pfd.revents & POLLIN){ cmd = parse_cmd(state, cmd_file); if (cmd) { if (cmd < 0) D0(fprintf(debug_file, "Unrecognized command\n")); } } else if (state->prog_state == STATE_RUNNING) { // no commands in queue, started D6(fprintf(debug_file, "state->prog_state == STATE_RUNNING ")); switch ((rslt = -sendImageFrame(state))) { D6(fprintf(debug_file, " ==> %d",rslt)); case 0: break; // frame sent OK, nothing to do (TODO: check file length/duration) case CAMOGM_FRAME_NOT_READY: // just wait for the frame to appear at the current pointer Loading Loading @@ -1727,7 +1731,7 @@ int listener_loop(camogm_state *state) state->rawdev.thread_state = STATE_RUNNING; usleep(COMMAND_LOOP_DELAY); // make it longer but interruptible by signals? } } // if pfd.revents & POLLIN // } // if pfd.revents & POLLIN } // while (process) // normally, we should not be here Loading