提交
This commit is contained in:
41
Pods/AgoraRtcEngine_iOS/AgoraAiEchoCancellationExtension.xcframework/Info.plist
generated
Normal file
41
Pods/AgoraRtcEngine_iOS/AgoraAiEchoCancellationExtension.xcframework/Info.plist
generated
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_armv7</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraAiEchoCancellationExtension.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraAiEchoCancellationExtension.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AgoraAiEchoCancellationExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.agora.AgoraAiEchoCancellationExtension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AgoraAiEchoCancellationExtension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.0.4</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2014-2025 Agora. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AgoraAiEchoCancellationExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.agora.AgoraAiEchoCancellationExtension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AgoraAiEchoCancellationExtension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.0.4</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2014-2025 Agora. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
41
Pods/AgoraRtcEngine_iOS/AgoraAiEchoCancellationLLExtension.xcframework/Info.plist
generated
Normal file
41
Pods/AgoraRtcEngine_iOS/AgoraAiEchoCancellationLLExtension.xcframework/Info.plist
generated
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraAiEchoCancellationLLExtension.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_armv7</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraAiEchoCancellationLLExtension.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AgoraAiEchoCancellationLLExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.agora.AgoraAiEchoCancellationLLExtension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AgoraAiEchoCancellationLLExtension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.0.4</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2014-2025 Agora. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AgoraAiEchoCancellationLLExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.agora.AgoraAiEchoCancellationLLExtension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AgoraAiEchoCancellationLLExtension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.0.4</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2014-2025 Agora. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
41
Pods/AgoraRtcEngine_iOS/AgoraAiNoiseSuppressionExtension.xcframework/Info.plist
generated
Normal file
41
Pods/AgoraRtcEngine_iOS/AgoraAiNoiseSuppressionExtension.xcframework/Info.plist
generated
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_armv7</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraAiNoiseSuppressionExtension.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraAiNoiseSuppressionExtension.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AgoraAiNoiseSuppressionExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.agora.AgoraAiNoiseSuppressionExtension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AgoraAiNoiseSuppressionExtension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>4.0.1</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2014-2025 Agora. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AgoraAiNoiseSuppressionExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.agora.AgoraAiNoiseSuppressionExtension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AgoraAiNoiseSuppressionExtension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>4.0.1</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2014-2025 Agora. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
41
Pods/AgoraRtcEngine_iOS/AgoraAiNoiseSuppressionLLExtension.xcframework/Info.plist
generated
Normal file
41
Pods/AgoraRtcEngine_iOS/AgoraAiNoiseSuppressionLLExtension.xcframework/Info.plist
generated
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_armv7</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraAiNoiseSuppressionLLExtension.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraAiNoiseSuppressionLLExtension.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AgoraAiNoiseSuppressionLLExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.agora.AgoraAiNoiseSuppressionLLExtension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AgoraAiNoiseSuppressionLLExtension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>4.1.0</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2014-2025 Agora. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AgoraAiNoiseSuppressionLLExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.agora.AgoraAiNoiseSuppressionLLExtension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AgoraAiNoiseSuppressionLLExtension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>4.1.0</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2014-2025 Agora. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
41
Pods/AgoraRtcEngine_iOS/AgoraAudioBeautyExtension.xcframework/Info.plist
generated
Normal file
41
Pods/AgoraRtcEngine_iOS/AgoraAudioBeautyExtension.xcframework/Info.plist
generated
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraAudioBeautyExtension.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_armv7</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraAudioBeautyExtension.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AgoraAudioBeautyExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.agora.AgoraAudioBeautyExtension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AgoraAudioBeautyExtension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.0</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2014-2025 Agora. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AgoraAudioBeautyExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.agora.AgoraAudioBeautyExtension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AgoraAudioBeautyExtension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.0</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2014-2025 Agora. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
41
Pods/AgoraRtcEngine_iOS/AgoraClearVisionExtension.xcframework/Info.plist
generated
Normal file
41
Pods/AgoraRtcEngine_iOS/AgoraClearVisionExtension.xcframework/Info.plist
generated
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraClearVisionExtension.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_armv7</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraClearVisionExtension.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AgoraClearVisionExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.agora.AgoraClearVisionExtension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AgoraClearVisionExtension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>5.3.16</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2014-2025 Agora. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AgoraClearVisionExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.agora.AgoraClearVisionExtension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AgoraClearVisionExtension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>5.3.16</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2014-2025 Agora. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
41
Pods/AgoraRtcEngine_iOS/AgoraContentInspectExtension.xcframework/Info.plist
generated
Normal file
41
Pods/AgoraRtcEngine_iOS/AgoraContentInspectExtension.xcframework/Info.plist
generated
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_armv7</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraContentInspectExtension.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraContentInspectExtension.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AgoraContentInspectExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.agora.AgoraContentInspectExtension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AgoraContentInspectExtension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.0</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2014-2025 Agora. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AgoraContentInspectExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.agora.AgoraContentInspectExtension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AgoraContentInspectExtension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.0</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2014-2025 Agora. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
41
Pods/AgoraRtcEngine_iOS/AgoraFaceCaptureExtension.xcframework/Info.plist
generated
Normal file
41
Pods/AgoraRtcEngine_iOS/AgoraFaceCaptureExtension.xcframework/Info.plist
generated
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraFaceCaptureExtension.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_armv7</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraFaceCaptureExtension.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AgoraFaceCaptureExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.agora.AgoraFaceCaptureExtension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AgoraFaceCaptureExtension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.0</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2014-2025 Agora. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AgoraFaceCaptureExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.agora.AgoraFaceCaptureExtension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AgoraFaceCaptureExtension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.0</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2014-2025 Agora. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
41
Pods/AgoraRtcEngine_iOS/AgoraFaceDetectionExtension.xcframework/Info.plist
generated
Normal file
41
Pods/AgoraRtcEngine_iOS/AgoraFaceDetectionExtension.xcframework/Info.plist
generated
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_armv7</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraFaceDetectionExtension.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraFaceDetectionExtension.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AgoraFaceDetectionExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.agora.AgoraFaceDetectionExtension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AgoraFaceDetectionExtension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.0.0</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2014-2025 Agora. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AgoraFaceDetectionExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.agora.AgoraFaceDetectionExtension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AgoraFaceDetectionExtension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.0.0</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2014-2025 Agora. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
41
Pods/AgoraRtcEngine_iOS/AgoraLipSyncExtension.xcframework/Info.plist
generated
Normal file
41
Pods/AgoraRtcEngine_iOS/AgoraLipSyncExtension.xcframework/Info.plist
generated
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_armv7</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraLipSyncExtension.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraLipSyncExtension.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AgoraLipSyncExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.agora.AgoraLipSyncExtension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AgoraLipSyncExtension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.0</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2014-2025 Agora. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AgoraLipSyncExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.agora.AgoraLipSyncExtension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AgoraLipSyncExtension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.0</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2014-2025 Agora. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
41
Pods/AgoraRtcEngine_iOS/AgoraReplayKitExtension.xcframework/Info.plist
generated
Normal file
41
Pods/AgoraRtcEngine_iOS/AgoraReplayKitExtension.xcframework/Info.plist
generated
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_armv7</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraReplayKitExtension.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraReplayKitExtension.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// AgoraSampleHander.h
|
||||
// BroadCastUI
|
||||
//
|
||||
// Created by Agora on 2022/1/25.
|
||||
// Copyright (c) 2022 Agora IO. All rights reserved.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <ReplayKit/ReplayKit.h>
|
||||
typedef enum {
|
||||
// Failed to connect to the app process, Please call startScreenCapture in the app process.
|
||||
AgoraReplayKitExtReasonConnectFail = 1,
|
||||
// Disconnected from the app process. Please Check the APP process exits or not.
|
||||
AgoraReplayKitExtReasonDisconnect = 2,
|
||||
// Stopped by the user or the app process.
|
||||
AgoraReplayKitExtReasonInitiativeStop = 3,
|
||||
} AgoraReplayKitExtReason;
|
||||
|
||||
@class AgoraReplayKitExt;
|
||||
|
||||
@protocol AgoraReplayKitExtDelegate <NSObject>
|
||||
|
||||
- (void)broadcastFinished:(AgoraReplayKitExt* _Nonnull)broadcast
|
||||
reason:(AgoraReplayKitExtReason)reason;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
API_AVAILABLE(ios(11.0))
|
||||
NS_SWIFT_NAME(AgoraReplayKitExt)
|
||||
__attribute__((visibility("default")))
|
||||
@interface AgoraReplayKitExt : NSObject
|
||||
|
||||
+ (instancetype)shareInstance;
|
||||
|
||||
- (void)start:(id<AgoraReplayKitExtDelegate>)delegate;
|
||||
- (void)stop;
|
||||
- (void)resume;
|
||||
- (void)pause;
|
||||
- (void)pushSampleBuffer:(CMSampleBufferRef)sampleBuffer
|
||||
withType:(RPSampleBufferType)sampleBufferType;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// AgoraReplayKitExtension.h
|
||||
// AgoraScreenShare
|
||||
//
|
||||
// Created by Agora on 2022/1/25.
|
||||
// Copyright (c) 2022 Agora IO. All rights reserved.
|
||||
|
||||
#ifndef AgoraReplayKitExtension_h
|
||||
#define AgoraReplayKitExtension_h
|
||||
|
||||
#import <AgoraReplayKitExtension/AgoraReplayKitExt.h>
|
||||
#import <AgoraReplayKitExtension/AgoraReplayKitHandler.h>
|
||||
|
||||
|
||||
#endif /* AgoraReplayKitExtension_h */
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// SampleHandler.h
|
||||
// BroadCastUI
|
||||
//
|
||||
// Created by Agora on 2022/1/25.
|
||||
// Copyright (c) 2022 Agora IO. All rights reserved.
|
||||
|
||||
#import <ReplayKit/ReplayKit.h>
|
||||
|
||||
API_AVAILABLE(ios(11.0))
|
||||
__attribute__((visibility("default")))
|
||||
@interface AgoraReplayKitHandler : RPBroadcastSampleHandler
|
||||
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AgoraReplayKitExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.agora.AgoraReplayKitExtension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AgoraReplayKitExtension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.0</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2014-2025 Agora. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,12 @@
|
||||
framework module AgoraReplayKitExtension {
|
||||
header "AgoraReplayKitExtension.h"
|
||||
module AgoraReplayKitExt {
|
||||
header "AgoraReplayKitExt.h"
|
||||
export *
|
||||
}
|
||||
module AgoraReplayKitHandler {
|
||||
header "AgoraReplayKitHandler.h"
|
||||
export *
|
||||
}
|
||||
export *
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// AgoraSampleHander.h
|
||||
// BroadCastUI
|
||||
//
|
||||
// Created by Agora on 2022/1/25.
|
||||
// Copyright (c) 2022 Agora IO. All rights reserved.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <ReplayKit/ReplayKit.h>
|
||||
typedef enum {
|
||||
// Failed to connect to the app process, Please call startScreenCapture in the app process.
|
||||
AgoraReplayKitExtReasonConnectFail = 1,
|
||||
// Disconnected from the app process. Please Check the APP process exits or not.
|
||||
AgoraReplayKitExtReasonDisconnect = 2,
|
||||
// Stopped by the user or the app process.
|
||||
AgoraReplayKitExtReasonInitiativeStop = 3,
|
||||
} AgoraReplayKitExtReason;
|
||||
|
||||
@class AgoraReplayKitExt;
|
||||
|
||||
@protocol AgoraReplayKitExtDelegate <NSObject>
|
||||
|
||||
- (void)broadcastFinished:(AgoraReplayKitExt* _Nonnull)broadcast
|
||||
reason:(AgoraReplayKitExtReason)reason;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
API_AVAILABLE(ios(11.0))
|
||||
NS_SWIFT_NAME(AgoraReplayKitExt)
|
||||
__attribute__((visibility("default")))
|
||||
@interface AgoraReplayKitExt : NSObject
|
||||
|
||||
+ (instancetype)shareInstance;
|
||||
|
||||
- (void)start:(id<AgoraReplayKitExtDelegate>)delegate;
|
||||
- (void)stop;
|
||||
- (void)resume;
|
||||
- (void)pause;
|
||||
- (void)pushSampleBuffer:(CMSampleBufferRef)sampleBuffer
|
||||
withType:(RPSampleBufferType)sampleBufferType;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// AgoraReplayKitExtension.h
|
||||
// AgoraScreenShare
|
||||
//
|
||||
// Created by Agora on 2022/1/25.
|
||||
// Copyright (c) 2022 Agora IO. All rights reserved.
|
||||
|
||||
#ifndef AgoraReplayKitExtension_h
|
||||
#define AgoraReplayKitExtension_h
|
||||
|
||||
#import <AgoraReplayKitExtension/AgoraReplayKitExt.h>
|
||||
#import <AgoraReplayKitExtension/AgoraReplayKitHandler.h>
|
||||
|
||||
|
||||
#endif /* AgoraReplayKitExtension_h */
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// SampleHandler.h
|
||||
// BroadCastUI
|
||||
//
|
||||
// Created by Agora on 2022/1/25.
|
||||
// Copyright (c) 2022 Agora IO. All rights reserved.
|
||||
|
||||
#import <ReplayKit/ReplayKit.h>
|
||||
|
||||
API_AVAILABLE(ios(11.0))
|
||||
__attribute__((visibility("default")))
|
||||
@interface AgoraReplayKitHandler : RPBroadcastSampleHandler
|
||||
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AgoraReplayKitExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.agora.AgoraReplayKitExtension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AgoraReplayKitExtension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.0</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2014-2025 Agora. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,12 @@
|
||||
framework module AgoraReplayKitExtension {
|
||||
header "AgoraReplayKitExtension.h"
|
||||
module AgoraReplayKitExt {
|
||||
header "AgoraReplayKitExt.h"
|
||||
export *
|
||||
}
|
||||
module AgoraReplayKitHandler {
|
||||
header "AgoraReplayKitHandler.h"
|
||||
export *
|
||||
}
|
||||
export *
|
||||
}
|
||||
41
Pods/AgoraRtcEngine_iOS/AgoraRtcKit.xcframework/Info.plist
generated
Normal file
41
Pods/AgoraRtcEngine_iOS/AgoraRtcKit.xcframework/Info.plist
generated
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_armv7</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraRtcKit.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AgoraRtcKit.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
Pods/AgoraRtcEngine_iOS/AgoraRtcKit.xcframework/ios-arm64_armv7/AgoraRtcKit.framework/AgoraRtcKit
generated
Executable file
BIN
Pods/AgoraRtcEngine_iOS/AgoraRtcKit.xcframework/ios-arm64_armv7/AgoraRtcKit.framework/AgoraRtcKit
generated
Executable file
Binary file not shown.
@@ -0,0 +1,73 @@
|
||||
// Copyright (c) 2020 Agora.io. All rights reserved
|
||||
|
||||
// This program is confidential and proprietary to Agora.io.
|
||||
// And may not be copied, reproduced, modified, disclosed to others, published
|
||||
// or used, in whole or in part, without the express prior written permission
|
||||
// of Agora.io.
|
||||
#pragma once
|
||||
|
||||
#if defined(_WIN32)
|
||||
// clang-format off
|
||||
// clang formating would change include order.
|
||||
|
||||
// Include WinSock2.h before including <Windows.h> to maintain consistency with
|
||||
// win32.h. To include win32.h directly, it must be broken out into its own
|
||||
// build target.
|
||||
#include <WinSock2.h>
|
||||
#include <Windows.h>
|
||||
// clang-format on
|
||||
#endif // _WIN32
|
||||
|
||||
namespace agora {
|
||||
|
||||
class AtomicOps {
|
||||
public:
|
||||
#if defined(_WIN32)
|
||||
// Assumes sizeof(int) == sizeof(LONG), which it is on Win32 and Win64.
|
||||
static int Increment(volatile int* i) {
|
||||
return ::InterlockedIncrement(reinterpret_cast<volatile LONG*>(i));
|
||||
}
|
||||
static int Decrement(volatile int* i) {
|
||||
return ::InterlockedDecrement(reinterpret_cast<volatile LONG*>(i));
|
||||
}
|
||||
static int AcquireLoad(volatile const int* i) { return *i; }
|
||||
static void ReleaseStore(volatile int* i, int value) { *i = value; }
|
||||
static int CompareAndSwap(volatile int* i, int old_value, int new_value) {
|
||||
return ::InterlockedCompareExchange(reinterpret_cast<volatile LONG*>(i),
|
||||
new_value, old_value);
|
||||
}
|
||||
// Pointer variants.
|
||||
template <typename T>
|
||||
static T* AcquireLoadPtr(T* volatile* ptr) {
|
||||
return *ptr;
|
||||
}
|
||||
template <typename T>
|
||||
static T* CompareAndSwapPtr(T* volatile* ptr, T* old_value, T* new_value) {
|
||||
return static_cast<T*>(::InterlockedCompareExchangePointer(
|
||||
reinterpret_cast<PVOID volatile*>(ptr), new_value, old_value));
|
||||
}
|
||||
#else
|
||||
static int Increment(volatile int* i) { return __sync_add_and_fetch(i, 1); }
|
||||
static int Decrement(volatile int* i) { return __sync_sub_and_fetch(i, 1); }
|
||||
static int AcquireLoad(volatile const int* i) {
|
||||
return __atomic_load_n(i, __ATOMIC_ACQUIRE);
|
||||
}
|
||||
static void ReleaseStore(volatile int* i, int value) {
|
||||
__atomic_store_n(i, value, __ATOMIC_RELEASE);
|
||||
}
|
||||
static int CompareAndSwap(volatile int* i, int old_value, int new_value) {
|
||||
return __sync_val_compare_and_swap(i, old_value, new_value);
|
||||
}
|
||||
// Pointer variants.
|
||||
template <typename T>
|
||||
static T* AcquireLoadPtr(T* volatile* ptr) {
|
||||
return __atomic_load_n(ptr, __ATOMIC_ACQUIRE);
|
||||
}
|
||||
template <typename T>
|
||||
static T* CompareAndSwapPtr(T* volatile* ptr, T* old_value, T* new_value) {
|
||||
return __sync_val_compare_and_swap(ptr, old_value, new_value);
|
||||
}
|
||||
#endif // _WIN32
|
||||
};
|
||||
|
||||
} // namespace agora
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// AgoraRtcEngineKit.h
|
||||
// AgoraRtcEngineKit
|
||||
//
|
||||
// Copyright (c) 2018 Agora. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AgoraConstants.h"
|
||||
#import "AgoraObjects.h"
|
||||
|
||||
/** Agora provides ensured quality of experience (QoE) for worldwide Internet-based voice and video communications through a virtual global network that is especially optimized for real-time web and mobile-to-mobile applications.
|
||||
|
||||
The AgoraRtcEngineKit class is the entry point of the Agora SDK that provides simple APIs for applications to easily start voice and video communication.
|
||||
*/
|
||||
@class AgoraRtcEngineKit;
|
||||
@class AgoraMediaRecorder;
|
||||
|
||||
@protocol AgoraAudioEncodedFrameDelegate <NSObject>
|
||||
@required
|
||||
|
||||
/**
|
||||
* Occurs when the record audio data is received.
|
||||
*/
|
||||
- (void)onRecordEncodedAudioFrame:(NSData* _Nonnull)frameData info:(AgoraEncodedAudioFrameInfo* _Nonnull)info NS_SWIFT_NAME(onRecordEncodedAudioFrame(_:info:));
|
||||
|
||||
/**
|
||||
* Occurs when the playback audio data is received.
|
||||
*/
|
||||
- (void)onPlaybackEncodedAudioFrame:(NSData* _Nonnull)frameData info:(AgoraEncodedAudioFrameInfo* _Nonnull)info NS_SWIFT_NAME(onPlaybackEncodedAudioFrame(_:info:));
|
||||
|
||||
/**
|
||||
* Occurs when the mixed audio data is received.
|
||||
*/
|
||||
- (void)onMixedEncodedAudioFrame:(NSData* _Nonnull)frameData info:(AgoraEncodedAudioFrameInfo* _Nonnull)info NS_SWIFT_NAME(onMixedEncodedAudioFrame(_:info:));
|
||||
@end
|
||||
@@ -0,0 +1,204 @@
|
||||
//
|
||||
// AgoraRtcEngineKit.h
|
||||
// AgoraRtcEngineKit
|
||||
//
|
||||
// Copyright (c) 2018 Agora. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AgoraEnumerates.h"
|
||||
|
||||
@class AgoraAudioFrame;
|
||||
@class AgoraAudioParams;
|
||||
|
||||
/**
|
||||
* The AgoraAudioFrameDelegate protocol enables audio frame callback event notifications to your application.
|
||||
*/
|
||||
@protocol AgoraAudioFrameDelegate <NSObject>
|
||||
@optional
|
||||
|
||||
/**
|
||||
* Occurs when the recorded audio frame is received.
|
||||
* @param frame A pointer to the audio frame: AgoraAudioFrame.
|
||||
* @param channelId Unique channel name for the AgoraRTC session in the string
|
||||
* format. The string length must be less than 64 bytes. Supported character
|
||||
* scopes are:
|
||||
* - All lowercase English letters: a to z.
|
||||
* - All uppercase English letters: A to Z.
|
||||
* - All numeric characters: 0 to 9.
|
||||
* - The space character.
|
||||
* - Punctuation characters and other symbols, including: "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", " {", "}", "|", "~", ",".
|
||||
* @return
|
||||
* - true: The recorded audio frame is valid and is encoded and sent.
|
||||
* - false: The recorded audio frame is invalid and is not encoded or sent.
|
||||
*/
|
||||
- (BOOL)onRecordAudioFrame:(AgoraAudioFrame* _Nonnull)frame channelId:(NSString * _Nonnull)channelId NS_SWIFT_NAME(onRecordAudioFrame(_:channelId:));
|
||||
|
||||
/**
|
||||
* Occurs when the playback audio frame is received.
|
||||
* @param channelId Unique channel name for the AgoraRTC session in the string
|
||||
* format. The string length must be less than 64 bytes. Supported character
|
||||
* scopes are:
|
||||
* - All lowercase English letters: a to z.
|
||||
* - All uppercase English letters: A to Z.
|
||||
* - All numeric characters: 0 to 9.
|
||||
* - The space character.
|
||||
* - Punctuation characters and other symbols, including: "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", " {", "}", "|", "~", ",".
|
||||
* @param frame A pointer to the audio frame: AgoraAudioFrame.
|
||||
* @return
|
||||
* - true: The playback audio frame is valid and is encoded and sent.
|
||||
* - false: The playback audio frame is invalid and is not encoded or sent.
|
||||
*/
|
||||
- (BOOL)onPlaybackAudioFrame:(AgoraAudioFrame* _Nonnull)frame channelId:(NSString * _Nonnull)channelId NS_SWIFT_NAME(onPlaybackAudioFrame(_:channelId:));
|
||||
|
||||
/**
|
||||
* Occurs when the mixed audio data is received.
|
||||
* @param frame The A pointer to the audio frame: AgoraAudioFrame.
|
||||
* @param channelId Unique channel name for the AgoraRTC session in the string
|
||||
* format. The string length must be less than 64 bytes. Supported character
|
||||
* scopes are:
|
||||
* - All lowercase English letters: a to z.
|
||||
* - All uppercase English letters: A to Z.
|
||||
* - All numeric characters: 0 to 9.
|
||||
* - The space character.
|
||||
* - Punctuation characters and other symbols, including: "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", " {", "}", "|", "~", ",".
|
||||
* @return
|
||||
* - true: The mixed audio data is valid and is encoded and sent.
|
||||
* - false: The mixed audio data is invalid and is not encoded or sent.
|
||||
*/
|
||||
- (BOOL)onMixedAudioFrame:(AgoraAudioFrame* _Nonnull)frame channelId:(NSString * _Nonnull)channelId NS_SWIFT_NAME(onMixedAudioFrame(_:channelId:));
|
||||
|
||||
/**
|
||||
* Occurs when the ear monitoring audio frame is received.
|
||||
* @param frame A pointer to the audio frame: AgoraAudioFrame.
|
||||
* @return
|
||||
* - true: The ear monitoring audio frame is valid and is encoded and sent.
|
||||
* - false: The ear monitoring audio frame is invalid and is not encoded or sent.
|
||||
*/
|
||||
- (BOOL)onEarMonitoringAudioFrame:(AgoraAudioFrame* _Nonnull)frame NS_SWIFT_NAME(onEarMonitoringAudioFrame(_:));
|
||||
|
||||
/**
|
||||
Sets the frame position for the audio observer.
|
||||
* @return A bit mask that controls the frame position of the audio observer.
|
||||
* @note - Use '|' (the OR operator) to observe multiple frame positions.
|
||||
* <p>
|
||||
* After you successfully register the audio observer, the SDK triggers this callback each time it receives a audio frame. You can determine which position to observe by setting the return value.
|
||||
* The SDK provides 4 positions for observer. Each position corresponds to a callback function:
|
||||
* - `AgoraAudioFramePositionPlayback (1 << 0)`: The position for playback audio frame is received, which corresponds to the \ref onPlaybackFrame "onPlaybackFrame" callback.
|
||||
* - `AgoraAudioFramePositionRecord (1 << 1)`: The position for record audio frame is received, which corresponds to the \ref onRecordFrame "onRecordFrame" callback.
|
||||
* - `AgoraAudioFramePositionMixed (1 << 2)`: The position for mixed audio frame is received, which corresponds to the \ref onMixedFrame "onMixedFrame" callback.
|
||||
* - `AgoraAudioFramePositionBeforeMixing (1 << 3)`: The position for playback audio frame before mixing is received, which corresponds to the \ref onPlaybackFrameBeforeMixing "onPlaybackFrameBeforeMixing" callback.
|
||||
* @return The bit mask that controls the audio observation positions.
|
||||
See AgoraAudioFramePosition.
|
||||
*/
|
||||
|
||||
- (AgoraAudioFramePosition)getObservedAudioFramePosition NS_SWIFT_NAME(getObservedAudioFramePosition());
|
||||
|
||||
/** Sets the audio mixing format for the
|
||||
[onMixedAudioFrame]([AgoraAudioFrameDelegate onMixedAudioFrame:]) callback.
|
||||
|
||||
Register the `getMixedAudioParams` callback when calling the
|
||||
[setAudioFrameDelegate]([AgoraRtcEngineKit setAudioFrameDelegate:]) method. After you
|
||||
successfully register the audio delegate, the SDK triggers this callback each
|
||||
time it receives an audio frame. You can set the audio mixing format in
|
||||
the return value of this callback.
|
||||
|
||||
**Note**:
|
||||
|
||||
- The SDK calculates the sample interval according to the `AgoraAudioParams`
|
||||
you set in the return value of this callback and triggers the
|
||||
`onMixedAudioFrame` callback at the calculated sample interval.
|
||||
Sample interval (seconds) = `samplesPerCall`/(`sampleRate` × `channel`).
|
||||
Ensure that the value of sample interval is equal to or greater than 0.01.
|
||||
|
||||
@return Sets the audio format. See AgoraAudioParams.
|
||||
*/
|
||||
- (AgoraAudioParams* _Nonnull)getMixedAudioParams NS_SWIFT_NAME(getMixedAudioParams());
|
||||
|
||||
/** Sets the audio recording format for the
|
||||
[onRecordAudioFrame]([AgoraAudioFrameDelegate onRecordAudioFrame:])
|
||||
callback.
|
||||
|
||||
Register the `getRecordAudioParams` callback when calling the
|
||||
[setAudioFrameDelegate]([AgoraRtcEngineKit setAudioFrameDelegate:]) method. After you
|
||||
successfully register the audio delegate, the SDK triggers this callback each
|
||||
time it receives an audio frame. You can set the audio recording format in
|
||||
the return value of this callback.
|
||||
|
||||
**Note**:
|
||||
|
||||
- This callback applies to iOS only.
|
||||
- The SDK calculates the sample interval according to the `AgoraAudioParams`
|
||||
you set in the return value of this callback and triggers the
|
||||
`onRecordAudioFrame` callback at the calculated sample interval.
|
||||
Sample interval (seconds) = `samplesPerCall`/(`sampleRate` × `channel`).
|
||||
Ensure that the value of sample interval is equal to or greater than 0.01.
|
||||
|
||||
@return Sets the audio format. See AgoraAudioParams.
|
||||
*/
|
||||
- (AgoraAudioParams* _Nonnull)getRecordAudioParams NS_SWIFT_NAME(getRecordAudioParams());
|
||||
|
||||
/** Sets the audio playback format for the
|
||||
[onPlaybackAudioFrame]([AgoraAudioFrameDelegate onPlaybackAudioFrame:])
|
||||
callback.
|
||||
|
||||
Register the `getPlaybackAudioParams` callback when calling the
|
||||
[setAudioFrameDelegate]([AgoraRtcEngineKit setAudioFrameDelegate:]) method. After you
|
||||
successfully register the audio delegate, the SDK triggers this callback each
|
||||
time it receives an audio frame. You can set the audio playback format in
|
||||
the return value of this callback.
|
||||
|
||||
**Note**:
|
||||
|
||||
- The SDK calculates the sample interval according to the `AgoraAudioParams`
|
||||
you set in the return value of this callback and triggers the
|
||||
`onPlaybackAudioFrame` callback at the calculated sample interval.
|
||||
Sample interval (seconds) = `samplesPerCall`/(`sampleRate` × `channel`).
|
||||
Ensure that the value of sample interval is equal to or greater than 0.01.
|
||||
|
||||
@return Sets the audio format. See AgoraAudioParams.
|
||||
*/
|
||||
- (AgoraAudioParams* _Nonnull)getPlaybackAudioParams NS_SWIFT_NAME(getPlaybackAudioParams());
|
||||
|
||||
/** Sets the audio recording format for the
|
||||
[onEarMonitoringAudioFrame]([AgoraAudioFrameDelegate onEarMonitoringAudioFrame:])
|
||||
callback.
|
||||
|
||||
Register the `getEarMonitoringAudioParams` callback when calling the
|
||||
[setAudioFrameDelegate]([AgoraRtcEngineKit setAudioFrameDelegate:]) method. After you
|
||||
successfully register the audio delegate, the SDK triggers this callback each
|
||||
time it receives an audio frame. You can set the audio recording format in
|
||||
the return value of this callback.
|
||||
|
||||
**Note**:
|
||||
|
||||
- This callback applies to iOS only.
|
||||
- The SDK calculates the sample interval according to the `AgoraAudioParams`
|
||||
you set in the return value of this callback and triggers the
|
||||
`onEarMonitoringAudioFrame` callback at the calculated sample interval.
|
||||
Sample interval (seconds) = `samplesPerCall`/(`sampleRate` × `channel`).
|
||||
Ensure that the value of sample interval is equal to or greater than 0.01.
|
||||
|
||||
@return Sets the audio format. See AgoraAudioParams.
|
||||
*/
|
||||
- (AgoraAudioParams* _Nonnull)getEarMonitoringAudioParams NS_SWIFT_NAME(getEarMonitoringAudioParams());
|
||||
|
||||
/**
|
||||
* Occurs when the before-mixing playback audio frame is received.
|
||||
* @param channelId Unique channel name for the AgoraRTC session in the string
|
||||
* format. The string length must be less than 64 bytes. Supported character
|
||||
* scopes are:
|
||||
* - All lowercase English letters: a to z.
|
||||
* - All uppercase English letters: A to Z.
|
||||
* - All numeric characters: 0 to 9.
|
||||
* - The space character.
|
||||
* - Punctuation characters and other symbols, including: "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", " {", "}", "|", "~", ",".
|
||||
* @param uid ID of the remote user.
|
||||
* @param frame A pointer to the audio frame: AgoraAudioFrame.
|
||||
* @return
|
||||
* - true: The before-mixing playback audio frame is valid and is encoded and sent.
|
||||
* - false: The before-mixing playback audio frame is invalid and is not encoded or sent.
|
||||
*/
|
||||
- (BOOL)onPlaybackAudioFrameBeforeMixing:(AgoraAudioFrame* _Nonnull)frame channelId:(NSString * _Nonnull)channelId uid:(NSUInteger)uid NS_SWIFT_NAME(onPlaybackAudioFrame(beforeMixing:channelId:uid:));
|
||||
|
||||
@end
|
||||
7035
Pods/AgoraRtcEngine_iOS/AgoraRtcKit.xcframework/ios-arm64_armv7/AgoraRtcKit.framework/Headers/AgoraBase.h
generated
Normal file
7035
Pods/AgoraRtcEngine_iOS/AgoraRtcKit.xcframework/ios-arm64_armv7/AgoraRtcKit.framework/Headers/AgoraBase.h
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,122 @@
|
||||
//
|
||||
// AgoraConstants.h
|
||||
// AgoraRtcEngineKit
|
||||
//
|
||||
// Copyright (c) 2018 Agora. All rights reserved.
|
||||
//
|
||||
#import <Foundation/Foundation.h>
|
||||
#if TARGET_OS_IPHONE
|
||||
#import <UIKit/UIKit.h>
|
||||
#elif TARGET_OS_MAC
|
||||
#import <AppKit/AppKit.h>
|
||||
#endif
|
||||
|
||||
/** The standard bitrate in [setVideoEncoderConfiguration]([AgoraRtcEngineKit setVideoEncoderConfiguration:]).
|
||||
|
||||
(Recommended) In a live broadcast, Agora recommends setting a larger bitrate to improve the video quality. When you choose AgoraVideoBitrateStandard, the bitrate value doubles in a live broadcast mode, and remains the same as in AgoraVideoProfile in a communication mode.
|
||||
*/
|
||||
extern NSInteger const AgoraVideoBitrateStandard;
|
||||
|
||||
/** The compatible bitrate in [setVideoEncoderConfiguration]([AgoraRtcEngineKit setVideoEncoderConfiguration:]).
|
||||
|
||||
The bitrate in both the live broadcast and communication modes remain the same as in AgoraVideoProfile.
|
||||
*/
|
||||
extern NSInteger const AgoraVideoBitrateCompatible;
|
||||
|
||||
|
||||
/** The min bitrate in [setVideoEncoderConfiguration]([AgoraRtcEngineKit setVideoEncoderConfiguration:]).
|
||||
|
||||
The min bitrate set to default value
|
||||
*/
|
||||
extern NSInteger const AgoraVideoDefaultMinBitrate;
|
||||
|
||||
/** The min bitrate in [setVideoEncoderConfiguration]([AgoraRtcEngineKit setVideoEncoderConfiguration:]).
|
||||
|
||||
The min bitrate will be equal to bitrate
|
||||
*/
|
||||
extern NSInteger const AgoraVideoMinBitrateEqualToBitrate;
|
||||
|
||||
/**
|
||||
* set analyze duration for real time stream
|
||||
* @example "setPlayerOption(AgoraRtcMediaPlayerRealTimeStreamAnalyzeDuration,1000000)"
|
||||
*/
|
||||
extern NSString* const AgoraRtcMediaPlayerRealTimeStreamAnalyzeDuration;
|
||||
|
||||
/**
|
||||
* make the player to enable audio or not
|
||||
* @example "setPlayerOption(AgoraRtcMediaPlayerEnableAudio,0)"
|
||||
*/
|
||||
extern NSString* const AgoraRtcMediaPlayerEnableAudio;
|
||||
|
||||
/**
|
||||
* make the player to enable video or not
|
||||
* @example "setPlayerOption(AgoraRtcMediaPlayerEnableVideo,0)"
|
||||
*/
|
||||
extern NSString* const AgoraRtcMediaPlayerEnableVideo;
|
||||
|
||||
/**
|
||||
* set the player enable to search metadata
|
||||
* @example "setPlayerOption(AgoraRtcMediaPlayerEnableSearchMetadata,0)"
|
||||
*/
|
||||
extern NSString* const AgoraRtcMediaPlayerEnableSearchMetadata;
|
||||
|
||||
/** 120 x 120
|
||||
*/
|
||||
extern CGSize const AgoraVideoDimension120x120;
|
||||
/** 160 x 120
|
||||
*/
|
||||
extern CGSize const AgoraVideoDimension160x120;
|
||||
/** 180 x 180
|
||||
*/
|
||||
extern CGSize const AgoraVideoDimension180x180;
|
||||
/** 240 x 180
|
||||
*/
|
||||
extern CGSize const AgoraVideoDimension240x180;
|
||||
/** 320 x 180
|
||||
*/
|
||||
extern CGSize const AgoraVideoDimension320x180;
|
||||
/** 240 x 240
|
||||
*/
|
||||
extern CGSize const AgoraVideoDimension240x240;
|
||||
/** 320 x 240
|
||||
*/
|
||||
extern CGSize const AgoraVideoDimension320x240;
|
||||
/** 424 x 240
|
||||
*/
|
||||
extern CGSize const AgoraVideoDimension424x240;
|
||||
/** 360 x 360
|
||||
*/
|
||||
extern CGSize const AgoraVideoDimension360x360;
|
||||
/** 480 x 360
|
||||
*/
|
||||
extern CGSize const AgoraVideoDimension480x360;
|
||||
/** 640 x 360
|
||||
*/
|
||||
extern CGSize const AgoraVideoDimension640x360;
|
||||
/** 480 x 480
|
||||
*/
|
||||
extern CGSize const AgoraVideoDimension480x480;
|
||||
/** 640 x 480
|
||||
*/
|
||||
extern CGSize const AgoraVideoDimension640x480;
|
||||
/** 840 x 480
|
||||
*/
|
||||
extern CGSize const AgoraVideoDimension840x480;
|
||||
/** 960 x 540
|
||||
*/
|
||||
extern CGSize const AgoraVideoDimension960x540;
|
||||
/** 960 x 720 (Depends on the hardware)
|
||||
*/
|
||||
extern CGSize const AgoraVideoDimension960x720;
|
||||
/** 1280 x 720 (Depends on the hardware)
|
||||
*/
|
||||
extern CGSize const AgoraVideoDimension1280x720;
|
||||
/** 1920 x 1080 (Depends on the hardware)
|
||||
*/
|
||||
extern CGSize const AgoraVideoDimension1920x1080;
|
||||
/** 25400 x 1440 (Depends on the hardware)
|
||||
*/
|
||||
extern CGSize const AgoraVideoDimension2540x1440;
|
||||
/** 3840 x 2160 (Depends on the hardware)
|
||||
*/
|
||||
extern CGSize const AgoraVideoDimension3840x2160;
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// AgoraRtcEngineKit.h
|
||||
// AgoraRtcEngineKit
|
||||
//
|
||||
// Copyright (c) 2018 Agora. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AgoraConstants.h"
|
||||
#import "AgoraObjects.h"
|
||||
|
||||
/** Agora provides ensured quality of experience (QoE) for worldwide Internet-based voice and video communications through a virtual global network that is especially optimized for real-time web and mobile-to-mobile applications.
|
||||
|
||||
The AgoraRtcEngineKit class is the entry point of the Agora SDK that provides simple APIs for applications to easily start voice and video communication.
|
||||
*/
|
||||
@class AgoraRtcEngineKit;
|
||||
@class AgoraMediaRecorder;
|
||||
|
||||
/**
|
||||
* The event handler for direct cdn streaming
|
||||
*
|
||||
*/
|
||||
@protocol AgoraDirectCdnStreamingEventDelegate <NSObject>
|
||||
@optional
|
||||
|
||||
/**
|
||||
* Event callback of direct cdn streaming
|
||||
* @param state Current status
|
||||
* @param reason Reason Code
|
||||
* @param message Message
|
||||
*/
|
||||
- (void)onDirectCdnStreamingStateChanged:(AgoraDirectCdnStreamingState)state
|
||||
reason:(AgoraDirectCdnStreamingReason)reason
|
||||
message:(NSString *_Nullable)message NS_SWIFT_NAME(onDirectCdnStreamingStateChanged(_:reason:message:));
|
||||
|
||||
- (void)onDirectCdnStreamingStats:(AgoraDirectCdnStreamingStats *_Nonnull)stats NS_SWIFT_NAME(onDirectCdnStreamingStats(_:));
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// AgoraRtcEngineKit.h
|
||||
// AgoraRtcEngineKit
|
||||
//
|
||||
// Copyright (c) 2018 Agora. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class AgoraEncodedVideoFrameInfo;
|
||||
|
||||
@protocol AgoraEncodedVideoFrameDelegate <NSObject>
|
||||
@optional
|
||||
|
||||
/**
|
||||
* Occurs when get H264 video data interface before decoding
|
||||
*/
|
||||
- (BOOL)onEncodedVideoFrameReceived:(NSData * _Nonnull )videoData length:(size_t)length info:(AgoraEncodedVideoFrameInfo * _Nonnull)videoFrameInfo NS_SWIFT_NAME(onEncodedVideoFrameReceived(_:length:info:));
|
||||
@end
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,77 @@
|
||||
//
|
||||
// Copyright (c) 2020 Agora.io. All rights reserved
|
||||
|
||||
// This program is confidential and proprietary to Agora.io.
|
||||
// And may not be copied, reproduced, modified, disclosed to others, published
|
||||
// or used, in whole or in part, without the express prior written permission
|
||||
// of Agora.io.
|
||||
|
||||
#pragma once // NOLINT(build/header_guard)
|
||||
|
||||
#include "NGIAgoraExtensionControl.h"
|
||||
AGORA_API agora::rtc::IExtensionControl* AGORA_CALL getAgoraExtensionControl();
|
||||
AGORA_API void AGORA_CALL declareProviderVersion(
|
||||
const char*, const agora::rtc::ExtensionVersion&);
|
||||
typedef void(*agora_ext_entry_func_t)(void);
|
||||
AGORA_API void AGORA_CALL registerProviderEntry(const char*, agora_ext_entry_func_t);
|
||||
|
||||
#define DECLARE_CREATE_AND_REGISTER_PROVIDER(PROVIDER_NAME, PROVIDER_CLASS, PROVIDER_INTERFACE_USED, ...) \
|
||||
static void register_##PROVIDER_NAME##_to_agora() { \
|
||||
auto control = getAgoraExtensionControl(); \
|
||||
agora::rtc::ExtensionVersion version = \
|
||||
agora::rtc::ExtensionInterfaceVersion<PROVIDER_INTERFACE_USED>::Version(); \
|
||||
declareProviderVersion(#PROVIDER_NAME, version); \
|
||||
if (#PROVIDER_NAME && control) { \
|
||||
control->registerProvider(#PROVIDER_NAME, \
|
||||
new agora::RefCountedObject<PROVIDER_CLASS>(__VA_ARGS__)); \
|
||||
} \
|
||||
} \
|
||||
|
||||
#define DECLARE_CREATE_AND_REGISTER_PROVIDER_PTR(PROVIDER_NAME, PROVIDER_INTERFACE_USED, PROVIDER_REF_PTR) \
|
||||
static void register_##PROVIDER_NAME##_to_agora() { \
|
||||
auto control = getAgoraExtensionControl(); \
|
||||
agora::rtc::ExtensionVersion version = \
|
||||
agora::rtc::ExtensionInterfaceVersion<PROVIDER_INTERFACE_USED>::Version(); \
|
||||
declareProviderVersion(#PROVIDER_NAME, version); \
|
||||
if (#PROVIDER_NAME && control) { \
|
||||
control->registerProvider(#PROVIDER_NAME, PROVIDER_REF_PTR); \
|
||||
} \
|
||||
} \
|
||||
|
||||
|
||||
#if defined (__GNUC__)
|
||||
#define REGISTER_AGORA_EXTENSION_PROVIDER(PROVIDER_NAME, PROVIDER_CLASS, PROVIDER_INTERFACE_USED, ...) \
|
||||
DECLARE_CREATE_AND_REGISTER_PROVIDER(PROVIDER_NAME, PROVIDER_CLASS, PROVIDER_INTERFACE_USED, __VA_ARGS__); \
|
||||
__attribute__((constructor, used)) \
|
||||
static void _##PROVIDER_NAME##_provider_entry() { \
|
||||
registerProviderEntry(#PROVIDER_NAME, register_##PROVIDER_NAME##_to_agora); \
|
||||
} \
|
||||
|
||||
#define REGISTER_AGORA_EXTENSION_PROVIDER_PTR(PROVIDER_NAME, PROVIDER_INTERFACE_USED, PROVIDER_REF_PTR) \
|
||||
DECLARE_CREATE_AND_REGISTER_PROVIDER_PTR(PROVIDER_NAME, PROVIDER_INTERFACE_USED, PROVIDER_REF_PTR); \
|
||||
__attribute__((constructor, used)) \
|
||||
static void _##PROVIDER_NAME##_provider_entry() { \
|
||||
registerProviderEntry(#PROVIDER_NAME, register_##PROVIDER_NAME##_to_agora); \
|
||||
} \
|
||||
|
||||
|
||||
#elif defined (_MSC_VER)
|
||||
#define REGISTER_AGORA_EXTENSION_PROVIDER(PROVIDER_NAME, PROVIDER_CLASS, PROVIDER_INTERFACE_USED, ...) \
|
||||
DECLARE_CREATE_AND_REGISTER_PROVIDER(PROVIDER_NAME, PROVIDER_CLASS, PROVIDER_INTERFACE_USED, __VA_ARGS__); \
|
||||
static int _##PROVIDER_NAME##_provider_entry() { \
|
||||
registerProviderEntry(#PROVIDER_NAME, register_##PROVIDER_NAME##_to_agora); \
|
||||
return 0; \
|
||||
} \
|
||||
const int DUMMY_AGORA_REGEXT_##PROVIDE_NAME##_VAR = _##PROVIDER_NAME##_provider_entry(); \
|
||||
|
||||
#define REGISTER_AGORA_EXTENSION_PROVIDER_PTR(PROVIDER_NAME, PROVIDER_INTERFACE_USED, PROVIDER_REF_PTR) \
|
||||
DECLARE_CREATE_AND_REGISTER_PROVIDER_PTR(PROVIDER_NAME, PROVIDER_INTERFACE_USED, PROVIDER_REF_PTR); \
|
||||
static int _##PROVIDER_NAME##_provider_entry() { \
|
||||
registerProviderEntry(#PROVIDER_NAME, register_##PROVIDER_NAME##_to_agora); \
|
||||
return 0; \
|
||||
} \
|
||||
const int DUMMY_AGORA_REGEXT_##PROVIDE_NAME##_VAR = _##PROVIDER_NAME##_provider_entry(); \
|
||||
|
||||
#else
|
||||
#error Unsupported Compilation Toolchain!
|
||||
#endif
|
||||
@@ -0,0 +1,111 @@
|
||||
//
|
||||
// Copyright (c) 2021 Agora.io. All rights reserved
|
||||
|
||||
// This program is confidential and proprietary to Agora.io.
|
||||
// And may not be copied, reproduced, modified, disclosed to others, published
|
||||
// or used, in whole or in part, without the express prior written permission
|
||||
// of Agora.io.
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace agora {
|
||||
namespace rtc {
|
||||
|
||||
struct ExtensionVersion {
|
||||
// Extension Framework Version : major.minor.micro
|
||||
int major_v;
|
||||
int minor_v;
|
||||
int micro_v;
|
||||
|
||||
ExtensionVersion()
|
||||
: major_v(0), minor_v(0), micro_v(0) {}
|
||||
ExtensionVersion(int majorV, int minorV = 0, int microV = 0)
|
||||
: major_v(majorV), minor_v(minorV), micro_v(microV) {}
|
||||
|
||||
bool operator==(const ExtensionVersion& other) const {
|
||||
return major_v == other.major_v && minor_v == other.minor_v && micro_v == other.micro_v;
|
||||
}
|
||||
|
||||
bool operator>(const ExtensionVersion& other) const {
|
||||
return major_v > other.major_v || (major_v == other.major_v && minor_v > other.minor_v)
|
||||
|| (major_v == other.major_v && minor_v == other.minor_v && micro_v > other.micro_v);
|
||||
}
|
||||
|
||||
bool operator<(const ExtensionVersion& other) const {
|
||||
return major_v < other.major_v || (major_v == other.major_v && minor_v < other.minor_v)
|
||||
|| (major_v == other.major_v && minor_v == other.minor_v && micro_v < other.micro_v);
|
||||
}
|
||||
|
||||
bool operator<=(const ExtensionVersion& other) const {
|
||||
return !operator>(other);
|
||||
}
|
||||
|
||||
bool operator>=(const ExtensionVersion& other) const {
|
||||
return !operator<(other);
|
||||
}
|
||||
};
|
||||
|
||||
#define BUMP_MAJOR_VERSION(VERSION) \
|
||||
ExtensionVersion(VERSION.major_v + 1, 0, 0); \
|
||||
|
||||
#define BUMP_MINOR_VERSION(VERSION) \
|
||||
ExtensionVersion(VERSION.major_v, VERSION.minor_v + 1, 0); \
|
||||
|
||||
#define BUMP_MICRO_VERSION(VERSION) \
|
||||
ExtensionVersion(VERSION.major_v, VERSION.minor_v, VERSION.micro_v + 1); \
|
||||
|
||||
class IExtensionProvider;
|
||||
class IExtensionProviderV2;
|
||||
class IExtensionProviderV3;
|
||||
class IAudioFilter;
|
||||
class IAudioFilterV2;
|
||||
class IExtensionVideoFilter;
|
||||
class IScreenCaptureSource;
|
||||
|
||||
template <class T>
|
||||
struct ExtensionInterfaceVersion;
|
||||
|
||||
template <>
|
||||
struct ExtensionInterfaceVersion<IExtensionProvider> {
|
||||
static ExtensionVersion Version() {
|
||||
return ExtensionVersion(1, 0, 0);
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ExtensionInterfaceVersion<IExtensionProviderV2> {
|
||||
static ExtensionVersion Version() {
|
||||
return BUMP_MAJOR_VERSION(ExtensionInterfaceVersion<IExtensionProvider>::Version());
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ExtensionInterfaceVersion<IAudioFilter> {
|
||||
static ExtensionVersion Version() {
|
||||
return ExtensionVersion(1, 0, 0);
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ExtensionInterfaceVersion<IAudioFilterV2> {
|
||||
static ExtensionVersion Version() {
|
||||
return BUMP_MAJOR_VERSION(ExtensionInterfaceVersion<IAudioFilter>::Version());
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ExtensionInterfaceVersion<IExtensionVideoFilter> {
|
||||
static ExtensionVersion Version() {
|
||||
return ExtensionVersion(1, 0, 0);
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ExtensionInterfaceVersion<IScreenCaptureSource> {
|
||||
static ExtensionVersion Version() {
|
||||
return ExtensionVersion(1, 0, 0);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace rtc
|
||||
} // namespace agora
|
||||
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// AgoraRtcEngineKit.h
|
||||
// AgoraRtcEngineKit
|
||||
//
|
||||
// Copyright (c) 2018 Agora. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AgoraEnumerates.h"
|
||||
|
||||
/**
|
||||
* The AgoraFaceInfoDelegate protocol enables face info callback event notifications to your application.
|
||||
*/
|
||||
@protocol AgoraFaceInfoDelegate <NSObject>
|
||||
@optional
|
||||
|
||||
/**
|
||||
* Occurs when the face info is received.
|
||||
* @param outFaceInfo A pointer to the face info: NSString.
|
||||
* @return
|
||||
* - true: The face info is valid and sent.
|
||||
* - false: The face info is invalid or sent.
|
||||
*/
|
||||
- (BOOL)onFaceInfo:(NSString* _Nonnull)outFaceInfo NS_SWIFT_NAME(onFaceInfo(_:));
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// AgoraH265TranscoderDelegate.h
|
||||
// AgoraH265TranscoderDelegate
|
||||
//
|
||||
// Copyright (c) 2022 Agora. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AgoraEnumerates.h"
|
||||
|
||||
@protocol AgoraH265TranscoderDelegate <NSObject>
|
||||
@optional
|
||||
/**
|
||||
* Use to notify the result of invoking enableTranscode interface.
|
||||
* @param result Result of invoking enableTranscode interface. There are some processing advice below of result.
|
||||
* - AgoraH265TranscodeResultRequestInvalid: Channel or uid param have a mistake, you need to check them for correctness.
|
||||
* - AgoraH265TranscodeResultUnauthorized: Authentication failed, please check for correctness of token.
|
||||
* - AgoraH265TranscodeResultTokenExpired: The token has expired, you need to generate a new token.
|
||||
* - AgoraH265TranscodeResultForbidden: You need to contact agora staff to add the vid whitelist.
|
||||
* - AgoraH265TranscodeResultNotFound: Indicates that the network may be faulty.
|
||||
* - AgoraH265TranscodeResultTooOften: Request is too often, please request again later.
|
||||
* - AgoraH265TranscodeResultServerInternalError: The service has an internal error. A request can be made again.
|
||||
*/
|
||||
- (void)onEnableTranscode:(AgoraH265TranscodeResult)result NS_SWIFT_NAME(onEnableTranscode(_:));
|
||||
|
||||
/**
|
||||
* Use to notify the result of invoking queryChannel interface.
|
||||
* @param result Result of invoking queryChannel interface. There are some processing advice below of result.
|
||||
* - AgoraH265TranscodeResultUnauthorized: Authentication failed, please check for correctness of token.
|
||||
* - AgoraH265TranscodeResultTokenExpired: The token has expired, you need to generate a new token.
|
||||
* - AgoraH265TranscodeResultNotFound: Indicates that the network may be faulty or the channel param may be is empty.
|
||||
* - AgoraH265TranscodeResultTooOften: Request is too often, please request again later.
|
||||
* - AgoraH265TranscodeResultServerInternalError: The service has an internal error. A request can be made again.
|
||||
*
|
||||
* @param originChannel Origin channel id
|
||||
* @param transcodeChannel Transcode channel id
|
||||
*/
|
||||
- (void)onQueryChannel:(AgoraH265TranscodeResult)result
|
||||
originChannel:(NSString* _Nullable)originChannel
|
||||
transcodeChannel:(NSString* _Nullable)transcodeChannel NS_SWIFT_NAME(onQueryChannel(_:originChannel:transcodeChannel:));
|
||||
|
||||
/** Use to notify the result of invoking triggerTranscode interface.
|
||||
* @param result Result of invoking triggerTranscode interface. There are some processing advice below of result.
|
||||
* - AgoraH265TranscodeResultUnauthorized: Authentication failed, please check for correctness of token.
|
||||
* - AgoraH265TranscodeResultTokenExpired: The token has expired, you need to generate a new token.
|
||||
* - AgoraH265TranscodeResultNotFound: Indicates that the network may be faulty or the channel param may be is empty.
|
||||
* - AgoraH265TranscodeResultConflict: The request of trigger transcode is conflicted, please try again.
|
||||
* - AgoraH265TranscodeResultTooOften: Request is too often, please request again later.
|
||||
* - AgoraH265TranscodeResultServerInternalError: The service has an internal error. A request can be made again.
|
||||
* - AgoraH265TranscodeResultServiceUnavailable: May be the number of transcode service is over the limit.
|
||||
*/
|
||||
- (void)onTriggerTranscode:(AgoraH265TranscodeResult)result NS_SWIFT_NAME(onTriggerTranscode(_:));
|
||||
@end
|
||||
@@ -0,0 +1,71 @@
|
||||
//
|
||||
// AgoraH265TranscoderProtocol.h
|
||||
// AgoraH265TranscoderProtocol
|
||||
//
|
||||
// Copyright (c) 2022 Agora. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@protocol AgoraH265TranscoderDelegate;
|
||||
|
||||
@protocol AgoraH265TranscoderProtocol <NSObject>
|
||||
|
||||
/**
|
||||
* Enable transcoding for a channel.
|
||||
* @param token The token for authentication.
|
||||
* @param channel The unique channel name for the AgoraRTC session in the string format.
|
||||
* @param uid User ID.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - <0: Failure.
|
||||
*/
|
||||
- (NSInteger)enableTranscodeWithToken:(NSString* _Nonnull)token
|
||||
channel:(NSString* _Nonnull)channel
|
||||
uid:(NSUInteger)uid NS_SWIFT_NAME(enableTranscode(token:channel:uid:));
|
||||
|
||||
/**
|
||||
* Query the transcoded channel of a channel.
|
||||
* @param token The token for authentication.
|
||||
* @param channel The unique channel name for the AgoraRTC session in the string format.
|
||||
* @param uid User ID.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - <0: Failure.
|
||||
*/
|
||||
- (NSInteger)queryChannelWithToken:(NSString* _Nonnull)token
|
||||
channel:(NSString* _Nonnull)channel
|
||||
uid:(NSUInteger) uid NS_SWIFT_NAME(queryChannel(token:channel:uid:));
|
||||
|
||||
/**
|
||||
* Trigger channel transcoding.
|
||||
* @param token The token for authentication.
|
||||
* @param channel The unique channel name for the AgoraRTC session in the string format.
|
||||
* @param uid User ID.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - <0: Failure.
|
||||
*/
|
||||
- (NSInteger)triggerTranscodeWithToken:(NSString* _Nonnull)token
|
||||
channel:(NSString* _Nonnull)channel
|
||||
uid:(NSUInteger)uid NS_SWIFT_NAME(triggerTranscode(token:channel:uid:));
|
||||
|
||||
/**
|
||||
* Register a AgoraH265TranscoderDelegate object.
|
||||
* @param delegate AgoraH265TranscoderDelegate.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - <0: Failure.
|
||||
*/
|
||||
- (NSInteger)registerTranscoderDelegate:(id<AgoraH265TranscoderDelegate>_Nullable)delegate NS_SWIFT_NAME(registerTranscoderDelegate(_:));
|
||||
|
||||
/**
|
||||
* Unregister a AgoraH265TranscoderDelegate object.
|
||||
* @param delegate AgoraH265TranscoderDelegate.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - <0: Failure.
|
||||
*/
|
||||
- (NSInteger)unregisterTranscoderDelegate:(id<AgoraH265TranscoderDelegate>_Nullable)delegate NS_SWIFT_NAME(unregisterTranscoderDelegate(_:));
|
||||
|
||||
@end
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,52 @@
|
||||
//
|
||||
// AgoraMediaFilterEventDelegate.h
|
||||
// Agora SDK
|
||||
//
|
||||
// Created by LLF on 2020-9-21.
|
||||
// Copyright (c) 2020 Agora. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* The definition of extension context types.
|
||||
*/
|
||||
@interface AgoraExtensionContext : NSObject
|
||||
/**
|
||||
* Whether the uid is valid.
|
||||
* - YES: The uid is valid.
|
||||
* - NO: The uid is invalid.
|
||||
*/
|
||||
@property (assign, nonatomic) BOOL isValid;
|
||||
/**
|
||||
* The ID of the user.
|
||||
* A uid of 0 indicates the local user, and a uid greater than 0 represents a remote user.
|
||||
*/
|
||||
@property (assign, nonatomic) NSUInteger uid;
|
||||
/**
|
||||
* The provider name of the current extension.
|
||||
*/
|
||||
@property (copy, nonatomic) NSString * _Nullable providerName;
|
||||
/**
|
||||
* The extension name of the current extension.
|
||||
*/
|
||||
@property (copy, nonatomic) NSString * _Nullable extensionName;
|
||||
@end
|
||||
|
||||
@protocol AgoraMediaFilterEventDelegate <NSObject>
|
||||
@optional
|
||||
/* Meida filter(audio filter or video filter) event callback
|
||||
*/
|
||||
- (void)onEventWithContext:(AgoraExtensionContext * _Nonnull)context
|
||||
key:(NSString * _Nullable)key
|
||||
value:(NSString * _Nullable)value NS_SWIFT_NAME(onEventWithContext(_:key:value:));
|
||||
|
||||
- (void)onExtensionStartedWithContext:(AgoraExtensionContext * _Nonnull)context NS_SWIFT_NAME(onExtensionStartedWithContext(_:));
|
||||
|
||||
- (void)onExtensionStoppedWithContext:(AgoraExtensionContext * _Nonnull)context NS_SWIFT_NAME(onExtensionStoppedWithContext(_:));
|
||||
|
||||
- (void)onExtensionErrorWithContext:(AgoraExtensionContext * _Nonnull)context
|
||||
error:(int)error
|
||||
message:(NSString * _Nullable)message NS_SWIFT_NAME(onExtensionErrorWithContext(_:error:message:));
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// AgoraRtcEngineKit.h
|
||||
// AgoraRtcEngineKit
|
||||
//
|
||||
// Copyright (c) 2018 Agora. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AgoraConstants.h"
|
||||
#import "AgoraObjects.h"
|
||||
#import "AgoraRtcMediaPlayerProtocol.h"
|
||||
#import "AgoraH265TranscoderProtocol.h"
|
||||
|
||||
/** Agora provides ensured quality of experience (QoE) for worldwide Internet-based voice and video communications through a virtual global network that is especially optimized for real-time web and mobile-to-mobile applications.
|
||||
|
||||
The AgoraRtcEngineKit class is the entry point of the Agora SDK that provides simple APIs for applications to easily start voice and video communication.
|
||||
*/
|
||||
@class AgoraRtcEngineKit;
|
||||
@class AgoraMediaRecorder;
|
||||
|
||||
/** The definition of the AgoraMediaMetadataDataSource protocol.
|
||||
* @note Implement all the callbacks in this protocol in the critical thread. We recommend avoiding any time-consuming
|
||||
* operation in the critical thread.
|
||||
*/
|
||||
@protocol AgoraMediaMetadataDataSource <NSObject>
|
||||
@required
|
||||
|
||||
/** Occurs when the SDK requests the maximum size of the metadata.
|
||||
*
|
||||
* After calling the \ref AgoraRtcEngineKit.setMediaMetadataDataSource:withType: setMediaMetadataDataSource method,
|
||||
* the SDK triggers this callback to query the maximum size of your metadata.
|
||||
* You must specify the maximum size in the return value and then pass it to the SDK.
|
||||
*
|
||||
* @return The maximum size (bytes) of the buffer of the metadata. See \ref AgoraMediaMetadataDataSource.readyToSendMetadataAtTimestamp: readyToSendMetadataAtTimestamp. The value must not exceed 1024 bytes.
|
||||
* You must specify the maximum size in this return value.
|
||||
*/
|
||||
- (NSInteger)metadataMaxSize NS_SWIFT_NAME(metadataMaxSize());
|
||||
|
||||
/** Occurs when the SDK is ready to send metadata.
|
||||
|
||||
You need to specify the metadata in the return value of this method.
|
||||
|
||||
@note Ensure that the size of the metadata that you specify in this callback does not exceed the value set in the \ref AgoraMediaMetadataDataSource.metadataMaxSize metadataMaxSize callback.
|
||||
@param timestamp The timestamp (ms) of the current metadata.
|
||||
@return The metadata that you want to send in the format of NSData, including the following parameters:
|
||||
- `uid`: ID of the user who sends the metadata.
|
||||
- `size`: The size of the sent metadata.
|
||||
- `buffer`: The sent metadata.
|
||||
- `timeStampMs`: The NTP timestamp (ms) when the metadata is sent.
|
||||
*/
|
||||
- (NSData * _Nullable)readyToSendMetadataAtTimestamp:(NSTimeInterval)timestamp sourceType:(AgoraVideoSourceType)sourceType NS_SWIFT_NAME(readyToSendMetadata(atTimestamp:sourceType:));
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// AgoraRtcEngineKit.h
|
||||
// AgoraRtcEngineKit
|
||||
//
|
||||
// Copyright (c) 2018 Agora. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AgoraObjects.h"
|
||||
|
||||
/** The definition of AgoraMediaMetadataDelegate.
|
||||
@note Implement the callback in this protocol in the critical thread. We recommend avoiding any time-consuming operation in the critical thread.
|
||||
*/
|
||||
@protocol AgoraMediaMetadataDelegate <NSObject>
|
||||
@required
|
||||
|
||||
/** Occurs when the local user receives the metadata.
|
||||
*
|
||||
* @param metadata The received metadata. See \ref AgoraMetadata.
|
||||
*/
|
||||
- (void)didMetadataReceived:(AgoraMetadata * _Nonnull)metadata NS_SWIFT_NAME(didMetadataReceived(_:));
|
||||
|
||||
@optional
|
||||
/* Unavailable Delegate Methods */
|
||||
#if TARGET_OS_IPHONE
|
||||
- (void)receiveMetadata:(NSData * _Nonnull)data fromUser:(NSInteger)uid atTimestamp:(NSTimeInterval)timestamp NS_SWIFT_NAME(receiveMetadata(_:fromUser:atTimestamp:)) __attribute__((availability(ios,deprecated=7_0,message="Use didMetadataReceived: instead.")));
|
||||
#endif
|
||||
#if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
|
||||
- (void)receiveMetadata:(NSData * _Nonnull)data fromUser:(NSInteger)uid atTimestamp:(NSTimeInterval)timestamp NS_SWIFT_NAME(receiveMetadata(_:fromUser:atTimestamp:)) __attribute__((availability(macos,deprecated=10_9,message="Use didMetadataReceived: instead.")));
|
||||
#endif
|
||||
@end
|
||||
@@ -0,0 +1,520 @@
|
||||
//
|
||||
// Agora Engine SDK
|
||||
//
|
||||
// Created by Sting Feng in 2020-05.
|
||||
// Copyright (c) 2017 Agora.io. All rights reserved.
|
||||
|
||||
#pragma once // NOLINT(build/header_guard)
|
||||
|
||||
#include <cstring>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "AgoraOptional.h"
|
||||
|
||||
/**
|
||||
* set analyze duration for real time stream
|
||||
* @example "setPlayerOption(KEY_PLAYER_REAL_TIME_STREAM_ANALYZE_DURATION,1000000)"
|
||||
*/
|
||||
#define KEY_PLAYER_REAL_TIME_STREAM_ANALYZE_DURATION "analyze_duration"
|
||||
|
||||
/**
|
||||
* make the player to enable audio or not
|
||||
* @example "setPlayerOption(KEY_PLAYER_ENABLE_AUDIO,0)"
|
||||
*/
|
||||
#define KEY_PLAYER_ENABLE_AUDIO "enable_audio"
|
||||
|
||||
/**
|
||||
* make the player to enable video or not
|
||||
* @example "setPlayerOption(KEY_PLAYER_ENABLE_VIDEO,0)"
|
||||
*/
|
||||
#define KEY_PLAYER_ENABLE_VIDEO "enable_video"
|
||||
|
||||
/**
|
||||
* set the player enable to search metadata
|
||||
* @example "setPlayerOption(KEY_PLAYER_DISABLE_SEARCH_METADATA,0)"
|
||||
*/
|
||||
#define KEY_PLAYER_ENABLE_SEARCH_METADATA "enable_search_metadata"
|
||||
|
||||
/**
|
||||
* set the player sei filter type
|
||||
* @example "setPlayerOption(KEY_PLAYER_SEI_FILTER_TYPE,"5")"
|
||||
*/
|
||||
#define KEY_PLAYER_SEI_FILTER_TYPE "set_sei_filter_type"
|
||||
|
||||
namespace agora {
|
||||
|
||||
namespace media {
|
||||
|
||||
namespace base {
|
||||
static const uint8_t kMaxCharBufferLength = 50;
|
||||
/**
|
||||
* @brief The playback state.
|
||||
*
|
||||
*/
|
||||
enum MEDIA_PLAYER_STATE {
|
||||
/** Default state.
|
||||
*/
|
||||
PLAYER_STATE_IDLE = 0,
|
||||
/** Opening the media file.
|
||||
*/
|
||||
PLAYER_STATE_OPENING,
|
||||
/** The media file is opened successfully.
|
||||
*/
|
||||
PLAYER_STATE_OPEN_COMPLETED,
|
||||
/** Playing the media file.
|
||||
*/
|
||||
PLAYER_STATE_PLAYING,
|
||||
/** The playback is paused.
|
||||
*/
|
||||
PLAYER_STATE_PAUSED,
|
||||
/** The playback is completed.
|
||||
*/
|
||||
PLAYER_STATE_PLAYBACK_COMPLETED,
|
||||
/** All loops are completed.
|
||||
*/
|
||||
PLAYER_STATE_PLAYBACK_ALL_LOOPS_COMPLETED,
|
||||
/** The playback is stopped.
|
||||
*/
|
||||
PLAYER_STATE_STOPPED,
|
||||
/** Player pausing (internal)
|
||||
*/
|
||||
PLAYER_STATE_PAUSING_INTERNAL = 50,
|
||||
/** Player stopping (internal)
|
||||
*/
|
||||
PLAYER_STATE_STOPPING_INTERNAL,
|
||||
/** Player seeking state (internal)
|
||||
*/
|
||||
PLAYER_STATE_SEEKING_INTERNAL,
|
||||
/** Player getting state (internal)
|
||||
*/
|
||||
PLAYER_STATE_GETTING_INTERNAL,
|
||||
/** None state for state machine (internal)
|
||||
*/
|
||||
PLAYER_STATE_NONE_INTERNAL,
|
||||
/** Do nothing state for state machine (internal)
|
||||
*/
|
||||
PLAYER_STATE_DO_NOTHING_INTERNAL,
|
||||
/** Player set track state (internal)
|
||||
*/
|
||||
PLAYER_STATE_SET_TRACK_INTERNAL,
|
||||
/** The playback fails.
|
||||
*/
|
||||
PLAYER_STATE_FAILED = 100,
|
||||
};
|
||||
/**
|
||||
* @brief Player error code
|
||||
*
|
||||
*/
|
||||
enum MEDIA_PLAYER_REASON {
|
||||
/** No error.
|
||||
*/
|
||||
PLAYER_REASON_NONE = 0,
|
||||
/** The parameter is invalid.
|
||||
*/
|
||||
PLAYER_REASON_INVALID_ARGUMENTS = -1,
|
||||
/** Internel error.
|
||||
*/
|
||||
PLAYER_REASON_INTERNAL = -2,
|
||||
/** No resource.
|
||||
*/
|
||||
PLAYER_REASON_NO_RESOURCE = -3,
|
||||
/** Invalid media source.
|
||||
*/
|
||||
PLAYER_REASON_INVALID_MEDIA_SOURCE = -4,
|
||||
/** The type of the media stream is unknown.
|
||||
*/
|
||||
PLAYER_REASON_UNKNOWN_STREAM_TYPE = -5,
|
||||
/** The object is not initialized.
|
||||
*/
|
||||
PLAYER_REASON_OBJ_NOT_INITIALIZED = -6,
|
||||
/** The codec is not supported.
|
||||
*/
|
||||
PLAYER_REASON_CODEC_NOT_SUPPORTED = -7,
|
||||
/** Invalid renderer.
|
||||
*/
|
||||
PLAYER_REASON_VIDEO_RENDER_FAILED = -8,
|
||||
/** An error occurs in the internal state of the player.
|
||||
*/
|
||||
PLAYER_REASON_INVALID_STATE = -9,
|
||||
/** The URL of the media file cannot be found.
|
||||
*/
|
||||
PLAYER_REASON_URL_NOT_FOUND = -10,
|
||||
/** Invalid connection between the player and the Agora server.
|
||||
*/
|
||||
PLAYER_REASON_INVALID_CONNECTION_STATE = -11,
|
||||
/** The playback buffer is insufficient.
|
||||
*/
|
||||
PLAYER_REASON_SRC_BUFFER_UNDERFLOW = -12,
|
||||
/** The audio mixing file playback is interrupted.
|
||||
*/
|
||||
PLAYER_REASON_INTERRUPTED = -13,
|
||||
/** The SDK does not support this function.
|
||||
*/
|
||||
PLAYER_REASON_NOT_SUPPORTED = -14,
|
||||
/** The token has expired.
|
||||
*/
|
||||
PLAYER_REASON_TOKEN_EXPIRED = -15,
|
||||
/** The ip has expired.
|
||||
*/
|
||||
PLAYER_REASON_IP_EXPIRED = -16,
|
||||
/** An unknown error occurs.
|
||||
*/
|
||||
PLAYER_REASON_UNKNOWN = -17,
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief The type of the media stream.
|
||||
*
|
||||
*/
|
||||
enum MEDIA_STREAM_TYPE {
|
||||
/** The type is unknown.
|
||||
*/
|
||||
STREAM_TYPE_UNKNOWN = 0,
|
||||
/** The video stream.
|
||||
*/
|
||||
STREAM_TYPE_VIDEO = 1,
|
||||
/** The audio stream.
|
||||
*/
|
||||
STREAM_TYPE_AUDIO = 2,
|
||||
/** The subtitle stream.
|
||||
*/
|
||||
STREAM_TYPE_SUBTITLE = 3,
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief The playback event.
|
||||
*
|
||||
*/
|
||||
enum MEDIA_PLAYER_EVENT {
|
||||
/** The player begins to seek to the new playback position.
|
||||
*/
|
||||
PLAYER_EVENT_SEEK_BEGIN = 0,
|
||||
/** The seek operation completes.
|
||||
*/
|
||||
PLAYER_EVENT_SEEK_COMPLETE = 1,
|
||||
/** An error occurs during the seek operation.
|
||||
*/
|
||||
PLAYER_EVENT_SEEK_ERROR = 2,
|
||||
/** The player changes the audio track for playback.
|
||||
*/
|
||||
PLAYER_EVENT_AUDIO_TRACK_CHANGED = 5,
|
||||
/** player buffer low
|
||||
*/
|
||||
PLAYER_EVENT_BUFFER_LOW = 6,
|
||||
/** player buffer recover
|
||||
*/
|
||||
PLAYER_EVENT_BUFFER_RECOVER = 7,
|
||||
/** The video or audio is interrupted
|
||||
*/
|
||||
PLAYER_EVENT_FREEZE_START = 8,
|
||||
/** Interrupt at the end of the video or audio
|
||||
*/
|
||||
PLAYER_EVENT_FREEZE_STOP = 9,
|
||||
/** switch source begin
|
||||
*/
|
||||
PLAYER_EVENT_SWITCH_BEGIN = 10,
|
||||
/** switch source complete
|
||||
*/
|
||||
PLAYER_EVENT_SWITCH_COMPLETE = 11,
|
||||
/** switch source error
|
||||
*/
|
||||
PLAYER_EVENT_SWITCH_ERROR = 12,
|
||||
/** An application can render the video to less than a second
|
||||
*/
|
||||
PLAYER_EVENT_FIRST_DISPLAYED = 13,
|
||||
/** cache resources exceed the maximum file count
|
||||
*/
|
||||
PLAYER_EVENT_REACH_CACHE_FILE_MAX_COUNT = 14,
|
||||
/** cache resources exceed the maximum file size
|
||||
*/
|
||||
PLAYER_EVENT_REACH_CACHE_FILE_MAX_SIZE = 15,
|
||||
/** Triggered when a retry is required to open the media
|
||||
*/
|
||||
PLAYER_EVENT_TRY_OPEN_START = 16,
|
||||
/** Triggered when the retry to open the media is successful
|
||||
*/
|
||||
PLAYER_EVENT_TRY_OPEN_SUCCEED = 17,
|
||||
/** Triggered when retrying to open media fails
|
||||
*/
|
||||
PLAYER_EVENT_TRY_OPEN_FAILED = 18,
|
||||
/** Triggered when an http redirect occurs
|
||||
* @technical preview
|
||||
*/
|
||||
PLAYER_EVENT_HTTP_REDIRECT = 19,
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief The play preload another source event.
|
||||
*
|
||||
*/
|
||||
enum PLAYER_PRELOAD_EVENT {
|
||||
/** preload source begin
|
||||
*/
|
||||
PLAYER_PRELOAD_EVENT_BEGIN = 0,
|
||||
/** preload source complete
|
||||
*/
|
||||
PLAYER_PRELOAD_EVENT_COMPLETE = 1,
|
||||
/** preload source error
|
||||
*/
|
||||
PLAYER_PRELOAD_EVENT_ERROR = 2,
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief The information of the media stream object.
|
||||
*
|
||||
*/
|
||||
struct PlayerStreamInfo {
|
||||
/** The index of the media stream. */
|
||||
int streamIndex;
|
||||
|
||||
/** The type of the media stream. See {@link MEDIA_STREAM_TYPE}. */
|
||||
MEDIA_STREAM_TYPE streamType;
|
||||
|
||||
/** The codec of the media stream. */
|
||||
char codecName[kMaxCharBufferLength];
|
||||
|
||||
/** The language of the media stream. */
|
||||
char language[kMaxCharBufferLength];
|
||||
|
||||
/** The frame rate (fps) if the stream is video. */
|
||||
int videoFrameRate;
|
||||
|
||||
/** The video bitrate (bps) if the stream is video. */
|
||||
int videoBitRate;
|
||||
|
||||
/** The video width (pixel) if the stream is video. */
|
||||
int videoWidth;
|
||||
|
||||
/** The video height (pixel) if the stream is video. */
|
||||
int videoHeight;
|
||||
|
||||
/** The rotation angle if the steam is video. */
|
||||
int videoRotation;
|
||||
|
||||
/** The sample rate if the stream is audio. */
|
||||
int audioSampleRate;
|
||||
|
||||
/** The number of audio channels if the stream is audio. */
|
||||
int audioChannels;
|
||||
|
||||
/** The number of bits per sample if the stream is audio. */
|
||||
int audioBitsPerSample;
|
||||
|
||||
/** The total duration (millisecond) of the media stream. */
|
||||
int64_t duration;
|
||||
|
||||
PlayerStreamInfo() : streamIndex(0),
|
||||
streamType(STREAM_TYPE_UNKNOWN),
|
||||
videoFrameRate(0),
|
||||
videoBitRate(0),
|
||||
videoWidth(0),
|
||||
videoHeight(0),
|
||||
videoRotation(0),
|
||||
audioSampleRate(0),
|
||||
audioChannels(0),
|
||||
audioBitsPerSample(0),
|
||||
duration(0) {
|
||||
memset(codecName, 0, sizeof(codecName));
|
||||
memset(language, 0, sizeof(language));
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief The information of the media stream object.
|
||||
*
|
||||
*/
|
||||
struct SrcInfo {
|
||||
/** The bitrate of the media stream. The unit of the number is kbps.
|
||||
*
|
||||
*/
|
||||
int bitrateInKbps;
|
||||
|
||||
/** The name of the media stream.
|
||||
*
|
||||
*/
|
||||
const char* name;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief The type of the media metadata.
|
||||
*
|
||||
*/
|
||||
enum MEDIA_PLAYER_METADATA_TYPE {
|
||||
/** The type is unknown.
|
||||
*/
|
||||
PLAYER_METADATA_TYPE_UNKNOWN = 0,
|
||||
/** The type is SEI.
|
||||
*/
|
||||
PLAYER_METADATA_TYPE_SEI = 1,
|
||||
};
|
||||
|
||||
struct CacheStatistics {
|
||||
/** total data size of uri
|
||||
*/
|
||||
int64_t fileSize;
|
||||
/** data of uri has cached
|
||||
*/
|
||||
int64_t cacheSize;
|
||||
/** data of uri has downloaded
|
||||
*/
|
||||
int64_t downloadSize;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief The real time statistics of the media stream being played.
|
||||
*
|
||||
*/
|
||||
struct PlayerPlaybackStats {
|
||||
/** Video fps.
|
||||
*/
|
||||
int videoFps;
|
||||
/** Video bitrate (Kbps).
|
||||
*/
|
||||
int videoBitrateInKbps;
|
||||
/** Audio bitrate (Kbps).
|
||||
*/
|
||||
int audioBitrateInKbps;
|
||||
/** Total bitrate (Kbps).
|
||||
*/
|
||||
int totalBitrateInKbps;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief The updated information of media player.
|
||||
*
|
||||
*/
|
||||
struct PlayerUpdatedInfo {
|
||||
/** @technical preview
|
||||
*/
|
||||
const char* internalPlayerUuid;
|
||||
/** The device ID of the playback device.
|
||||
*/
|
||||
const char* deviceId;
|
||||
/** Video height.
|
||||
*/
|
||||
int videoHeight;
|
||||
/** Video width.
|
||||
*/
|
||||
int videoWidth;
|
||||
/** Audio sample rate.
|
||||
*/
|
||||
int audioSampleRate;
|
||||
/** The audio channel number.
|
||||
*/
|
||||
int audioChannels;
|
||||
/** The bit number of each audio sample.
|
||||
*/
|
||||
int audioBitsPerSample;
|
||||
|
||||
PlayerUpdatedInfo()
|
||||
: internalPlayerUuid(NULL),
|
||||
deviceId(NULL),
|
||||
videoHeight(0),
|
||||
videoWidth(0),
|
||||
audioSampleRate(0),
|
||||
audioChannels(0),
|
||||
audioBitsPerSample(0) {}
|
||||
};
|
||||
|
||||
/**
|
||||
* The custom data source provides a data stream input callback, and the player will continue to call back this interface, requesting the user to fill in the data that needs to be played.
|
||||
*/
|
||||
class IMediaPlayerCustomDataProvider {
|
||||
public:
|
||||
|
||||
/**
|
||||
* @brief The player requests to read the data callback, you need to fill the specified length of data into the buffer
|
||||
* @param buffer the buffer pointer that you need to fill data.
|
||||
* @param bufferSize the bufferSize need to fill of the buffer pointer.
|
||||
* @return you need return offset value if succeed. return 0 if failed.
|
||||
*/
|
||||
virtual int onReadData(unsigned char *buffer, int bufferSize) = 0;
|
||||
|
||||
/**
|
||||
* @brief The Player seek event callback, you need to operate the corresponding stream seek operation, You can refer to the definition of lseek() at https://man7.org/linux/man-pages/man2/lseek.2.html
|
||||
* @param offset the value of seek offset.
|
||||
* @param whence the postion of start seeking, the directive whence as follows:
|
||||
* 0 - SEEK_SET : The file offset is set to offset bytes.
|
||||
* 1 - SEEK_CUR : The file offset is set to its current location plus offset bytes.
|
||||
* 2 - SEEK_END : The file offset is set to the size of the file plus offset bytes.
|
||||
* 65536 - AVSEEK_SIZE : Optional. Passing this as the "whence" parameter to a seek function causes it to return the filesize without seeking anywhere.
|
||||
* @return
|
||||
* whence == 65536, return filesize if you need.
|
||||
* whence >= 0 && whence < 3 , return offset value if succeed. return -1 if failed.
|
||||
*/
|
||||
virtual int64_t onSeek(int64_t offset, int whence) = 0;
|
||||
|
||||
virtual ~IMediaPlayerCustomDataProvider() {}
|
||||
};
|
||||
|
||||
struct MediaSource {
|
||||
/**
|
||||
* The URL of the media file that you want to play.
|
||||
*/
|
||||
const char* url;
|
||||
/**
|
||||
* The URI of the media file
|
||||
*
|
||||
* When caching is enabled, if the url cannot distinguish the cache file name,
|
||||
* the uri must be able to ensure that the cache file name corresponding to the url is unique.
|
||||
*/
|
||||
const char* uri;
|
||||
/**
|
||||
* Set the starting position for playback, in ms.
|
||||
*/
|
||||
int64_t startPos;
|
||||
/**
|
||||
* Determines whether to autoplay after opening a media resource.
|
||||
* - true: (Default) Autoplay after opening a media resource.
|
||||
* - false: Do not autoplay after opening a media resource.
|
||||
*/
|
||||
bool autoPlay;
|
||||
/**
|
||||
* Determines whether to enable cache streaming to local files. If enable cached, the media player will
|
||||
* use the url or uri as the cache index.
|
||||
*
|
||||
* @note
|
||||
* The local cache function only supports on-demand video/audio streams and does not support live streams.
|
||||
* Caching video and audio files based on the HLS protocol (m3u8) to your local device is not supported.
|
||||
*
|
||||
* - true: Enable cache.
|
||||
* - false: (Default) Disable cache.
|
||||
*/
|
||||
bool enableCache;
|
||||
/**
|
||||
* Determines whether to enable multi-track audio stream decoding.
|
||||
* Then you can select multi audio track of the media file for playback or publish to channel
|
||||
*
|
||||
* @note
|
||||
* If you use the selectMultiAudioTrack API, you must set enableMultiAudioTrack to true.
|
||||
*
|
||||
* - true: Enable MultiAudioTrack;.
|
||||
* - false: (Default) Disable MultiAudioTrack;.
|
||||
*/
|
||||
bool enableMultiAudioTrack;
|
||||
/**
|
||||
* Determines whether the opened media resource is a stream through the Agora Broadcast Streaming Network(CDN).
|
||||
* - true: It is a stream through the Agora Broadcast Streaming Network.
|
||||
* - false: (Default) It is not a stream through the Agora Broadcast Streaming Network.
|
||||
*/
|
||||
Optional<bool> isAgoraSource;
|
||||
/**
|
||||
* Determines whether the opened media resource is a live stream. If is a live stream, it can speed up the opening of media resources.
|
||||
* - true: It is a live stream.
|
||||
* - false: (Default) It is not is a live stream.
|
||||
*/
|
||||
Optional<bool> isLiveSource;
|
||||
/**
|
||||
* External custom data source object
|
||||
*/
|
||||
IMediaPlayerCustomDataProvider* provider;
|
||||
|
||||
MediaSource() : url(NULL), uri(NULL), startPos(0), autoPlay(true), enableCache(false),
|
||||
enableMultiAudioTrack(false), provider(NULL){
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace base
|
||||
} // namespace media
|
||||
} // namespace agora
|
||||
@@ -0,0 +1,104 @@
|
||||
//
|
||||
// AgoraRtcEngineKit.h
|
||||
// AgoraRtcEngineKit
|
||||
//
|
||||
// Copyright (c) 2018 Agora. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@protocol AgoraMediaRecorderDelegate;
|
||||
@class AgoraMediaRecorderConfiguration;
|
||||
|
||||
__attribute__((visibility("default"))) @interface AgoraMediaRecorder : NSObject
|
||||
|
||||
/**
|
||||
* Registers the AgoraMediaRecorderDelegate delegate.
|
||||
*
|
||||
* @since v4.0.0
|
||||
*
|
||||
* @note Call this method before the startRecording method.
|
||||
*
|
||||
* @param delegate The callbacks for recording audio and video streams. See AgoraMediaRecorderDelegate
|
||||
*
|
||||
* @return
|
||||
* - 0(ERR_OK): Success.
|
||||
* - < 0: Failure:
|
||||
*/
|
||||
- (int)setMediaRecorderDelegate:(id<AgoraMediaRecorderDelegate> _Nullable)delegate;
|
||||
|
||||
/** Enables/Disables dispatching delegate methods to the main queue.
|
||||
|
||||
* If disabled, the app should dispatch UI operations to the main queue.
|
||||
* @param enabled Sets whether or not to dispatch delegate methods to the main queue:
|
||||
* YES: Dispatch delegate methods to the main queue.
|
||||
* NO: Do not dispatch delegate methods to the main queue
|
||||
* @return * 0: Success.
|
||||
* < 0: Failure.
|
||||
*/
|
||||
- (int)enableMainQueueDispatch:(BOOL)enabled NS_SWIFT_NAME(enableMainQueueDispatch(_:));
|
||||
|
||||
/**
|
||||
* Starts recording the local audio and video.
|
||||
*
|
||||
* @since v4.0.0
|
||||
*
|
||||
* After successfully calling \ref AgoraRtcEngineKit.createMediaRecorder: createMediaRecorder to get the media recorder object
|
||||
* , you can call this method to enable the recording of the local audio and video.
|
||||
*
|
||||
* This method can record the following content:
|
||||
* - The audio captured by the local microphone and encoded in AAC format.
|
||||
* - The video captured by the local camera and encoded by the SDK.
|
||||
*
|
||||
* This method can record the following content:
|
||||
* - The audio received from remote users and encoded in AAC format.
|
||||
* - The video received from remote users.
|
||||
*
|
||||
*
|
||||
* The SDK can generate a recording file only when it detects the recordable audio and video streams; when there are
|
||||
* no audio and video streams to be recorded or the audio and video streams are interrupted for more than five
|
||||
* seconds, the SDK stops recording and triggers the
|
||||
* \ref AgoraMediaRecorderDelegate.stateDidChanged "stateDidChanged" (AgoraMediaRecorderState, AgoraMediaRecorderReasonCode)
|
||||
* callback.
|
||||
*
|
||||
* @note Call this method after joining the channel.
|
||||
*
|
||||
* @param config The recording configurations. See AgoraMediaRecorderConfiguration object.
|
||||
*
|
||||
* @return
|
||||
* - 0(ERR_OK): Success.
|
||||
* - < 0: Failure:
|
||||
* - `-1(ERR_FAILED)`: IRtcEngine does not support the request due to one of the following reasons:
|
||||
* - During remote recording, There is no subscription to the target channel or user。
|
||||
* - `-2(ERR_INVALID_ARGUMENT)`: The parameter is invalid. Ensure the following:
|
||||
* - The specified path of the recording file exists and is writable.
|
||||
* - The specified format of the recording file is supported.
|
||||
* - The maximum recording duration is correctly set.
|
||||
* - During remote recording, ensure the user whose media streams you want record did join the channel.
|
||||
* - `-4(ERR_NOT_SUPPORTED)`: IRtcEngine does not support the request due to one of the following reasons:
|
||||
* - The recording is ongoing.
|
||||
* - The recording stops because an error occurs.
|
||||
* - No \ref AgoraMediaRecorderDelegate object is registered.
|
||||
*/
|
||||
- (int)startRecording:(AgoraMediaRecorderConfiguration* _Nonnull)config NS_SWIFT_NAME(startRecording(_:));
|
||||
/**
|
||||
* Stops recording the audio and video.
|
||||
*
|
||||
* @since v4.0.0
|
||||
*
|
||||
* @note After calling \ref AgoraMediaRecorder.startRecording: startRecording, if you want to stop the recording,
|
||||
* you must call `stopRecording`; otherwise, the generated recording files might not be playable.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* - 0(ERR_OK): Success.
|
||||
* - < 0: Failure:
|
||||
*/
|
||||
/**
|
||||
Stop recording.
|
||||
@return 0: Success.
|
||||
* < 0: Failure.
|
||||
*/
|
||||
- (int)stopRecording NS_SWIFT_NAME(stopRecording());
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,49 @@
|
||||
//
|
||||
// Copyright (c) 2018 Agora. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class AgoraMediaRecorder;
|
||||
@class AgoraMediaRecorderInfo;
|
||||
typedef NS_ENUM(NSInteger, AgoraMediaRecorderState);
|
||||
typedef NS_ENUM(NSInteger, AgoraMediaRecorderReasonCode);
|
||||
|
||||
@protocol AgoraMediaRecorderDelegate <NSObject>
|
||||
#pragma mark Media Recorder Delegate Methods
|
||||
/**-----------------------------------------------------------------------------
|
||||
* @name Media Recorder Delegate Methods
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/** Occurs when media recorder state is changed.
|
||||
*
|
||||
* @since v4.0.0
|
||||
*
|
||||
* When the local audio and video recording state changes, the SDK triggers this callback to report the current
|
||||
* recording state and the reason for the change.
|
||||
*
|
||||
* @param recorder AgoraMediaRecorder object.
|
||||
* @param state Recorder state. See AgoraMediaRecorderState.
|
||||
* @param reason Error code. See AgoraMediaRecorderReasonCode.
|
||||
* @param channelId The channel name.
|
||||
* @param uid ID of the user.
|
||||
*/
|
||||
- (void)mediaRecorder:(AgoraMediaRecorder* _Nonnull)recorder stateDidChanged:(NSString * _Nonnull)channelId uid:(NSUInteger)uid state:(AgoraMediaRecorderState)state reason:(AgoraMediaRecorderReasonCode)reason;
|
||||
|
||||
/** Occurs when media recorder information is updated.
|
||||
*
|
||||
* @since v4.0.0
|
||||
*
|
||||
* After you successfully register this callback and enable the local audio and video recording, the SDK periodically triggers
|
||||
* the `onRecorderInfoUpdated` callback based on the set value of `recorderInfoUpdateInterval`. This callback reports the
|
||||
* filename, duration, and size of the current recording file.
|
||||
*
|
||||
* @param recorder AgoraMediaRecorder object.
|
||||
* @param info Information about the recording file.. See AgoraMediaRecorderInfo.
|
||||
* @param channelId The channel name.
|
||||
* @param uid ID of the user.
|
||||
*/
|
||||
- (void)mediaRecorder:(AgoraMediaRecorder* _Nonnull)recorder informationDidUpdated:(NSString * _Nonnull)channelId uid:(NSUInteger)uid info:(AgoraMediaRecorderInfo* _Nonnull)info;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,551 @@
|
||||
//
|
||||
// AgoraMusicContentCenter.h
|
||||
// AgoraMusicContentCenter
|
||||
//
|
||||
// Created by dingyusong on 2022/6/1.
|
||||
// Copyright © 2022 Agora. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@protocol AgoraRtcMediaPlayerProtocol;
|
||||
@protocol AgoraRtcMediaPlayerDelegate;
|
||||
|
||||
/**
|
||||
* Modes for playing songs.
|
||||
*/
|
||||
typedef NS_ENUM(NSUInteger, AgoraMusicPlayMode) {
|
||||
/**
|
||||
* 0: The music player is in the origin mode, which means playing the original song.
|
||||
*/
|
||||
AgoraMusicPlayModeOriginal = 0,
|
||||
|
||||
/**
|
||||
* The music player is in the accompany mode, which means playing the accompaniment only.
|
||||
*/
|
||||
AgoraMusicPlayModeAccompany = 1,
|
||||
/**
|
||||
* 2: The music player is in the lead sing mode, which means playing the lead vocals.
|
||||
*/
|
||||
AgoraMusicPlayModeLeadsing = 2,
|
||||
};
|
||||
|
||||
/**
|
||||
* The status of preload request
|
||||
*/
|
||||
typedef NS_ENUM(NSUInteger, AgoraMusicContentCenterPreloadState) {
|
||||
/**
|
||||
* 0: No error occurs and preload succeeds.
|
||||
*/
|
||||
AgoraMusicContentCenterPreloadStateOK = 0,
|
||||
|
||||
/**
|
||||
* 1: A general error occurs.
|
||||
*/
|
||||
AgoraMusicContentCenterPreloadStateError = 1,
|
||||
|
||||
/**
|
||||
* 2: The media file is preloading.
|
||||
*/
|
||||
AgoraMusicContentCenterPreloadStatePreloading = 2,
|
||||
|
||||
/**
|
||||
* 3: The media file is removed.
|
||||
*/
|
||||
AgoraMusicContentCenterPreloadStateRemoveCache = 3,
|
||||
};
|
||||
|
||||
/**
|
||||
* the status of search or get top list request
|
||||
*/
|
||||
typedef NS_ENUM(NSUInteger, AgoraMusicContentCenterStateReason) {
|
||||
/**
|
||||
* 0: No error occurs and request succeeds.
|
||||
*/
|
||||
AgoraMusicContentCenterStateReasonOK = 0,
|
||||
/**
|
||||
* 1: The gateway error. There are several possible reasons:
|
||||
* - Token is expired. Check if your token is expired.
|
||||
* - Token is invalid. Check the type of token you passed in.
|
||||
* - Network error. Check your network.
|
||||
*/
|
||||
AgoraMusicContentCenterStateReasonError = 1,
|
||||
/**
|
||||
* 2: The gateway error. There are several possible reasons:
|
||||
* - Token is expired. Check if your token is expired.
|
||||
* - Token is invalid. Check the type of token you passed in.
|
||||
* - Network error. Check your network.
|
||||
*/
|
||||
AgoraMusicContentCenterStateReasonErrorGateway = 2,
|
||||
/**
|
||||
* 3: Permission and resource error. There are several possible reasons:
|
||||
* - Your appid may not have the mcc permission. Please contact technical support
|
||||
* - The resource may not exist. Please contact technical support
|
||||
*/
|
||||
AgoraMusicContentCenterStateReasonErrorPermissionAndResource = 3,
|
||||
/**
|
||||
* 4: Internal data parse error. Please contact technical support
|
||||
*/
|
||||
AgoraMusicContentCenterStateReasonErrorInternalDataParse = 4,
|
||||
/**
|
||||
* 5: Music loading error. Please contact technical support
|
||||
*/
|
||||
AgoraMusicContentCenterStateReasonErrorMusicLoading = 5,
|
||||
/**
|
||||
* 6: Music decryption error. Please contact technical support
|
||||
*/
|
||||
AgoraMusicContentCenterStateReasonErrorMusicDecryption = 6,
|
||||
/**
|
||||
* 7: Http internal error. Please retry later.
|
||||
*/
|
||||
AgoraMusicContentCenterStateReasonErrorHttpInternalError = 7,
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, AgoraMusicCacheStatusType) {
|
||||
/**
|
||||
* 0: The media file is already cached.
|
||||
*/
|
||||
AgoraMusicCacheStatusTypeCached = 0,
|
||||
|
||||
/**
|
||||
* 1: The media file is being cached.
|
||||
*/
|
||||
AgoraMusicCacheStatusTypeCaching = 1,
|
||||
};
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
__attribute__((visibility("default"))) @interface AgoraMusicCacheInfo : NSObject
|
||||
/**
|
||||
* The songCode of the music
|
||||
*/
|
||||
@property(nonatomic, assign) NSInteger songCode;
|
||||
|
||||
/**
|
||||
* The cache status of the music
|
||||
*/
|
||||
@property(nonatomic, assign) AgoraMusicCacheStatusType statusType;
|
||||
@end
|
||||
|
||||
__attribute__((visibility("default"))) @interface AgoraMusicChartInfo : NSObject
|
||||
/**
|
||||
* Name of the music chart
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *chartName;
|
||||
/**
|
||||
* Id of the music chart, which is used to get music list
|
||||
*/
|
||||
@property (nonatomic, assign) NSInteger identify;
|
||||
@end
|
||||
|
||||
__attribute__((visibility("default"))) @interface AgoraMvProperty : NSObject
|
||||
/**
|
||||
* The resolution of the mv
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *resolution;
|
||||
/**
|
||||
* The bandwidth of the mv
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *bandwidth;
|
||||
@end
|
||||
|
||||
__attribute__((visibility("default"))) @interface AgoraClimaxSegment : NSObject
|
||||
/**
|
||||
* The start time of climax segment
|
||||
*/
|
||||
@property(nonatomic, assign) NSInteger startTimeMs;
|
||||
/**
|
||||
* The end time of climax segment
|
||||
*/
|
||||
@property(nonatomic, assign) NSInteger endTimeMs;
|
||||
@end
|
||||
|
||||
/**
|
||||
* The music info
|
||||
*/
|
||||
__attribute__((visibility("default"))) @interface AgoraMusic : NSObject
|
||||
/**
|
||||
* The songCode of music
|
||||
*/
|
||||
@property(nonatomic, assign) NSInteger songCode;
|
||||
/**
|
||||
* The type of music
|
||||
* 1, mp3 with instrumental accompaniment and original
|
||||
* 2, mp3 only with instrumental accompaniment
|
||||
* 3, mp3 only with original
|
||||
* 4, mp4 with instrumental accompaniment and original
|
||||
* 5, mv only
|
||||
* 6, new type mp4 with instrumental accompaniment and original
|
||||
* detail at document of music media center
|
||||
*/
|
||||
@property(nonatomic, assign) NSInteger type;
|
||||
/**
|
||||
* The pitch type of music.
|
||||
* 1, xml lyric has pitch
|
||||
* 2, lyric has no pitch
|
||||
*/
|
||||
@property(nonatomic, assign) NSInteger pitchType;
|
||||
/**
|
||||
* The name of music
|
||||
*/
|
||||
@property(nonatomic, copy) NSString* name;
|
||||
/**
|
||||
* The singer of music
|
||||
*/
|
||||
@property(nonatomic, copy) NSString* singer;
|
||||
/**
|
||||
* The poster url of music
|
||||
*/
|
||||
@property(nonatomic, copy) NSString* poster;
|
||||
|
||||
/**
|
||||
* The release time of music
|
||||
*/
|
||||
@property(nonatomic, copy) NSString* releaseTime;
|
||||
/**
|
||||
* The duration (in seconds) of music
|
||||
*/
|
||||
@property(nonatomic, assign) NSInteger durationS;
|
||||
/**
|
||||
* The lyric list of music
|
||||
* 0, xml
|
||||
* 1, lrc
|
||||
*/
|
||||
@property(nonatomic, strong) NSArray<NSNumber *>* lyricList;
|
||||
/**
|
||||
* The mv property list of music
|
||||
*/
|
||||
@property(nonatomic, strong) NSArray<AgoraMvProperty *>* mvPropertyList;
|
||||
/**
|
||||
* The climax segment list of music
|
||||
*/
|
||||
@property(nonatomic, strong) NSArray<AgoraClimaxSegment *>* climaxSegmentList;
|
||||
@end
|
||||
|
||||
/**
|
||||
* The music collection info
|
||||
*/
|
||||
__attribute__((visibility("default"))) @interface AgoraMusicCollection : NSObject
|
||||
/**
|
||||
* This page contains how many AgoraMusic object
|
||||
*/
|
||||
@property(nonatomic, assign) NSInteger count;
|
||||
/**
|
||||
* Total number of this search result or total number of the type music sources
|
||||
*/
|
||||
@property(nonatomic, assign) NSInteger total;
|
||||
/**
|
||||
* This current page number
|
||||
*/
|
||||
@property(nonatomic, assign) NSInteger page;
|
||||
/**
|
||||
* This request page size
|
||||
*/
|
||||
@property(nonatomic, assign) NSInteger pageSize;
|
||||
/**
|
||||
* This music list of the request result
|
||||
*/
|
||||
@property(nonatomic, strong) NSArray<AgoraMusic *>* musicList;
|
||||
@end
|
||||
|
||||
/**
|
||||
* The request event delegate callback
|
||||
*/
|
||||
@protocol AgoraMusicContentCenterEventDelegate <NSObject>
|
||||
/**
|
||||
* The music chart result callback; occurs when getMusicCharts method is called.
|
||||
*
|
||||
* @param requestId The request id is same as that returned by getMusicCharts.
|
||||
* @param result The result of music chart collection
|
||||
* @param reason The status of the request. See MusicContentCenterStateReason
|
||||
*/
|
||||
- (void)onMusicChartsResult:(NSString *)requestId result:(NSArray<AgoraMusicChartInfo*> *)result reason:(AgoraMusicContentCenterStateReason)reason;
|
||||
|
||||
/**
|
||||
* Music collection, occurs when getMusicCollectionByMusicChartId or searchMusic method is called.
|
||||
*
|
||||
* @param requestId The request id is the same with that returned by getMusicCollectionByMusicChartId or searchMusic
|
||||
* @param result The result of music collection
|
||||
* @param reason The status of the request. See MusicContentCenterStateReason
|
||||
*/
|
||||
- (void)onMusicCollectionResult:(NSString *)requestId result:(AgoraMusicCollection *)result reason:(AgoraMusicContentCenterStateReason)reason;
|
||||
|
||||
/**
|
||||
* Lyric url callback of getLyric, occurs when getLyric is called
|
||||
*
|
||||
* @param requestId The request id is same as that returned by getLyric
|
||||
* @param songCode Song code
|
||||
* @param lyricUrl The lyric url of this music
|
||||
* @param reason The status of the request. See MusicContentCenterStateReason
|
||||
*/
|
||||
- (void)onLyricResult:(NSString*)requestId songCode:(NSInteger)songCode lyricUrl:(NSString* _Nullable)lyricUrl reason:(AgoraMusicContentCenterStateReason)reason;
|
||||
|
||||
/**
|
||||
* Simple info callback of getSongSimpleInfo, occurs when getSongSimpleInfo is called
|
||||
*
|
||||
* @param requestId The request id is same as that returned by getSongSimpleInfo.
|
||||
* @param songCode Song code
|
||||
* @param simpleInfo The metadata of the music.
|
||||
* @param reason The status of the request. See MusicContentCenterStateReason
|
||||
*/
|
||||
- (void)onSongSimpleInfoResult:(NSString*)requestId songCode:(NSInteger)songCode simpleInfo:(NSString* _Nullable)simpleInfo reason:(AgoraMusicContentCenterStateReason)reason;
|
||||
|
||||
/**
|
||||
* Preload process callback, occurs when preload is called
|
||||
*
|
||||
* @param requestId The request id is same as that returned by preload.
|
||||
* @param songCode Song code
|
||||
* @param percent Preload progress (0 ~ 100)
|
||||
* @param lyricUrl The lyric url of this music
|
||||
* @param state Preload state; see PreloadState.
|
||||
* @param reason The status of the request. See MusicContentCenterStateReason
|
||||
*/
|
||||
- (void)onPreLoadEvent:(NSString*)requestId songCode:(NSInteger)songCode percent:(NSInteger)percent lyricUrl:(NSString * _Nullable)lyricUrl state:(AgoraMusicContentCenterPreloadState)state reason:(AgoraMusicContentCenterStateReason)reason;
|
||||
@end
|
||||
|
||||
|
||||
@class AgoraRtcEngineKit;
|
||||
__attribute__((visibility("default"))) @interface AgoraMusicContentCenterConfig : NSObject
|
||||
@property(assign, nonatomic) AgoraRtcEngineKit* _Nullable rtcEngine;
|
||||
/**
|
||||
* The app ID of the project that has enabled the music content center
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *appId;
|
||||
/**
|
||||
* music content center need token to connect with server
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *token;
|
||||
/**
|
||||
* The user ID when using music content center. It can be different from that of the rtc product.
|
||||
*/
|
||||
@property (nonatomic, assign) NSInteger mccUid;
|
||||
/**
|
||||
* The max number which the music content center caches cannot exceed 50.
|
||||
*/
|
||||
@property (nonatomic, assign) NSUInteger maxCacheSize;
|
||||
/**
|
||||
* @technical preview
|
||||
*/
|
||||
@property(nonatomic, copy) NSString* mccDomain;
|
||||
/**
|
||||
* Event handler to get callback result.
|
||||
*/
|
||||
@property(nonatomic, weak) id<AgoraMusicContentCenterEventDelegate> eventDelegate;
|
||||
@end
|
||||
|
||||
@protocol AgoraMusicPlayerProtocol <AgoraRtcMediaPlayerProtocol>
|
||||
/**
|
||||
* Open a media file with specified parameters.
|
||||
*
|
||||
* @param songCode The identifier of the media file that you want to play.
|
||||
* @param startPos The playback position (ms) of the music file.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (NSInteger)openMediaWithSongCode:(NSInteger)songCode startPos:(NSInteger)startPos NS_SWIFT_NAME(openMedia(songCode:startPos:));
|
||||
|
||||
/**
|
||||
* Set the mode for playing songs.
|
||||
* You can call this method to switch from original to accompaniment or lead vocals.
|
||||
* If you do not call this method to set the mode, the SDK plays the accompaniment by default.
|
||||
*
|
||||
* @param model The playing mode.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (NSInteger)setPlayMode:(AgoraMusicPlayMode)mode NS_SWIFT_NAME(setPlayMode(mode:));
|
||||
|
||||
@end
|
||||
|
||||
|
||||
__attribute__((visibility("default"))) @interface AgoraMusicContentCenter : NSObject
|
||||
|
||||
/**
|
||||
* Create an AgoraMusicContentCenter instance.
|
||||
*
|
||||
* @param config Configurations for the AgoraMusicContentCenter instance. For details, see AgoraMusicContentCenterConfig.
|
||||
* @return An shared instance of AgoraMusicContentCenter
|
||||
*/
|
||||
+ (instancetype _Nullable)sharedContentCenterWithConfig:(AgoraMusicContentCenterConfig *)config NS_SWIFT_NAME(sharedContentCenter(config:));
|
||||
|
||||
/**
|
||||
* Renew token of music content center
|
||||
* @param token The new token.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (NSInteger)renewToken:(NSString * _Nonnull)token;
|
||||
|
||||
/**
|
||||
* Register an event delegate, only the last delegate is working.
|
||||
*
|
||||
* @param eventDelegate the object who need AgoraRtcMediaPlayerDelegate method to get the player information ,
|
||||
* if you want remove the delegate, just pass nil
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (NSInteger)registerEventDelegate:(id<AgoraMusicContentCenterEventDelegate> _Nullable)eventDelegate;
|
||||
|
||||
/**
|
||||
* Creates a music player source object and return its pointer.
|
||||
*
|
||||
* @param delegate The object who need AgoraRtcMediaPlayerDelegate method to get the player information
|
||||
* @return
|
||||
* - The pointer to an object who realize the AgoraMusicPlayerProtocol, if the method call succeeds.
|
||||
* - The empty pointer NULL, if the method call fails.
|
||||
*/
|
||||
- (id<AgoraMusicPlayerProtocol> _Nullable)createMusicPlayerWithDelegate:(id<AgoraRtcMediaPlayerDelegate> _Nullable)delegate NS_SWIFT_NAME(createMusicPlayer(delegate:));
|
||||
|
||||
/**
|
||||
* Destroy a music player source object and return result.
|
||||
*
|
||||
* @param musicPlayer The music player.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (NSInteger)destroyMusicPlayer:(id<AgoraMusicPlayerProtocol>)musicPlayer;
|
||||
|
||||
/**
|
||||
* Get music chart collection of music.If the method call success, get result from the AgoraMusicContentCenterEventDelegate - (void)onMusicChartsResult:(NSString *)requestId status:(AgoraMusicContentCenterStatusCode)status result:(NSArray<AgoraMusicChartInfo*> *)result; match the callback "requestId" parameter to get the request result.
|
||||
*
|
||||
* @return The request identification
|
||||
*/
|
||||
- (NSString *)getMusicCharts;
|
||||
|
||||
/**
|
||||
* Get hot music list by hotType and page info.If the method call success, get result from the AgoraMusicContentCenterEventDelegate - (void)onMusicCollectionResult:(NSString *)requestId status:(AgoraMusicContentCenterStateReason)status result:(AgoraMusicCollection *)result; match the callback "requestId" parameter to get the request result.
|
||||
*
|
||||
* @param musicChartId The music chart id obtained from getMusicCharts.
|
||||
* @param page The page of the music chart, starting from 1
|
||||
* @param pageSize The page size, max is 50.
|
||||
* @param jsonOption The ext param, default is null.
|
||||
* @return The request identification
|
||||
*/
|
||||
- (NSString *)getMusicCollectionWithMusicChartId:(NSInteger)musicChartId page:(NSInteger)page pageSize:(NSInteger)pageSize jsonOption:(NSString * _Nullable)jsonOption NS_SWIFT_NAME(getMusicCollection(musicChartId:page:pageSize:jsonOption:));
|
||||
|
||||
/**
|
||||
* Search music by keyword and page info. get result from the AgoraMusicContentCenterEventDelegate - (void)onMusicCollectionResult:(NSString *)requestId status:(AgoraMusicContentCenterStateReason)status result:(AgoraMusicCollection *)result; match the callback "requestId" parameter to get the request result.
|
||||
*
|
||||
* @param keyWord The key word to search.
|
||||
* @param page The page of the music search result, starting from 1
|
||||
* @param pageSize The page size, max is 50.
|
||||
* @param jsonOption The ext param, default is null.
|
||||
* @return The request identification
|
||||
*/
|
||||
- (NSString *)searchMusicWithKeyWord:(NSString *)keyWord page:(NSInteger)page pageSize:(NSInteger)pageSize jsonOption:(NSString * _Nullable)jsonOption NS_SWIFT_NAME(searchMusic(keyWord:page:pageSize:jsonOption:));
|
||||
|
||||
/**
|
||||
* Preload a media file with specified parameters.
|
||||
*
|
||||
* @deprecated This method is deprecated. Use preload(songCode:) instead.
|
||||
* @param songCode The identify of the media file that you want to play.
|
||||
* @param jsonOption The ext param, default is null.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (NSInteger)preloadWithSongCode:(NSInteger)songCode jsonOption:(NSString* _Nullable)jsonOption NS_SWIFT_NAME(preload(songCode:jsonOption:)) __attribute__((deprecated("Use preload(songCode:) instead.")));
|
||||
|
||||
/**
|
||||
* Preload a media file with specified parameters.
|
||||
*
|
||||
* @param songCode The identify of the media file that you want to play.
|
||||
* @return The request identification
|
||||
*/
|
||||
- (NSString *)preloadWithSongCode:(NSInteger)songCode NS_SWIFT_NAME(preload(songCode:));
|
||||
|
||||
/**
|
||||
* Preload a media file with specified parameters.
|
||||
*
|
||||
* @param songCode The identify of the media file that you want to play.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (NSInteger)isPreloadedWithSongCode:(NSInteger)songCode NS_SWIFT_NAME(isPreloaded(songCode:));
|
||||
|
||||
/**
|
||||
* Remove a media file cache
|
||||
*
|
||||
* @param songCode The identifier of the media file that you want to play.
|
||||
* @return
|
||||
* - 0: Success; the cached media file is removed.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (NSInteger)removeCacheWithSongCode:(NSInteger)songCode NS_SWIFT_NAME(removeCache(songCode:));
|
||||
|
||||
/**
|
||||
* Get media cache files.
|
||||
*
|
||||
* @return The caches Array contains songCode and status of the music.
|
||||
*/
|
||||
- (NSArray *)getCaches NS_SWIFT_NAME(getCaches());
|
||||
|
||||
/**
|
||||
* Get internal songCodeKey from songCode and jsonOption
|
||||
*
|
||||
* @param songCode The identifier of the media file.
|
||||
* @param jsonOption An extention parameter. The default value is null. it’s a json-format string and the `key` and `value` can be customized according to your scenarios.
|
||||
* @return
|
||||
* - Internal songCode key, if the method call succeeds.
|
||||
* - The number less than zero, if the method call fails.
|
||||
*/
|
||||
- (NSInteger)getInternalSongCode:(NSInteger)songCode jsonOption:(NSString * _Nullable)jsonOption NS_SWIFT_NAME(getInternalSongCode(songCode:jsonOption:));
|
||||
|
||||
/**
|
||||
* Get lyric of the song. get result from the AgoraMusicContentCenterEventDelegate - (void)onLyricResult:(NSString*)requestId lyricUrl:(NSString*)lyricUrl; match the callback "requestId" parameter to get the request result.
|
||||
*
|
||||
* @param songCode The identify of the media file that you want to play.
|
||||
* @param lyricType The type of the lyric file. may be 0:xml or 1:lrc.
|
||||
* @return The request identification
|
||||
*/
|
||||
- (NSString *)getLyricWithSongCode:(NSInteger)songCode lyricType:(NSInteger)lyricType NS_SWIFT_NAME(getLyric(songCode:lyricType:));
|
||||
|
||||
/**
|
||||
* Gets the metadata of a specific music. Once this method is called, the SDK triggers the onSongSimpleInfoResult callback to report the metadata of the music.
|
||||
*
|
||||
* @param songCode The identify of the media file that you want to play.
|
||||
* @return The request identification
|
||||
*/
|
||||
- (NSString *)getSongSimpleInfoWithSongCode:(NSInteger)songCode NS_SWIFT_NAME(getSongSimpleInfo(songCode:));
|
||||
|
||||
/**
|
||||
* If you want AgoraMusicContentCenterEventDelegate methods callback in the mainThread ,you should set enable YES. Default the delegate callback in subthread.
|
||||
* - `NO`: (Default)Send the delegate callback in subthread.
|
||||
* - `YES`: Send the delegate callback in mainthread.
|
||||
*/
|
||||
- (void)enableMainQueueDispatch:(BOOL)enabled;
|
||||
|
||||
/**
|
||||
* Destroy the shared instance of AgoraMusicContentCenter
|
||||
*
|
||||
* @note If you call the method, you should call it brefore AgoraRtcEngineKit destroy
|
||||
*/
|
||||
+ (void)destroy;
|
||||
|
||||
|
||||
#pragma mark - Unavailable Delegate Methods
|
||||
#if TARGET_OS_IPHONE
|
||||
- (void)onMusicChartsResult:(NSString *)requestId result:(NSArray<AgoraMusicChartInfo*> *)result errorCode:(AgoraMusicContentCenterStateReason)errorCode __attribute__((availability(ios,deprecated=7_0,message="Use onMusicChartsResult:result:statusCode: instead.")));
|
||||
- (void)onMusicCollectionResult:(NSString *)requestId result:(AgoraMusicCollection *)result errorCode:(AgoraMusicContentCenterStateReason)errorCode __attribute__((availability(ios,deprecated=7_0,message="Use onMusicCollectionResult:result:statusCode: instead.")));
|
||||
- (void)onLyricResult:(NSString*)requestId songCode:(NSInteger)songCode lyricUrl:(NSString* _Nullable)lyricUrl errorCode:(AgoraMusicContentCenterStateReason)errorCode __attribute__((availability(ios,deprecated=7_0,message="Use onLyricResult:songCode:lyricUrl:statusCode: instead.")));
|
||||
- (void)onSongSimpleInfoResult:(NSString*)requestId songCode:(NSInteger)songCode simpleInfo:(NSString* _Nullable)simpleInfo errorCode:(AgoraMusicContentCenterStateReason)errorCode __attribute__((availability(ios,deprecated=7_0,message="Use onSongSimpleInfoResult:songCode:simpleInfo:statusCode: instead.")));
|
||||
- (void)onPreLoadEvent:(NSString*)requestId songCode:(NSInteger)songCode percent:(NSInteger)percent lyricUrl:(NSString * _Nullable)lyricUrl state:(AgoraMusicContentCenterPreloadState)state errorCode:(AgoraMusicContentCenterStateReason)errorCode __attribute__((availability(ios,deprecated=7_0,message="Use onPreLoadEvent:songCode:percent:lyricUrl:status:statusCode: instead.")));
|
||||
#endif
|
||||
|
||||
#if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
|
||||
- (void)onMusicChartsResult:(NSString *)requestId result:(NSArray<AgoraMusicChartInfo*> *)result errorCode:(AgoraMusicContentCenterStateReason)errorCode __attribute__((availability(macos,deprecated=10_9,message="Use onMusicChartsResult:result:statusCode: instead.")));
|
||||
- (void)onMusicCollectionResult:(NSString *)requestId result:(AgoraMusicCollection *)result errorCode:(AgoraMusicContentCenterStateReason)errorCode __attribute__((availability(macos,deprecated=10_9,message="Use onMusicCollectionResult:result:statusCode: instead.")));
|
||||
- (void)onLyricResult:(NSString*)requestId songCode:(NSInteger)songCode lyricUrl:(NSString* _Nullable)lyricUrl errorCode:(AgoraMusicContentCenterStateReason)errorCode __attribute__((availability(macos,deprecated=10_9,message="Use onLyricResult:songCode:lyricUrl:statusCode: instead.")));
|
||||
- (void)onSongSimpleInfoResult:(NSString*)requestId songCode:(NSInteger)songCode simpleInfo:(NSString* _Nullable)simpleInfo errorCode:(AgoraMusicContentCenterStateReason)errorCode __attribute__((availability(macos,deprecated=10_9,message="Use onSongSimpleInfoResult:songCode:simpleInfo:statusCode: instead.")));
|
||||
- (void)onPreLoadEvent:(NSString*)requestId songCode:(NSInteger)songCode percent:(NSInteger)percent lyricUrl:(NSString * _Nullable)lyricUrl state:(AgoraMusicContentCenterPreloadState)state errorCode:(AgoraMusicContentCenterStateReason)errorCode __attribute__((availability(macos,deprecated=10_9,message="Use onPreLoadEvent:songCode:percent:lyricUrl:status:statusCode: instead.")));
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
3732
Pods/AgoraRtcEngine_iOS/AgoraRtcKit.xcframework/ios-arm64_armv7/AgoraRtcKit.framework/Headers/AgoraObjects.h
generated
Normal file
3732
Pods/AgoraRtcEngine_iOS/AgoraRtcKit.xcframework/ios-arm64_armv7/AgoraRtcKit.framework/Headers/AgoraObjects.h
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,891 @@
|
||||
// Copyright (c) 2019 Agora.io. All rights reserved
|
||||
|
||||
// This program is confidential and proprietary to Agora.io.
|
||||
// And may not be copied, reproduced, modified, disclosed to others, published
|
||||
// or used, in whole or in part, without the express prior written permission
|
||||
// of Agora.io.
|
||||
#pragma once
|
||||
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
#include <type_traits>
|
||||
#endif
|
||||
#include <utility>
|
||||
|
||||
#ifndef CONSTEXPR
|
||||
#if __cplusplus >= 201103L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201103L)
|
||||
#define CONSTEXPR constexpr
|
||||
#else
|
||||
#define CONSTEXPR
|
||||
#endif
|
||||
#endif // !CONSTEXPR
|
||||
|
||||
#ifndef NOEXCEPT
|
||||
#if __cplusplus >= 201103L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201103L)
|
||||
#define NOEXCEPT(Expr) noexcept(Expr)
|
||||
#else
|
||||
#define NOEXCEPT(Expr)
|
||||
#endif
|
||||
#endif // !NOEXCEPT
|
||||
|
||||
namespace agora {
|
||||
|
||||
// Specification:
|
||||
// http://en.cppreference.com/w/cpp/utility/optional/in_place_t
|
||||
struct in_place_t {};
|
||||
|
||||
// Specification:
|
||||
// http://en.cppreference.com/w/cpp/utility/optional/nullopt_t
|
||||
struct nullopt_t {
|
||||
CONSTEXPR explicit nullopt_t(int) {}
|
||||
};
|
||||
|
||||
// Specification:
|
||||
// http://en.cppreference.com/w/cpp/utility/optional/in_place
|
||||
/*CONSTEXPR*/ const in_place_t in_place = {};
|
||||
|
||||
// Specification:
|
||||
// http://en.cppreference.com/w/cpp/utility/optional/nullopt
|
||||
/*CONSTEXPR*/ const nullopt_t nullopt(0);
|
||||
|
||||
// Forward declaration, which is refered by following helpers.
|
||||
template <typename T>
|
||||
class Optional;
|
||||
|
||||
namespace internal {
|
||||
|
||||
template <typename T>
|
||||
struct OptionalStorageBase {
|
||||
// Initializing |empty_| here instead of using default member initializing
|
||||
// to avoid errors in g++ 4.8.
|
||||
CONSTEXPR OptionalStorageBase() : is_populated_(false), empty_('\0') {}
|
||||
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
template <class... Args>
|
||||
CONSTEXPR explicit OptionalStorageBase(in_place_t, Args&&... args)
|
||||
: is_populated_(true), value_(std::forward<Args>(args)...) {}
|
||||
#else
|
||||
CONSTEXPR explicit OptionalStorageBase(in_place_t, const T& _value)
|
||||
: is_populated_(true), value_(_value) {}
|
||||
#endif
|
||||
// When T is not trivially destructible we must call its
|
||||
// destructor before deallocating its memory.
|
||||
// Note that this hides the (implicitly declared) move constructor, which
|
||||
// would be used for constexpr move constructor in OptionalStorage<T>.
|
||||
// It is needed iff T is trivially move constructible. However, the current
|
||||
// is_trivially_{copy,move}_constructible implementation requires
|
||||
// is_trivially_destructible (which looks a bug, cf:
|
||||
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51452 and
|
||||
// http://cplusplus.github.io/LWG/lwg-active.html#2116), so it is not
|
||||
// necessary for this case at the moment. Please see also the destructor
|
||||
// comment in "is_trivially_destructible = true" specialization below.
|
||||
~OptionalStorageBase() {
|
||||
if (is_populated_)
|
||||
value_.~T();
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
template <class... Args>
|
||||
void Init(Args&&... args) {
|
||||
::new (&value_) T(std::forward<Args>(args)...);
|
||||
is_populated_ = true;
|
||||
}
|
||||
#else
|
||||
void Init(const T& _value) {
|
||||
::new (&value_) T(_value);
|
||||
is_populated_ = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool is_populated_;
|
||||
|
||||
union {
|
||||
// |empty_| exists so that the union will always be initialized, even when
|
||||
// it doesn't contain a value. Union members must be initialized for the
|
||||
// constructor to be 'constexpr'.
|
||||
char empty_;
|
||||
T value_;
|
||||
};
|
||||
};
|
||||
|
||||
// Implement conditional constexpr copy and move constructors. These are
|
||||
// constexpr if is_trivially_{copy,move}_constructible<T>::value is true
|
||||
// respectively. If each is true, the corresponding constructor is defined as
|
||||
// "= default;", which generates a constexpr constructor (In this case,
|
||||
// the condition of constexpr-ness is satisfied because the base class also has
|
||||
// compiler generated constexpr {copy,move} constructors). Note that
|
||||
// placement-new is prohibited in constexpr.
|
||||
template <typename T>
|
||||
struct OptionalStorage : OptionalStorageBase<T> {
|
||||
// This is no trivially {copy,move} constructible case. Other cases are
|
||||
// defined below as specializations.
|
||||
|
||||
// Accessing the members of template base class requires explicit
|
||||
// declaration.
|
||||
using OptionalStorageBase<T>::is_populated_;
|
||||
using OptionalStorageBase<T>::value_;
|
||||
using OptionalStorageBase<T>::Init;
|
||||
|
||||
// Inherit constructors (specifically, the in_place constructor).
|
||||
//using OptionalStorageBase<T>::OptionalStorageBase;
|
||||
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
template <class... Args>
|
||||
CONSTEXPR explicit OptionalStorage(in_place_t in_place, Args&&... args)
|
||||
: OptionalStorageBase<T>(in_place, std::forward<Args>(args)...) {}
|
||||
#else
|
||||
CONSTEXPR explicit OptionalStorage(in_place_t in_place, const T& _value)
|
||||
: OptionalStorageBase<T>(in_place, _value) {}
|
||||
#endif
|
||||
|
||||
// User defined constructor deletes the default constructor.
|
||||
// Define it explicitly.
|
||||
OptionalStorage() {}
|
||||
|
||||
OptionalStorage(const OptionalStorage& other) {
|
||||
if (other.is_populated_)
|
||||
Init(other.value_);
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
OptionalStorage(OptionalStorage&& other) NOEXCEPT(std::is_nothrow_move_constructible<T>::value) {
|
||||
if (other.is_populated_)
|
||||
Init(std::move(other.value_));
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
// Base class to support conditionally usable copy-/move- constructors
|
||||
// and assign operators.
|
||||
template <typename T>
|
||||
class OptionalBase {
|
||||
// This class provides implementation rather than public API, so everything
|
||||
// should be hidden. Often we use composition, but we cannot in this case
|
||||
// because of C++ language restriction.
|
||||
protected:
|
||||
CONSTEXPR OptionalBase() {}
|
||||
CONSTEXPR OptionalBase(const OptionalBase& other) : storage_(other.storage_) {}
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
CONSTEXPR OptionalBase(OptionalBase&& other) : storage_(std::move(other.storage_)) {}
|
||||
|
||||
template <class... Args>
|
||||
CONSTEXPR explicit OptionalBase(in_place_t, Args&&... args)
|
||||
: storage_(in_place, std::forward<Args>(args)...) {}
|
||||
#else
|
||||
CONSTEXPR explicit OptionalBase(in_place_t, const T& _value)
|
||||
: storage_(in_place, _value) {}
|
||||
#endif
|
||||
|
||||
// Implementation of converting constructors.
|
||||
template <typename U>
|
||||
explicit OptionalBase(const OptionalBase<U>& other) {
|
||||
if (other.storage_.is_populated_)
|
||||
storage_.Init(other.storage_.value_);
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
template <typename U>
|
||||
explicit OptionalBase(OptionalBase<U>&& other) {
|
||||
if (other.storage_.is_populated_)
|
||||
storage_.Init(std::move(other.storage_.value_));
|
||||
}
|
||||
#endif
|
||||
|
||||
~OptionalBase() {}
|
||||
|
||||
OptionalBase& operator=(const OptionalBase& other) {
|
||||
CopyAssign(other);
|
||||
return *this;
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
OptionalBase& operator=(OptionalBase&& other) NOEXCEPT(
|
||||
std::is_nothrow_move_assignable<T>::value &&
|
||||
std::is_nothrow_move_constructible<T>::value) {
|
||||
MoveAssign(std::move(other));
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
template <typename U>
|
||||
void CopyAssign(const OptionalBase<U>& other) {
|
||||
if (other.storage_.is_populated_)
|
||||
InitOrAssign(other.storage_.value_);
|
||||
else
|
||||
FreeIfNeeded();
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
template <typename U>
|
||||
void MoveAssign(OptionalBase<U>&& other) {
|
||||
if (other.storage_.is_populated_)
|
||||
InitOrAssign(std::move(other.storage_.value_));
|
||||
else
|
||||
FreeIfNeeded();
|
||||
}
|
||||
#endif
|
||||
|
||||
template <typename U>
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
void InitOrAssign(U&& value) {
|
||||
if (storage_.is_populated_)
|
||||
storage_.value_ = std::forward<U>(value);
|
||||
else
|
||||
storage_.Init(std::forward<U>(value));
|
||||
}
|
||||
#else
|
||||
void InitOrAssign(const U& value) {
|
||||
if (storage_.is_populated_)
|
||||
storage_.value_ = value;
|
||||
else
|
||||
storage_.Init(value);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void FreeIfNeeded() {
|
||||
if (!storage_.is_populated_)
|
||||
return;
|
||||
storage_.value_.~T();
|
||||
storage_.is_populated_ = false;
|
||||
}
|
||||
|
||||
// For implementing conversion, allow access to other typed OptionalBase
|
||||
// class.
|
||||
template <typename U>
|
||||
friend class OptionalBase;
|
||||
|
||||
OptionalStorage<T> storage_;
|
||||
};
|
||||
|
||||
// The following {Copy,Move}{Constructible,Assignable} structs are helpers to
|
||||
// implement constructor/assign-operator overloading. Specifically, if T is
|
||||
// is not movable but copyable, Optional<T>'s move constructor should not
|
||||
// participate in overload resolution. This inheritance trick implements that.
|
||||
template <bool is_copy_constructible>
|
||||
struct CopyConstructible {};
|
||||
|
||||
template <>
|
||||
struct CopyConstructible<false> {
|
||||
CONSTEXPR CopyConstructible() {}
|
||||
CopyConstructible& operator=(const CopyConstructible&) { return *this; }
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
CONSTEXPR CopyConstructible(CopyConstructible&&) {}
|
||||
CopyConstructible& operator=(CopyConstructible&&) { return *this; }
|
||||
#endif
|
||||
private:
|
||||
CONSTEXPR CopyConstructible(const CopyConstructible&);
|
||||
};
|
||||
|
||||
template <bool is_move_constructible>
|
||||
struct MoveConstructible {};
|
||||
|
||||
template <>
|
||||
struct MoveConstructible<false> {
|
||||
CONSTEXPR MoveConstructible() {}
|
||||
CONSTEXPR MoveConstructible(const MoveConstructible&) {}
|
||||
MoveConstructible& operator=(const MoveConstructible&) { return *this; }
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
MoveConstructible& operator=(MoveConstructible&&) { return *this; }
|
||||
private:
|
||||
CONSTEXPR MoveConstructible(MoveConstructible&&);
|
||||
#endif
|
||||
};
|
||||
|
||||
template <bool is_copy_assignable>
|
||||
struct CopyAssignable {};
|
||||
|
||||
template <>
|
||||
struct CopyAssignable<false> {
|
||||
CONSTEXPR CopyAssignable() {}
|
||||
CONSTEXPR CopyAssignable(const CopyAssignable&) {}
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
CONSTEXPR CopyAssignable(CopyAssignable&&) {}
|
||||
CopyAssignable& operator=(CopyAssignable&&) { return *this; }
|
||||
#endif
|
||||
private:
|
||||
CopyAssignable& operator=(const CopyAssignable&);
|
||||
};
|
||||
|
||||
template <bool is_move_assignable>
|
||||
struct MoveAssignable {};
|
||||
|
||||
template <>
|
||||
struct MoveAssignable<false> {
|
||||
CONSTEXPR MoveAssignable() {}
|
||||
CONSTEXPR MoveAssignable(const MoveAssignable&) {}
|
||||
MoveAssignable& operator=(const MoveAssignable&) { return *this; }
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
CONSTEXPR MoveAssignable(MoveAssignable&&) {}
|
||||
|
||||
private:
|
||||
MoveAssignable& operator=(MoveAssignable&&);
|
||||
#endif
|
||||
};
|
||||
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
// Helper to conditionally enable converting constructors and assign operators.
|
||||
template <typename T, typename U>
|
||||
struct IsConvertibleFromOptional
|
||||
: std::integral_constant<
|
||||
bool,
|
||||
std::is_constructible<T, Optional<U>&>::value ||
|
||||
std::is_constructible<T, const Optional<U>&>::value ||
|
||||
std::is_constructible<T, Optional<U>&&>::value ||
|
||||
std::is_constructible<T, const Optional<U>&&>::value ||
|
||||
std::is_convertible<Optional<U>&, T>::value ||
|
||||
std::is_convertible<const Optional<U>&, T>::value ||
|
||||
std::is_convertible<Optional<U>&&, T>::value ||
|
||||
std::is_convertible<const Optional<U>&&, T>::value> {};
|
||||
|
||||
template <typename T, typename U>
|
||||
struct IsAssignableFromOptional
|
||||
: std::integral_constant<
|
||||
bool,
|
||||
IsConvertibleFromOptional<T, U>::value ||
|
||||
std::is_assignable<T&, Optional<U>&>::value ||
|
||||
std::is_assignable<T&, const Optional<U>&>::value ||
|
||||
std::is_assignable<T&, Optional<U>&&>::value ||
|
||||
std::is_assignable<T&, const Optional<U>&&>::value> {};
|
||||
|
||||
// Forward compatibility for C++17.
|
||||
// Introduce one more deeper nested namespace to avoid leaking using std::swap.
|
||||
namespace swappable_impl {
|
||||
using std::swap;
|
||||
|
||||
struct IsSwappableImpl {
|
||||
// Tests if swap can be called. Check<T&>(0) returns true_type iff swap
|
||||
// is available for T. Otherwise, Check's overload resolution falls back
|
||||
// to Check(...) declared below thanks to SFINAE, so returns false_type.
|
||||
template <typename T>
|
||||
static auto Check(int)
|
||||
-> decltype(swap(std::declval<T>(), std::declval<T>()), std::true_type());
|
||||
|
||||
template <typename T>
|
||||
static std::false_type Check(...);
|
||||
};
|
||||
} // namespace swappable_impl
|
||||
template <typename T>
|
||||
struct IsSwappable : decltype(swappable_impl::IsSwappableImpl::Check<T&>(0)) {};
|
||||
#endif
|
||||
} // namespace internal
|
||||
|
||||
// On Windows, by default, empty-base class optimization does not work,
|
||||
// which means even if the base class is empty struct, it still consumes one
|
||||
// byte for its body. __declspec(empty_bases) enables the optimization.
|
||||
// cf)
|
||||
// https://blogs.msdn.microsoft.com/vcblog/2016/03/30/optimizing-the-layout-of-empty-base-classes-in-vs2015-update-2-3/
|
||||
#if defined(_WIN32)
|
||||
#define OPTIONAL_DECLSPEC_EMPTY_BASES __declspec(empty_bases)
|
||||
#else
|
||||
#define OPTIONAL_DECLSPEC_EMPTY_BASES
|
||||
#endif
|
||||
|
||||
// Optional is a Chromium version of the C++17 optional class:
|
||||
// std::optional documentation:
|
||||
// http://en.cppreference.com/w/cpp/utility/optional
|
||||
// Chromium documentation:
|
||||
// https://chromium.googlesource.com/chromium/src/+/master/docs/optional.md
|
||||
//
|
||||
// These are the differences between the specification and the implementation:
|
||||
// - Constructors do not use 'constexpr' as it is a C++14 extension.
|
||||
// - 'constexpr' might be missing in some places for reasons specified locally.
|
||||
// - No exceptions are thrown, because they are banned from Chromium.
|
||||
// Marked noexcept for only move constructor and move assign operators.
|
||||
// - All the non-members are in the 'base' namespace instead of 'std'.
|
||||
//
|
||||
// Note that T cannot have a constructor T(Optional<T>) etc. Optional<T> checks
|
||||
// T's constructor (specifically via IsConvertibleFromOptional), and in the
|
||||
// check whether T can be constructible from Optional<T>, which is recursive
|
||||
// so it does not work. As of Feb 2018, std::optional C++17 implementation in
|
||||
// both clang and gcc has same limitation. MSVC SFINAE looks to have different
|
||||
// behavior, but anyway it reports an error, too.
|
||||
template <typename T>
|
||||
class OPTIONAL_DECLSPEC_EMPTY_BASES Optional
|
||||
: public internal::OptionalBase<T>
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
, public internal::CopyConstructible<std::is_copy_constructible<T>::value>,
|
||||
public internal::MoveConstructible<std::is_move_constructible<T>::value>,
|
||||
public internal::CopyAssignable<std::is_copy_constructible<T>::value &&
|
||||
std::is_copy_assignable<T>::value>,
|
||||
public internal::MoveAssignable<std::is_move_constructible<T>::value &&
|
||||
std::is_move_assignable<T>::value>
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
#undef OPTIONAL_DECLSPEC_EMPTY_BASES
|
||||
|
||||
typedef T value_type;
|
||||
|
||||
// Defer default/copy/move constructor implementation to OptionalBase.
|
||||
CONSTEXPR Optional() {}
|
||||
CONSTEXPR Optional(const Optional& other) : internal::OptionalBase<T>(other) {}
|
||||
|
||||
CONSTEXPR Optional(nullopt_t) {} // NOLINT(runtime/explicit)
|
||||
|
||||
// Converting copy constructor. "explicit" only if
|
||||
// std::is_convertible<const U&, T>::value is false. It is implemented by
|
||||
// declaring two almost same constructors, but that condition in enable_if_t
|
||||
// is different, so that either one is chosen, thanks to SFINAE.
|
||||
template <typename U>
|
||||
Optional(const Optional<U>& other) : internal::OptionalBase<T>(other) {}
|
||||
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
// Converting move constructor. Similar to converting copy constructor,
|
||||
// declaring two (explicit and non-explicit) constructors.
|
||||
template <typename U>
|
||||
Optional(Optional<U>&& other) : internal::OptionalBase<T>(std::move(other)) {}
|
||||
|
||||
template <class... Args>
|
||||
CONSTEXPR explicit Optional(in_place_t, Args&&... args)
|
||||
: internal::OptionalBase<T>(in_place, std::forward<Args>(args)...) {}
|
||||
|
||||
template <class U, class... Args>
|
||||
CONSTEXPR explicit Optional(in_place_t,
|
||||
std::initializer_list<U> il,
|
||||
Args&&... args)
|
||||
: internal::OptionalBase<T>(in_place, il, std::forward<Args>(args)...) {}
|
||||
#else
|
||||
CONSTEXPR explicit Optional(in_place_t, const T& _value)
|
||||
: internal::OptionalBase<T>(in_place, _value) {}
|
||||
template <class U>
|
||||
CONSTEXPR explicit Optional(in_place_t,
|
||||
const U il[],
|
||||
const T& _value)
|
||||
: internal::OptionalBase<T>(in_place, il, _value) {}
|
||||
#endif
|
||||
|
||||
// Forward value constructor. Similar to converting constructors,
|
||||
// conditionally explicit.
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
template <typename U = value_type>
|
||||
CONSTEXPR Optional(U&& value)
|
||||
: internal::OptionalBase<T>(in_place, std::forward<U>(value)) {}
|
||||
#else
|
||||
template <typename U>
|
||||
CONSTEXPR Optional(const U& value)
|
||||
: internal::OptionalBase<T>(in_place, value) {}
|
||||
#endif
|
||||
|
||||
~Optional() {}
|
||||
|
||||
// Defer copy-/move- assign operator implementation to OptionalBase.
|
||||
Optional& operator=(const Optional& other) {
|
||||
if (&other == this) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
internal::OptionalBase<T>::operator=(other);
|
||||
return *this;
|
||||
}
|
||||
|
||||
Optional& operator=(nullopt_t) {
|
||||
FreeIfNeeded();
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Perfect-forwarded assignment.
|
||||
template <typename U>
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
Optional& operator=(U&& value) {
|
||||
InitOrAssign(std::forward<U>(value));
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
Optional& operator=(const U& value) {
|
||||
InitOrAssign(value);
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Copy assign the state of other.
|
||||
template <typename U>
|
||||
Optional& operator=(const Optional<U>& other) {
|
||||
CopyAssign(other);
|
||||
return *this;
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
// Move assign the state of other.
|
||||
template <typename U>
|
||||
Optional& operator=(Optional<U>&& other) {
|
||||
MoveAssign(std::move(other));
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
const T* operator->() const {
|
||||
return &storage_.value_;
|
||||
}
|
||||
|
||||
T* operator->() {
|
||||
return &storage_.value_;
|
||||
}
|
||||
|
||||
const T& operator*() const {
|
||||
return storage_.value_;
|
||||
}
|
||||
|
||||
T& operator*() {
|
||||
return storage_.value_;
|
||||
}
|
||||
|
||||
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
CONSTEXPR explicit operator bool() const { return storage_.is_populated_; }
|
||||
#else
|
||||
CONSTEXPR operator bool() const { return storage_.is_populated_; }
|
||||
#endif
|
||||
|
||||
CONSTEXPR bool has_value() const { return storage_.is_populated_; }
|
||||
|
||||
#if 1
|
||||
const T& value() const {
|
||||
return storage_.value_;
|
||||
}
|
||||
|
||||
template <class U>
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
CONSTEXPR T value_or(U&& default_value) const {
|
||||
// TODO(mlamouri): add the following assert when possible:
|
||||
// static_assert(std::is_copy_constructible<T>::value,
|
||||
// "T must be copy constructible");
|
||||
static_assert(std::is_convertible<U, T>::value,
|
||||
"U must be convertible to T");
|
||||
return storage_.is_populated_
|
||||
? value()
|
||||
: static_cast<T>(std::forward<U>(default_value));
|
||||
}
|
||||
#else
|
||||
CONSTEXPR T value_or(const U& default_value) const {
|
||||
return storage_.is_populated_
|
||||
? value()
|
||||
: static_cast<T>(default_value);
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
const T& value() const & {
|
||||
return storage_.value_;
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
const T&& value() const && {
|
||||
return std::move(storage_.value_);
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class U>
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
CONSTEXPR T value_or(U&& default_value) const & {
|
||||
// TODO(mlamouri): add the following assert when possible:
|
||||
// static_assert(std::is_copy_constructible<T>::value,
|
||||
// "T must be copy constructible");
|
||||
static_assert(std::is_convertible<U, T>::value,
|
||||
"U must be convertible to T");
|
||||
return storage_.is_populated_
|
||||
? value()
|
||||
: static_cast<T>(std::forward<U>(default_value));
|
||||
}
|
||||
#else
|
||||
CONSTEXPR T value_or(const U& default_value) const & {
|
||||
// TODO(mlamouri): add the following assert when possible:
|
||||
// static_assert(std::is_copy_constructible<T>::value,
|
||||
// "T must be copy constructible");
|
||||
static_assert(std::is_convertible<U, T>::value,
|
||||
"U must be convertible to T");
|
||||
return storage_.is_populated_
|
||||
? value()
|
||||
: static_cast<T>(default_value);
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class U>
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
CONSTEXPR T value_or(U&& default_value) const && {
|
||||
// TODO(mlamouri): add the following assert when possible:
|
||||
// static_assert(std::is_move_constructible<T>::value,
|
||||
// "T must be move constructible");
|
||||
static_assert(std::is_convertible<U, T>::value,
|
||||
"U must be convertible to T");
|
||||
return storage_.is_populated_
|
||||
? std::move(value())
|
||||
: static_cast<T>(std::forward<U>(default_value));
|
||||
}
|
||||
#endif
|
||||
#endif // 1
|
||||
|
||||
void swap(Optional& other) {
|
||||
if (!storage_.is_populated_ && !other.storage_.is_populated_)
|
||||
return;
|
||||
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
if (storage_.is_populated_ != other.storage_.is_populated_) {
|
||||
if (storage_.is_populated_) {
|
||||
other.storage_.Init(std::move(storage_.value_));
|
||||
FreeIfNeeded();
|
||||
} else {
|
||||
storage_.Init(std::move(other.storage_.value_));
|
||||
other.FreeIfNeeded();
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
using std::swap;
|
||||
swap(**this, *other);
|
||||
}
|
||||
|
||||
void reset() { FreeIfNeeded(); }
|
||||
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
template <class... Args>
|
||||
T& emplace(Args&&... args) {
|
||||
FreeIfNeeded();
|
||||
storage_.Init(std::forward<Args>(args)...);
|
||||
return storage_.value_;
|
||||
}
|
||||
|
||||
template <class U, class... Args>
|
||||
T& emplace(std::initializer_list<U> il, Args&&... args) {
|
||||
FreeIfNeeded();
|
||||
storage_.Init(il, std::forward<Args>(args)...);
|
||||
return storage_.value_;
|
||||
}
|
||||
#else
|
||||
T& emplace(const T& _value) {
|
||||
FreeIfNeeded();
|
||||
storage_.Init(_value);
|
||||
return storage_.value_;
|
||||
}
|
||||
template <class U>
|
||||
T& emplace(const U il[], const T& _value) {
|
||||
FreeIfNeeded();
|
||||
storage_.Init(il, _value);
|
||||
return storage_.value_;
|
||||
}
|
||||
#endif
|
||||
|
||||
private:
|
||||
// Accessing template base class's protected member needs explicit
|
||||
// declaration to do so.
|
||||
using internal::OptionalBase<T>::CopyAssign;
|
||||
using internal::OptionalBase<T>::FreeIfNeeded;
|
||||
using internal::OptionalBase<T>::InitOrAssign;
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
using internal::OptionalBase<T>::MoveAssign;
|
||||
#endif
|
||||
using internal::OptionalBase<T>::storage_;
|
||||
};
|
||||
|
||||
// Here after defines comparation operators. The definition follows
|
||||
// http://en.cppreference.com/w/cpp/utility/optional/operator_cmp
|
||||
// while bool() casting is replaced by has_value() to meet the chromium
|
||||
// style guide.
|
||||
template <class T, class U>
|
||||
bool operator==(const Optional<T>& lhs, const Optional<U>& rhs) {
|
||||
if (lhs.has_value() != rhs.has_value())
|
||||
return false;
|
||||
if (!lhs.has_value())
|
||||
return true;
|
||||
return *lhs == *rhs;
|
||||
}
|
||||
|
||||
template <class T, class U>
|
||||
bool operator!=(const Optional<T>& lhs, const Optional<U>& rhs) {
|
||||
if (lhs.has_value() != rhs.has_value())
|
||||
return true;
|
||||
if (!lhs.has_value())
|
||||
return false;
|
||||
return *lhs != *rhs;
|
||||
}
|
||||
|
||||
template <class T, class U>
|
||||
bool operator<(const Optional<T>& lhs, const Optional<U>& rhs) {
|
||||
if (!rhs.has_value())
|
||||
return false;
|
||||
if (!lhs.has_value())
|
||||
return true;
|
||||
return *lhs < *rhs;
|
||||
}
|
||||
|
||||
template <class T, class U>
|
||||
bool operator<=(const Optional<T>& lhs, const Optional<U>& rhs) {
|
||||
if (!lhs.has_value())
|
||||
return true;
|
||||
if (!rhs.has_value())
|
||||
return false;
|
||||
return *lhs <= *rhs;
|
||||
}
|
||||
|
||||
template <class T, class U>
|
||||
bool operator>(const Optional<T>& lhs, const Optional<U>& rhs) {
|
||||
if (!lhs.has_value())
|
||||
return false;
|
||||
if (!rhs.has_value())
|
||||
return true;
|
||||
return *lhs > *rhs;
|
||||
}
|
||||
|
||||
template <class T, class U>
|
||||
bool operator>=(const Optional<T>& lhs, const Optional<U>& rhs) {
|
||||
if (!rhs.has_value())
|
||||
return true;
|
||||
if (!lhs.has_value())
|
||||
return false;
|
||||
return *lhs >= *rhs;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
CONSTEXPR bool operator==(const Optional<T>& opt, nullopt_t) {
|
||||
return !opt;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
CONSTEXPR bool operator==(nullopt_t, const Optional<T>& opt) {
|
||||
return !opt;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
CONSTEXPR bool operator!=(const Optional<T>& opt, nullopt_t) {
|
||||
return opt.has_value();
|
||||
}
|
||||
|
||||
template <class T>
|
||||
CONSTEXPR bool operator!=(nullopt_t, const Optional<T>& opt) {
|
||||
return opt.has_value();
|
||||
}
|
||||
|
||||
template <class T>
|
||||
CONSTEXPR bool operator<(const Optional<T>& , nullopt_t) {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
CONSTEXPR bool operator<(nullopt_t, const Optional<T>& opt) {
|
||||
return opt.has_value();
|
||||
}
|
||||
|
||||
template <class T>
|
||||
CONSTEXPR bool operator<=(const Optional<T>& opt, nullopt_t) {
|
||||
return !opt;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
CONSTEXPR bool operator<=(nullopt_t, const Optional<T>& ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
CONSTEXPR bool operator>(const Optional<T>& opt, nullopt_t) {
|
||||
return opt.has_value();
|
||||
}
|
||||
|
||||
template <class T>
|
||||
CONSTEXPR bool operator>(nullopt_t, const Optional<T>& ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
CONSTEXPR bool operator>=(const Optional<T>& , nullopt_t) {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
CONSTEXPR bool operator>=(nullopt_t, const Optional<T>& opt) {
|
||||
return !opt;
|
||||
}
|
||||
|
||||
template <class T, class U>
|
||||
CONSTEXPR bool operator==(const Optional<T>& opt, const U& value) {
|
||||
return opt.has_value() ? *opt == value : false;
|
||||
}
|
||||
|
||||
template <class T, class U>
|
||||
CONSTEXPR bool operator==(const U& value, const Optional<T>& opt) {
|
||||
return opt.has_value() ? value == *opt : false;
|
||||
}
|
||||
|
||||
template <class T, class U>
|
||||
CONSTEXPR bool operator!=(const Optional<T>& opt, const U& value) {
|
||||
return opt.has_value() ? *opt != value : true;
|
||||
}
|
||||
|
||||
template <class T, class U>
|
||||
CONSTEXPR bool operator!=(const U& value, const Optional<T>& opt) {
|
||||
return opt.has_value() ? value != *opt : true;
|
||||
}
|
||||
|
||||
template <class T, class U>
|
||||
CONSTEXPR bool operator<(const Optional<T>& opt, const U& value) {
|
||||
return opt.has_value() ? *opt < value : true;
|
||||
}
|
||||
|
||||
template <class T, class U>
|
||||
CONSTEXPR bool operator<(const U& value, const Optional<T>& opt) {
|
||||
return opt.has_value() ? value < *opt : false;
|
||||
}
|
||||
|
||||
template <class T, class U>
|
||||
CONSTEXPR bool operator<=(const Optional<T>& opt, const U& value) {
|
||||
return opt.has_value() ? *opt <= value : true;
|
||||
}
|
||||
|
||||
template <class T, class U>
|
||||
CONSTEXPR bool operator<=(const U& value, const Optional<T>& opt) {
|
||||
return opt.has_value() ? value <= *opt : false;
|
||||
}
|
||||
|
||||
template <class T, class U>
|
||||
CONSTEXPR bool operator>(const Optional<T>& opt, const U& value) {
|
||||
return opt.has_value() ? *opt > value : false;
|
||||
}
|
||||
|
||||
template <class T, class U>
|
||||
CONSTEXPR bool operator>(const U& value, const Optional<T>& opt) {
|
||||
return opt.has_value() ? value > *opt : true;
|
||||
}
|
||||
|
||||
template <class T, class U>
|
||||
CONSTEXPR bool operator>=(const Optional<T>& opt, const U& value) {
|
||||
return opt.has_value() ? *opt >= value : false;
|
||||
}
|
||||
|
||||
template <class T, class U>
|
||||
CONSTEXPR bool operator>=(const U& value, const Optional<T>& opt) {
|
||||
return opt.has_value() ? value >= *opt : true;
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
template <class T, class... Args>
|
||||
CONSTEXPR Optional<T> make_optional(Args&&... args) {
|
||||
return Optional<T>(in_place, std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
template <class T, class U, class... Args>
|
||||
CONSTEXPR Optional<T> make_optional(std::initializer_list<U> il,
|
||||
Args&&... args) {
|
||||
return Optional<T>(in_place, il, std::forward<Args>(args)...);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Partial specialization for a function template is not allowed. Also, it is
|
||||
// not allowed to add overload function to std namespace, while it is allowed
|
||||
// to specialize the template in std. Thus, swap() (kind of) overloading is
|
||||
// defined in base namespace, instead.
|
||||
template <class T>
|
||||
void swap(Optional<T>& lhs, Optional<T>& rhs) {
|
||||
lhs.swap(rhs);
|
||||
}
|
||||
|
||||
} // namespace agora
|
||||
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
namespace std {
|
||||
template <class T>
|
||||
struct hash<agora::Optional<T> > {
|
||||
size_t operator()(const agora::Optional<T>& opt) const {
|
||||
return opt == agora::nullopt ? 0 : std::hash<T>()(*opt);
|
||||
}
|
||||
};
|
||||
} // namespace std
|
||||
#endif
|
||||
#undef CONSTEXPR
|
||||
#undef NOEXCEPT
|
||||
@@ -0,0 +1,137 @@
|
||||
|
||||
// Copyright (c) 2020 Agora.io. All rights reserved
|
||||
|
||||
// This program is confidential and proprietary to Agora.io.
|
||||
// And may not be copied, reproduced, modified, disclosed to others, published
|
||||
// or used, in whole or in part, without the express prior written permission
|
||||
// of Agora.io.
|
||||
#pragma once
|
||||
|
||||
#ifndef __AGORA_REF_COUNTED_OBJECT_H__
|
||||
#define __AGORA_REF_COUNTED_OBJECT_H__
|
||||
#endif
|
||||
|
||||
#if defined(__AGORA_REF_COUNTED_OBJECT_INTERNAL_H__)
|
||||
#error AgoraRefCountedObject is deprected now, its only purpose is for API compatiable.
|
||||
#endif
|
||||
|
||||
#include "AgoraRefPtr.h"
|
||||
#include "AgoraAtomicOps.h"
|
||||
|
||||
#ifndef OPTIONAL_REFCOUNTRELEASESTATUS_SPECIFIER
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
#define OPTIONAL_REFCOUNTRELEASESTATUS_SPECIFIER agora::RefCountReleaseStatus::
|
||||
#else
|
||||
#define OPTIONAL_REFCOUNTRELEASESTATUS_SPECIFIER
|
||||
#endif
|
||||
#endif
|
||||
namespace agora {
|
||||
|
||||
class RefCounter {
|
||||
public:
|
||||
explicit RefCounter(int ref_count) : ref_count_(ref_count) {}
|
||||
|
||||
void IncRef() { AtomicOps::Increment(&ref_count_); }
|
||||
|
||||
/**
|
||||
* Returns true if this was the last reference, and the resource protected by
|
||||
* the reference counter can be deleted.
|
||||
*/
|
||||
agora::RefCountReleaseStatus DecRef() {
|
||||
return (AtomicOps::Decrement(&ref_count_) == 0
|
||||
? OPTIONAL_REFCOUNTRELEASESTATUS_SPECIFIER kDroppedLastRef
|
||||
: OPTIONAL_REFCOUNTRELEASESTATUS_SPECIFIER kOtherRefsRemained);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether the reference count is one. If the reference count is used
|
||||
* in the conventional way, a reference count of 1 implies that the current
|
||||
* thread owns the reference and no other thread shares it. This call performs
|
||||
* the test for a reference count of one, and performs the memory barrier
|
||||
* needed for the owning thread to act on the resource protected by the
|
||||
* reference counter, knowing that it has exclusive access.
|
||||
*/
|
||||
bool HasOneRef() const { return (AtomicOps::AcquireLoad(&ref_count_) == 1); }
|
||||
|
||||
private:
|
||||
RefCounter();
|
||||
|
||||
private:
|
||||
volatile int ref_count_;
|
||||
};
|
||||
|
||||
/**
|
||||
* Agora sample code for wrapping a class that needs to inherit from RefCountInterface in order
|
||||
* to be held by agora::agora_refptr
|
||||
* Usage:
|
||||
* agora::agora_refptr<TypeName> ptr = new RefCountedObject<TypeName>(Arg1, Arg2, ...);
|
||||
*/
|
||||
|
||||
template <class T>
|
||||
class RefCountedObject : public T {
|
||||
public:
|
||||
RefCountedObject(): ref_count_(0) {}
|
||||
|
||||
template <class P0>
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
explicit RefCountedObject(P0&& p0) : T(std::forward<P0>(p0)), ref_count_(0) {}
|
||||
#else
|
||||
explicit RefCountedObject(const P0& p0) : T(p0), ref_count_(0) {}
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
template <class P0, class P1, class... Args>
|
||||
RefCountedObject(P0&& p0, P1&& p1, Args&&... args)
|
||||
: T(std::forward<P0>(p0),
|
||||
std::forward<P1>(p1),
|
||||
std::forward<Args>(args)...),
|
||||
ref_count_(0) {}
|
||||
#endif
|
||||
|
||||
virtual void AddRef() const { ref_count_.IncRef(); }
|
||||
|
||||
virtual agora::RefCountReleaseStatus Release() const {
|
||||
const agora::RefCountReleaseStatus status = ref_count_.DecRef();
|
||||
if (status == OPTIONAL_REFCOUNTRELEASESTATUS_SPECIFIER kDroppedLastRef) {
|
||||
delete this;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether the reference count is one. If the reference count is used
|
||||
* in the conventional way, a reference count of 1 implies that the current
|
||||
* thread owns the reference and no other thread shares it. This call
|
||||
* performs the test for a reference count of one, and performs the memory
|
||||
* barrier needed for the owning thread to act on the object, knowing that it
|
||||
* has exclusive access to the object.
|
||||
*/
|
||||
virtual bool HasOneRef() const { return ref_count_.HasOneRef(); }
|
||||
|
||||
protected:
|
||||
virtual ~RefCountedObject() {}
|
||||
|
||||
private:
|
||||
RefCountedObject(const RefCountedObject&);
|
||||
RefCountedObject& operator=(const RefCountedObject&);
|
||||
|
||||
protected:
|
||||
mutable agora::RefCounter ref_count_;
|
||||
};
|
||||
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
template <typename T, typename... types>
|
||||
inline agora_refptr<T> make_refptr(types&&... args) {
|
||||
return agora_refptr<T>(new RefCountedObject<T>(std::forward<types>(args)...));
|
||||
}
|
||||
#else
|
||||
template <typename T>
|
||||
inline agora_refptr<T> make_refptr() {
|
||||
return agora_refptr<T>(new RefCountedObject<T>());
|
||||
}
|
||||
template <typename T, typename P0>
|
||||
inline agora_refptr<T> make_refptr(const P0& p0) {
|
||||
return agora_refptr<T>(new RefCountedObject<T>(p0));
|
||||
}
|
||||
#endif
|
||||
} // namespace agora
|
||||
@@ -0,0 +1,156 @@
|
||||
|
||||
// Copyright (c) 2019 Agora.io. All rights reserved
|
||||
|
||||
// This program is confidential and proprietary to Agora.io.
|
||||
// And may not be copied, reproduced, modified, disclosed to others, published
|
||||
// or used, in whole or in part, without the express prior written permission
|
||||
// of Agora.io.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#if !(__cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800))
|
||||
#include <cstddef>
|
||||
#endif
|
||||
#ifndef OPTIONAL_ENUM_CLASS
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
#define OPTIONAL_ENUM_CLASS enum class
|
||||
#else
|
||||
#define OPTIONAL_ENUM_CLASS enum
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace agora {
|
||||
|
||||
OPTIONAL_ENUM_CLASS RefCountReleaseStatus { kDroppedLastRef, kOtherRefsRemained };
|
||||
|
||||
// Interfaces where refcounting is part of the public api should
|
||||
// inherit this abstract interface. The implementation of these
|
||||
// methods is usually provided by the RefCountedObject template class,
|
||||
// applied as a leaf in the inheritance tree.
|
||||
class RefCountInterface {
|
||||
public:
|
||||
virtual void AddRef() const = 0;
|
||||
virtual RefCountReleaseStatus Release() const = 0;
|
||||
virtual bool HasOneRef() const = 0;
|
||||
|
||||
// Non-public destructor, because Release() has exclusive responsibility for
|
||||
// destroying the object.
|
||||
protected:
|
||||
virtual ~RefCountInterface() {}
|
||||
};
|
||||
|
||||
template <class T>
|
||||
class agora_refptr {
|
||||
public:
|
||||
agora_refptr() : ptr_(NULL) {}
|
||||
|
||||
agora_refptr(T* p) : ptr_(p) {
|
||||
if (ptr_) ptr_->AddRef();
|
||||
}
|
||||
|
||||
template<typename U>
|
||||
agora_refptr(U* p) : ptr_(p) {
|
||||
if (ptr_) ptr_->AddRef();
|
||||
}
|
||||
|
||||
agora_refptr(const agora_refptr<T>& r) : ptr_(r.get()) {
|
||||
if (ptr_) ptr_->AddRef();
|
||||
}
|
||||
|
||||
template <typename U>
|
||||
agora_refptr(const agora_refptr<U>& r) : ptr_(r.get()) {
|
||||
if (ptr_) ptr_->AddRef();
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
agora_refptr(agora_refptr<T>&& r) : ptr_(r.move()) {}
|
||||
|
||||
template <typename U>
|
||||
agora_refptr(agora_refptr<U>&& r) : ptr_(r.move()) {}
|
||||
#endif
|
||||
|
||||
~agora_refptr() {
|
||||
reset();
|
||||
}
|
||||
|
||||
T* get() const { return ptr_; }
|
||||
operator bool() const { return (ptr_ != NULL); }
|
||||
|
||||
T* operator->() const { return ptr_; }
|
||||
T& operator*() const { return *ptr_; }
|
||||
|
||||
// Returns the (possibly null) raw pointer, and makes the agora_refptr hold a
|
||||
// null pointer, all without touching the reference count of the underlying
|
||||
// pointed-to object. The object is still reference counted, and the caller of
|
||||
// move() is now the proud owner of one reference, so it is responsible for
|
||||
// calling Release() once on the object when no longer using it.
|
||||
T* move() {
|
||||
T* retVal = ptr_;
|
||||
ptr_ = NULL;
|
||||
return retVal;
|
||||
}
|
||||
|
||||
agora_refptr<T>& operator=(T* p) {
|
||||
if (ptr_ == p) return *this;
|
||||
|
||||
if (p) p->AddRef();
|
||||
if (ptr_) ptr_->Release();
|
||||
ptr_ = p;
|
||||
return *this;
|
||||
}
|
||||
|
||||
agora_refptr<T>& operator=(const agora_refptr<T>& r) {
|
||||
return *this = r.get();
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
agora_refptr<T>& operator=(agora_refptr<T>&& r) {
|
||||
agora_refptr<T>(std::move(r)).swap(*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename U>
|
||||
agora_refptr<T>& operator=(agora_refptr<U>&& r) {
|
||||
agora_refptr<T>(std::move(r)).swap(*this);
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
// For working with std::find()
|
||||
bool operator==(const agora_refptr<T>& r) const { return ptr_ == r.ptr_; }
|
||||
|
||||
// For working with std::set
|
||||
bool operator<(const agora_refptr<T>& r) const { return ptr_ < r.ptr_; }
|
||||
|
||||
void swap(T** pp) {
|
||||
T* p = ptr_;
|
||||
ptr_ = *pp;
|
||||
*pp = p;
|
||||
}
|
||||
|
||||
void swap(agora_refptr<T>& r) { swap(&r.ptr_); }
|
||||
|
||||
void reset() {
|
||||
if (ptr_) {
|
||||
ptr_->Release();
|
||||
ptr_ = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
T* ptr_;
|
||||
};
|
||||
|
||||
} // namespace agora
|
||||
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
namespace std {
|
||||
template <typename T>
|
||||
struct hash<agora::agora_refptr<T>> {
|
||||
std::size_t operator()(const agora::agora_refptr<T>& k) const {
|
||||
return reinterpret_cast<size_t>(k.get());
|
||||
}
|
||||
};
|
||||
} // namespace std
|
||||
#endif
|
||||
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// Copyright (c) 2020 Agora. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AgoraObjects.h"
|
||||
|
||||
@protocol AgoraAudioSpectrumDelegate <NSObject>
|
||||
@optional
|
||||
/**
|
||||
* Reports the audio spectrum of audio recording.
|
||||
*
|
||||
* This callback reports the audio spectrum data of the audio recording at the moment
|
||||
* in the channel.
|
||||
*
|
||||
* You can set the time interval of this callback using "enableAudioSpectrumMonitor".
|
||||
*
|
||||
* @param audioSpectrumData The audio spectrum data of audio recording.
|
||||
* - true: Processed.
|
||||
* - false: Not processed.
|
||||
*/
|
||||
- (BOOL)onLocalAudioSpectrum:(NSArray<NSNumber *> * _Nullable)audioSpectrumData NS_SWIFT_NAME(onLocalAudioSpectrum(_:));
|
||||
|
||||
/**
|
||||
* Reports the audio spectrum of remote user.
|
||||
*
|
||||
* This callback reports the IDs and audio spectrum data of the loudest speakers at the moment
|
||||
* in the channel.
|
||||
*
|
||||
* You can set the time interval of this callback using "enableAudioSpectrumMonitor".
|
||||
*
|
||||
* @param AudioSpectrumInfo The pointer to AudioSpectrumInfo, which is an array containing
|
||||
* the user ID and audio spectrum data for each speaker.
|
||||
* - This array contains the following members:
|
||||
* - `uid`, which is the UID of each remote speaker
|
||||
* - `audioSpectrumData`, which reports the audio spectrum of each remote speaker.
|
||||
* - `spectrumDataLength`, the length of audio spectrum data.
|
||||
* - true: Processed.
|
||||
* - false: Not processed.
|
||||
*/
|
||||
- (BOOL)onRemoteAudioSpectrum:(NSArray<AgoraAudioSpectrumInfo *> * _Nullable)AudioSpectrumInfo NS_SWIFT_NAME(onRemoteAudioSpectrum(_:));
|
||||
|
||||
@end
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// AgoraRtcKit.h
|
||||
// AgoraRtcKit
|
||||
//
|
||||
// Copyright (c) 2018 Agora. All rights reserved.
|
||||
//
|
||||
|
||||
#import <AgoraRtcKit/AgoraConstants.h>
|
||||
#import <AgoraRtcKit/AgoraEnumerates.h>
|
||||
#import <AgoraRtcKit/AgoraObjects.h>
|
||||
#import <AgoraRtcKit/AgoraRtcEngineKit.h>
|
||||
#import <AgoraRtcKit/AgoraRtcEngineKitEx.h>
|
||||
#import <AgoraRtcKit/AgoraRtcEngineDelegate.h>
|
||||
#import <AgoraRtcKit/AgoraAudioFrameDelegate.h>
|
||||
#import <AgoraRtcKit/AgoraAudioEncodedFrameDelegate.h>
|
||||
#import <AgoraRtcKit/AgoraRtcAudioSpectrumDelegate.h>
|
||||
#import <AgoraRtcKit/AgoraVideoFrameDelegate.h>
|
||||
#import <AgoraRtcKit/AgoraFaceInfoDelegate.h>
|
||||
#import <AgoraRtcKit/AgoraEncodedVideoFrameDelegate.h>
|
||||
#import <AgoraRtcKit/AgoraRtcMediaPlayerProtocol.h>
|
||||
#import <AgoraRtcKit/AgoraRtcMediaPlayerDelegate.h>
|
||||
#import <AgoraRtcKit/AgoraRtcMediaPlayerAudioFrameDelegate.h>
|
||||
#import <AgoraRtcKit/AgoraRtcMediaPlayerVideoFrameDelegate.h>
|
||||
#import <AgoraRtcKit/AgoraH265TranscoderProtocol.h>
|
||||
#import <AgoraRtcKit/AgoraH265TranscoderDelegate.h>
|
||||
#import <AgoraRtcKit/AgoraMediaRecorder.h>
|
||||
#import <AgoraRtcKit/AgoraMediaRecorderDelegate.h>
|
||||
#import <AgoraRtcKit/AgoraMediaMetadataDelegate.h>
|
||||
#import <AgoraRtcKit/AgoraMediaMetadataDataSource.h>
|
||||
#import <AgoraRtcKit/AgoraDirectCdnStreamingEventDelegate.h>
|
||||
#import <AgoraRtcKit/AgoraMediaFilterEventDelegate.h>
|
||||
#import <AgoraRtcKit/AgoraSpatialAudioKit.h>
|
||||
#import <AgoraRtcKit/AgoraMusicContentCenter.h>
|
||||
#import <AgoraRtcKit/AgoraRtcMediaPlayerCacheManagerProtocol.h>
|
||||
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// Copyright (c) 2018 Agora. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AgoraConstants.h"
|
||||
#import "AgoraObjects.h"
|
||||
#import "AgoraRtcMediaPlayerProtocol.h"
|
||||
#import "AgoraH265TranscoderProtocol.h"
|
||||
|
||||
/** Agora provides ensured quality of experience (QoE) for worldwide Internet-based voice and video communications through a virtual global network that is especially optimized for real-time web and mobile-to-mobile applications.
|
||||
|
||||
The AgoraRtcEngineKit class is the entry point of the Agora SDK that provides simple APIs for applications to easily start voice and video communication.
|
||||
*/
|
||||
@class AgoraRtcEngineKit;
|
||||
@class AgoraMediaRecorder;
|
||||
|
||||
@protocol AgoraRtcMediaPlayerAudioFrameDelegate <NSObject>
|
||||
|
||||
/** Occurs when each time the player receives an audio frame.
|
||||
|
||||
After registering the audio frame observer, the callback occurs when each
|
||||
time the player receives an audio frame, reporting the detailed
|
||||
information of the audio frame.
|
||||
|
||||
@param playerKit AgoraRtcMediaPlayer
|
||||
|
||||
@param audioFrame The detailed information of the audio frame.
|
||||
*/
|
||||
- (void)AgoraRtcMediaPlayer:(id<AgoraRtcMediaPlayerProtocol> _Nonnull)playerKit
|
||||
didReceiveAudioFrame:(AgoraAudioFrame* _Nonnull)audioFrame NS_SWIFT_NAME(AgoraRtcMediaPlayer(_:didReceiveAudioFrame:));
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,99 @@
|
||||
//
|
||||
// Copyright (c) 2020 Agora. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol AgoraRtcMediaPlayerCacheManagerProtocol <NSObject>
|
||||
|
||||
/**
|
||||
* Get shared cacheManager instance.
|
||||
* @return cacheManager instance.
|
||||
*/
|
||||
+ (instancetype)sharedInstance NS_SWIFT_NAME(sharedInstance());
|
||||
/**
|
||||
* Remove all media resource cache files.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)removeAllCaches NS_SWIFT_NAME(removeAllCaches());
|
||||
/**
|
||||
* Remove the latest media resource cache file.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)removeOldCache NS_SWIFT_NAME(removeOldCache());
|
||||
/**
|
||||
* Remove the cache file by uri, setting by MediaSource.
|
||||
* @param uri URI,identify the uniqueness of the property, Set from `MeidaSource`
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)removeCacheByUri:(NSString *)uri NS_SWIFT_NAME(removeCache(byUri:));
|
||||
/**
|
||||
* Set cache file path that files will be saved to.
|
||||
* @param cacheDir cacheDir path.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)setCacheDir:(NSString *)cacheDir NS_SWIFT_NAME(setCacheDir(_:));
|
||||
/**
|
||||
* Set the maximum number of cached files.
|
||||
* @param count maximum number of cached files.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)setMaxCacheFileCount:(NSInteger)count NS_SWIFT_NAME(setMaxCacheFileCount(_:));
|
||||
/**
|
||||
* Set the total size of the largest cache file.
|
||||
* @param cacheSize total size of the largest cache file.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)setMaxCacheFileSize:(NSInteger)cacheSize NS_SWIFT_NAME(setMaxCacheFileSize(_:));
|
||||
/**
|
||||
* Set whether the player will clean up the cache in the order of resource usage.
|
||||
* @param enable enable the player to automatically clear the cache.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)enableAutoRemoveCache:(BOOL)enable NS_SWIFT_NAME(enableAutoRemoveCache(_:));
|
||||
/**
|
||||
* Get the cache directory you have set.
|
||||
* @return cacheDir
|
||||
*/
|
||||
- (NSString *)cacheDir NS_SWIFT_NAME(cacheDir());
|
||||
/**
|
||||
* Get the maximum number of cached files.
|
||||
* @return
|
||||
* > 0: file count.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (NSInteger)maxCacheFileCount NS_SWIFT_NAME(maxCacheFileCount());
|
||||
/**
|
||||
* Get the total size of the largest cache file
|
||||
* @return
|
||||
* > 0: file size.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (NSInteger)maxCacheFileSize NS_SWIFT_NAME(maxCacheFileSize());
|
||||
/**
|
||||
* Get the number of all cache files.
|
||||
* @return
|
||||
* > 0: file count.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (NSInteger)cacheFileCount NS_SWIFT_NAME(cacheFileCount());
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,127 @@
|
||||
//
|
||||
// Copyright (c) 2018 Agora. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AgoraConstants.h"
|
||||
#import "AgoraObjects.h"
|
||||
|
||||
@protocol AgoraRtcMediaPlayerProtocol;
|
||||
|
||||
@protocol AgoraRtcMediaPlayerDelegate <NSObject>
|
||||
@optional
|
||||
|
||||
/** Reports the playback state change.
|
||||
|
||||
@param playerKit AgoraRtcMediaPlayer
|
||||
|
||||
@param state The new playback state after change. See AgoraMediaPlayerState.
|
||||
|
||||
@param reason The player's error code. See AgoraMediaPlayerReason.
|
||||
*/
|
||||
- (void)AgoraRtcMediaPlayer:(id<AgoraRtcMediaPlayerProtocol> _Nonnull)playerKit
|
||||
didChangedToState:(AgoraMediaPlayerState)state
|
||||
reason:(AgoraMediaPlayerReason)reason NS_SWIFT_NAME(AgoraRtcMediaPlayer(_:didChangedTo:reason:));
|
||||
|
||||
/** Reports current playback progress.
|
||||
|
||||
The callback occurs once every one second during the playback and reports
|
||||
current playback progress.
|
||||
|
||||
@param playerKit AgoraMediaPlayer
|
||||
|
||||
@param positionMs Current playback progress (ms).
|
||||
@param timestampMs The NTP timestamp (ms) when the position is sent.
|
||||
*/
|
||||
- (void)AgoraRtcMediaPlayer:(id<AgoraRtcMediaPlayerProtocol> _Nonnull)playerKit
|
||||
didChangedToPosition:(NSInteger)positionMs
|
||||
atTimestamp:(NSTimeInterval)timestampMs NS_SWIFT_NAME(AgoraRtcMediaPlayer(_:didChangedTo:atTimestamp:));
|
||||
|
||||
/** Reports the result of the seek operation.
|
||||
|
||||
@param playerKit AgoraRtcMediaPlayer
|
||||
@param eventCode AgoraMediaPlayerEvent
|
||||
@param elapsedTime The playback elapsed time.
|
||||
@param message NSString
|
||||
*/
|
||||
- (void)AgoraRtcMediaPlayer:(id<AgoraRtcMediaPlayerProtocol> _Nonnull)playerKit
|
||||
didOccurEvent:(AgoraMediaPlayerEvent)eventCode
|
||||
elapsedTime:(NSInteger)elapsedTime
|
||||
message:(NSString *_Nullable)message NS_SWIFT_NAME(AgoraRtcMediaPlayer(_:didOccur:elapsedTime:message:));
|
||||
|
||||
/** Reports the reception of the media metadata.
|
||||
|
||||
The callback occurs when the player receivers the media metadata and reports
|
||||
the detailed information of the media metadata.
|
||||
|
||||
@param playerKit AgoraRtcMediaPlayer
|
||||
|
||||
@param data The detailed data of the media metadata.
|
||||
|
||||
@param length The length (byte) of the data.
|
||||
*/
|
||||
- (void)AgoraRtcMediaPlayer:(id<AgoraRtcMediaPlayerProtocol> _Nonnull)playerKit
|
||||
didReceiveData:(NSString *_Nullable)data
|
||||
length:(NSInteger)length NS_SWIFT_NAME(AgoraRtcMediaPlayer(_:didReceiveData:length:));
|
||||
|
||||
/**
|
||||
* @brief Triggered when play buffer updated, once every 1 second
|
||||
*
|
||||
* @param playerKit AgoraRtcMediaPlayer
|
||||
* @param playCachedBuffer NSInteger
|
||||
*/
|
||||
- (void)AgoraRtcMediaPlayer:(id<AgoraRtcMediaPlayerProtocol> _Nonnull)playerKit
|
||||
didPlayBufferUpdated:(NSInteger)playCachedBuffer NS_SWIFT_NAME(AgoraRtcMediaPlayer(_:didPlayBufferUpdated:));
|
||||
|
||||
/**
|
||||
* @brief Triggered when the player preloadSrc
|
||||
*
|
||||
* @param playerKit AgoraRtcMediaPlayer
|
||||
* @param event AgoraMediaPlayerPreloadEvent
|
||||
*/
|
||||
- (void)AgoraRtcMediaPlayer:(id<AgoraRtcMediaPlayerProtocol> _Nonnull)playerKit
|
||||
didPreloadEvent:(AgoraMediaPlayerPreloadEvent)event NS_SWIFT_NAME(AgoraRtcMediaPlayer(_:didPreloadEvent:));
|
||||
|
||||
/**
|
||||
* @brief Reports current playback source bitrate changed.
|
||||
*
|
||||
* @param to Streaming media information after the change.
|
||||
* @param from Streaming media information before the change.
|
||||
*/
|
||||
- (void)AgoraRtcMediaPlayer:(id<AgoraRtcMediaPlayerProtocol> _Nonnull)playerKit playerSrcInfoDidChange:(AgoraMediaPlayerSrcInfo *_Nonnull)to from:(AgoraMediaPlayerSrcInfo *_Nonnull)from NS_SWIFT_NAME(AgoraRtcMediaPlayer(_:playerSrcInfoDidChange:from:));
|
||||
|
||||
/**
|
||||
* @brief Triggered when media player information updated.
|
||||
*
|
||||
* @param info Include information of media player.
|
||||
*/
|
||||
- (void)AgoraRtcMediaPlayer:(id<AgoraRtcMediaPlayerProtocol> _Nonnull)playerKit infoUpdated:(AgoraMediaPlayerUpdatedInfo *_Nonnull)info NS_SWIFT_NAME(AgoraRtcMediaPlayer(_:infoUpdated:));
|
||||
|
||||
/**
|
||||
* @brief Triggered every 1 second, reports the statistics of the files being cached.
|
||||
*
|
||||
* @param stats Cached file statistics.
|
||||
*/
|
||||
- (void)AgoraRtcMediaPlayer:(id<AgoraRtcMediaPlayerProtocol> _Nonnull)playerKit cacheStats:(AgoraMediaPlayerCacheStatistics *_Nonnull)info NS_SWIFT_NAME(AgoraRtcMediaPlayer(_:cacheStats:));
|
||||
|
||||
/**
|
||||
* @brief Triggered every 1 second, reports the statistics of the media stream being played.
|
||||
*
|
||||
* @param stats The statistics of the media stream.
|
||||
*/
|
||||
- (void)AgoraRtcMediaPlayer:(id<AgoraRtcMediaPlayerProtocol> _Nonnull)playerKit playbackStats:(AgoraMediaPlayerPlaybackStats *_Nonnull)info NS_SWIFT_NAME(AgoraRtcMediaPlayer(_:playbackStats:));
|
||||
|
||||
/**
|
||||
* @brief AgoraCDN Token has expired and needs to be set up with renewAgoraCDNSrcToken(const char*
|
||||
* src).
|
||||
*/
|
||||
- (void)onAgoraCDNTokenWillExpire NS_SWIFT_NAME(onAgoraCDNTokenWillExpire());
|
||||
|
||||
/**
|
||||
* @brief Triggered when play volume updated, once every 200 millisecond
|
||||
*
|
||||
* @param volume volume of current player.
|
||||
*/
|
||||
- (void)AgoraRtcMediaPlayer:(id<AgoraRtcMediaPlayerProtocol> _Nonnull)playerKit
|
||||
volumeIndicationDidReceive:(NSInteger)volume NS_SWIFT_NAME(AgoraRtcMediaPlayer(_:volumeIndicationDidReceive:));
|
||||
@end
|
||||
@@ -0,0 +1,446 @@
|
||||
//
|
||||
// AgoraRtcMediaPlayerProtocol.h
|
||||
// AgoraRtcMediaPlayerProtocol
|
||||
//
|
||||
// Copyright (c) 2020 Agora. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AgoraObjects.h"
|
||||
#if TARGET_OS_IPHONE
|
||||
#import <UIKit/UIKit.h>
|
||||
typedef UIView View;
|
||||
#elif TARGET_OS_MAC
|
||||
#import <AppKit/AppKit.h>
|
||||
typedef NSView View;
|
||||
#endif
|
||||
|
||||
@protocol AgoraRtcAudioSpectrumDelegateocol;
|
||||
@protocol AgoraRtcMediaPlayerAudioFrameDelegate;
|
||||
@protocol AgoraRtcMediaPlayerVideoFrameDelegate;
|
||||
@protocol AgoraAudioSpectrumDelegate;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@protocol AgoraRtcMediaPlayerProtocol <NSObject>
|
||||
|
||||
/**
|
||||
* Get unique media player id of the media player entity.
|
||||
* @return
|
||||
* - >= 0: The mediaPlayerId of this media player entity.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)getMediaPlayerId NS_SWIFT_NAME(getMediaPlayerId());
|
||||
/**
|
||||
* Opens a media file with a specified URL.
|
||||
* @param url The URL of the media file that you want to play.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)open:(NSString *)url startPos:(NSInteger)startPos NS_SWIFT_NAME(open(_:startPos:));
|
||||
|
||||
|
||||
/**
|
||||
* Opens a media file with MediaSource
|
||||
* @param source see `AgoraMediaSource`
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)openWithMediaSource:(AgoraMediaSource *)source NS_SWIFT_NAME(open(with:));
|
||||
|
||||
/**
|
||||
* Open the Agora CDN media source.
|
||||
* @param src The src of the media file that you want to play.
|
||||
* @param startPos The playback position (ms).
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)openWithAgoraCDNSrc:(NSString *)src startPos:(NSInteger)startPos NS_SWIFT_NAME(open(withAgoraCDNSrc:startPos:));
|
||||
|
||||
/**
|
||||
* Gets the number of Agora CDN lines.
|
||||
* @return
|
||||
* - > 0: number of CDN.
|
||||
* - <= 0: Failure.
|
||||
*/
|
||||
- (int)getAgoraCDNLineCount NS_SWIFT_NAME(getAgoraCDNLineCount());
|
||||
|
||||
/**
|
||||
* Switch Agora CDN lines.
|
||||
* @param index Specific line.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)switchAgoraCDNLineByIndex:(int)index NS_SWIFT_NAME(switchAgoraCDNLine(by:));
|
||||
|
||||
/**
|
||||
* Gets the line of the current CDN.
|
||||
* @return
|
||||
* - >= 0: Specific line.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)getCurrentAgoraCDNIndex NS_SWIFT_NAME(getCurrentAgoraCDNIndex());
|
||||
|
||||
/**
|
||||
* Enable automatic CDN line switching.
|
||||
* @param enable Whether enable.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)enableAutoSwitchAgoraCDN:(BOOL)enable NS_SWIFT_NAME(enableAutoSwitchAgoraCDN(_:));
|
||||
|
||||
/**
|
||||
* Update the CDN source token and timestamp.
|
||||
* @param token token.
|
||||
* @param ts ts.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)renewAgoraCDNSrcToken:(NSString *)token ts:(NSInteger)ts NS_SWIFT_NAME(renewAgoraCDNSrcToken(_:ts:));
|
||||
|
||||
/**
|
||||
* Switch the CDN source.
|
||||
* @param src Specific line.
|
||||
* @param syncPts Live streaming must be set to false.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)switchAgoraCDNSrc:(NSString *)src syncPts:(BOOL)syncPts NS_SWIFT_NAME(switchAgoraCDNSrc(_:syncPts:));
|
||||
|
||||
/**
|
||||
* Plays the media file.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)play NS_SWIFT_NAME(play());
|
||||
|
||||
/**
|
||||
* Pauses playing the media file.
|
||||
*/
|
||||
- (int)pause NS_SWIFT_NAME(pause());
|
||||
|
||||
/**
|
||||
* Stops playing the current media file.
|
||||
*/
|
||||
- (int)stop NS_SWIFT_NAME(stop());
|
||||
|
||||
/**
|
||||
* Resumes playing the media file.
|
||||
*/
|
||||
- (int)resume NS_SWIFT_NAME(resume());
|
||||
|
||||
/**
|
||||
* Sets the current playback position of the media file.
|
||||
* @param position The new playback position (ms).
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)seekToPosition:(NSInteger)position NS_SWIFT_NAME(seek(toPosition:));
|
||||
|
||||
/**
|
||||
* Sets the pitch of the current media file.
|
||||
* @param pitch Sets the pitch of the local music file by chromatic scale. The default value is 0,
|
||||
* which means keeping the original pitch. The value ranges from -12 to 12, and the pitch value
|
||||
* between consecutive values is a chromatic value. The greater the absolute value of this
|
||||
* parameter, the higher or lower the pitch of the local music file.
|
||||
*
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)setAudioPitch:(NSInteger)pitch NS_SWIFT_NAME(setAudioPitch(_:));
|
||||
|
||||
/**
|
||||
* Gets the duration of the media file.
|
||||
*/
|
||||
- (NSInteger)getDuration NS_SWIFT_NAME(getDuration());
|
||||
/**
|
||||
* Gets the current playback position of the media file.(ms).
|
||||
*/
|
||||
- (NSInteger)getPosition NS_SWIFT_NAME(getPosition());
|
||||
/**
|
||||
* Gets the number of the media streams in the media resource.
|
||||
*/
|
||||
- (NSInteger)getStreamCount NS_SWIFT_NAME(getStreamCount());
|
||||
|
||||
/** Gets the detailed information of the media stream.
|
||||
|
||||
@param index The index of the media stream.
|
||||
|
||||
@return * If the call succeeds, returns the detailed information of the media
|
||||
stream. See AgoraMediaStreamInfo.
|
||||
* If the call fails and returns nil.
|
||||
*/
|
||||
- (AgoraRtcMediaStreamInfo *_Nullable)getStreamByIndex:(int)index NS_SWIFT_NAME(getStreamBy(_:));
|
||||
|
||||
/**
|
||||
* Sets whether to loop the media file for playback.
|
||||
* @param loopCount the number of times looping the media file.
|
||||
* - 0: Play the audio effect once.
|
||||
* - 1: Play the audio effect twice.
|
||||
* - -1: Play the audio effect in a loop indefinitely, until stopEffect() or stop() is called.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)setLoopCount:(int)loopCount NS_SWIFT_NAME(setLoopCount(_:));
|
||||
|
||||
/**
|
||||
* Change playback speed
|
||||
* @param speed the enum of playback speed
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)setPlaybackSpeed:(int)speed NS_SWIFT_NAME(setPlaybackSpeed(_:));
|
||||
|
||||
/**
|
||||
* Select playback audio track of the media file
|
||||
* @param index the index of the audio track in media file
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)selectAudioTrack:(int)index NS_SWIFT_NAME(selectAudioTrack(_:));
|
||||
|
||||
/**
|
||||
* Selects multi audio track of the media file for playback or publish to channel.
|
||||
* @param playoutTrackIndex The index of the audio track in media file for local playback.
|
||||
* @param publishTrackIndex The index of the audio track in the media file published to the remote.
|
||||
*
|
||||
* @note
|
||||
* You can obtain the streamIndex of the audio track by calling getStreamInfo..
|
||||
* If you want to use selectMultiAudioTrack, you need to open the media file with openWithMediaSource and set enableMultiAudioTrack to true.
|
||||
*
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure. See {@link media::base::MEDIA_PLAYER_REASON MEDIA_PLAYER_REASON}.
|
||||
* - -2: Invalid argument. Argument must be greater than or equal to zero.
|
||||
* - -8: Invalid State.You must open the media file with openWithMediaSource and set enableMultiAudioTrack to true
|
||||
*/
|
||||
- (int)selectMultiAudioTrack:(NSInteger)playoutTrackIndex publishTrackIndex:(NSInteger)publishTrackIndex NS_SWIFT_NAME(selectMultiAudioTrack(_:publishTrackIndex:));
|
||||
|
||||
/**
|
||||
* take screenshot while playing video
|
||||
* @param filename the filename of screenshot file
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)takeScreenshot:(NSString *)filename NS_SWIFT_NAME(takeScreenshot(_:));
|
||||
|
||||
/**
|
||||
* select internal subtitles in video
|
||||
* @param index the index of the internal subtitles
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)selectInternalSubtitle:(int)index NS_SWIFT_NAME(selectInternalSubtitle(_:));
|
||||
|
||||
/**
|
||||
* set an external subtitle for video
|
||||
* @param url The URL of the subtitle file that you want to load.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)setExternalSubtitle:(NSString *)url NS_SWIFT_NAME(setExternalSubtitle(_:));
|
||||
|
||||
/** Gets current playback state.
|
||||
|
||||
@return * The call succeeds and returns current playback state. See
|
||||
AgoraMediaPlayerState.
|
||||
* The call fails and returns nil.
|
||||
*/
|
||||
- (AgoraMediaPlayerState)getPlayerState NS_SWIFT_NAME(getPlayerState());
|
||||
|
||||
/**
|
||||
* @brief Turn mute on or off
|
||||
*
|
||||
* @param isMute Whether the media source is mute.
|
||||
* YES: Yes.
|
||||
* NO: No.
|
||||
* @return mute Whether to mute on
|
||||
*/
|
||||
- (int)mute:(BOOL)isMute NS_SWIFT_NAME(mute(_:));
|
||||
|
||||
/**
|
||||
* @brief Get mute state
|
||||
*
|
||||
* @return mute Whether is mute on
|
||||
*/
|
||||
- (BOOL)getMute NS_SWIFT_NAME(getMute());
|
||||
|
||||
/**
|
||||
* @brief Adjust playback volume
|
||||
*
|
||||
* @param volume The volume value to be adjusted
|
||||
* The volume can be adjusted from 0 to 400:
|
||||
* 0: mute;
|
||||
* 100: original volume;
|
||||
* 400: Up to 4 times the original volume (with built-in overflow protection).
|
||||
* @return int < 0 on behalf of an error, the value corresponds to one of MEDIA_PLAYER_REASON
|
||||
*/
|
||||
- (int)adjustPlayoutVolume:(int)volume NS_SWIFT_NAME(adjustPlayoutVolume(_:));
|
||||
|
||||
/**
|
||||
* @brief Get the current playback volume
|
||||
*
|
||||
* @return volume
|
||||
*/
|
||||
- (int)getPlayoutVolume NS_SWIFT_NAME(getPlayoutVolume());
|
||||
|
||||
/**
|
||||
* @brief adjust publish signal volume
|
||||
*/
|
||||
- (int)adjustPublishSignalVolume:(int)volume NS_SWIFT_NAME(adjustPublishSignalVolume(_:));
|
||||
|
||||
/**
|
||||
* @brief get publish signal volume
|
||||
*/
|
||||
- (int)getPublishSignalVolume NS_SWIFT_NAME(getPublishSignalVolume());
|
||||
|
||||
/**
|
||||
* @brief Modify player option before opening file or url,
|
||||
* @param [in] key
|
||||
* the option key name
|
||||
* @param [in] value
|
||||
* the option value
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure. See AgoraMediaPlayerReason.
|
||||
*/
|
||||
- (int)setPlayerOption:(NSString *)key value:(NSInteger)value NS_SWIFT_NAME(setPlayerOption(_:value:));
|
||||
|
||||
/**
|
||||
* @brief Modify player option before opening file or url,
|
||||
* @param [in] key
|
||||
* the option key name
|
||||
* @param [in] value
|
||||
* the option value
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure. See AgoraMediaPlayerReason.
|
||||
*/
|
||||
- (int)setPlayerOptionString:(NSString *)key value:(NSString *)value NS_SWIFT_NAME(setPlayerOptionString(_:value:));
|
||||
|
||||
/**
|
||||
* @brief Set video rendering view
|
||||
*/
|
||||
- (int)setView:(View *_Nullable)view NS_SWIFT_NAME(setView(_:));
|
||||
|
||||
/**
|
||||
* @brief Set video display mode
|
||||
*
|
||||
* @param mode Video display mode
|
||||
* @return int < 0 on behalf of an error, the value corresponds to one of MEDIA_PLAYER_REASON
|
||||
*/
|
||||
- (int)setRenderMode:(AgoraMediaPlayerRenderMode)mode NS_SWIFT_NAME(setRenderMode(_:));
|
||||
|
||||
/**
|
||||
* Get the current play src.
|
||||
* @return
|
||||
* - current play src of raw bytes.
|
||||
*/
|
||||
- (NSString *)getPlaySrc NS_SWIFT_NAME(getPlaySrc());
|
||||
|
||||
/**
|
||||
* Switch the media source when open a media through "open" API
|
||||
* @param src Specific src.
|
||||
* @param syncPts Live streaming must be set to false.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)switchSrc:(NSString *)src syncPts:(BOOL)syncPts NS_SWIFT_NAME(switchSrc(_:syncPts:));
|
||||
|
||||
/**
|
||||
* Preload a media source
|
||||
* @param src Specific src.
|
||||
* @param startPos The starting position (ms) for playback. Default value is 0.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)preloadSrc:(NSString *)src startPos:(int)startPos NS_SWIFT_NAME(preloadSrc(_:startPos:));
|
||||
|
||||
/**
|
||||
* unload a media source
|
||||
* @param src Specific src.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)unloadSrc:(NSString *)src NS_SWIFT_NAME(unloadSrc(_:));
|
||||
|
||||
/**
|
||||
* Play a pre-loaded media source
|
||||
* @param src Specific src.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)playPreloadedSrc:(NSString *)src NS_SWIFT_NAME(playPreloadedSrc(_:));
|
||||
|
||||
/** Set dual-mono output mode of the music file.
|
||||
@param mode The audio dual mono mode. See AgoraAudioDualMonoMode.
|
||||
|
||||
@return
|
||||
- 0: Success.
|
||||
- < 0: Failure.
|
||||
*/
|
||||
- (int)setAudioDualMonoMode:(AgoraAudioDualMonoMode)mode NS_SWIFT_NAME(setAudioDualMonoMode(_:));
|
||||
|
||||
/**
|
||||
* Set spatial audio params for the music file. It can be called after the media player
|
||||
* was created.
|
||||
*
|
||||
* @params params See `AgoraSpatialAudioParams`. If it's
|
||||
* not set, then the spatial audio will be disabled; or it will be enabled.
|
||||
* @return
|
||||
* - 0: Success.
|
||||
* - < 0: Failure.
|
||||
*/
|
||||
- (int)setSpatialAudioParams:(AgoraSpatialAudioParams* _Nonnull)params NS_SWIFT_NAME(setSpatialAudioParams(_:));
|
||||
|
||||
#pragma mark Callback Audio PCM Frame
|
||||
|
||||
/**
|
||||
* Registers & unregister the player audio observer
|
||||
*
|
||||
* @param delegate observer object, pass nil to unregister
|
||||
* @return
|
||||
* - YES: Success.
|
||||
* - NO: Failure.
|
||||
*/
|
||||
- (BOOL)setAudioFrameDelegate:(id<AgoraRtcMediaPlayerAudioFrameDelegate> _Nullable)delegate NS_SWIFT_NAME(setAudioFrameDelegate(_:));
|
||||
|
||||
#pragma mark Callback Video Frame
|
||||
|
||||
/**
|
||||
* Registers & unregister the player video observer
|
||||
*
|
||||
* @param delegate observer object, pass nil to unregister.
|
||||
* @return
|
||||
* - YES: Success.
|
||||
* - NO: Failure.
|
||||
*/
|
||||
- (BOOL)setVideoFrameDelegate:(id<AgoraRtcMediaPlayerVideoFrameDelegate> _Nullable)delegate NS_SWIFT_NAME(setVideoFrameDelegate(_:));
|
||||
|
||||
- (int)registerMediaPlayerAudioSpectrumDelegate:(id<AgoraAudioSpectrumDelegate> _Nullable)delegate
|
||||
intervalInMS:(NSUInteger)intervalInMS NS_SWIFT_NAME(registerMediaPlayerAudioSpectrumDelegate(_:intervalInMS:));
|
||||
|
||||
- (int)unregisterMediaPlayerAudioSpectrumDelegate:(id<AgoraAudioSpectrumDelegate> _Nullable)delegate NS_SWIFT_NAME(unregisterMediaPlayerAudioSpectrumDelegate(_:));
|
||||
@end
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// Copyright (c) 2018 Agora. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AgoraRtcMediaPlayerProtocol.h"
|
||||
|
||||
@protocol AgoraRtcMediaPlayerProtocol;
|
||||
@class AgoraOutputVideoFrame;
|
||||
|
||||
@protocol AgoraRtcMediaPlayerVideoFrameDelegate <NSObject>
|
||||
@optional
|
||||
/** Occurs when each time the player receives a video frame.
|
||||
|
||||
After registering the video frame observer, the callback occurs when each
|
||||
time the player receives a video frame, reporting the detailed
|
||||
information of the video frame.
|
||||
|
||||
@param playerKit AgoraRtcMediaPlayer
|
||||
|
||||
@param videoFrame The detailed information of the video frame.
|
||||
*/
|
||||
- (void)AgoraRtcMediaPlayer:(id<AgoraRtcMediaPlayerProtocol> _Nonnull)playerKit
|
||||
didReceiveVideoFrame:(AgoraOutputVideoFrame * _Nonnull)videoFrame NS_SWIFT_NAME(AgoraRtcMediaPlayer(_:didReceiveVideoFrame:));
|
||||
|
||||
/** Occurs when each time the player receives a video frame.
|
||||
|
||||
After registering the video frame observer, the callback occurs when each
|
||||
time the player receives a video frame, reporting the detailed
|
||||
information of the CVPixelBufferRef.
|
||||
|
||||
@param playerKit AgoraRtcMediaPlayer
|
||||
|
||||
@param pixelBuffer The detailed information of the CVPixelBufferRef. Format define by AgoraRtcMediaPlayerGetVideoPixelFormat.
|
||||
*/
|
||||
- (void)AgoraRtcMediaPlayer:(id<AgoraRtcMediaPlayerProtocol> _Nonnull)playerKit
|
||||
didReceivePixelBuffer:(CVPixelBufferRef _Nonnull)pixelBuffer NS_SWIFT_NAME(AgoraRtcMediaPlayer(_:didReceivePixelBuffer:));
|
||||
|
||||
/**
|
||||
* Occurs each time needs to get preference video frame type.
|
||||
* @return AgoraVideoFormat.
|
||||
*/
|
||||
- (AgoraVideoFormat)AgoraRtcMediaPlayerGetVideoPixelFormat NS_SWIFT_NAME(AgoraRtcMediaPlayerGetVideoPixelFormat());
|
||||
|
||||
@end
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user