diff --git a/.metadata b/.metadata index 14879c6..8a25edb 100644 --- a/.metadata +++ b/.metadata @@ -1,10 +1,36 @@ # This file tracks properties of this Flutter project. # Used by Flutter tool to assess capabilities and perform upgrades etc. # -# This file should be version controlled and should not be manually edited. +# This file should be version controlled. version: - revision: c860cba910319332564e1e9d470a17074c1f2dfd + revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 channel: stable project_type: plugin + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 + base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 + - platform: android + create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 + base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 + - platform: ios + create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 + base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 + - platform: linux + create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 + base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/README.md b/README.md index d82ed08..40c271d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # GStreamer Player Plugin -A GStreamer-powered alternative to Flutter's video_player that support Linux and Android. +A GStreamer-powered alternative to Flutter's video_player that support Linux, iOS and Android. ![](doc/screenshot.png) @@ -12,9 +12,19 @@ A GStreamer-powered alternative to Flutter's video_player that support Linux and Follow GStreamer's [Install on Linux](https://gstreamer.freedesktop.org/documentation/installing/on-linux.html?gi-language=c) instuction. +### iOS + +Follow GStreamer's [Install on iOS](https://gstreamer.freedesktop.org/documentation/installing/for-ios-development.html?gi-language=c) instuction, step `Prerequisites` and `Download and install GStreamer binaries`. + +Link GStreamer framework to `ios` directory for flutter's ios build system. + +``` +ln -s /Users//Library/Developer/GStreamer/iPhone.sdk/GStreamer.framework ios/GStreamer.framework +``` + ### Android -Follow GStreamer's [Install on Android](https://gstreamer.freedesktop.org/documentation/installing/for-android-development.html?gi-language=c) instuction. +Follow GStreamer's [Install on Android](https://gstreamer.freedesktop.org/documentation/installing/for-android-development.html?gi-language=c) instuction, step `Prerequisites` and `Download and install GStreamer binaries`. In Android, you need to init GStreamer in main activity of your flutter application. In your flutter application, edit `MainActivity.kt` or `MainActivity.java` file, depends on your flutter config diff --git a/example/ios/.gitignore b/example/ios/.gitignore new file mode 100644 index 0000000..7a7f987 --- /dev/null +++ b/example/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000..8d4492f --- /dev/null +++ b/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 9.0 + + diff --git a/example/ios/Flutter/Debug.xcconfig b/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..ec97fc6 --- /dev/null +++ b/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/example/ios/Flutter/Release.xcconfig b/example/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..c4855bf --- /dev/null +++ b/example/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/example/ios/Podfile b/example/ios/Podfile new file mode 100644 index 0000000..1e8c3c9 --- /dev/null +++ b/example/ios/Podfile @@ -0,0 +1,41 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '9.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..3fb104e --- /dev/null +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,552 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 23BE5024557D8EEE0861108A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 58AF5954DB46E0C0F1119140 /* Pods_Runner.framework */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 06120E50B0AF2396016BA548 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 58AF5954DB46E0C0F1119140 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 759FCE9FCA55FE9F145A46F6 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 80D718BB06308FCF0426D0E9 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 23BE5024557D8EEE0861108A /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1026DB4961513020352AB6C1 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 58AF5954DB46E0C0F1119140 /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 903CA40394334F487C222199 /* Pods */ = { + isa = PBXGroup; + children = ( + 06120E50B0AF2396016BA548 /* Pods-Runner.debug.xcconfig */, + 80D718BB06308FCF0426D0E9 /* Pods-Runner.release.xcconfig */, + 759FCE9FCA55FE9F145A46F6 /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 903CA40394334F487C222199 /* Pods */, + 1026DB4961513020352AB6C1 /* Frameworks */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 16599963BC632B9F074E74A2 /* [CP] Check Pods Manifest.lock */, + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 5A01618652BCD3A0BE01E880 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1300; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 16599963BC632B9F074E74A2 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 5A01618652BCD3A0BE01E880 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = NVDS35BS8J; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.hpdragon1618.flutterGstreamerPlayerExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = NVDS35BS8J; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.hpdragon1618.flutterGstreamerPlayerExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = NVDS35BS8J; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.hpdragon1618.flutterGstreamerPlayerExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..c87d15a --- /dev/null +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..21a3cc1 --- /dev/null +++ b/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/example/ios/Runner/AppDelegate.swift b/example/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..70693e4 --- /dev/null +++ b/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d36b1fa --- /dev/null +++ b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000..dc9ada4 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..28c6bf0 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..2ccbfd9 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..f091b6b Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..4cde121 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..d0ef06e Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..dcdc230 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..2ccbfd9 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..c8f9ed8 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..a6d6b86 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..a6d6b86 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..75b2d16 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..c4df70d Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..6a84f41 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..d0e1f58 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..0bedcf2 --- /dev/null +++ b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000..89c2725 --- /dev/null +++ b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f2e259c --- /dev/null +++ b/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/Runner/Base.lproj/Main.storyboard b/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f3c2851 --- /dev/null +++ b/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist new file mode 100644 index 0000000..e6107e4 --- /dev/null +++ b/example/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Flutter Gstreamer Player + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + flutter_gstreamer_player_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + CADisableMinimumFrameDurationOnPhone + + + diff --git a/example/ios/Runner/Runner-Bridging-Header.h b/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/example/lib/main.dart b/example/lib/main.dart index 3b653da..ae60bc4 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; +import 'package:flutter/foundation.dart'; -import 'package:flutter/services.dart'; import 'package:flutter_gstreamer_player/flutter_gstreamer_player.dart'; void main() { @@ -10,78 +10,116 @@ void main() { class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key); + Widget initMultipleGstPlayer(List pipelines) { + // Try this: https://stackoverflow.com/a/66421214 + List videoListWidget = []; + for (var i = 0; i < pipelines.length - 1; i = i + 2){ + videoListWidget.add( + Expanded( + child: Row( + children: [ + Expanded( + child: GstPlayer( + pipeline: pipelines[i], + ), + ), + Expanded( + child: GstPlayer( + pipeline: pipelines[i+1], + ), + ), + ], + ), + ), + ); + } + + if (pipelines.length.isOdd) { + videoListWidget.add( + Expanded( + child: Row( + children: [ + Expanded( + child: GstPlayer( + pipeline: pipelines.last, + ), + ), + ], + ), + ), + ); + } + + Widget multipleGstPlayer = Column( + children: videoListWidget, + ); + + return multipleGstPlayer; + } + @override Widget build(BuildContext context) { + List pipelines = []; + + switch (defaultTargetPlatform) { + case (TargetPlatform.linux): + case (TargetPlatform.android): + pipelines.addAll([ + '''rtspsrc location= + rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 ! + decodebin ! + videoconvert ! + video/x-raw,format=RGBA ! + appsink name=sink''', + '''rtspsrc location= + rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 ! + decodebin ! + videoconvert ! + video/x-raw,format=RGBA ! + appsink name=sink''', + '''rtspsrc location= + rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 ! + decodebin ! + videoconvert ! + video/x-raw,format=RGBA ! + appsink name=sink''', + '''rtspsrc location= + rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 ! + decodebin ! + videoconvert ! + video/x-raw,format=RGBA ! + appsink name=sink''', + ]); + break; + case (TargetPlatform.iOS): + pipelines.addAll([ + '''rtspsrc location= + rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 ! + decodebin ! + glimagesink''', + '''rtspsrc location= + rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 ! + decodebin ! + glimagesink''', + '''rtspsrc location= + rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 ! + decodebin ! + glimagesink''', + '''rtspsrc location= + rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 ! + decodebin ! + glimagesink''', + ]); + break; + default: + break; + } + + Widget multipleGstPlayer = initMultipleGstPlayer(pipelines); + return MaterialApp( home: Scaffold( - body: Column( - children: [ - Expanded( - child: Row( - children: [ - Expanded( - child: GstPlayer( - pipeline: - '''rtspsrc location= - rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 ! - rtph264depay ! - h264parse ! - decodebin ! - videoconvert ! - video/x-raw,format=RGBA ! - appsink name=sink''', - ), - ), - Expanded( - child: GstPlayer( - pipeline: - '''rtspsrc location= - rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 ! - rtph264depay ! - h264parse ! - decodebin ! - videoconvert ! - video/x-raw,format=RGBA ! - appsink name=sink''', - ), - ), - ], - ), - ), - Expanded( - child: Row( - children: [ - Expanded( - child: GstPlayer( - pipeline: - '''rtspsrc location= - rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 ! - rtph264depay ! - h264parse ! - decodebin ! - videoconvert ! - video/x-raw,format=RGBA ! - appsink name=sink''', - ), - ), - Expanded( - child: GstPlayer( - pipeline: - '''rtspsrc location= - rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 ! - rtph264depay ! - h264parse ! - decodebin ! - videoconvert ! - video/x-raw,format=RGBA ! - appsink name=sink''', - ), - ), - ], - ), - ), - ], - ), + body: multipleGstPlayer, ), ); } diff --git a/example/pubspec.lock b/example/pubspec.lock index ddcc291..0fcb489 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -68,7 +68,7 @@ packages: path: ".." relative: true source: path - version: "0.0.1" + version: "0.0.3" flutter_lints: dependency: "direct dev" description: diff --git a/ios/.gitignore b/ios/.gitignore new file mode 100644 index 0000000..0c88507 --- /dev/null +++ b/ios/.gitignore @@ -0,0 +1,38 @@ +.idea/ +.vagrant/ +.sconsign.dblite +.svn/ + +.DS_Store +*.swp +profile + +DerivedData/ +build/ +GeneratedPluginRegistrant.h +GeneratedPluginRegistrant.m + +.generated/ + +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + +xcuserdata + +*.moved-aside + +*.pyc +*sync/ +Icon? +.tags* + +/Flutter/Generated.xcconfig +/Flutter/ephemeral/ +/Flutter/flutter_export_environment.sh \ No newline at end of file diff --git a/ios/Assets/.gitkeep b/ios/Assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/ios/Classes/BridgingHeader.h b/ios/Classes/BridgingHeader.h new file mode 100644 index 0000000..c1a1704 --- /dev/null +++ b/ios/Classes/BridgingHeader.h @@ -0,0 +1,7 @@ +#ifndef __BRIDGINGHEADER_H__ +#define __BRIDGINGHEADER_H__ + +#import "GStreamerBackend.h" +#import "gst_ios_init.h" + +#endif diff --git a/ios/Classes/FlutterGstreamerPlayerPlugin.h b/ios/Classes/FlutterGstreamerPlayerPlugin.h new file mode 100644 index 0000000..3ab27e1 --- /dev/null +++ b/ios/Classes/FlutterGstreamerPlayerPlugin.h @@ -0,0 +1,4 @@ +#import + +@interface FlutterGstreamerPlayerPlugin : NSObject +@end diff --git a/ios/Classes/FlutterGstreamerPlayerPlugin.m b/ios/Classes/FlutterGstreamerPlayerPlugin.m new file mode 100644 index 0000000..5dcced0 --- /dev/null +++ b/ios/Classes/FlutterGstreamerPlayerPlugin.m @@ -0,0 +1,15 @@ +#import "FlutterGstreamerPlayerPlugin.h" +#if __has_include() +#import +#else +// Support project import fallback if the generated compatibility header +// is not copied when this plugin is created as a library. +// https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816 +#import "flutter_gstreamer_player-Swift.h" +#endif + +@implementation FlutterGstreamerPlayerPlugin ++ (void)registerWithRegistrar:(NSObject*)registrar { + [SwiftFlutterGstreamerPlayerPlugin registerWithRegistrar:registrar]; +} +@end diff --git a/ios/Classes/GStreamerBackend.h b/ios/Classes/GStreamerBackend.h new file mode 100644 index 0000000..3368029 --- /dev/null +++ b/ios/Classes/GStreamerBackend.h @@ -0,0 +1,13 @@ +#ifndef __GSTREAMERBACKEND_H__ +#define __GSTREAMERBACKEND_H__ + +#import + +@interface GStreamerBackend : NSObject + + +-(id) init:(NSString*) pipeline videoView:(UIView*) video_view; + +@end + +#endif diff --git a/ios/Classes/GStreamerBackend.m b/ios/Classes/GStreamerBackend.m new file mode 100644 index 0000000..bc37eb9 --- /dev/null +++ b/ios/Classes/GStreamerBackend.m @@ -0,0 +1,185 @@ +#import "GStreamerBackend.h" + +#include +#include + +GST_DEBUG_CATEGORY_STATIC (debug_category); +#define GST_CAT_DEFAULT debug_category + +@interface GStreamerBackend() +-(void)setUIMessage:(gchar*) message; +-(void)app_function:(gchar*) pipeline_string; +-(void)check_initialization_complete; +@end + +@implementation GStreamerBackend { + /* id ui_delegate; /1* Class that we use to interact with the user interface *1/ */ + GstElement *pipeline; /* The running pipeline */ + GstElement *video_sink;/* The video sink element which receives XOverlay commands */ + GMainContext *context; /* GLib context used to run the main loop */ + GMainLoop *main_loop; /* GLib main loop */ + gboolean initialized; /* To avoid informing the UI multiple times about the initialization */ + UIView *ui_video_view; /* UIView that holds the video */ +} + +-(id) init:(NSString*) pipeline videoView:(UIView*) video_view +{ + if (self = [super init]) + { + /* self->ui_delegate = uiDelegate; */ + self->ui_video_view = video_view; + + GST_DEBUG_CATEGORY_INIT (debug_category, "tutorial-3", 0, "iOS tutorial 3"); + gst_debug_set_threshold_for_name("tutorial-3", GST_LEVEL_DEBUG); + + /* Start the bus monitoring task */ + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [self app_function: (gchar*)[pipeline UTF8String]]; + }); + } + + return self; +} + +-(void) dealloc +{ + if (pipeline) { + NSLog(@"Setting the pipeline to NULL"); + gst_element_set_state(pipeline, GST_STATE_NULL); + gst_object_unref(pipeline); + pipeline = NULL; + } +} + +/* + * Private methods + */ + +/* Change the message on the UI through the UI delegate */ +-(void)setUIMessage:(gchar*) message +{ + NSString *string = [NSString stringWithUTF8String:message]; + /* if(ui_delegate && [ui_delegate respondsToSelector:@selector(gstreamerSetUIMessage:)]) */ + /* { */ + /* [ui_delegate gstreamerSetUIMessage:string]; */ + /* } */ +} + +/* Retrieve errors from the bus and show them on the UI */ +static void error_cb (GstBus *bus, GstMessage *msg, GStreamerBackend *self) +{ + GError *err; + gchar *debug_info; + gchar *message_string; + + gst_message_parse_error (msg, &err, &debug_info); + message_string = g_strdup_printf ("Error received from element %s: %s", GST_OBJECT_NAME (msg->src), err->message); + g_clear_error (&err); + g_free (debug_info); + [self setUIMessage:message_string]; + g_free (message_string); + gst_element_set_state (self->pipeline, GST_STATE_NULL); +} + +/* Notify UI about pipeline state changes */ +static void state_changed_cb (GstBus *bus, GstMessage *msg, GStreamerBackend *self) +{ + GstState old_state, new_state, pending_state; + gst_message_parse_state_changed (msg, &old_state, &new_state, &pending_state); + /* Only pay attention to messages coming from the pipeline, not its children */ + if (GST_MESSAGE_SRC (msg) == GST_OBJECT (self->pipeline)) { + gchar *message = g_strdup_printf("State changed to %s", gst_element_state_get_name(new_state)); + [self setUIMessage:message]; + g_free (message); + } +} + +/* Check if all conditions are met to report GStreamer as initialized. + * These conditions will change depending on the application */ +-(void) check_initialization_complete +{ + if (!initialized && main_loop) { + NSLog (@"Initialization complete, notifying application."); + /* if (ui_delegate && [ui_delegate respondsToSelector:@selector(gstreamerInitialized)]) */ + /* { */ + /* [ui_delegate gstreamerInitialized]; */ + /* } */ + initialized = TRUE; + + NSLog(@"Initialization complete, notifying application."); + if(gst_element_set_state(pipeline, GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) { + [self setUIMessage:"Failed to set pipeline to playing"]; + } + } +} + +/* Main method for the bus monitoring code */ +-(void) app_function:(gchar*) pipeline_string +{ + GstBus *bus; + GSource *bus_source; + GError *error = NULL; + + NSLog (@"Creating pipeline"); + + /* Create our own GLib Main Context and make it the default one */ + context = g_main_context_new (); + g_main_context_push_thread_default(context); + + /* Build pipeline */ + /* pipeline = gst_parse_launch("videotestsrc ! warptv ! videoconvert ! autovideosink", &error); */ + /* pipeline = gst_parse_launch("rtspsrc location= \ */ + /* rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 latency=0 ! \ */ + /* decodebin ! \ */ + /* autovideosink", &error); */ + NSLog(@"Pipeline 1: %s", pipeline_string); + NSLog(@"Pipeline 2: %s", pipeline_string); + pipeline = gst_parse_launch(pipeline_string, &error); + if (error) { + NSLog (@"Unable to build pipeline: %s", error->message); + gchar *message = g_strdup_printf("Unable to build pipeline: %s", error->message); + g_clear_error (&error); + [self setUIMessage:message]; + g_free (message); + return; + } + + /* Set the pipeline to READY, so it can already accept a window handle */ + gst_element_set_state(pipeline, GST_STATE_READY); + + video_sink = gst_bin_get_by_interface(GST_BIN(pipeline), GST_TYPE_VIDEO_OVERLAY); + if (!video_sink) { + NSLog (@"Could not retrieve video sink"); + return; + } + gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(video_sink), (guintptr) (id) ui_video_view); + + /* Instruct the bus to emit signals for each received message, and connect to the interesting signals */ + bus = gst_element_get_bus (pipeline); + bus_source = gst_bus_create_watch (bus); + g_source_set_callback (bus_source, (GSourceFunc) gst_bus_async_signal_func, NULL, NULL); + g_source_attach (bus_source, context); + g_source_unref (bus_source); + g_signal_connect (G_OBJECT (bus), "message::error", (GCallback)error_cb, (__bridge void *)self); + g_signal_connect (G_OBJECT (bus), "message::state-changed", (GCallback)state_changed_cb, (__bridge void *)self); + gst_object_unref (bus); + + /* Create a GLib Main Loop and set it to run */ + NSLog (@"Entering main loop..."); + main_loop = g_main_loop_new (context, FALSE); + [self check_initialization_complete]; + g_main_loop_run (main_loop); + NSLog (@"Exited main loop"); + g_main_loop_unref (main_loop); + main_loop = NULL; + + /* Free resources */ + g_main_context_pop_thread_default(context); + g_main_context_unref (context); + gst_element_set_state (pipeline, GST_STATE_NULL); + gst_object_unref (pipeline); + + return; +} + +@end diff --git a/ios/Classes/SwiftFlutterGstreamerPlayerPlugin.swift b/ios/Classes/SwiftFlutterGstreamerPlayerPlugin.swift new file mode 100644 index 0000000..225adc2 --- /dev/null +++ b/ios/Classes/SwiftFlutterGstreamerPlayerPlugin.swift @@ -0,0 +1,148 @@ +import Flutter +import UIKit + +class FLNativeViewFactory: NSObject, FlutterPlatformViewFactory { + private var messenger: FlutterBinaryMessenger + private var pipeline: String + + init(messenger: FlutterBinaryMessenger, pipeline: String) { + self.messenger = messenger + self.pipeline = pipeline + super.init() + } + + func create( + withFrame frame: CGRect, + viewIdentifier viewId: Int64, + arguments args: Any? + ) -> FlutterPlatformView { + return FLNativeView( + frame: frame, + viewIdentifier: viewId, + arguments: args, + binaryMessenger: messenger, + pipeline: self.pipeline) + } +} + +class FLNativeView: NSObject, FlutterPlatformView { + private var _view: UIView + //private var _pipeline: String = "" + private var _gStreamerBackend: GStreamerBackend + + init( + frame: CGRect, + viewIdentifier viewId: Int64, + arguments args: Any?, + binaryMessenger messenger: FlutterBinaryMessenger?, + pipeline pipeline: String + ) { + _view = UIView() + + /* + print("[FLNativeView] viewId: " + String(viewId)) + switch (viewId) { + case 0: + //_pipeline = "videotestsrc pattern=smpte ! warptv ! videoconvert ! autovideosink" + _pipeline = "rtspsrc location=rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 retry=60000 ! decodebin ! autovideosink" + //_pipeline = "rtspsrc location=rtsp://192.168.55.1:9000/sony latency=0 ! decodebin ! autovideosink" + //_pipeline = "rtspsrc location=rtsp://192.168.0.103:9000/sony latency=0 ! decodebin ! autovideosink" + break + case 1: + //_pipeline = "videotestsrc pattern=circular ! warptv ! videoconvert ! autovideosink" + _pipeline = "rtspsrc location=rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 retry=60000 ! decodebin ! autovideosink" + //_pipeline = "rtspsrc location=rtsp://192.168.55.1:9000/sony latency=0 ! decodebin ! autovideosink" + //_pipeline = "rtspsrc location=rtsp://192.168.0.103:9000/sony latency=0 ! decodebin ! autovideosink" + break + case 2: + //_pipeline = "videotestsrc pattern=checkers-8 ! warptv ! videoconvert ! autovideosink" + _pipeline = "rtspsrc location=rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 retry=60000 ! decodebin ! autovideosink" + //_pipeline = "rtspsrc location=rtsp://192.168.55.1:9000/sony latency=0 ! decodebin ! autovideosink" + //_pipeline = "rtspsrc location=rtsp://192.168.0.103:9000/sony latency=0 ! decodebin ! autovideosink" + break + case 3: + //_pipeline = "videotestsrc pattern=smpte100 ! warptv ! videoconvert ! autovideosink" + _pipeline = "rtspsrc location=rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 retry=60000 ! decodebin ! autovideosink" + //_pipeline = "rtspsrc location=rtsp://192.168.55.1:9000/sony latency=0 ! decodebin ! autovideosink" + //_pipeline = "rtspsrc location=rtsp://192.168.0.103:9000/sony latency=0 ! decodebin ! autovideosink" + break + default: + _pipeline = "rtspsrc location=rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 latency=0 ! decodebin ! autovideosink" + //_pipeline = "rtspsrc location=rtsp://192.168.55.1:9000/sony latency=0 ! decodebin ! autovideosink" + //_pipeline = "rtspsrc location=rtsp://192.168.0.103:9000/sony latency=0 ! decodebin ! autovideosink" + break + } + */ + _gStreamerBackend = GStreamerBackend( + pipeline, + videoView: _view) + + super.init() + // iOS views can be created here + //createNativeView(view: _view) + } + + func view() -> UIView { + return _view + } + + func createNativeView(view _view: UIView){ + _view.backgroundColor = UIColor.blue + let nativeLabel = UILabel() + nativeLabel.text = "Native text from iOS: " + String("") + nativeLabel.textColor = UIColor.white + nativeLabel.textAlignment = .center + nativeLabel.frame = CGRect(x: 0, y: 0, width: 180, height: 48.0) + _view.addSubview(nativeLabel) + } +} + +public class SwiftFlutterGstreamerPlayerPlugin: NSObject, FlutterPlugin { + + static var registrar: FlutterPluginRegistrar? = nil; + /* static var factory: FLNativeViewFactory? = nil; */ + + public static func register(with registrar: FlutterPluginRegistrar) { + let channel = FlutterMethodChannel(name: "flutter_gstreamer_player", binaryMessenger: registrar.messenger()) + let instance = SwiftFlutterGstreamerPlayerPlugin() + registrar.addMethodCallDelegate(instance, channel: channel) + + gst_ios_init() + + SwiftFlutterGstreamerPlayerPlugin.registrar = registrar + /* SwiftFlutterGstreamerPlayerPlugin.factory = factory */ + } + + public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { + switch (call.method) { + case "getPlatformVersion": + result("iOS " + UIDevice.current.systemVersion) + break + case "PlayerRegisterTexture": + guard let args = call.arguments as? [String : Any] else { + result(" arguments error.... ") + return + } + let pipeline = args["pipeline"] as! String; + let playerId = args["playerId"] as! Int64; + + /* guard let factory = SwiftFlutterGstreamerPlayerPlugin.factory as? FLNativeViewFactory else { */ + /* print("Internal plugin error: factory does not initialized") */ + /* return */ + /* } */ + guard let registrar = SwiftFlutterGstreamerPlayerPlugin.registrar as? FlutterPluginRegistrar else { + print("Internal plugin error: registrar does not initialized") + return + } + + var factory = FLNativeViewFactory(messenger: registrar.messenger(), pipeline: pipeline) + registrar.register(factory, withId: String(playerId)) + + result(playerId) + break + default: + result(FlutterMethodNotImplemented) + break + } + } +} diff --git a/ios/Classes/gst_ios_init.h b/ios/Classes/gst_ios_init.h new file mode 100644 index 0000000..77bb7a4 --- /dev/null +++ b/ios/Classes/gst_ios_init.h @@ -0,0 +1,39 @@ +#ifndef __GST_IOS_INIT_H__ +#define __GST_IOS_INIT_H__ + +// #include + +// G_BEGIN_DECLS + +#define GST_G_IO_MODULE_DECLARE(name) \ +extern void G_PASTE(g_io_, G_PASTE(name, _load)) (gpointer module) + +#define GST_G_IO_MODULE_LOAD(name) \ +G_PASTE(g_io_, G_PASTE(name, _load)) (NULL) + +/* Uncomment each line to enable the plugin categories that your application needs. + * You can also enable individual plugins. See gst_ios_init.c to see their names + */ + +#define GST_IOS_PLUGINS_CORE +#define GST_IOS_PLUGINS_CODECS +#define GST_IOS_PLUGINS_ENCODING +#define GST_IOS_PLUGINS_NET +#define GST_IOS_PLUGINS_PLAYBACK +#define GST_IOS_PLUGINS_VIS +#define GST_IOS_PLUGINS_SYS +#define GST_IOS_PLUGINS_EFFECTS +#define GST_IOS_PLUGINS_CAPTURE +#define GST_IOS_PLUGINS_CODECS_GPL +#define GST_IOS_PLUGINS_CODECS_RESTRICTED +#define GST_IOS_PLUGINS_NET_RESTRICTED +#define GST_IOS_PLUGINS_GES + + +//#define GST_IOS_GIO_MODULE_GNUTLS + +void gst_ios_init (void); + +// G_END_DECLS + +#endif diff --git a/ios/Classes/gst_ios_init.m b/ios/Classes/gst_ios_init.m new file mode 100644 index 0000000..ac83093 --- /dev/null +++ b/ios/Classes/gst_ios_init.m @@ -0,0 +1,1108 @@ +#include "gst_ios_init.h" + +#include + +#include + +#if defined(GST_IOS_PLUGIN_COREELEMENTS) || defined(GST_IOS_PLUGINS_CORE) +GST_PLUGIN_STATIC_DECLARE(coreelements); +#endif +#if defined(GST_IOS_PLUGIN_CORETRACERS) || defined(GST_IOS_PLUGINS_CORE) +GST_PLUGIN_STATIC_DECLARE(coretracers); +#endif +#if defined(GST_IOS_PLUGIN_ADDER) || defined(GST_IOS_PLUGINS_CORE) +GST_PLUGIN_STATIC_DECLARE(adder); +#endif +#if defined(GST_IOS_PLUGIN_APP) || defined(GST_IOS_PLUGINS_CORE) +GST_PLUGIN_STATIC_DECLARE(app); +#endif +#if defined(GST_IOS_PLUGIN_AUDIOCONVERT) || defined(GST_IOS_PLUGINS_CORE) +GST_PLUGIN_STATIC_DECLARE(audioconvert); +#endif +#if defined(GST_IOS_PLUGIN_AUDIOMIXER) || defined(GST_IOS_PLUGINS_CORE) +GST_PLUGIN_STATIC_DECLARE(audiomixer); +#endif +#if defined(GST_IOS_PLUGIN_AUDIORATE) || defined(GST_IOS_PLUGINS_CORE) +GST_PLUGIN_STATIC_DECLARE(audiorate); +#endif +#if defined(GST_IOS_PLUGIN_AUDIORESAMPLE) || defined(GST_IOS_PLUGINS_CORE) +GST_PLUGIN_STATIC_DECLARE(audioresample); +#endif +#if defined(GST_IOS_PLUGIN_AUDIOTESTSRC) || defined(GST_IOS_PLUGINS_CORE) +GST_PLUGIN_STATIC_DECLARE(audiotestsrc); +#endif +#if defined(GST_IOS_PLUGIN_COMPOSITOR) || defined(GST_IOS_PLUGINS_CORE) +GST_PLUGIN_STATIC_DECLARE(compositor); +#endif +#if defined(GST_IOS_PLUGIN_GIO) || defined(GST_IOS_PLUGINS_CORE) +GST_PLUGIN_STATIC_DECLARE(gio); +#endif +#if defined(GST_IOS_PLUGIN_OVERLAYCOMPOSITION) || defined(GST_IOS_PLUGINS_CORE) +GST_PLUGIN_STATIC_DECLARE(overlaycomposition); +#endif +#if defined(GST_IOS_PLUGIN_PANGO) || defined(GST_IOS_PLUGINS_CORE) +GST_PLUGIN_STATIC_DECLARE(pango); +#endif +#if defined(GST_IOS_PLUGIN_RAWPARSE) || defined(GST_IOS_PLUGINS_CORE) +GST_PLUGIN_STATIC_DECLARE(rawparse); +#endif +#if defined(GST_IOS_PLUGIN_TYPEFINDFUNCTIONS) || defined(GST_IOS_PLUGINS_CORE) +GST_PLUGIN_STATIC_DECLARE(typefindfunctions); +#endif +#if defined(GST_IOS_PLUGIN_VIDEOCONVERT) || defined(GST_IOS_PLUGINS_CORE) +GST_PLUGIN_STATIC_DECLARE(videoconvert); +#endif +#if defined(GST_IOS_PLUGIN_VIDEORATE) || defined(GST_IOS_PLUGINS_CORE) +GST_PLUGIN_STATIC_DECLARE(videorate); +#endif +#if defined(GST_IOS_PLUGIN_VIDEOSCALE) || defined(GST_IOS_PLUGINS_CORE) +GST_PLUGIN_STATIC_DECLARE(videoscale); +#endif +#if defined(GST_IOS_PLUGIN_VIDEOTESTSRC) || defined(GST_IOS_PLUGINS_CORE) +GST_PLUGIN_STATIC_DECLARE(videotestsrc); +#endif +#if defined(GST_IOS_PLUGIN_VOLUME) || defined(GST_IOS_PLUGINS_CORE) +GST_PLUGIN_STATIC_DECLARE(volume); +#endif +#if defined(GST_IOS_PLUGIN_AUTODETECT) || defined(GST_IOS_PLUGINS_CORE) +GST_PLUGIN_STATIC_DECLARE(autodetect); +#endif +#if defined(GST_IOS_PLUGIN_VIDEOFILTER) || defined(GST_IOS_PLUGINS_CORE) +GST_PLUGIN_STATIC_DECLARE(videofilter); +#endif +#if defined(GST_IOS_PLUGIN_SUBPARSE) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(subparse); +#endif +#if defined(GST_IOS_PLUGIN_OGG) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(ogg); +#endif +#if defined(GST_IOS_PLUGIN_THEORA) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(theora); +#endif +#if defined(GST_IOS_PLUGIN_VORBIS) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(vorbis); +#endif +#if defined(GST_IOS_PLUGIN_OPUS) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(opus); +#endif +#if defined(GST_IOS_PLUGIN_IVORBISDEC) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(ivorbisdec); +#endif +#if defined(GST_IOS_PLUGIN_ALAW) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(alaw); +#endif +#if defined(GST_IOS_PLUGIN_APETAG) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(apetag); +#endif +#if defined(GST_IOS_PLUGIN_AUDIOPARSERS) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(audioparsers); +#endif +#if defined(GST_IOS_PLUGIN_AUPARSE) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(auparse); +#endif +#if defined(GST_IOS_PLUGIN_AVI) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(avi); +#endif +#if defined(GST_IOS_PLUGIN_DV) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(dv); +#endif +#if defined(GST_IOS_PLUGIN_FLAC) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(flac); +#endif +#if defined(GST_IOS_PLUGIN_FLV) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(flv); +#endif +#if defined(GST_IOS_PLUGIN_FLXDEC) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(flxdec); +#endif +#if defined(GST_IOS_PLUGIN_ICYDEMUX) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(icydemux); +#endif +#if defined(GST_IOS_PLUGIN_ID3DEMUX) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(id3demux); +#endif +#if defined(GST_IOS_PLUGIN_ISOMP4) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(isomp4); +#endif +#if defined(GST_IOS_PLUGIN_JPEG) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(jpeg); +#endif +#if defined(GST_IOS_PLUGIN_LAME) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(lame); +#endif +#if defined(GST_IOS_PLUGIN_MATROSKA) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(matroska); +#endif +#if defined(GST_IOS_PLUGIN_MPG123) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(mpg123); +#endif +#if defined(GST_IOS_PLUGIN_MULAW) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(mulaw); +#endif +#if defined(GST_IOS_PLUGIN_MULTIPART) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(multipart); +#endif +#if defined(GST_IOS_PLUGIN_PNG) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(png); +#endif +#if defined(GST_IOS_PLUGIN_SPEEX) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(speex); +#endif +#if defined(GST_IOS_PLUGIN_TAGLIB) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(taglib); +#endif +#if defined(GST_IOS_PLUGIN_VPX) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(vpx); +#endif +#if defined(GST_IOS_PLUGIN_WAVENC) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(wavenc); +#endif +#if defined(GST_IOS_PLUGIN_WAVPACK) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(wavpack); +#endif +#if defined(GST_IOS_PLUGIN_WAVPARSE) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(wavparse); +#endif +#if defined(GST_IOS_PLUGIN_Y4MENC) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(y4menc); +#endif +#if defined(GST_IOS_PLUGIN_ADPCMDEC) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(adpcmdec); +#endif +#if defined(GST_IOS_PLUGIN_ADPCMENC) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(adpcmenc); +#endif +#if defined(GST_IOS_PLUGIN_DASH) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(dash); +#endif +#if defined(GST_IOS_PLUGIN_DVBSUBOVERLAY) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(dvbsuboverlay); +#endif +#if defined(GST_IOS_PLUGIN_DVDSPU) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(dvdspu); +#endif +#if defined(GST_IOS_PLUGIN_HLS) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(hls); +#endif +#if defined(GST_IOS_PLUGIN_ID3TAG) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(id3tag); +#endif +#if defined(GST_IOS_PLUGIN_KATE) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(kate); +#endif +#if defined(GST_IOS_PLUGIN_MIDI) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(midi); +#endif +#if defined(GST_IOS_PLUGIN_MXF) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(mxf); +#endif +#if defined(GST_IOS_PLUGIN_OPENH264) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(openh264); +#endif +#if defined(GST_IOS_PLUGIN_OPUSPARSE) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(opusparse); +#endif +#if defined(GST_IOS_PLUGIN_PCAPPARSE) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(pcapparse); +#endif +#if defined(GST_IOS_PLUGIN_PNM) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(pnm); +#endif +#if defined(GST_IOS_PLUGIN_RFBSRC) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(rfbsrc); +#endif +#if defined(GST_IOS_PLUGIN_SIREN) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(siren); +#endif +#if defined(GST_IOS_PLUGIN_SMOOTHSTREAMING) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(smoothstreaming); +#endif +#if defined(GST_IOS_PLUGIN_SUBENC) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(subenc); +#endif +#if defined(GST_IOS_PLUGIN_VIDEOPARSERSBAD) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(videoparsersbad); +#endif +#if defined(GST_IOS_PLUGIN_Y4MDEC) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(y4mdec); +#endif +#if defined(GST_IOS_PLUGIN_JPEGFORMAT) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(jpegformat); +#endif +#if defined(GST_IOS_PLUGIN_GDP) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(gdp); +#endif +#if defined(GST_IOS_PLUGIN_RSVG) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(rsvg); +#endif +#if defined(GST_IOS_PLUGIN_OPENJPEG) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(openjpeg); +#endif +#if defined(GST_IOS_PLUGIN_SPANDSP) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(spandsp); +#endif +#if defined(GST_IOS_PLUGIN_SBC) || defined(GST_IOS_PLUGINS_CODECS) +GST_PLUGIN_STATIC_DECLARE(sbc); +#endif +#if defined(GST_IOS_PLUGIN_ENCODING) || defined(GST_IOS_PLUGINS_ENCODING) +GST_PLUGIN_STATIC_DECLARE(encoding); +#endif +#if defined(GST_IOS_PLUGIN_TCP) || defined(GST_IOS_PLUGINS_NET) +GST_PLUGIN_STATIC_DECLARE(tcp); +#endif +#if defined(GST_IOS_PLUGIN_RTSP) || defined(GST_IOS_PLUGINS_NET) +GST_PLUGIN_STATIC_DECLARE(rtsp); +#endif +#if defined(GST_IOS_PLUGIN_RTP) || defined(GST_IOS_PLUGINS_NET) +GST_PLUGIN_STATIC_DECLARE(rtp); +#endif +#if defined(GST_IOS_PLUGIN_RTPMANAGER) || defined(GST_IOS_PLUGINS_NET) +GST_PLUGIN_STATIC_DECLARE(rtpmanager); +#endif +#if defined(GST_IOS_PLUGIN_SOUP) || defined(GST_IOS_PLUGINS_NET) +GST_PLUGIN_STATIC_DECLARE(soup); +#endif +#if defined(GST_IOS_PLUGIN_UDP) || defined(GST_IOS_PLUGINS_NET) +GST_PLUGIN_STATIC_DECLARE(udp); +#endif +#if defined(GST_IOS_PLUGIN_DTLS) || defined(GST_IOS_PLUGINS_NET) +GST_PLUGIN_STATIC_DECLARE(dtls); +#endif +#if defined(GST_IOS_PLUGIN_SDPELEM) || defined(GST_IOS_PLUGINS_NET) +GST_PLUGIN_STATIC_DECLARE(sdpelem); +#endif +#if defined(GST_IOS_PLUGIN_SRTP) || defined(GST_IOS_PLUGINS_NET) +GST_PLUGIN_STATIC_DECLARE(srtp); +#endif +#if defined(GST_IOS_PLUGIN_WEBRTC) || defined(GST_IOS_PLUGINS_NET) +GST_PLUGIN_STATIC_DECLARE(webrtc); +#endif +#if defined(GST_IOS_PLUGIN_SRT) || defined(GST_IOS_PLUGINS_NET) +GST_PLUGIN_STATIC_DECLARE(srt); +#endif +#if defined(GST_IOS_PLUGIN_SCTP) || defined(GST_IOS_PLUGINS_NET) +GST_PLUGIN_STATIC_DECLARE(sctp); +#endif +#if defined(GST_IOS_PLUGIN_NICE) || defined(GST_IOS_PLUGINS_NET) +GST_PLUGIN_STATIC_DECLARE(nice); +#endif +#if defined(GST_IOS_PLUGIN_RTSPCLIENTSINK) || defined(GST_IOS_PLUGINS_NET) +GST_PLUGIN_STATIC_DECLARE(rtspclientsink); +#endif +#if defined(GST_IOS_PLUGIN_PLAYBACK) || defined(GST_IOS_PLUGINS_PLAYBACK) +GST_PLUGIN_STATIC_DECLARE(playback); +#endif +#if defined(GST_IOS_PLUGIN_GOOM) || defined(GST_IOS_PLUGINS_VIS) +GST_PLUGIN_STATIC_DECLARE(goom); +#endif +#if defined(GST_IOS_PLUGIN_GOOM2K1) || defined(GST_IOS_PLUGINS_VIS) +GST_PLUGIN_STATIC_DECLARE(goom2k1); +#endif +#if defined(GST_IOS_PLUGIN_AUDIOVISUALIZERS) || defined(GST_IOS_PLUGINS_VIS) +GST_PLUGIN_STATIC_DECLARE(audiovisualizers); +#endif +#if defined(GST_IOS_PLUGIN_OPENGL) || defined(GST_IOS_PLUGINS_SYS) +GST_PLUGIN_STATIC_DECLARE(opengl); +#endif +#if defined(GST_IOS_PLUGIN_OSXAUDIO) || defined(GST_IOS_PLUGINS_SYS) +GST_PLUGIN_STATIC_DECLARE(osxaudio); +#endif +#if defined(GST_IOS_PLUGIN_APPLEMEDIA) || defined(GST_IOS_PLUGINS_SYS) +GST_PLUGIN_STATIC_DECLARE(applemedia); +#endif +#if defined(GST_IOS_PLUGIN_SHM) || defined(GST_IOS_PLUGINS_SYS) +GST_PLUGIN_STATIC_DECLARE(shm); +#endif +#if defined(GST_IOS_PLUGIN_ALPHA) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(alpha); +#endif +#if defined(GST_IOS_PLUGIN_ALPHACOLOR) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(alphacolor); +#endif +#if defined(GST_IOS_PLUGIN_AUDIOFX) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(audiofx); +#endif +#if defined(GST_IOS_PLUGIN_CAIRO) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(cairo); +#endif +#if defined(GST_IOS_PLUGIN_CUTTER) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(cutter); +#endif +#if defined(GST_IOS_PLUGIN_DEBUG) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(debug); +#endif +#if defined(GST_IOS_PLUGIN_DEINTERLACE) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(deinterlace); +#endif +#if defined(GST_IOS_PLUGIN_DTMF) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(dtmf); +#endif +#if defined(GST_IOS_PLUGIN_EFFECTV) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(effectv); +#endif +#if defined(GST_IOS_PLUGIN_EQUALIZER) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(equalizer); +#endif +#if defined(GST_IOS_PLUGIN_GDKPIXBUF) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(gdkpixbuf); +#endif +#if defined(GST_IOS_PLUGIN_IMAGEFREEZE) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(imagefreeze); +#endif +#if defined(GST_IOS_PLUGIN_INTERLEAVE) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(interleave); +#endif +#if defined(GST_IOS_PLUGIN_LEVEL) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(level); +#endif +#if defined(GST_IOS_PLUGIN_MULTIFILE) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(multifile); +#endif +#if defined(GST_IOS_PLUGIN_REPLAYGAIN) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(replaygain); +#endif +#if defined(GST_IOS_PLUGIN_SHAPEWIPE) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(shapewipe); +#endif +#if defined(GST_IOS_PLUGIN_SMPTE) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(smpte); +#endif +#if defined(GST_IOS_PLUGIN_SPECTRUM) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(spectrum); +#endif +#if defined(GST_IOS_PLUGIN_VIDEOBOX) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(videobox); +#endif +#if defined(GST_IOS_PLUGIN_VIDEOCROP) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(videocrop); +#endif +#if defined(GST_IOS_PLUGIN_VIDEOMIXER) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(videomixer); +#endif +#if defined(GST_IOS_PLUGIN_ACCURIP) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(accurip); +#endif +#if defined(GST_IOS_PLUGIN_AIFF) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(aiff); +#endif +#if defined(GST_IOS_PLUGIN_AUDIOFXBAD) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(audiofxbad); +#endif +#if defined(GST_IOS_PLUGIN_AUTOCONVERT) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(autoconvert); +#endif +#if defined(GST_IOS_PLUGIN_BAYER) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(bayer); +#endif +#if defined(GST_IOS_PLUGIN_COLOREFFECTS) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(coloreffects); +#endif +#if defined(GST_IOS_PLUGIN_CLOSEDCAPTION) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(closedcaption); +#endif +#if defined(GST_IOS_PLUGIN_DEBUGUTILSBAD) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(debugutilsbad); +#endif +#if defined(GST_IOS_PLUGIN_FIELDANALYSIS) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(fieldanalysis); +#endif +#if defined(GST_IOS_PLUGIN_FREEVERB) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(freeverb); +#endif +#if defined(GST_IOS_PLUGIN_FREI0R) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(frei0r); +#endif +#if defined(GST_IOS_PLUGIN_GAUDIEFFECTS) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(gaudieffects); +#endif +#if defined(GST_IOS_PLUGIN_GEOMETRICTRANSFORM) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(geometrictransform); +#endif +#if defined(GST_IOS_PLUGIN_INTER) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(inter); +#endif +#if defined(GST_IOS_PLUGIN_INTERLACE) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(interlace); +#endif +#if defined(GST_IOS_PLUGIN_IVTC) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(ivtc); +#endif +#if defined(GST_IOS_PLUGIN_LEGACYRAWPARSE) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(legacyrawparse); +#endif +#if defined(GST_IOS_PLUGIN_PROXY) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(proxy); +#endif +#if defined(GST_IOS_PLUGIN_REMOVESILENCE) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(removesilence); +#endif +#if defined(GST_IOS_PLUGIN_SEGMENTCLIP) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(segmentclip); +#endif +#if defined(GST_IOS_PLUGIN_SMOOTH) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(smooth); +#endif +#if defined(GST_IOS_PLUGIN_SPEED) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(speed); +#endif +#if defined(GST_IOS_PLUGIN_SOUNDTOUCH) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(soundtouch); +#endif +#if defined(GST_IOS_PLUGIN_VIDEOFILTERSBAD) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(videofiltersbad); +#endif +#if defined(GST_IOS_PLUGIN_WEBRTCDSP) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(webrtcdsp); +#endif +#if defined(GST_IOS_PLUGIN_LADSPA) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(ladspa); +#endif +#if defined(GST_IOS_PLUGIN_AUDIOBUFFERSPLIT) || defined(GST_IOS_PLUGINS_EFFECTS) +GST_PLUGIN_STATIC_DECLARE(audiobuffersplit); +#endif +#if defined(GST_IOS_PLUGIN_CAMERABIN) || defined(GST_IOS_PLUGINS_CAPTURE) +GST_PLUGIN_STATIC_DECLARE(camerabin); +#endif +#if defined(GST_IOS_PLUGIN_ASSRENDER) || defined(GST_IOS_PLUGINS_CODECS_GPL) +GST_PLUGIN_STATIC_DECLARE(assrender); +#endif +#if defined(GST_IOS_PLUGIN_ASFMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) +GST_PLUGIN_STATIC_DECLARE(asfmux); +#endif +#if defined(GST_IOS_PLUGIN_DTSDEC) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) +GST_PLUGIN_STATIC_DECLARE(dtsdec); +#endif +#if defined(GST_IOS_PLUGIN_MPEGPSDEMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) +GST_PLUGIN_STATIC_DECLARE(mpegpsdemux); +#endif +#if defined(GST_IOS_PLUGIN_MPEGPSMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) +GST_PLUGIN_STATIC_DECLARE(mpegpsmux); +#endif +#if defined(GST_IOS_PLUGIN_MPEGTSDEMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) +GST_PLUGIN_STATIC_DECLARE(mpegtsdemux); +#endif +#if defined(GST_IOS_PLUGIN_MPEGTSMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) +GST_PLUGIN_STATIC_DECLARE(mpegtsmux); +#endif +#if defined(GST_IOS_PLUGIN_VOAACENC) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) +GST_PLUGIN_STATIC_DECLARE(voaacenc); +#endif +#if defined(GST_IOS_PLUGIN_A52DEC) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) +GST_PLUGIN_STATIC_DECLARE(a52dec); +#endif +#if defined(GST_IOS_PLUGIN_AMRNB) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) +GST_PLUGIN_STATIC_DECLARE(amrnb); +#endif +#if defined(GST_IOS_PLUGIN_AMRWBDEC) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) +GST_PLUGIN_STATIC_DECLARE(amrwbdec); +#endif +#if defined(GST_IOS_PLUGIN_ASF) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) +GST_PLUGIN_STATIC_DECLARE(asf); +#endif +#if defined(GST_IOS_PLUGIN_DVDSUB) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) +GST_PLUGIN_STATIC_DECLARE(dvdsub); +#endif +#if defined(GST_IOS_PLUGIN_DVDLPCMDEC) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) +GST_PLUGIN_STATIC_DECLARE(dvdlpcmdec); +#endif +#if defined(GST_IOS_PLUGIN_XINGMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) +GST_PLUGIN_STATIC_DECLARE(xingmux); +#endif +#if defined(GST_IOS_PLUGIN_REALMEDIA) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) +GST_PLUGIN_STATIC_DECLARE(realmedia); +#endif +#if defined(GST_IOS_PLUGIN_X264) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) +GST_PLUGIN_STATIC_DECLARE(x264); +#endif +#if defined(GST_IOS_PLUGIN_LIBAV) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) +GST_PLUGIN_STATIC_DECLARE(libav); +#endif +#if defined(GST_IOS_PLUGIN_RTMP) || defined(GST_IOS_PLUGINS_NET_RESTRICTED) +GST_PLUGIN_STATIC_DECLARE(rtmp); +#endif +#if defined(GST_IOS_PLUGIN_NLE) || defined(GST_IOS_PLUGINS_GES) +GST_PLUGIN_STATIC_DECLARE(nle); +#endif + +#if defined(GST_IOS_GIO_MODULE_OPENSSL) + GST_G_IO_MODULE_DECLARE(openssl); +#endif + +void +gst_ios_init (void) +{ + GstPluginFeature *plugin; + GstRegistry *reg; + NSString *resources = [[NSBundle mainBundle] resourcePath]; + NSString *tmp = NSTemporaryDirectory(); + NSString *cache = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Caches"]; + NSString *docs = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]; + + const gchar *resources_dir = [resources UTF8String]; + const gchar *tmp_dir = [tmp UTF8String]; + const gchar *cache_dir = [cache UTF8String]; + const gchar *docs_dir = [docs UTF8String]; + gchar *ca_certificates; + + g_setenv ("TMP", tmp_dir, TRUE); + g_setenv ("TEMP", tmp_dir, TRUE); + g_setenv ("TMPDIR", tmp_dir, TRUE); + g_setenv ("XDG_RUNTIME_DIR", resources_dir, TRUE); + g_setenv ("XDG_CACHE_HOME", cache_dir, TRUE); + + g_setenv ("HOME", docs_dir, TRUE); + g_setenv ("XDG_DATA_DIRS", resources_dir, TRUE); + g_setenv ("XDG_CONFIG_DIRS", resources_dir, TRUE); + g_setenv ("XDG_CONFIG_HOME", cache_dir, TRUE); + g_setenv ("XDG_DATA_HOME", resources_dir, TRUE); + g_setenv ("FONTCONFIG_PATH", resources_dir, TRUE); + + ca_certificates = g_build_filename (resources_dir, "ssl", "certs", "ca-certificates.crt", NULL); + g_setenv ("CA_CERTIFICATES", ca_certificates, TRUE); + +#if defined(GST_IOS_GIO_MODULE_OPENSSL) + GST_G_IO_MODULE_LOAD(openssl); +#endif + + if (ca_certificates) { + GTlsBackend *backend = g_tls_backend_get_default (); + if (backend) { + GTlsDatabase *db = g_tls_file_database_new (ca_certificates, NULL); + if (db) + g_tls_backend_set_default_database (backend, db); + } + } + g_free (ca_certificates); + + gst_init (NULL, NULL); + + #if defined(GST_IOS_PLUGIN_COREELEMENTS) || defined(GST_IOS_PLUGINS_CORE) + GST_PLUGIN_STATIC_REGISTER(coreelements); +#endif +#if defined(GST_IOS_PLUGIN_CORETRACERS) || defined(GST_IOS_PLUGINS_CORE) + GST_PLUGIN_STATIC_REGISTER(coretracers); +#endif +#if defined(GST_IOS_PLUGIN_ADDER) || defined(GST_IOS_PLUGINS_CORE) + GST_PLUGIN_STATIC_REGISTER(adder); +#endif +#if defined(GST_IOS_PLUGIN_APP) || defined(GST_IOS_PLUGINS_CORE) + GST_PLUGIN_STATIC_REGISTER(app); +#endif +#if defined(GST_IOS_PLUGIN_AUDIOCONVERT) || defined(GST_IOS_PLUGINS_CORE) + GST_PLUGIN_STATIC_REGISTER(audioconvert); +#endif +#if defined(GST_IOS_PLUGIN_AUDIOMIXER) || defined(GST_IOS_PLUGINS_CORE) + GST_PLUGIN_STATIC_REGISTER(audiomixer); +#endif +#if defined(GST_IOS_PLUGIN_AUDIORATE) || defined(GST_IOS_PLUGINS_CORE) + GST_PLUGIN_STATIC_REGISTER(audiorate); +#endif +#if defined(GST_IOS_PLUGIN_AUDIORESAMPLE) || defined(GST_IOS_PLUGINS_CORE) + GST_PLUGIN_STATIC_REGISTER(audioresample); +#endif +#if defined(GST_IOS_PLUGIN_AUDIOTESTSRC) || defined(GST_IOS_PLUGINS_CORE) + GST_PLUGIN_STATIC_REGISTER(audiotestsrc); +#endif +#if defined(GST_IOS_PLUGIN_COMPOSITOR) || defined(GST_IOS_PLUGINS_CORE) + GST_PLUGIN_STATIC_REGISTER(compositor); +#endif +#if defined(GST_IOS_PLUGIN_GIO) || defined(GST_IOS_PLUGINS_CORE) + GST_PLUGIN_STATIC_REGISTER(gio); +#endif +#if defined(GST_IOS_PLUGIN_OVERLAYCOMPOSITION) || defined(GST_IOS_PLUGINS_CORE) + GST_PLUGIN_STATIC_REGISTER(overlaycomposition); +#endif +#if defined(GST_IOS_PLUGIN_PANGO) || defined(GST_IOS_PLUGINS_CORE) + GST_PLUGIN_STATIC_REGISTER(pango); +#endif +#if defined(GST_IOS_PLUGIN_RAWPARSE) || defined(GST_IOS_PLUGINS_CORE) + GST_PLUGIN_STATIC_REGISTER(rawparse); +#endif +#if defined(GST_IOS_PLUGIN_TYPEFINDFUNCTIONS) || defined(GST_IOS_PLUGINS_CORE) + GST_PLUGIN_STATIC_REGISTER(typefindfunctions); +#endif +#if defined(GST_IOS_PLUGIN_VIDEOCONVERT) || defined(GST_IOS_PLUGINS_CORE) + GST_PLUGIN_STATIC_REGISTER(videoconvert); +#endif +#if defined(GST_IOS_PLUGIN_VIDEORATE) || defined(GST_IOS_PLUGINS_CORE) + GST_PLUGIN_STATIC_REGISTER(videorate); +#endif +#if defined(GST_IOS_PLUGIN_VIDEOSCALE) || defined(GST_IOS_PLUGINS_CORE) + GST_PLUGIN_STATIC_REGISTER(videoscale); +#endif +#if defined(GST_IOS_PLUGIN_VIDEOTESTSRC) || defined(GST_IOS_PLUGINS_CORE) + GST_PLUGIN_STATIC_REGISTER(videotestsrc); +#endif +#if defined(GST_IOS_PLUGIN_VOLUME) || defined(GST_IOS_PLUGINS_CORE) + GST_PLUGIN_STATIC_REGISTER(volume); +#endif +#if defined(GST_IOS_PLUGIN_AUTODETECT) || defined(GST_IOS_PLUGINS_CORE) + GST_PLUGIN_STATIC_REGISTER(autodetect); +#endif +#if defined(GST_IOS_PLUGIN_VIDEOFILTER) || defined(GST_IOS_PLUGINS_CORE) + GST_PLUGIN_STATIC_REGISTER(videofilter); +#endif +#if defined(GST_IOS_PLUGIN_SUBPARSE) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(subparse); +#endif +#if defined(GST_IOS_PLUGIN_OGG) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(ogg); +#endif +#if defined(GST_IOS_PLUGIN_THEORA) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(theora); +#endif +#if defined(GST_IOS_PLUGIN_VORBIS) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(vorbis); +#endif +#if defined(GST_IOS_PLUGIN_OPUS) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(opus); +#endif +#if defined(GST_IOS_PLUGIN_IVORBISDEC) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(ivorbisdec); +#endif +#if defined(GST_IOS_PLUGIN_ALAW) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(alaw); +#endif +#if defined(GST_IOS_PLUGIN_APETAG) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(apetag); +#endif +#if defined(GST_IOS_PLUGIN_AUDIOPARSERS) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(audioparsers); +#endif +#if defined(GST_IOS_PLUGIN_AUPARSE) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(auparse); +#endif +#if defined(GST_IOS_PLUGIN_AVI) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(avi); +#endif +#if defined(GST_IOS_PLUGIN_DV) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(dv); +#endif +#if defined(GST_IOS_PLUGIN_FLAC) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(flac); +#endif +#if defined(GST_IOS_PLUGIN_FLV) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(flv); +#endif +#if defined(GST_IOS_PLUGIN_FLXDEC) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(flxdec); +#endif +#if defined(GST_IOS_PLUGIN_ICYDEMUX) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(icydemux); +#endif +#if defined(GST_IOS_PLUGIN_ID3DEMUX) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(id3demux); +#endif +#if defined(GST_IOS_PLUGIN_ISOMP4) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(isomp4); +#endif +#if defined(GST_IOS_PLUGIN_JPEG) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(jpeg); +#endif +#if defined(GST_IOS_PLUGIN_LAME) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(lame); +#endif +#if defined(GST_IOS_PLUGIN_MATROSKA) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(matroska); +#endif +#if defined(GST_IOS_PLUGIN_MPG123) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(mpg123); +#endif +#if defined(GST_IOS_PLUGIN_MULAW) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(mulaw); +#endif +#if defined(GST_IOS_PLUGIN_MULTIPART) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(multipart); +#endif +#if defined(GST_IOS_PLUGIN_PNG) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(png); +#endif +#if defined(GST_IOS_PLUGIN_SPEEX) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(speex); +#endif +#if defined(GST_IOS_PLUGIN_TAGLIB) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(taglib); +#endif +#if defined(GST_IOS_PLUGIN_VPX) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(vpx); +#endif +#if defined(GST_IOS_PLUGIN_WAVENC) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(wavenc); +#endif +#if defined(GST_IOS_PLUGIN_WAVPACK) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(wavpack); +#endif +#if defined(GST_IOS_PLUGIN_WAVPARSE) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(wavparse); +#endif +#if defined(GST_IOS_PLUGIN_Y4MENC) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(y4menc); +#endif +#if defined(GST_IOS_PLUGIN_ADPCMDEC) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(adpcmdec); +#endif +#if defined(GST_IOS_PLUGIN_ADPCMENC) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(adpcmenc); +#endif +#if defined(GST_IOS_PLUGIN_DASH) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(dash); +#endif +#if defined(GST_IOS_PLUGIN_DVBSUBOVERLAY) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(dvbsuboverlay); +#endif +#if defined(GST_IOS_PLUGIN_DVDSPU) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(dvdspu); +#endif +#if defined(GST_IOS_PLUGIN_HLS) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(hls); +#endif +#if defined(GST_IOS_PLUGIN_ID3TAG) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(id3tag); +#endif +#if defined(GST_IOS_PLUGIN_KATE) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(kate); +#endif +#if defined(GST_IOS_PLUGIN_MIDI) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(midi); +#endif +#if defined(GST_IOS_PLUGIN_MXF) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(mxf); +#endif +#if defined(GST_IOS_PLUGIN_OPENH264) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(openh264); +#endif +#if defined(GST_IOS_PLUGIN_OPUSPARSE) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(opusparse); +#endif +#if defined(GST_IOS_PLUGIN_PCAPPARSE) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(pcapparse); +#endif +#if defined(GST_IOS_PLUGIN_PNM) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(pnm); +#endif +#if defined(GST_IOS_PLUGIN_RFBSRC) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(rfbsrc); +#endif +#if defined(GST_IOS_PLUGIN_SIREN) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(siren); +#endif +#if defined(GST_IOS_PLUGIN_SMOOTHSTREAMING) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(smoothstreaming); +#endif +#if defined(GST_IOS_PLUGIN_SUBENC) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(subenc); +#endif +#if defined(GST_IOS_PLUGIN_VIDEOPARSERSBAD) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(videoparsersbad); +#endif +#if defined(GST_IOS_PLUGIN_Y4MDEC) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(y4mdec); +#endif +#if defined(GST_IOS_PLUGIN_JPEGFORMAT) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(jpegformat); +#endif +#if defined(GST_IOS_PLUGIN_GDP) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(gdp); +#endif +#if defined(GST_IOS_PLUGIN_RSVG) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(rsvg); +#endif +#if defined(GST_IOS_PLUGIN_OPENJPEG) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(openjpeg); +#endif +#if defined(GST_IOS_PLUGIN_SPANDSP) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(spandsp); +#endif +#if defined(GST_IOS_PLUGIN_SBC) || defined(GST_IOS_PLUGINS_CODECS) + GST_PLUGIN_STATIC_REGISTER(sbc); +#endif +#if defined(GST_IOS_PLUGIN_ENCODING) || defined(GST_IOS_PLUGINS_ENCODING) + GST_PLUGIN_STATIC_REGISTER(encoding); +#endif +#if defined(GST_IOS_PLUGIN_TCP) || defined(GST_IOS_PLUGINS_NET) + GST_PLUGIN_STATIC_REGISTER(tcp); +#endif +#if defined(GST_IOS_PLUGIN_RTSP) || defined(GST_IOS_PLUGINS_NET) + GST_PLUGIN_STATIC_REGISTER(rtsp); +#endif +#if defined(GST_IOS_PLUGIN_RTP) || defined(GST_IOS_PLUGINS_NET) + GST_PLUGIN_STATIC_REGISTER(rtp); +#endif +#if defined(GST_IOS_PLUGIN_RTPMANAGER) || defined(GST_IOS_PLUGINS_NET) + GST_PLUGIN_STATIC_REGISTER(rtpmanager); +#endif +#if defined(GST_IOS_PLUGIN_SOUP) || defined(GST_IOS_PLUGINS_NET) + GST_PLUGIN_STATIC_REGISTER(soup); +#endif +#if defined(GST_IOS_PLUGIN_UDP) || defined(GST_IOS_PLUGINS_NET) + GST_PLUGIN_STATIC_REGISTER(udp); +#endif +#if defined(GST_IOS_PLUGIN_DTLS) || defined(GST_IOS_PLUGINS_NET) + GST_PLUGIN_STATIC_REGISTER(dtls); +#endif +#if defined(GST_IOS_PLUGIN_SDPELEM) || defined(GST_IOS_PLUGINS_NET) + GST_PLUGIN_STATIC_REGISTER(sdpelem); +#endif +#if defined(GST_IOS_PLUGIN_SRTP) || defined(GST_IOS_PLUGINS_NET) + GST_PLUGIN_STATIC_REGISTER(srtp); +#endif +#if defined(GST_IOS_PLUGIN_WEBRTC) || defined(GST_IOS_PLUGINS_NET) + GST_PLUGIN_STATIC_REGISTER(webrtc); +#endif +#if defined(GST_IOS_PLUGIN_SRT) || defined(GST_IOS_PLUGINS_NET) + GST_PLUGIN_STATIC_REGISTER(srt); +#endif +#if defined(GST_IOS_PLUGIN_SCTP) || defined(GST_IOS_PLUGINS_NET) + GST_PLUGIN_STATIC_REGISTER(sctp); +#endif +#if defined(GST_IOS_PLUGIN_NICE) || defined(GST_IOS_PLUGINS_NET) + GST_PLUGIN_STATIC_REGISTER(nice); +#endif +#if defined(GST_IOS_PLUGIN_RTSPCLIENTSINK) || defined(GST_IOS_PLUGINS_NET) + GST_PLUGIN_STATIC_REGISTER(rtspclientsink); +#endif +#if defined(GST_IOS_PLUGIN_PLAYBACK) || defined(GST_IOS_PLUGINS_PLAYBACK) + GST_PLUGIN_STATIC_REGISTER(playback); +#endif +#if defined(GST_IOS_PLUGIN_GOOM) || defined(GST_IOS_PLUGINS_VIS) + GST_PLUGIN_STATIC_REGISTER(goom); +#endif +#if defined(GST_IOS_PLUGIN_GOOM2K1) || defined(GST_IOS_PLUGINS_VIS) + GST_PLUGIN_STATIC_REGISTER(goom2k1); +#endif +#if defined(GST_IOS_PLUGIN_AUDIOVISUALIZERS) || defined(GST_IOS_PLUGINS_VIS) + GST_PLUGIN_STATIC_REGISTER(audiovisualizers); +#endif +#if defined(GST_IOS_PLUGIN_OPENGL) || defined(GST_IOS_PLUGINS_SYS) + GST_PLUGIN_STATIC_REGISTER(opengl); +#endif +#if defined(GST_IOS_PLUGIN_OSXAUDIO) || defined(GST_IOS_PLUGINS_SYS) + GST_PLUGIN_STATIC_REGISTER(osxaudio); +#endif +#if defined(GST_IOS_PLUGIN_APPLEMEDIA) || defined(GST_IOS_PLUGINS_SYS) + GST_PLUGIN_STATIC_REGISTER(applemedia); +#endif +#if defined(GST_IOS_PLUGIN_SHM) || defined(GST_IOS_PLUGINS_SYS) + GST_PLUGIN_STATIC_REGISTER(shm); +#endif +#if defined(GST_IOS_PLUGIN_ALPHA) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(alpha); +#endif +#if defined(GST_IOS_PLUGIN_ALPHACOLOR) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(alphacolor); +#endif +#if defined(GST_IOS_PLUGIN_AUDIOFX) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(audiofx); +#endif +#if defined(GST_IOS_PLUGIN_CAIRO) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(cairo); +#endif +#if defined(GST_IOS_PLUGIN_CUTTER) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(cutter); +#endif +#if defined(GST_IOS_PLUGIN_DEBUG) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(debug); +#endif +#if defined(GST_IOS_PLUGIN_DEINTERLACE) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(deinterlace); +#endif +#if defined(GST_IOS_PLUGIN_DTMF) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(dtmf); +#endif +#if defined(GST_IOS_PLUGIN_EFFECTV) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(effectv); +#endif +#if defined(GST_IOS_PLUGIN_EQUALIZER) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(equalizer); +#endif +#if defined(GST_IOS_PLUGIN_GDKPIXBUF) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(gdkpixbuf); +#endif +#if defined(GST_IOS_PLUGIN_IMAGEFREEZE) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(imagefreeze); +#endif +#if defined(GST_IOS_PLUGIN_INTERLEAVE) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(interleave); +#endif +#if defined(GST_IOS_PLUGIN_LEVEL) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(level); +#endif +#if defined(GST_IOS_PLUGIN_MULTIFILE) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(multifile); +#endif +#if defined(GST_IOS_PLUGIN_REPLAYGAIN) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(replaygain); +#endif +#if defined(GST_IOS_PLUGIN_SHAPEWIPE) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(shapewipe); +#endif +#if defined(GST_IOS_PLUGIN_SMPTE) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(smpte); +#endif +#if defined(GST_IOS_PLUGIN_SPECTRUM) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(spectrum); +#endif +#if defined(GST_IOS_PLUGIN_VIDEOBOX) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(videobox); +#endif +#if defined(GST_IOS_PLUGIN_VIDEOCROP) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(videocrop); +#endif +#if defined(GST_IOS_PLUGIN_VIDEOMIXER) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(videomixer); +#endif +#if defined(GST_IOS_PLUGIN_ACCURIP) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(accurip); +#endif +#if defined(GST_IOS_PLUGIN_AIFF) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(aiff); +#endif +#if defined(GST_IOS_PLUGIN_AUDIOFXBAD) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(audiofxbad); +#endif +#if defined(GST_IOS_PLUGIN_AUTOCONVERT) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(autoconvert); +#endif +#if defined(GST_IOS_PLUGIN_BAYER) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(bayer); +#endif +#if defined(GST_IOS_PLUGIN_COLOREFFECTS) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(coloreffects); +#endif +#if defined(GST_IOS_PLUGIN_CLOSEDCAPTION) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(closedcaption); +#endif +#if defined(GST_IOS_PLUGIN_DEBUGUTILSBAD) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(debugutilsbad); +#endif +#if defined(GST_IOS_PLUGIN_FIELDANALYSIS) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(fieldanalysis); +#endif +#if defined(GST_IOS_PLUGIN_FREEVERB) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(freeverb); +#endif +#if defined(GST_IOS_PLUGIN_FREI0R) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(frei0r); +#endif +#if defined(GST_IOS_PLUGIN_GAUDIEFFECTS) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(gaudieffects); +#endif +#if defined(GST_IOS_PLUGIN_GEOMETRICTRANSFORM) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(geometrictransform); +#endif +#if defined(GST_IOS_PLUGIN_INTER) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(inter); +#endif +#if defined(GST_IOS_PLUGIN_INTERLACE) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(interlace); +#endif +#if defined(GST_IOS_PLUGIN_IVTC) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(ivtc); +#endif +#if defined(GST_IOS_PLUGIN_LEGACYRAWPARSE) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(legacyrawparse); +#endif +#if defined(GST_IOS_PLUGIN_PROXY) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(proxy); +#endif +#if defined(GST_IOS_PLUGIN_REMOVESILENCE) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(removesilence); +#endif +#if defined(GST_IOS_PLUGIN_SEGMENTCLIP) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(segmentclip); +#endif +#if defined(GST_IOS_PLUGIN_SMOOTH) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(smooth); +#endif +#if defined(GST_IOS_PLUGIN_SPEED) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(speed); +#endif +#if defined(GST_IOS_PLUGIN_SOUNDTOUCH) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(soundtouch); +#endif +#if defined(GST_IOS_PLUGIN_VIDEOFILTERSBAD) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(videofiltersbad); +#endif +#if defined(GST_IOS_PLUGIN_WEBRTCDSP) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(webrtcdsp); +#endif +#if defined(GST_IOS_PLUGIN_LADSPA) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(ladspa); +#endif +#if defined(GST_IOS_PLUGIN_AUDIOBUFFERSPLIT) || defined(GST_IOS_PLUGINS_EFFECTS) + GST_PLUGIN_STATIC_REGISTER(audiobuffersplit); +#endif +#if defined(GST_IOS_PLUGIN_CAMERABIN) || defined(GST_IOS_PLUGINS_CAPTURE) + GST_PLUGIN_STATIC_REGISTER(camerabin); +#endif +#if defined(GST_IOS_PLUGIN_ASSRENDER) || defined(GST_IOS_PLUGINS_CODECS_GPL) + GST_PLUGIN_STATIC_REGISTER(assrender); +#endif +#if defined(GST_IOS_PLUGIN_ASFMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) + GST_PLUGIN_STATIC_REGISTER(asfmux); +#endif +#if defined(GST_IOS_PLUGIN_DTSDEC) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) + GST_PLUGIN_STATIC_REGISTER(dtsdec); +#endif +#if defined(GST_IOS_PLUGIN_MPEGPSDEMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) + GST_PLUGIN_STATIC_REGISTER(mpegpsdemux); +#endif +#if defined(GST_IOS_PLUGIN_MPEGPSMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) + GST_PLUGIN_STATIC_REGISTER(mpegpsmux); +#endif +#if defined(GST_IOS_PLUGIN_MPEGTSDEMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) + GST_PLUGIN_STATIC_REGISTER(mpegtsdemux); +#endif +#if defined(GST_IOS_PLUGIN_MPEGTSMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) + GST_PLUGIN_STATIC_REGISTER(mpegtsmux); +#endif +#if defined(GST_IOS_PLUGIN_VOAACENC) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) + GST_PLUGIN_STATIC_REGISTER(voaacenc); +#endif +#if defined(GST_IOS_PLUGIN_A52DEC) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) + GST_PLUGIN_STATIC_REGISTER(a52dec); +#endif +#if defined(GST_IOS_PLUGIN_AMRNB) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) + GST_PLUGIN_STATIC_REGISTER(amrnb); +#endif +#if defined(GST_IOS_PLUGIN_AMRWBDEC) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) + GST_PLUGIN_STATIC_REGISTER(amrwbdec); +#endif +#if defined(GST_IOS_PLUGIN_ASF) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) + GST_PLUGIN_STATIC_REGISTER(asf); +#endif +#if defined(GST_IOS_PLUGIN_DVDSUB) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) + GST_PLUGIN_STATIC_REGISTER(dvdsub); +#endif +#if defined(GST_IOS_PLUGIN_DVDLPCMDEC) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) + GST_PLUGIN_STATIC_REGISTER(dvdlpcmdec); +#endif +#if defined(GST_IOS_PLUGIN_XINGMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) + GST_PLUGIN_STATIC_REGISTER(xingmux); +#endif +#if defined(GST_IOS_PLUGIN_REALMEDIA) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) + GST_PLUGIN_STATIC_REGISTER(realmedia); +#endif +#if defined(GST_IOS_PLUGIN_X264) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) + GST_PLUGIN_STATIC_REGISTER(x264); +#endif +#if defined(GST_IOS_PLUGIN_LIBAV) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED) + GST_PLUGIN_STATIC_REGISTER(libav); +#endif +#if defined(GST_IOS_PLUGIN_RTMP) || defined(GST_IOS_PLUGINS_NET_RESTRICTED) + GST_PLUGIN_STATIC_REGISTER(rtmp); +#endif +#if defined(GST_IOS_PLUGIN_NLE) || defined(GST_IOS_PLUGINS_GES) + GST_PLUGIN_STATIC_REGISTER(nle); +#endif + + /* Lower the ranks of filesrc and giosrc so iosavassetsrc is + * tried first in gst_element_make_from_uri() for file:// */ + reg = gst_registry_get(); + plugin = gst_registry_lookup_feature(reg, "filesrc"); + if (plugin) + gst_plugin_feature_set_rank(plugin, GST_RANK_SECONDARY); + plugin = gst_registry_lookup_feature(reg, "giosrc"); + if (plugin) + gst_plugin_feature_set_rank(plugin, GST_RANK_SECONDARY-1); +} diff --git a/ios/flutter_gstreamer_player.podspec b/ios/flutter_gstreamer_player.podspec new file mode 100644 index 0000000..953cd40 --- /dev/null +++ b/ios/flutter_gstreamer_player.podspec @@ -0,0 +1,37 @@ +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. +# Run `pod lib lint flutter_gstreamer_player.podspec` to validate before publishing. +# +Pod::Spec.new do |s| + s.name = 'flutter_gstreamer_player' + s.version = '0.0.1' + s.summary = 'A new Flutter plugin project.' + s.description = <<-DESC +A new Flutter plugin project. + DESC + s.homepage = 'http://example.com' + s.license = { :file => '../LICENSE' } + s.author = { 'Your Company' => 'email@example.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.dependency 'Flutter' + s.platform = :ios, '9.0' + + # Flutter.framework does not contain a i386 slice. + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } + s.swift_version = '5.0' + + s.frameworks = 'CoreFoundation', 'Foundation', 'AVFoundation', 'CoreMedia', 'CoreVideo', 'CoreAudio', 'AudioToolbox', 'OpenGLES', 'AssetsLibrary', 'QuartzCore', 'AssetsLibrary', 'VideoToolBox', 'Metal', 'IOSurface' + s.vendored_frameworks = 'GStreamer.framework' + s.xcconfig = { + 'HEADER_SEARCH_PATHS' => [ + '"$(HOME)/Library/Developer/GStreamer/iPhone.sdk/GStreamer.framework/Headers"' + ], + 'FRAMEWORK_SEARCH_PATHS' => [ + '"$(HOME)/Library/Developer/GStreamer/iPhone.sdk"', + '"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Library/Frameworks"' + ], + 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES' + } + s.library = 'iconv', 'resolv', 'c++', '' +end diff --git a/lib/flutter_gstreamer_player.dart b/lib/flutter_gstreamer_player.dart index c462487..7e9a4a2 100644 --- a/lib/flutter_gstreamer_player.dart +++ b/lib/flutter_gstreamer_player.dart @@ -65,10 +65,29 @@ class _GstPlayerState extends State { @override Widget build(BuildContext context) { - return Container( - child: _controller.isInitialized - ? Texture(textureId: _controller.textureId) - : null, - ); + var currentPlatform = Theme.of(context).platform; + + switch (currentPlatform) { + case TargetPlatform.linux: + case TargetPlatform.android: + return Container( + child: _controller.isInitialized + ? Texture(textureId: _controller.textureId) + : null, + ); + break; + case TargetPlatform.iOS: + String viewType = _controller.textureId.toString(); + final Map creationParams = {}; + return UiKitView( + viewType: viewType, + layoutDirection: TextDirection.ltr, + creationParams: creationParams, + creationParamsCodec: const StandardMessageCodec(), + ); + break; + default: + throw UnsupportedError('Unsupported platform view'); + } } } diff --git a/pubspec.yaml b/pubspec.yaml index de81b85..c081b76 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_gstreamer_player -description: A GStreamer-powered alternative to Flutter's video_player that support Linux and Android. -version: 0.0.2 +description: A GStreamer-powered alternative to Flutter's video_player that support Linux, iOS and Android. +version: 0.0.3 homepage: https://github.com/hpdragon1618/flutter_gstreamer_player environment: @@ -32,6 +32,8 @@ flutter: android: package: com.hpdragon1618.flutter_gstreamer_player pluginClass: FlutterGstreamerPlayerPlugin + ios: + pluginClass: FlutterGstreamerPlayerPlugin # To add assets to your plugin package, add an assets section, like this: # assets: