Opened 8 years ago

Closed 5 years ago

#49841 closed enhancement (fixed)

Building ffmpeg with avfoundation on OSX Lion

Reported by: p.ohanlon@… Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mojca (Mojca Miklavec)
Port: ffmpeg, ffmpeg-devel

Description

Currently ffmpeg has configuration in the Portfile to not build avfoundation indevice for OSX Lion:

    if {${os.major} < 12} {
        configure.args-append --disable-indev=avfoundation
    }

but it builds fine on OSX Lion when using the clang compiler. It could be nice to remove this restriction for OSX Lion from the Portfile and change the os.major check to be:

    if {${os.major} < 11} {
        configure.args-append --disable-indev=avfoundation
        configure.compiler clang
    }

Attachments (1)

ffmpeg-build-10.7-with-avfoundation.log.zip (116.2 KB) - added by kencu (Ken) 5 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 8 years ago by dbevans (David B. Evans)

Owner: changed from macports-tickets@… to devans@…
Status: newassigned

comment:2 Changed 8 years ago by dbevans (David B. Evans)

Port: ffmpeg-devel added
Type: requestenhancement
Version: 2.3.4

comment:3 Changed 7 years ago by mojca (Mojca Miklavec)

Cc: mojca added

comment:4 Changed 5 years ago by kencu (Ken)

I built this on 10.7 today, enabling avfoundation like this:

    # kCVPixelFormatType_OneComponent8 used in avfoundation indev is only available on 10.8+
    if {${os.major} < 12} {
#        configure.args-append --disable-indev=avfoundation
    }

So the OP is right, this builds on 10.7 with clang without any trouble. I didn't force the compiler, current MacPorts defaults led 10.7 to use /usr/bin/clang. Log attached.

Looks like the test can be changed to ${os.major} < 11 at least...

Changed 5 years ago by kencu (Ken)

comment:5 Changed 5 years ago by kencu (Ken)

The have fixed up ffmpeg like this, to support older systems:

libavdevice/avfoundation.m
#if !TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
    { AV_PIX_FMT_GRAY8,        kCVPixelFormatType_OneComponent8 },
#endif

comment:6 Changed 5 years ago by kencu (Ken)

in fact, 10.6.8 had no real issue with it as well, although I can't say for sure if it actually built anything differently.

Also, 10.6.8 can use the SDL2 outdev now, I notice.

comment:7 Changed 5 years ago by ken-cunningham-webuse

Resolution: fixed
Status: assignedclosed

In f9c360ab3daaeb75ede4c04f923aa6b3b5bafe07/macports-ports (master):

ffmpeg: enable avfoundation on 10.7

the previous definition missing from the 10.7 SDK has been
appropriately guarded by upstream, and this now builds
properly for 10.7

closes: #49841

Note: See TracTickets for help on using tickets.