[FFmpeg-devel] [PATCH] Fixed issue #43 JACK indev support on OSX

Michael Niedermayer michael at niedermayer.cc
Fri Feb 19 20:49:43 CET 2016


On Fri, Feb 19, 2016 at 05:28:52PM +0000, Josh de Kock wrote:
> ---
>  configure          | 12 +++++++++---
>  libavdevice/jack.c | 10 ++++++++++
>  2 files changed, 19 insertions(+), 3 deletions(-)
> 
> diff --git a/configure b/configure
> index 287896f..887384c 100755
> --- a/configure
> +++ b/configure
> @@ -1732,6 +1732,7 @@ BUILTIN_LIST="
>      mm_empty
>      rdtsc
>      sarestart
> +    sem_timedwait
>      sync_val_compare_and_swap
>  "
>  HAVE_LIST_CMDLINE="
> @@ -1753,6 +1754,7 @@ HEADERS_LIST="
>      asm_types_h
>      cdio_paranoia_h
>      cdio_paranoia_paranoia_h
> +    dispatch_dispatch_h
>      dev_bktr_ioctl_bt848_h
>      dev_bktr_ioctl_meteor_h
>      dev_ic_bt8xx_h
> @@ -2757,7 +2759,7 @@ gdigrab_indev_deps="CreateDIBSection"
>  gdigrab_indev_extralibs="-lgdi32"
>  gdigrab_indev_select="bmp_decoder"
>  iec61883_indev_deps="libiec61883"
> -jack_indev_deps="jack_jack_h sem_timedwait"
> +jack_indev_deps="jack_jack_h"
>  lavfi_indev_deps="avfilter"
>  libcdio_indev_deps="libcdio"
>  libdc1394_indev_deps="libdc1394"
> @@ -5266,6 +5268,7 @@ check_builtin atomic_compare_exchange "" "int *ptr, *oldval; int newval; __atomi
>  check_builtin machine_rw_barrier mbarrier.h "__machine_rw_barrier()"
>  check_builtin MemoryBarrier windows.h "MemoryBarrier()"
>  check_builtin sarestart signal.h "SA_RESTART"
> +check_builtin sem_timedwait semaphore.h "sem_t *s; sem_init(s,0,0); sem_timedwait(s,0); sem_destroy(s)" -lpthread
>  check_builtin sync_val_compare_and_swap "" "int *ptr; int oldval, newval; __sync_val_compare_and_swap(ptr, oldval, newval)"
>  check_builtin gmtime_r time.h "time_t *time; struct tm *tm; gmtime_r(time, tm)"
>  check_builtin localtime_r time.h "time_t *time; struct tm *tm; localtime_r(time, tm)"
> @@ -5330,6 +5333,7 @@ check_func_headers glob.h glob
>  enabled xlib &&
>      check_func_headers "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute -lXv -lX11 -lXext
>  
> +check_header dispatch/dispatch.h
>  check_header direct.h
>  check_header dirent.h
>  check_header dlfcn.h

> @@ -5702,8 +5706,10 @@ check_header soundcard.h
>  enabled_any alsa_indev alsa_outdev &&
>      check_lib2 alsa/asoundlib.h snd_pcm_htimestamp -lasound
>  
> -enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack && check_func sem_timedwait &&
> -    check_func jack_port_get_latency_range -ljack
> +enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack &&
> +     check_func jack_port_get_latency_range -ljack &&
> +     enabled_any sem_timedwait dispatch_dispatch_h ||
> +     { disable jack_indev && die "ERROR: input device jack could not be enabled"; }

this breaks build when libjack is not available

for example on mingw64
without explicitly enabling jack it fails with:
ERROR: input device jack could not be enabled

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user at ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you drop bombs on a foreign country and kill hundred thousands of
innocent people, expect your government to call the consequence
"unprovoked inhuman terrorist attacks" and use it to justify dropping
more bombs and killing more people. The technology changed, the idea is old.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160219/2f89a134/attachment.sig>


More information about the ffmpeg-devel mailing list