Commit b78c1115 authored by Mikhail Karpenko's avatar Mikhail Karpenko

Add more debug output

parent 21a44a87
...@@ -685,7 +685,7 @@ int sendImageFrame(camogm_state *state) ...@@ -685,7 +685,7 @@ int sendImageFrame(camogm_state *state)
default: rslt = 0; // do nothing default: rslt = 0; // do nothing
} }
if (rslt) { if (rslt) {
D3(fprintf(debug_file, "sendImageFrame:12: camogm_frame_***() returned 0x%x\n", rslt)); D3(fprintf(debug_file, "sendImageFrame:12: camogm_frame_***() returned %d\n", rslt));
return rslt; return rslt;
} }
if (state->kml_used) rslt = camogm_frame_kml(state); // will turn on state->kml_used if it can if (state->kml_used) rslt = camogm_frame_kml(state); // will turn on state->kml_used if it can
...@@ -1031,7 +1031,7 @@ void camogm_status(camogm_state *state, char * fn, int xml) ...@@ -1031,7 +1031,7 @@ void camogm_status(camogm_state *state, char * fn, int xml)
fprintf(f, "greedy %s\n", state->greedy ? "yes" : "no"); fprintf(f, "greedy %s\n", state->greedy ? "yes" : "no");
fprintf(f, "ignore fps %s\n", state->ignore_fps ? "yes" : "no"); fprintf(f, "ignore fps %s\n", state->ignore_fps ? "yes" : "no");
fprintf(f, "\n"); fprintf(f, "\n");
fprintf(f, "buffer overruns %d\n", state->last_error_code); fprintf(f, "last error code %d\n", state->last_error_code);
fprintf(f, "buffer overruns %d\n", state->buf_overruns); fprintf(f, "buffer overruns %d\n", state->buf_overruns);
fprintf(f, "buffer minimal %d\n", state->buf_min); fprintf(f, "buffer minimal %d\n", state->buf_min);
fprintf(f, "buffer free %d\n", _b_free); fprintf(f, "buffer free %d\n", _b_free);
......
...@@ -180,7 +180,8 @@ int camogm_frame_mov(camogm_state *state) ...@@ -180,7 +180,8 @@ int camogm_frame_mov(camogm_state *state)
iovlen = writev(state->ivf, chunks_iovec, (state->chunk_index) - 1); iovlen = writev(state->ivf, chunks_iovec, (state->chunk_index) - 1);
if (iovlen < l) { if (iovlen < l) {
j = errno; j = errno;
D0(fprintf(debug_file, "writev error %d (returned %d, expected %d)\n", j, iovlen, l)); D0(fprintf(debug_file, "writev error %d (returned %d, expected %d, file descriptor %d, chn %d)\n", j, iovlen, l, state->ivf, state->port_num));
perror(strerror(j));
close(state->ivf); close(state->ivf);
state->ivf = -1; state->ivf = -1;
return -CAMOGM_FRAME_FILE_ERR; return -CAMOGM_FRAME_FILE_ERR;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment