On Sun, Dec 1, 2013 at 4:21 PM, Rémi Denis-Courmont <[email protected]> wrote: > Le dimanche 1 décembre 2013, 16:15:22 Tristan Matthews a écrit : >> jack_ringbuffers are used instead of AVFifoBuffers as they are safe for >> lock-free use (in single-writer, single-reader scenarios). > > The use of condition variable without locked predicate/state makes as little > sense (i.e. no) as in previous iterations IMO.
In this version, the process callback is locking the mutex before signaling (with try_lock), is that not adequate? In any case, even if the reader misses a signal because it is not yet waiting on the condition variable, it will catch the next one. Moreover, it will only start waiting if it finds the ringbuffer to be empty. I agree that using a semaphore is better (since you avoid the above missed signal problem), but that's the whole issue with https://bugzilla.libav.org/show_bug.cgi?id=312 Could someone clarify what exactly is wrong with Mac OS X semaphores? I've only found this so far: http://dev.alopix.net/2012/10/os-x-dont-trust-posix-certificate.html in which case, could this be more simply resolved by using a named semaphore? Best, Tristan -- Tristan Matthews web: http://tristanswork.blogspot.com _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
