[FFmpeg-devel] [PATCH 1/2] Audio Video Filtering using threads & semaphores
nicolas.george at normalesup.org
Tue Jun 19 22:08:01 CEST 2012
Le duodi 2 messidor, an CCXX, Manjunath Siddaiah a écrit :
> I could avoid semaphores, if threads are created for every decoded frame
> and join the threads soon after filtering that decoded frame. For this
> there will be overhead for calling thread_create function for every
> decoded frame.
> Instead created threads during "transcode_init" function and join the
> threads while exiting the transcode. For this scenario, race conditions
> are avoided using semaphores.
To avoid race conditions using POSIX threads, there are POSIX mutexes and
conditions. They are an API designed along with the rest of the threading
API and widely implemented.
Semaphores are an IPC API, and thus more expensive. They also are only an
optional part of the Unix standard, and as such missing from some systems
where POSIX threads are fully implemented.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel