URGENT: I got this issue when I build the script for the latest version of ffmpeg source code
Vetagiri-Hrushikesh opened this issue · 4 comments
src/libavdevice/audiotoolbox.m:78:5: error: unknown type name 'AudioDeviceID'; did you mean 'AudioFileID'?
AudioDeviceID devices;
^~~~~~~~~~~~~
AudioFileID
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioFile.h:197:35: note:
'AudioFileID' declared here
typedef struct OpaqueAudioFileID AudioFileID;
^
src/libavdevice/audiotoolbox.m:84:5: error: use of undeclared identifier 'AudioObjectPropertyAddress'
AudioObjectPropertyAddress prop;
^
src/libavdevice/audiotoolbox.m:85:5: error: use of undeclared identifier 'prop'
prop.mSelector = kAudioHardwarePropertyDevices;
^
CC libavdevice/utils.o
src/libavdevice/audiotoolbox.m:85:22: error: use of undeclared identifier 'kAudioHardwarePropertyDevices'
prop.mSelector = kAudioHardwarePropertyDevices;
^
src/libavdevice/audiotoolbox.m:86:5: error: use of undeclared identifier 'prop'
prop.mScope = kAudioObjectPropertyScopeGlobal;
^
src/libavdevice/audiotoolbox.m:86:22: error: use of undeclared identifier 'kAudioObjectPropertyScopeGlobal'
prop.mScope = kAudioObjectPropertyScopeGlobal;
^
src/libavdevice/audiotoolbox.m:87:5: error: use of undeclared identifier 'prop'
prop.mElement = kAudioObjectPropertyElementMaster;
^
src/libavdevice/audiotoolbox.m:87:22: error: use of undeclared identifier 'kAudioObjectPropertyElementMaster'; did you mean 'kAudioUnitProperty_ElementName'?
prop.mElement = kAudioObjectPropertyElementMaster;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kAudioUnitProperty_ElementName
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioUnitProperties.h:803:2: note:
'kAudioUnitProperty_ElementName' declared here
kAudioUnitProperty_ElementName = 30,
^
src/libavdevice/audiotoolbox.m:88:11: error: implicit declaration of function 'AudioObjectGetPropertyDataSize' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
err = AudioObjectGetPropertyDataSize(kAudioObjectSystemObject, &prop, 0, NULL, &data_size);
^
src/libavdevice/audiotoolbox.m:88:11: note: did you mean 'AudioQueueGetPropertySize'?
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioQueue.h:1458:1: note:
'AudioQueueGetPropertySize' declared here
AudioQueueGetPropertySize( AudioQueueRef inAQ,
^
src/libavdevice/audiotoolbox.m:88:42: error: use of undeclared identifier 'kAudioObjectSystemObject'
err = AudioObjectGetPropertyDataSize(kAudioObjectSystemObject, &prop, 0, NULL, &data_size);
^
src/libavdevice/audiotoolbox.m:88:69: error: use of undeclared identifier 'prop'
err = AudioObjectGetPropertyDataSize(kAudioObjectSystemObject, &prop, 0, NULL, &data_size);
^
src/libavdevice/audiotoolbox.m:92:38: error: use of undeclared identifier 'AudioDeviceID'
num_devices = data_size / sizeof(AudioDeviceID);
^
src/libavdevice/audiotoolbox.m:94:30: error: expected expression
devices = (AudioDeviceID)(av_malloc(data_size));
^
src/libavdevice/audiotoolbox.m:94:16: error: use of undeclared identifier 'AudioDeviceID'
devices = (AudioDeviceID)(av_malloc(data_size));
^
src/libavdevice/audiotoolbox.m:95:11: error: implicit declaration of function 'AudioObjectGetPropertyData' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
err = AudioObjectGetPropertyData(kAudioObjectSystemObject, &prop, 0, NULL, &data_size, devices);
^
src/libavdevice/audiotoolbox.m:95:11: note: did you mean 'AudioObjectGetPropertyDataSize'?
src/libavdevice/audiotoolbox.m:88:11: note: 'AudioObjectGetPropertyDataSize' declared here
err = AudioObjectGetPropertyDataSize(kAudioObjectSystemObject, &prop, 0, NULL, &data_size);
^
src/libavdevice/audiotoolbox.m:95:38: error: use of undeclared identifier 'kAudioObjectSystemObject'
err = AudioObjectGetPropertyData(kAudioObjectSystemObject, &prop, 0, NULL, &data_size, devices);
^
src/libavdevice/audiotoolbox.m:95:65: error: use of undeclared identifier 'prop'
err = AudioObjectGetPropertyData(kAudioObjectSystemObject, &prop, 0, NULL, &data_size, devices);
^
src/libavdevice/audiotoolbox.m:104:9: error: use of undeclared identifier 'prop'
prop.mScope = kAudioDevicePropertyScopeInput;
^
CC libavformat/3dostr.o
src/libavdevice/audiotoolbox.m:104:23: error: use of undeclared identifier 'kAudioDevicePropertyScopeInput'
prop.mScope = kAudioDevicePropertyScopeInput;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [libavdevice/audiotoolbox.o] Error 1
make: *** Waiting for unfinished jobs....
Thank in advance for solving
Add "--disable-audiotoolbox" to CONFIGURE_FLAGS.
if I used "--disable-audiotoolbox" it means that audio encode and decode does not support hardware acceleration?
also get these errors, Add "--disable-audiotoolbox" to CONFIGURE_FLAGS Fix it. But why?
Because AudioDeviceID
and so on are not available for iOS. https://developer.apple.com/documentation/coreaudio/audiodeviceid