diff --git a/.gitignore b/.gitignore index beccb97..a36762f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ limelight-common/ARM/ limelight-common/Debug/ +Build/ diff --git a/limelight-common.xcodeproj/project.pbxproj b/limelight-common.xcodeproj/project.pbxproj new file mode 100644 index 0000000..d4caafc --- /dev/null +++ b/limelight-common.xcodeproj/project.pbxproj @@ -0,0 +1,386 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + FB290E5A19B37A8B004C83CF /* AudioStream.c in Sources */ = {isa = PBXBuildFile; fileRef = FB290E3619B37A8B004C83CF /* AudioStream.c */; }; + FB290E5B19B37A8B004C83CF /* ByteBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = FB290E3719B37A8B004C83CF /* ByteBuffer.c */; }; + FB290E5C19B37A8B004C83CF /* ByteBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = FB290E3819B37A8B004C83CF /* ByteBuffer.h */; }; + FB290E5D19B37A8B004C83CF /* Connection.c in Sources */ = {isa = PBXBuildFile; fileRef = FB290E3919B37A8B004C83CF /* Connection.c */; }; + FB290E5E19B37A8B004C83CF /* ControlStream.c in Sources */ = {isa = PBXBuildFile; fileRef = FB290E3A19B37A8B004C83CF /* ControlStream.c */; }; + FB290E5F19B37A8B004C83CF /* Input.h in Headers */ = {isa = PBXBuildFile; fileRef = FB290E3B19B37A8B004C83CF /* Input.h */; }; + FB290E6019B37A8B004C83CF /* InputStream.c in Sources */ = {isa = PBXBuildFile; fileRef = FB290E3C19B37A8B004C83CF /* InputStream.c */; }; + FB290E6119B37A8B004C83CF /* Limelight-internal.h in Headers */ = {isa = PBXBuildFile; fileRef = FB290E3F19B37A8B004C83CF /* Limelight-internal.h */; }; + FB290E6219B37A8B004C83CF /* Limelight.h in Headers */ = {isa = PBXBuildFile; fileRef = FB290E4019B37A8B004C83CF /* Limelight.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FB290E6319B37A8B004C83CF /* LinkedBlockingQueue.c in Sources */ = {isa = PBXBuildFile; fileRef = FB290E4119B37A8B004C83CF /* LinkedBlockingQueue.c */; }; + FB290E6419B37A8B004C83CF /* LinkedBlockingQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = FB290E4219B37A8B004C83CF /* LinkedBlockingQueue.h */; }; + FB290E6519B37A8B004C83CF /* oaes_base64.c in Sources */ = {isa = PBXBuildFile; fileRef = FB290E4519B37A8B004C83CF /* oaes_base64.c */; }; + FB290E6619B37A8B004C83CF /* oaes_base64.h in Headers */ = {isa = PBXBuildFile; fileRef = FB290E4619B37A8B004C83CF /* oaes_base64.h */; }; + FB290E6719B37A8B004C83CF /* oaes_common.h in Headers */ = {isa = PBXBuildFile; fileRef = FB290E4719B37A8B004C83CF /* oaes_common.h */; }; + FB290E6819B37A8B004C83CF /* oaes_config.h in Headers */ = {isa = PBXBuildFile; fileRef = FB290E4819B37A8B004C83CF /* oaes_config.h */; }; + FB290E6919B37A8B004C83CF /* oaes_lib.c in Sources */ = {isa = PBXBuildFile; fileRef = FB290E4919B37A8B004C83CF /* oaes_lib.c */; }; + FB290E6A19B37A8B004C83CF /* oaes_lib.h in Headers */ = {isa = PBXBuildFile; fileRef = FB290E4A19B37A8B004C83CF /* oaes_lib.h */; }; + FB290E6B19B37A8B004C83CF /* Platform.h in Headers */ = {isa = PBXBuildFile; fileRef = FB290E4D19B37A8B004C83CF /* Platform.h */; }; + FB290E6C19B37A8B004C83CF /* PlatformSockets.c in Sources */ = {isa = PBXBuildFile; fileRef = FB290E4E19B37A8B004C83CF /* PlatformSockets.c */; }; + FB290E6D19B37A8B004C83CF /* PlatformSockets.h in Headers */ = {isa = PBXBuildFile; fileRef = FB290E4F19B37A8B004C83CF /* PlatformSockets.h */; }; + FB290E6E19B37A8B004C83CF /* PlatformThreads.c in Sources */ = {isa = PBXBuildFile; fileRef = FB290E5019B37A8B004C83CF /* PlatformThreads.c */; }; + FB290E6F19B37A8B004C83CF /* PlatformThreads.h in Headers */ = {isa = PBXBuildFile; fileRef = FB290E5119B37A8B004C83CF /* PlatformThreads.h */; }; + FB290E7019B37A8B004C83CF /* Rtsp.h in Headers */ = {isa = PBXBuildFile; fileRef = FB290E5219B37A8B004C83CF /* Rtsp.h */; }; + FB290E7119B37A8B004C83CF /* RtspConnection.c in Sources */ = {isa = PBXBuildFile; fileRef = FB290E5319B37A8B004C83CF /* RtspConnection.c */; }; + FB290E7219B37A8B004C83CF /* RtspParser.c in Sources */ = {isa = PBXBuildFile; fileRef = FB290E5419B37A8B004C83CF /* RtspParser.c */; }; + FB290E7319B37A8B004C83CF /* SdpGenerator.c in Sources */ = {isa = PBXBuildFile; fileRef = FB290E5519B37A8B004C83CF /* SdpGenerator.c */; }; + FB290E7419B37A8B004C83CF /* Video.h in Headers */ = {isa = PBXBuildFile; fileRef = FB290E5619B37A8B004C83CF /* Video.h */; }; + FB290E7519B37A8B004C83CF /* VideoDepacketizer.c in Sources */ = {isa = PBXBuildFile; fileRef = FB290E5719B37A8B004C83CF /* VideoDepacketizer.c */; }; + FB290E7619B37A8B004C83CF /* VideoStream.c in Sources */ = {isa = PBXBuildFile; fileRef = FB290E5819B37A8B004C83CF /* VideoStream.c */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + FB290E2E19B37A4E004C83CF /* liblimelight-common.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "liblimelight-common.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + FB290E3619B37A8B004C83CF /* AudioStream.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = AudioStream.c; sourceTree = ""; }; + FB290E3719B37A8B004C83CF /* ByteBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ByteBuffer.c; sourceTree = ""; }; + FB290E3819B37A8B004C83CF /* ByteBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ByteBuffer.h; sourceTree = ""; }; + FB290E3919B37A8B004C83CF /* Connection.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Connection.c; sourceTree = ""; }; + FB290E3A19B37A8B004C83CF /* ControlStream.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ControlStream.c; sourceTree = ""; }; + FB290E3B19B37A8B004C83CF /* Input.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Input.h; sourceTree = ""; }; + FB290E3C19B37A8B004C83CF /* InputStream.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = InputStream.c; sourceTree = ""; }; + FB290E3D19B37A8B004C83CF /* limelight-common.vcxproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "limelight-common.vcxproj"; sourceTree = ""; }; + FB290E3E19B37A8B004C83CF /* limelight-common.vcxproj.filters */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "limelight-common.vcxproj.filters"; sourceTree = ""; }; + FB290E3F19B37A8B004C83CF /* Limelight-internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Limelight-internal.h"; sourceTree = ""; }; + FB290E4019B37A8B004C83CF /* Limelight.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Limelight.h; sourceTree = ""; }; + FB290E4119B37A8B004C83CF /* LinkedBlockingQueue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = LinkedBlockingQueue.c; sourceTree = ""; }; + FB290E4219B37A8B004C83CF /* LinkedBlockingQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkedBlockingQueue.h; sourceTree = ""; }; + FB290E4419B37A8B004C83CF /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; + FB290E4519B37A8B004C83CF /* oaes_base64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = oaes_base64.c; sourceTree = ""; }; + FB290E4619B37A8B004C83CF /* oaes_base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oaes_base64.h; sourceTree = ""; }; + FB290E4719B37A8B004C83CF /* oaes_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oaes_common.h; sourceTree = ""; }; + FB290E4819B37A8B004C83CF /* oaes_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oaes_config.h; sourceTree = ""; }; + FB290E4919B37A8B004C83CF /* oaes_lib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = oaes_lib.c; sourceTree = ""; }; + FB290E4A19B37A8B004C83CF /* oaes_lib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oaes_lib.h; sourceTree = ""; }; + FB290E4B19B37A8B004C83CF /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; + FB290E4C19B37A8B004C83CF /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = ""; }; + FB290E4D19B37A8B004C83CF /* Platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Platform.h; sourceTree = ""; }; + FB290E4E19B37A8B004C83CF /* PlatformSockets.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = PlatformSockets.c; sourceTree = ""; }; + FB290E4F19B37A8B004C83CF /* PlatformSockets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformSockets.h; sourceTree = ""; }; + FB290E5019B37A8B004C83CF /* PlatformThreads.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = PlatformThreads.c; sourceTree = ""; }; + FB290E5119B37A8B004C83CF /* PlatformThreads.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformThreads.h; sourceTree = ""; }; + FB290E5219B37A8B004C83CF /* Rtsp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Rtsp.h; sourceTree = ""; }; + FB290E5319B37A8B004C83CF /* RtspConnection.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = RtspConnection.c; sourceTree = ""; }; + FB290E5419B37A8B004C83CF /* RtspParser.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = RtspParser.c; sourceTree = ""; }; + FB290E5519B37A8B004C83CF /* SdpGenerator.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SdpGenerator.c; sourceTree = ""; }; + FB290E5619B37A8B004C83CF /* Video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Video.h; sourceTree = ""; }; + FB290E5719B37A8B004C83CF /* VideoDepacketizer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = VideoDepacketizer.c; sourceTree = ""; }; + FB290E5819B37A8B004C83CF /* VideoStream.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = VideoStream.c; sourceTree = ""; }; + FB290E5919B37A8B004C83CF /* make_fat_lib.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = make_fat_lib.sh; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + FB290E2B19B37A4E004C83CF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + FB290E2519B37A4E004C83CF = { + isa = PBXGroup; + children = ( + FB290E3519B37A8B004C83CF /* limelight-common */, + FB290E5919B37A8B004C83CF /* make_fat_lib.sh */, + FB290E2F19B37A4E004C83CF /* Products */, + ); + sourceTree = ""; + }; + FB290E2F19B37A4E004C83CF /* Products */ = { + isa = PBXGroup; + children = ( + FB290E2E19B37A4E004C83CF /* liblimelight-common.a */, + ); + name = Products; + sourceTree = ""; + }; + FB290E3519B37A8B004C83CF /* limelight-common */ = { + isa = PBXGroup; + children = ( + FB290E3619B37A8B004C83CF /* AudioStream.c */, + FB290E3719B37A8B004C83CF /* ByteBuffer.c */, + FB290E3819B37A8B004C83CF /* ByteBuffer.h */, + FB290E3919B37A8B004C83CF /* Connection.c */, + FB290E3A19B37A8B004C83CF /* ControlStream.c */, + FB290E3B19B37A8B004C83CF /* Input.h */, + FB290E3C19B37A8B004C83CF /* InputStream.c */, + FB290E3D19B37A8B004C83CF /* limelight-common.vcxproj */, + FB290E3E19B37A8B004C83CF /* limelight-common.vcxproj.filters */, + FB290E3F19B37A8B004C83CF /* Limelight-internal.h */, + FB290E4019B37A8B004C83CF /* Limelight.h */, + FB290E4119B37A8B004C83CF /* LinkedBlockingQueue.c */, + FB290E4219B37A8B004C83CF /* LinkedBlockingQueue.h */, + FB290E4319B37A8B004C83CF /* OpenAES */, + FB290E4D19B37A8B004C83CF /* Platform.h */, + FB290E4E19B37A8B004C83CF /* PlatformSockets.c */, + FB290E4F19B37A8B004C83CF /* PlatformSockets.h */, + FB290E5019B37A8B004C83CF /* PlatformThreads.c */, + FB290E5119B37A8B004C83CF /* PlatformThreads.h */, + FB290E5219B37A8B004C83CF /* Rtsp.h */, + FB290E5319B37A8B004C83CF /* RtspConnection.c */, + FB290E5419B37A8B004C83CF /* RtspParser.c */, + FB290E5519B37A8B004C83CF /* SdpGenerator.c */, + FB290E5619B37A8B004C83CF /* Video.h */, + FB290E5719B37A8B004C83CF /* VideoDepacketizer.c */, + FB290E5819B37A8B004C83CF /* VideoStream.c */, + ); + path = "limelight-common"; + sourceTree = ""; + }; + FB290E4319B37A8B004C83CF /* OpenAES */ = { + isa = PBXGroup; + children = ( + FB290E4419B37A8B004C83CF /* LICENSE */, + FB290E4519B37A8B004C83CF /* oaes_base64.c */, + FB290E4619B37A8B004C83CF /* oaes_base64.h */, + FB290E4719B37A8B004C83CF /* oaes_common.h */, + FB290E4819B37A8B004C83CF /* oaes_config.h */, + FB290E4919B37A8B004C83CF /* oaes_lib.c */, + FB290E4A19B37A8B004C83CF /* oaes_lib.h */, + FB290E4B19B37A8B004C83CF /* README */, + FB290E4C19B37A8B004C83CF /* VERSION */, + ); + path = OpenAES; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + FB290E2C19B37A4E004C83CF /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + FB290E6219B37A8B004C83CF /* Limelight.h in Headers */, + FB290E7019B37A8B004C83CF /* Rtsp.h in Headers */, + FB290E6819B37A8B004C83CF /* oaes_config.h in Headers */, + FB290E6619B37A8B004C83CF /* oaes_base64.h in Headers */, + FB290E6F19B37A8B004C83CF /* PlatformThreads.h in Headers */, + FB290E5C19B37A8B004C83CF /* ByteBuffer.h in Headers */, + FB290E6719B37A8B004C83CF /* oaes_common.h in Headers */, + FB290E5F19B37A8B004C83CF /* Input.h in Headers */, + FB290E6A19B37A8B004C83CF /* oaes_lib.h in Headers */, + FB290E6119B37A8B004C83CF /* Limelight-internal.h in Headers */, + FB290E6419B37A8B004C83CF /* LinkedBlockingQueue.h in Headers */, + FB290E6B19B37A8B004C83CF /* Platform.h in Headers */, + FB290E7419B37A8B004C83CF /* Video.h in Headers */, + FB290E6D19B37A8B004C83CF /* PlatformSockets.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + FB290E2D19B37A4E004C83CF /* limelight-common */ = { + isa = PBXNativeTarget; + buildConfigurationList = FB290E3219B37A4E004C83CF /* Build configuration list for PBXNativeTarget "limelight-common" */; + buildPhases = ( + FB290E2A19B37A4E004C83CF /* Sources */, + FB290E2B19B37A4E004C83CF /* Frameworks */, + FB290E2C19B37A4E004C83CF /* Headers */, + FB290E7719B37ABD004C83CF /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "limelight-common"; + productName = "limelight-common"; + productReference = FB290E2E19B37A4E004C83CF /* liblimelight-common.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + FB290E2619B37A4E004C83CF /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0510; + ORGANIZATIONNAME = "Limelight Stream"; + }; + buildConfigurationList = FB290E2919B37A4E004C83CF /* Build configuration list for PBXProject "limelight-common" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = FB290E2519B37A4E004C83CF; + productRefGroup = FB290E2F19B37A4E004C83CF /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + FB290E2D19B37A4E004C83CF /* limelight-common */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXShellScriptBuildPhase section */ + FB290E7719B37ABD004C83CF /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "##########################################\n#\n# c.f. http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4\n#\n# Version 2.7\n#\n# Latest Change:\n# - Supports iPhone 5 / iPod Touch 5 (uses Apple's workaround to lipo bug)\n#\n# Purpose:\n# Automatically create a Universal static library for iPhone + iPad + iPhone Simulator from within XCode\n#\n# Author: Adam Martin - http://twitter.com/t_machine_org\n# Based on: original script from Eonil (main changes: Eonil's script WILL NOT WORK in Xcode GUI - it WILL CRASH YOUR COMPUTER)\n#\n\nset -e\nset -o pipefail\n\n#################[ Tests: helps workaround any future bugs in Xcode ]########\n#\nDEBUG_THIS_SCRIPT=\"false\"\n\nif [ $DEBUG_THIS_SCRIPT = \"true\" ]\nthen\necho \"########### TESTS #############\"\necho \"Use the following variables when debugging this script; note that they may change on recursions\"\necho \"BUILD_DIR = $BUILD_DIR\"\necho \"BUILD_ROOT = $BUILD_ROOT\"\necho \"CONFIGURATION_BUILD_DIR = $CONFIGURATION_BUILD_DIR\"\necho \"BUILT_PRODUCTS_DIR = $BUILT_PRODUCTS_DIR\"\necho \"CONFIGURATION_TEMP_DIR = $CONFIGURATION_TEMP_DIR\"\necho \"TARGET_BUILD_DIR = $TARGET_BUILD_DIR\"\nfi\n\n#####################[ part 1 ]##################\n# First, work out the BASESDK version number (NB: Apple ought to report this, but they hide it)\n# (incidental: searching for substrings in sh is a nightmare! Sob)\n\nSDK_VERSION=$(echo ${SDK_NAME} | grep -o '.\\{3\\}$')\n\n# Next, work out if we're in SIM or DEVICE\n\nif [ ${PLATFORM_NAME} = \"iphonesimulator\" ]\nthen\nOTHER_SDK_TO_BUILD=iphoneos${SDK_VERSION}\nelse\nOTHER_SDK_TO_BUILD=iphonesimulator${SDK_VERSION}\nfi\n\necho \"XCode has selected SDK: ${PLATFORM_NAME} with version: ${SDK_VERSION} (although back-targetting: ${IPHONEOS_DEPLOYMENT_TARGET})\"\necho \"...therefore, OTHER_SDK_TO_BUILD = ${OTHER_SDK_TO_BUILD}\"\n#\n#####################[ end of part 1 ]##################\n\n#####################[ part 2 ]##################\n#\n# IF this is the original invocation, invoke WHATEVER other builds are required\n#\n# Xcode is already building ONE target...\n#\n# ...but this is a LIBRARY, so Apple is wrong to set it to build just one.\n# ...we need to build ALL targets\n# ...we MUST NOT re-build the target that is ALREADY being built: Xcode WILL CRASH YOUR COMPUTER if you try this (infinite recursion!)\n#\n#\n# So: build ONLY the missing platforms/configurations.\n\nif [ \"true\" == ${ALREADYINVOKED:-false} ]\nthen\necho \"RECURSION: I am NOT the root invocation, so I'm NOT going to recurse\"\nelse\n# CRITICAL:\n# Prevent infinite recursion (Xcode sucks)\nexport ALREADYINVOKED=\"true\"\n\necho \"RECURSION: I am the root ... recursing all missing build targets NOW...\"\necho \"RECURSION: ...about to invoke: xcodebuild -configuration \\\"${CONFIGURATION}\\\" -project \\\"${PROJECT_NAME}.xcodeproj\\\" -target \\\"${TARGET_NAME}\\\" -sdk \\\"${OTHER_SDK_TO_BUILD}\\\" ${ACTION} RUN_CLANG_STATIC_ANALYZER=NO\" BUILD_DIR=\\\"${BUILD_DIR}\\\" BUILD_ROOT=\\\"${BUILD_ROOT}\\\" SYMROOT=\\\"${SYMROOT}\\\"\n\nxcodebuild -configuration \"${CONFIGURATION}\" -project \"${PROJECT_NAME}.xcodeproj\" -target \"${TARGET_NAME}\" -sdk \"${OTHER_SDK_TO_BUILD}\" ${ACTION} RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR=\"${BUILD_DIR}\" BUILD_ROOT=\"${BUILD_ROOT}\" SYMROOT=\"${SYMROOT}\"\n\nACTION=\"build\"\n\n#Merge all platform binaries as a fat binary for each configurations.\n\n# Calculate where the (multiple) built files are coming from:\nCURRENTCONFIG_DEVICE_DIR=${SYMROOT}/${CONFIGURATION}-iphoneos\nCURRENTCONFIG_SIMULATOR_DIR=${SYMROOT}/${CONFIGURATION}-iphonesimulator\n\necho \"Taking device build from: ${CURRENTCONFIG_DEVICE_DIR}\"\necho \"Taking simulator build from: ${CURRENTCONFIG_SIMULATOR_DIR}\"\n\nCREATING_UNIVERSAL_DIR=${SYMROOT}/${CONFIGURATION}-universal\necho \"...I will output a universal build to: ${CREATING_UNIVERSAL_DIR}\"\n\n# ... remove the products of previous runs of this script\n# NB: this directory is ONLY created by this script - it should be safe to delete!\n\nrm -rf \"${CREATING_UNIVERSAL_DIR}\"\nmkdir \"${CREATING_UNIVERSAL_DIR}\"\n\n#\necho \"lipo: for current configuration (${CONFIGURATION}) creating output file: ${CREATING_UNIVERSAL_DIR}/${EXECUTABLE_NAME}\"\nxcrun -sdk iphoneos lipo -create -output \"${CREATING_UNIVERSAL_DIR}/${EXECUTABLE_NAME}\" \"${CURRENTCONFIG_DEVICE_DIR}/${EXECUTABLE_NAME}\" \"${CURRENTCONFIG_SIMULATOR_DIR}/${EXECUTABLE_NAME}\"\n\n#########\n#\n# Added: StackOverflow suggestion to also copy \"include\" files\n# (untested, but should work OK)\n#\necho \"Fetching headers from ${PUBLIC_HEADERS_FOLDER_PATH}\"\necho \" (if you embed your library project in another project, you will need to add\"\necho \" a \"User Search Headers\" build setting of: (NB INCLUDE THE DOUBLE QUOTES BELOW!)\"\necho ' \"$(TARGET_BUILD_DIR)/usr/local/include/\"'\nif [ -d \"${CURRENTCONFIG_DEVICE_DIR}${PUBLIC_HEADERS_FOLDER_PATH}\" ]\nthen\nmkdir -p \"${CREATING_UNIVERSAL_DIR}${PUBLIC_HEADERS_FOLDER_PATH}\"\n# * needs to be outside the double quotes?\ncp -r \"${CURRENTCONFIG_DEVICE_DIR}${PUBLIC_HEADERS_FOLDER_PATH}\"* \"${CREATING_UNIVERSAL_DIR}${PUBLIC_HEADERS_FOLDER_PATH}\"\nfi\nfi"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + FB290E2A19B37A4E004C83CF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + FB290E6E19B37A8B004C83CF /* PlatformThreads.c in Sources */, + FB290E5D19B37A8B004C83CF /* Connection.c in Sources */, + FB290E6919B37A8B004C83CF /* oaes_lib.c in Sources */, + FB290E7219B37A8B004C83CF /* RtspParser.c in Sources */, + FB290E6C19B37A8B004C83CF /* PlatformSockets.c in Sources */, + FB290E6519B37A8B004C83CF /* oaes_base64.c in Sources */, + FB290E6319B37A8B004C83CF /* LinkedBlockingQueue.c in Sources */, + FB290E7619B37A8B004C83CF /* VideoStream.c in Sources */, + FB290E5E19B37A8B004C83CF /* ControlStream.c in Sources */, + FB290E7519B37A8B004C83CF /* VideoDepacketizer.c in Sources */, + FB290E7119B37A8B004C83CF /* RtspConnection.c in Sources */, + FB290E7319B37A8B004C83CF /* SdpGenerator.c in Sources */, + FB290E6019B37A8B004C83CF /* InputStream.c in Sources */, + FB290E5A19B37A8B004C83CF /* AudioStream.c in Sources */, + FB290E5B19B37A8B004C83CF /* ByteBuffer.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + FB290E3019B37A4E004C83CF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + 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; + MACOSX_DEPLOYMENT_TARGET = 10.10; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + FB290E3119B37A4E004C83CF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = 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; + MACOSX_DEPLOYMENT_TARGET = 10.10; + SDKROOT = macosx; + }; + name = Release; + }; + FB290E3319B37A4E004C83CF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + EXECUTABLE_PREFIX = lib; + ONLY_ACTIVE_ARCH = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; + }; + name = Debug; + }; + FB290E3419B37A4E004C83CF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + EXECUTABLE_PREFIX = lib; + ONLY_ACTIVE_ARCH = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + FB290E2919B37A4E004C83CF /* Build configuration list for PBXProject "limelight-common" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FB290E3019B37A4E004C83CF /* Debug */, + FB290E3119B37A4E004C83CF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + FB290E3219B37A4E004C83CF /* Build configuration list for PBXNativeTarget "limelight-common" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FB290E3319B37A4E004C83CF /* Debug */, + FB290E3419B37A4E004C83CF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = FB290E2619B37A4E004C83CF /* Project object */; +} diff --git a/limelight-common.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/limelight-common.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..4d53b1b --- /dev/null +++ b/limelight-common.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/limelight-common.xcodeproj/project.xcworkspace/xcshareddata/limelight-common.xccheckout b/limelight-common.xcodeproj/project.xcworkspace/xcshareddata/limelight-common.xccheckout new file mode 100644 index 0000000..f13cb96 --- /dev/null +++ b/limelight-common.xcodeproj/project.xcworkspace/xcshareddata/limelight-common.xccheckout @@ -0,0 +1,41 @@ + + + + + IDESourceControlProjectFavoriteDictionaryKey + + IDESourceControlProjectIdentifier + 662F3EBE-A540-4F33-A434-3BBB22ECCB12 + IDESourceControlProjectName + limelight-common + IDESourceControlProjectOriginsDictionary + + 151E8452-E928-4FE9-BF31-5F5C490B9DD4 + ssh://github.com/limelight-stream/limelight-common-c.git + + IDESourceControlProjectPath + limelight-common.xcodeproj/project.xcworkspace + IDESourceControlProjectRelativeInstallPathDictionary + + 151E8452-E928-4FE9-BF31-5F5C490B9DD4 + ../.. + + IDESourceControlProjectURL + ssh://github.com/limelight-stream/limelight-common-c.git + IDESourceControlProjectVersion + 110 + IDESourceControlProjectWCCIdentifier + 151E8452-E928-4FE9-BF31-5F5C490B9DD4 + IDESourceControlProjectWCConfigurations + + + IDESourceControlRepositoryExtensionIdentifierKey + public.vcs.git + IDESourceControlWCCIdentifierKey + 151E8452-E928-4FE9-BF31-5F5C490B9DD4 + IDESourceControlWCCName + limelight-common-c + + + + diff --git a/limelight-common.xcodeproj/project.xcworkspace/xcuserdata/diegowaxemberg.xcuserdatad/UserInterfaceState.xcuserstate b/limelight-common.xcodeproj/project.xcworkspace/xcuserdata/diegowaxemberg.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..c7029e2 Binary files /dev/null and b/limelight-common.xcodeproj/project.xcworkspace/xcuserdata/diegowaxemberg.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/limelight-common.xcodeproj/xcuserdata/diegowaxemberg.xcuserdatad/xcschemes/limelight-common.xcscheme b/limelight-common.xcodeproj/xcuserdata/diegowaxemberg.xcuserdatad/xcschemes/limelight-common.xcscheme new file mode 100644 index 0000000..bd19f88 --- /dev/null +++ b/limelight-common.xcodeproj/xcuserdata/diegowaxemberg.xcuserdatad/xcschemes/limelight-common.xcscheme @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/limelight-common.xcodeproj/xcuserdata/diegowaxemberg.xcuserdatad/xcschemes/xcschememanagement.plist b/limelight-common.xcodeproj/xcuserdata/diegowaxemberg.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..db7d387 --- /dev/null +++ b/limelight-common.xcodeproj/xcuserdata/diegowaxemberg.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + limelight-common.xcscheme + + orderHint + 1 + + + SuppressBuildableAutocreation + + FB290E2D19B37A4E004C83CF + + primary + + + + + diff --git a/limelight-common/InputStream.c b/limelight-common/InputStream.c index 99ea77f..59eec05 100644 --- a/limelight-common/InputStream.c +++ b/limelight-common/InputStream.c @@ -4,8 +4,8 @@ #include "LinkedBlockingQueue.h" #include "Input.h" -#include "OpenAES\oaes_lib.h" -#include "OpenAES\oaes_common.h" +#include "OpenAES/oaes_lib.h" +#include "OpenAES/oaes_common.h" static IP_ADDRESS host; static SOCKET inputSock = INVALID_SOCKET; diff --git a/limelight-common/RtspConnection.c b/limelight-common/RtspConnection.c index 2227750..17e6138 100644 --- a/limelight-common/RtspConnection.c +++ b/limelight-common/RtspConnection.c @@ -1,5 +1,6 @@ #include "Limelight-internal.h" #include "Rtsp.h" +#include #define RTSP_MAX_RESP_SIZE 16384 @@ -250,7 +251,7 @@ static int sendVideoAnnounce(PRTSP_MESSAGE response, PSTREAM_CONFIGURATION strea goto FreeMessage; } - sdpAddr.S_un.S_addr = remoteAddr; + memcpy(&sdpAddr, &remoteAddr, sizeof(remoteAddr)); request.payload = getSdpPayloadForStreamConfig(streamConfig, sdpAddr, &payloadLength); if (request.payload == NULL) { goto FreeMessage; @@ -278,7 +279,7 @@ int performRtspHandshake(IP_ADDRESS addr, PSTREAM_CONFIGURATION streamConfigPtr) // Initialize global state remoteAddr = addr; - inaddr.S_un.S_addr = addr; + memcpy(&inaddr, &addr, sizeof(addr)); sprintf(rtspTargetUrl, "rtsp://%s", inet_ntoa(inaddr)); { diff --git a/limelight-common/SdpGenerator.c b/limelight-common/SdpGenerator.c index af93517..854390f 100644 --- a/limelight-common/SdpGenerator.c +++ b/limelight-common/SdpGenerator.c @@ -1,4 +1,5 @@ #include "Limelight-internal.h" +#include #define MAX_OPTION_NAME_LEN 128 diff --git a/make_fat_lib.sh b/make_fat_lib.sh new file mode 100755 index 0000000..b5b7ec8 --- /dev/null +++ b/make_fat_lib.sh @@ -0,0 +1,122 @@ +########################################## +# +# c.f. http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4 +# +# Version 2.7 +# +# Latest Change: +# - Supports iPhone 5 / iPod Touch 5 (uses Apple's workaround to lipo bug) +# +# Purpose: +# Automatically create a Universal static library for iPhone + iPad + iPhone Simulator from within XCode +# +# Author: Adam Martin - http://twitter.com/t_machine_org +# Based on: original script from Eonil (main changes: Eonil's script WILL NOT WORK in Xcode GUI - it WILL CRASH YOUR COMPUTER) +# + +set -e +set -o pipefail + +#################[ Tests: helps workaround any future bugs in Xcode ]######## +# +DEBUG_THIS_SCRIPT="false" + +if [ $DEBUG_THIS_SCRIPT = "true" ] +then +echo "########### TESTS #############" +echo "Use the following variables when debugging this script; note that they may change on recursions" +echo "BUILD_DIR = $BUILD_DIR" +echo "BUILD_ROOT = $BUILD_ROOT" +echo "CONFIGURATION_BUILD_DIR = $CONFIGURATION_BUILD_DIR" +echo "BUILT_PRODUCTS_DIR = $BUILT_PRODUCTS_DIR" +echo "CONFIGURATION_TEMP_DIR = $CONFIGURATION_TEMP_DIR" +echo "TARGET_BUILD_DIR = $TARGET_BUILD_DIR" +fi + +#####################[ part 1 ]################## +# First, work out the BASESDK version number (NB: Apple ought to report this, but they hide it) +# (incidental: searching for substrings in sh is a nightmare! Sob) + +SDK_VERSION=$(echo ${SDK_NAME} | grep -o '.\{3\}$') + +# Next, work out if we're in SIM or DEVICE + +if [ ${PLATFORM_NAME} = "iphonesimulator" ] +then +OTHER_SDK_TO_BUILD=iphoneos${SDK_VERSION} +else +OTHER_SDK_TO_BUILD=iphonesimulator${SDK_VERSION} +fi + +echo "XCode has selected SDK: ${PLATFORM_NAME} with version: ${SDK_VERSION} (although back-targetting: ${IPHONEOS_DEPLOYMENT_TARGET})" +echo "...therefore, OTHER_SDK_TO_BUILD = ${OTHER_SDK_TO_BUILD}" +# +#####################[ end of part 1 ]################## + +#####################[ part 2 ]################## +# +# IF this is the original invocation, invoke WHATEVER other builds are required +# +# Xcode is already building ONE target... +# +# ...but this is a LIBRARY, so Apple is wrong to set it to build just one. +# ...we need to build ALL targets +# ...we MUST NOT re-build the target that is ALREADY being built: Xcode WILL CRASH YOUR COMPUTER if you try this (infinite recursion!) +# +# +# So: build ONLY the missing platforms/configurations. + +if [ "true" == ${ALREADYINVOKED:-false} ] +then +echo "RECURSION: I am NOT the root invocation, so I'm NOT going to recurse" +else +# CRITICAL: +# Prevent infinite recursion (Xcode sucks) +export ALREADYINVOKED="true" + +echo "RECURSION: I am the root ... recursing all missing build targets NOW..." +echo "RECURSION: ...about to invoke: xcodebuild -configuration \"${CONFIGURATION}\" -project \"${PROJECT_NAME}.xcodeproj\" -target \"${TARGET_NAME}\" -sdk \"${OTHER_SDK_TO_BUILD}\" ${ACTION} RUN_CLANG_STATIC_ANALYZER=NO" BUILD_DIR=\"${BUILD_DIR}\" BUILD_ROOT=\"${BUILD_ROOT}\" SYMROOT=\"${SYMROOT}\" + +xcodebuild -configuration "${CONFIGURATION}" -project "${PROJECT_NAME}.xcodeproj" -target "${TARGET_NAME}" -sdk "${OTHER_SDK_TO_BUILD}" ${ACTION} RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" SYMROOT="${SYMROOT}" + +ACTION="build" + +#Merge all platform binaries as a fat binary for each configurations. + +# Calculate where the (multiple) built files are coming from: +CURRENTCONFIG_DEVICE_DIR=${SYMROOT}/${CONFIGURATION}-iphoneos +CURRENTCONFIG_SIMULATOR_DIR=${SYMROOT}/${CONFIGURATION}-iphonesimulator + +echo "Taking device build from: ${CURRENTCONFIG_DEVICE_DIR}" +echo "Taking simulator build from: ${CURRENTCONFIG_SIMULATOR_DIR}" + +CREATING_UNIVERSAL_DIR=${SYMROOT}/${CONFIGURATION}-universal +echo "...I will output a universal build to: ${CREATING_UNIVERSAL_DIR}" + +# ... remove the products of previous runs of this script +# NB: this directory is ONLY created by this script - it should be safe to delete! + +rm -rf "${CREATING_UNIVERSAL_DIR}" +mkdir "${CREATING_UNIVERSAL_DIR}" + +# +echo "lipo: for current configuration (${CONFIGURATION}) creating output file: ${CREATING_UNIVERSAL_DIR}/${EXECUTABLE_NAME}" +xcrun -sdk iphoneos lipo -create -output "${CREATING_UNIVERSAL_DIR}/${EXECUTABLE_NAME}" "${CURRENTCONFIG_DEVICE_DIR}/${EXECUTABLE_NAME}" "${CURRENTCONFIG_SIMULATOR_DIR}/${EXECUTABLE_NAME}" + +######### +# +# Added: StackOverflow suggestion to also copy "include" files +# (untested, but should work OK) +# +echo "Fetching headers from ${PUBLIC_HEADERS_FOLDER_PATH}" +echo " (if you embed your library project in another project, you will need to add" +echo " a "User Search Headers" build setting of: (NB INCLUDE THE DOUBLE QUOTES BELOW!)" +echo ' "$(TARGET_BUILD_DIR)/usr/local/include/"' +if [ -d "${CURRENTCONFIG_DEVICE_DIR}${PUBLIC_HEADERS_FOLDER_PATH}" ] +then +mkdir -p "${CREATING_UNIVERSAL_DIR}${PUBLIC_HEADERS_FOLDER_PATH}" +# * needs to be outside the double quotes? +cp -r "${CURRENTCONFIG_DEVICE_DIR}${PUBLIC_HEADERS_FOLDER_PATH}"* "${CREATING_UNIVERSAL_DIR}${PUBLIC_HEADERS_FOLDER_PATH}" +fi +fi +open "${CREATING_UNIVERSAL_DIR}" \ No newline at end of file