You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
build: restore videotoolbox compilation on iOS
This commit is contained in:
11
configure
vendored
11
configure
vendored
@@ -1818,6 +1818,7 @@ SYSTEM_FUNCS="
|
|||||||
sysconf
|
sysconf
|
||||||
sysctl
|
sysctl
|
||||||
usleep
|
usleep
|
||||||
|
UTGetOSTypeFromString
|
||||||
VirtualAlloc
|
VirtualAlloc
|
||||||
wglGetProcAddress
|
wglGetProcAddress
|
||||||
"
|
"
|
||||||
@@ -2395,11 +2396,11 @@ crystalhd_deps="libcrystalhd_libcrystalhd_if_h"
|
|||||||
d3d11va_deps="d3d11_h dxva_h ID3D11VideoDecoder ID3D11VideoContext"
|
d3d11va_deps="d3d11_h dxva_h ID3D11VideoDecoder ID3D11VideoContext"
|
||||||
dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode"
|
dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode"
|
||||||
vaapi_deps="va_va_h"
|
vaapi_deps="va_va_h"
|
||||||
vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads CoreServices_CoreServices_h"
|
vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads"
|
||||||
vda_extralibs="-framework CoreFoundation -framework VideoDecodeAcceleration -framework QuartzCore -framework CoreServices"
|
vda_extralibs="-framework CoreFoundation -framework VideoDecodeAcceleration -framework QuartzCore"
|
||||||
vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
|
vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
|
||||||
videotoolbox_deps="VideoToolbox_VideoToolbox_h pthreads CoreServices_CoreServices_h"
|
videotoolbox_deps="VideoToolbox_VideoToolbox_h pthreads"
|
||||||
videotoolbox_extralibs="-framework CoreFoundation -framework VideoToolbox -framework CoreMedia -framework QuartzCore -framework CoreServices"
|
videotoolbox_extralibs="-framework CoreFoundation -framework VideoToolbox -framework CoreMedia -framework QuartzCore"
|
||||||
xvmc_deps="X11_extensions_XvMClib_h"
|
xvmc_deps="X11_extensions_XvMClib_h"
|
||||||
|
|
||||||
h263_vaapi_hwaccel_deps="vaapi"
|
h263_vaapi_hwaccel_deps="vaapi"
|
||||||
@@ -5157,7 +5158,6 @@ check_func_headers glob.h glob
|
|||||||
enabled xlib &&
|
enabled xlib &&
|
||||||
check_func_headers "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute -lXv -lX11 -lXext
|
check_func_headers "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute -lXv -lX11 -lXext
|
||||||
|
|
||||||
check_header CoreServices/CoreServices.h
|
|
||||||
check_header direct.h
|
check_header direct.h
|
||||||
check_header dirent.h
|
check_header dirent.h
|
||||||
check_header dlfcn.h
|
check_header dlfcn.h
|
||||||
@@ -5190,6 +5190,7 @@ check_header asm/types.h
|
|||||||
check_lib2 "windows.h shellapi.h" CommandLineToArgvW -lshell32
|
check_lib2 "windows.h shellapi.h" CommandLineToArgvW -lshell32
|
||||||
check_lib2 "windows.h wincrypt.h" CryptGenRandom -ladvapi32
|
check_lib2 "windows.h wincrypt.h" CryptGenRandom -ladvapi32
|
||||||
check_lib2 "windows.h psapi.h" GetProcessMemoryInfo -lpsapi
|
check_lib2 "windows.h psapi.h" GetProcessMemoryInfo -lpsapi
|
||||||
|
check_lib "CoreServices/CoreServices.h" UTGetOSTypeFromString "-framework CoreServices"
|
||||||
|
|
||||||
check_struct "sys/time.h sys/resource.h" "struct rusage" ru_maxrss
|
check_struct "sys/time.h sys/resource.h" "struct rusage" ru_maxrss
|
||||||
|
|
||||||
|
@@ -16,7 +16,9 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if HAVE_UTGETOSTYPEFROMSTRING
|
||||||
#include <CoreServices/CoreServices.h>
|
#include <CoreServices/CoreServices.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "libavcodec/avcodec.h"
|
#include "libavcodec/avcodec.h"
|
||||||
@@ -168,7 +170,13 @@ int videotoolbox_init(AVCodecContext *s)
|
|||||||
CFStringRef pixfmt_str = CFStringCreateWithCString(kCFAllocatorDefault,
|
CFStringRef pixfmt_str = CFStringCreateWithCString(kCFAllocatorDefault,
|
||||||
videotoolbox_pixfmt,
|
videotoolbox_pixfmt,
|
||||||
kCFStringEncodingUTF8);
|
kCFStringEncodingUTF8);
|
||||||
|
#if HAVE_UTGETOSTYPEFROMSTRING
|
||||||
vdactx->cv_pix_fmt_type = UTGetOSTypeFromString(pixfmt_str);
|
vdactx->cv_pix_fmt_type = UTGetOSTypeFromString(pixfmt_str);
|
||||||
|
#else
|
||||||
|
av_log(s, loglevel, "UTGetOSTypeFromString() is not available "
|
||||||
|
"on this platform, %s pixel format can not be honored from "
|
||||||
|
"the command line\n", videotoolbox_pixfmt);
|
||||||
|
#endif
|
||||||
ret = av_vda_default_init2(s, vdactx);
|
ret = av_vda_default_init2(s, vdactx);
|
||||||
CFRelease(pixfmt_str);
|
CFRelease(pixfmt_str);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user