diff --git a/configure b/configure
index 287896f..f2f7c3d 100755
|
a
|
b
|
BUILTIN_LIST="
|
| 1732 | 1732 | mm_empty |
| 1733 | 1733 | rdtsc |
| 1734 | 1734 | sarestart |
| | 1735 | sem_timedwait |
| 1735 | 1736 | sync_val_compare_and_swap |
| 1736 | 1737 | " |
| 1737 | 1738 | HAVE_LIST_CMDLINE=" |
| … |
… |
HEADERS_LIST="
|
| 1758 | 1759 | dev_ic_bt8xx_h |
| 1759 | 1760 | dev_video_bktr_ioctl_bt848_h |
| 1760 | 1761 | dev_video_meteor_ioctl_meteor_h |
| | 1762 | dispatch_dispatch_h |
| 1761 | 1763 | direct_h |
| 1762 | 1764 | dirent_h |
| 1763 | 1765 | dlfcn_h |
| … |
… |
gdigrab_indev_deps="CreateDIBSection"
|
| 2757 | 2759 | gdigrab_indev_extralibs="-lgdi32" |
| 2758 | 2760 | gdigrab_indev_select="bmp_decoder" |
| 2759 | 2761 | iec61883_indev_deps="libiec61883" |
| 2760 | | jack_indev_deps="jack_jack_h sem_timedwait" |
| | 2762 | jack_indev_deps="jack_jack_h" |
| 2761 | 2763 | lavfi_indev_deps="avfilter" |
| 2762 | 2764 | libcdio_indev_deps="libcdio" |
| 2763 | 2765 | libdc1394_indev_deps="libdc1394" |
| … |
… |
check_func mprotect
|
| 5303 | 5305 | check_func_headers time.h nanosleep || { check_func_headers time.h nanosleep -lrt && add_extralibs -lrt && LIBRT="-lrt"; } |
| 5304 | 5306 | check_func sched_getaffinity |
| 5305 | 5307 | check_func setrlimit |
| | 5308 | check_func sem_timedwait |
| 5306 | 5309 | check_struct "sys/stat.h" "struct stat" st_mtim.tv_nsec -D_BSD_SOURCE |
| 5307 | 5310 | check_func strerror_r |
| 5308 | 5311 | check_func sysconf |
| … |
… |
check_func_headers glob.h glob
|
| 5330 | 5333 | enabled xlib && |
| 5331 | 5334 | check_func_headers "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute -lXv -lX11 -lXext |
| 5332 | 5335 | |
| | 5336 | check_header dispatch/dispatch.h |
| 5333 | 5337 | check_header direct.h |
| 5334 | 5338 | check_header dirent.h |
| 5335 | 5339 | check_header dlfcn.h |
| … |
… |
check_header soundcard.h
|
| 5702 | 5706 | enabled_any alsa_indev alsa_outdev && |
| 5703 | 5707 | check_lib2 alsa/asoundlib.h snd_pcm_htimestamp -lasound |
| 5704 | 5708 | |
| 5705 | | enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack && check_func sem_timedwait && |
| 5706 | | check_func jack_port_get_latency_range -ljack |
| | 5709 | if enabled jack_indev; then |
| | 5710 | { check_lib2 jack/jack.h jack_client_open -ljack && |
| | 5711 | check_func jack_port_get_latency_range -ljack && |
| | 5712 | enabled_any sem_timedwait dispatch_dispatch_h; } || |
| | 5713 | disable jack_indev |
| | 5714 | fi |
| 5707 | 5715 | |
| 5708 | 5716 | enabled_any sndio_indev sndio_outdev && check_lib2 sndio.h sio_open -lsndio |
| 5709 | 5717 | |
diff --git a/libavdevice/jack.c b/libavdevice/jack.c
index 9ecbf9e..b5b8666 100644
|
a
|
b
|
|
| 35 | 35 | #include "timefilter.h" |
| 36 | 36 | #include "avdevice.h" |
| 37 | 37 | |
| | 38 | #if HAVE_DISPATCH_DISPATCH_H |
| | 39 | |
| | 40 | #include <dispatch/dispatch.h> |
| | 41 | #define sem_t dispatch_semaphore_t |
| | 42 | #define sem_init(psem,x,val) *psem = dispatch_semaphore_create(val) |
| | 43 | #define sem_post(psem) dispatch_semaphore_signal(*psem) |
| | 44 | #define sem_wait(psem) dispatch_semaphore_wait(*psem, DISPATCH_TIME_FOREVER) |
| | 45 | #define sem_timedwait(psem, val) dispatch_semaphore_wait(*psem, dispatch_walltime(val, 0)) |
| | 46 | #define sem_destroy(psem) dispatch_release(*psem) |
| | 47 | |
| | 48 | #endif /* HAVE_DISPATCH_DISPATCH_H */ |
| | 49 | |
| 38 | 50 | /** |
| 39 | 51 | * Size of the internal FIFO buffers as a number of audio packets |
| 40 | 52 | */ |