Opened 5 years ago

Last modified 3 years ago

#3570 open enhancement

AVFoundation indev cannot enabled when configure ffmpeg compile in Mac OS Marverick

Reported by: xnohat Owned by:
Priority: wish Component: build system
Version: git-master Keywords: osx avfoundation
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:

AVFoundation indev cannot enabled when configure ffmpeg compile in Mac OS Marverick

How to reproduce:

Follow the guide at https://trac.ffmpeg.org/wiki/MacOSXCompilationGuide

./configure  --prefix=/usr/local --enable-gpl --enable-nonfree --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-indev=avfoundation

But after ./configure script run, it not enable avfoundation indev

Enabled bsfs:
aac_adtstoasc		imx_dump_header		mp3_header_decompress
chomp			mjpeg2jpeg		noise
dump_extradata		mjpega_dump_header	remove_extradata
h264_mp4toannexb	mov2textsub		text2movsub

Enabled indevs:
lavfi

Enabled outdevs:
sdl

Problem from this line in ./configure:

# these are off by default, so fail if requested and not available
enabled avfoundation_indev && { check_header_oc AVFoundation/AVFoundation.h || disable avfoundation_indev; }

It disabled permanently avfoundation_indev

Patch suggest:

enabled avfoundation_indev

Attachments (3)

config.log (521.1 KB) - added by xnohat 5 years ago.
./configure --prefix=/usr/local --enable-gpl --enable-nonfree --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-indev=avfoundation
patchundefstdcinline.diff (979 bytes) - added by cehoyos 4 years ago.
patchxcode4.diff (736 bytes) - added by cehoyos 4 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 5 years ago by cehoyos

  • Component changed from avdevice to build system
  • Keywords osx added
  • Priority changed from important to normal

Please run ./configure and provide (the relevant part of) the file config.log.

Changed 5 years ago by xnohat

./configure --prefix=/usr/local --enable-gpl --enable-nonfree --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-indev=avfoundation

comment:2 Changed 5 years ago by xnohat

Hi cehoyos,

I attached with this ticket config.log of configure arg:

./configure --prefix=/usr/local --enable-gpl --enable-nonfree --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-indev=avfoundation

comment:3 Changed 5 years ago by thilo.borgmann

AVFoundation compiles fine under Mavericks here.
So this looks like an Xcode issue.
What Xcode version are you using?
And on which Mac? Does it have an integrated Camera?

comment:4 Changed 4 years ago by cehoyos

  • Priority changed from normal to wish
  • Type changed from defect to enhancement

This is using an old compiler (see ticket #3569), workaround is apparently to install current XCode:

$ gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

Changed 4 years ago by cehoyos

comment:5 Changed 4 years ago by cehoyos

Could you test if attached patch makes any difference? Does it allow autodetection and build?

comment:6 Changed 4 years ago by cehoyos

  • Reproduced by developer set
  • Status changed from new to open

I am able to reproduce the problem: AVFoundation cannot be built with Xcode 4.6.3 - gcc 4.2.1 llvm 2336.11.00 - on Mavericks, workaround is to install a more recent version of Xcode. I will attach a patch that fixes the issue here, tested with both the failing gcc version and clang 503.0.40.

(The patch I attached a week ago does not help.)

Changed 4 years ago by cehoyos

comment:7 Changed 4 years ago by cehoyos

Relevant thread on ffmpeg-devel about the change originally breaking the configure test:
http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/176366

comment:8 Changed 3 years ago by ponpon

i face the problem under macosx 109 and gcc version 5.2.0 (MacPorts? gcc5 5.2.0_0) .
if the clang of apple is used, OK.

comment:9 Changed 3 years ago by cehoyos

  • Keywords avfoundation added
Note: See TracTickets for help on using tickets.