Add missing param.
Clean up #1

Optimize branches and some other minor enhancements
Replace old BSD locking API with POSIX 1

This allows mandatory locking if underneath fs is configured for it.
Also fixed operations there were done on an invalid fs.
Merge branch 'memory_fix' into dev
Use reentrant version of ctime() and localtime()

Replace a while loop with strstr() with a single strrchr() call.
More cleanup #2
Misc clean up.

branch prediction optimization
replace bitwise or operators with logical or operator
Fix name of XF86VidModeSetGamma symbol name.
various shuffling
Replace custom init sync with standard pthread_once
Christmas commit

misc changes. Ongoing stuff. not even tested if was still compiling.
log buffer stats if loglevel high enough.
Replace direct io syscalls with stdio

 Using stdio may help performance by:
 - reducing syscalls
 - Use buffering to preserve block size aligment (usually 4KB)
 - On 64-bits platform, on the readside, stdio may even use mmap to improve
   performance.
Make sure initial stream timestamp start at 0.

Also adjust the state time diff *before* starting capture.
refactor glc play program
Reduce timestamps scale to nanosecond

For increased resolution. Created a new file version for backward
compatibility with previous uSec timestamps.
For threads_hint to 1.

threads_hint sets the number of threads used in filters
for modifying the video during playback. I see at least 2
problems with that:

1. For the play pipeline, you end up with 4*number of cores threads.
   IMHO, it is not a good practice to have much more threads than
   you have cores. This is especially true for CPU bounded processing
   like what you find in the glc filters.
2. I see no synchronization to ensure that packets processed in parallel
   in a given pipeline stage are put back in the correct order in the next
   ring buffer. I have experienced playback freeze and I suspect this being
   the cause:

   In gl_play.c, you have pic_hdr->time > time + gl_play->sleep_threshold
   You end up with an underflow if this condition is true and
   pic_hdr->time < time.
Add stats gathering in gl_capture

Also remove a usleep that went unnoticed.
Remove zombie alsa hook capture thread leak.

Also make sure that the alsa hook thread code is async signal safe by
blocking signals from the thread.
Minor clean up.
replace malloc with alloca

for small temp ALSA params structs
Change a log statement.