On 6/8/2016 1:49 PM, Michael Niedermayer wrote: > On Wed, Jun 08, 2016 at 12:04:44AM -0300, James Almer wrote: >> On 5/31/2016 4:23 PM, Michael Niedermayer wrote: >>> adding demuxer and other logs should be easy >>> This forces single threaded decoding for simplicity >>> It also requires pthreads, this could be avoided either with >>> some lockless tricks or simply by assuming av_log would never be called from >>> another thread. >>> >>> doc/ffprobe.xsd update missing (TODO & help welcome) >>> >>> Fixes Ticket5521 >>> >>> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> >>> --- >>> ffprobe.c | 154 >>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- >>> 1 file changed, 153 insertions(+), 1 deletion(-) >>> >>> diff --git a/ffprobe.c b/ffprobe.c >>> index a7e329c..07b61ec 100644 >>> --- a/ffprobe.c >>> +++ b/ffprobe.c >>> @@ -49,6 +49,19 @@ >>> #include "libpostproc/postprocess.h" >>> #include "cmdutils.h" >>> >>> +#if HAVE_PTHREADS >>> +# include <pthread.h> >>> +#else >>> +# ifdef pthread_mutex_lock >>> +# undef pthread_mutex_lock >>> +# endif >>> +# define pthread_mutex_lock(a) >>> +# ifdef pthread_mutex_unlock >>> +# undef pthread_mutex_unlock >>> +# endif >>> +# define pthread_mutex_unlock(a) >>> +#endif >> >> Why are you not using the compat wrappers here? These are simple >> mutex locks that don't even use static init, so i don't see why >> they wouldn't work with w32threads or os2threads. > > i just used the same as ffmpeg.c does
That one should also be checked. Seems to be only pthread_join, pthread_create, both supported by the wrappers, and lavu's threaded message API, which also uses the wrappers. > > but locally changed as: > no idea if it works on os2 or w32 Compiles and seems to work after a quick test with mingw-w64. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel