diff --git a/Limelight-iOS.xcodeproj/project.pbxproj b/Limelight-iOS.xcodeproj/project.pbxproj index f360b37..8dc03be 100644 --- a/Limelight-iOS.xcodeproj/project.pbxproj +++ b/Limelight-iOS.xcodeproj/project.pbxproj @@ -7,9 +7,19 @@ objects = { /* Begin PBXBuildFile section */ + FB4E9460188BB80700CCC583 /* Connection.m in Sources */ = {isa = PBXBuildFile; fileRef = FB4E945F188BB80700CCC583 /* Connection.m */; }; + FB4E948B188BCC2900CCC583 /* VideoRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = FB4E948A188BCC2900CCC583 /* VideoRenderer.m */; }; + FB4E949D188BF49B00CCC583 /* ByteBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = FB4E948D188BF49B00CCC583 /* ByteBuffer.c */; }; + FB4E949E188BF49B00CCC583 /* Config.c in Sources */ = {isa = PBXBuildFile; fileRef = FB4E948F188BF49B00CCC583 /* Config.c */; }; + FB4E949F188BF49B00CCC583 /* ControlStream.c in Sources */ = {isa = PBXBuildFile; fileRef = FB4E9490188BF49B00CCC583 /* ControlStream.c */; }; + FB4E94A0188BF49B00CCC583 /* Handshake.c in Sources */ = {isa = PBXBuildFile; fileRef = FB4E9491188BF49B00CCC583 /* Handshake.c */; }; + FB4E94A1188BF49B00CCC583 /* LinkedBlockingQueue.c in Sources */ = {isa = PBXBuildFile; fileRef = FB4E9493188BF49B00CCC583 /* LinkedBlockingQueue.c */; }; + FB4E94A2188BF49B00CCC583 /* PlatformSockets.c in Sources */ = {isa = PBXBuildFile; fileRef = FB4E9496188BF49B00CCC583 /* PlatformSockets.c */; }; + FB4E94A3188BF49B00CCC583 /* PlatformThreads.c in Sources */ = {isa = PBXBuildFile; fileRef = FB4E9498188BF49B00CCC583 /* PlatformThreads.c */; }; + FB4E94A4188BF49B00CCC583 /* VideoDepacketizer.c in Sources */ = {isa = PBXBuildFile; fileRef = FB4E949B188BF49B00CCC583 /* VideoDepacketizer.c */; }; + FB4E94A5188BF49B00CCC583 /* VideoStream.c in Sources */ = {isa = PBXBuildFile; fileRef = FB4E949C188BF49B00CCC583 /* VideoStream.c */; }; FBBC53A5188ACD01004D2BA0 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = FBBC53A4188ACD01004D2BA0 /* libz.dylib */; }; FBBC53A8188AD1D3004D2BA0 /* StreamFrameViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FBBC53A7188AD1D3004D2BA0 /* StreamFrameViewController.m */; }; - FBBC53AB188AD48D004D2BA0 /* VideoRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = FBBC53AA188AD48D004D2BA0 /* VideoRenderer.m */; }; FBBC53AE188AE27D004D2BA0 /* StreamView.m in Sources */ = {isa = PBXBuildFile; fileRef = FBBC53AD188AE27D004D2BA0 /* StreamView.m */; }; FBBC53E4188BA7C7004D2BA0 /* libopus.la in Resources */ = {isa = PBXBuildFile; fileRef = FBBC53D4188BA7C7004D2BA0 /* libopus.la */; }; FBBC53E5188BA7C7004D2BA0 /* opus.pc in Resources */ = {isa = PBXBuildFile; fileRef = FBBC53D6188BA7C7004D2BA0 /* opus.pc */; }; @@ -972,6 +982,30 @@ FB272BC4188A93370093CCC9 /* VideoDepacketizer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VideoDepacketizer.m; sourceTree = ""; }; FB272BC5188A93370093CCC9 /* VideoDecoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VideoDecoder.h; sourceTree = ""; }; FB272BC6188A93370093CCC9 /* VideoDecoder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VideoDecoder.m; sourceTree = ""; }; + FB4E945C188BB6FA00CCC583 /* liblimelight-common.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "liblimelight-common.a"; path = "../../../Library/Developer/Xcode/DerivedData/limelight-common-c-cfonfottpvhxxcgrusjsydwkdaco/Build/Products/Debug-iphoneos/liblimelight-common.a"; sourceTree = ""; }; + FB4E945E188BB80700CCC583 /* Connection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Connection.h; sourceTree = ""; }; + FB4E945F188BB80700CCC583 /* Connection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Connection.m; sourceTree = ""; }; + FB4E9461188BC09600CCC583 /* liblimelight-common.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "liblimelight-common.a"; path = "../../../Library/Developer/Xcode/DerivedData/limelight-common-c-cfonfottpvhxxcgrusjsydwkdaco/Build/Intermediates/limelight-common-c.build/Debug-iphoneos/limelight-common.build/Objects-normal/armv7/liblimelight-common.a"; sourceTree = ""; }; + FB4E9486188BC39600CCC583 /* liblimelight-common.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "liblimelight-common.a"; sourceTree = ""; }; + FB4E9487188BC39600CCC583 /* liblimelight-common.a.dSYM */ = {isa = PBXFileReference; lastKnownFileType = wrapper.dsym; path = "liblimelight-common.a.dSYM"; sourceTree = ""; }; + FB4E9489188BCC2900CCC583 /* VideoRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoRenderer.h; sourceTree = ""; }; + FB4E948A188BCC2900CCC583 /* VideoRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VideoRenderer.m; sourceTree = ""; }; + FB4E948D188BF49B00CCC583 /* ByteBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ByteBuffer.c; path = "../limelight-common-c/limelight-common/ByteBuffer.c"; sourceTree = ""; }; + FB4E948E188BF49B00CCC583 /* ByteBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ByteBuffer.h; path = "../limelight-common-c/limelight-common/ByteBuffer.h"; sourceTree = ""; }; + FB4E948F188BF49B00CCC583 /* Config.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Config.c; path = "../limelight-common-c/limelight-common/Config.c"; sourceTree = ""; }; + FB4E9490188BF49B00CCC583 /* ControlStream.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ControlStream.c; path = "../limelight-common-c/limelight-common/ControlStream.c"; sourceTree = ""; }; + FB4E9491188BF49B00CCC583 /* Handshake.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Handshake.c; path = "../limelight-common-c/limelight-common/Handshake.c"; sourceTree = ""; }; + FB4E9492188BF49B00CCC583 /* Limelight.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Limelight.h; path = "../limelight-common-c/limelight-common/Limelight.h"; sourceTree = ""; }; + FB4E9493188BF49B00CCC583 /* LinkedBlockingQueue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = LinkedBlockingQueue.c; path = "../limelight-common-c/limelight-common/LinkedBlockingQueue.c"; sourceTree = ""; }; + FB4E9494188BF49B00CCC583 /* LinkedBlockingQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LinkedBlockingQueue.h; path = "../limelight-common-c/limelight-common/LinkedBlockingQueue.h"; sourceTree = ""; }; + FB4E9495188BF49B00CCC583 /* Platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Platform.h; path = "../limelight-common-c/limelight-common/Platform.h"; sourceTree = ""; }; + FB4E9496188BF49B00CCC583 /* PlatformSockets.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = PlatformSockets.c; path = "../limelight-common-c/limelight-common/PlatformSockets.c"; sourceTree = ""; }; + FB4E9497188BF49B00CCC583 /* PlatformSockets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatformSockets.h; path = "../limelight-common-c/limelight-common/PlatformSockets.h"; sourceTree = ""; }; + FB4E9498188BF49B00CCC583 /* PlatformThreads.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = PlatformThreads.c; path = "../limelight-common-c/limelight-common/PlatformThreads.c"; sourceTree = ""; }; + FB4E9499188BF49B00CCC583 /* PlatformThreads.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatformThreads.h; path = "../limelight-common-c/limelight-common/PlatformThreads.h"; sourceTree = ""; }; + FB4E949A188BF49B00CCC583 /* Video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Video.h; path = "../limelight-common-c/limelight-common/Video.h"; sourceTree = ""; }; + FB4E949B188BF49B00CCC583 /* VideoDepacketizer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = VideoDepacketizer.c; path = "../limelight-common-c/limelight-common/VideoDepacketizer.c"; sourceTree = ""; }; + FB4E949C188BF49B00CCC583 /* VideoStream.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = VideoStream.c; path = "../limelight-common-c/limelight-common/VideoStream.c"; sourceTree = ""; }; FBBC52C9188ACA92004D2BA0 /* avcodec.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = avcodec.h; sourceTree = ""; }; FBBC52CA188ACA92004D2BA0 /* avfft.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = avfft.h; sourceTree = ""; }; FBBC52CB188ACA92004D2BA0 /* dxva2.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = dxva2.h; sourceTree = ""; }; @@ -1165,8 +1199,6 @@ FBBC53A4188ACD01004D2BA0 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; FBBC53A6188AD1D3004D2BA0 /* StreamFrameViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StreamFrameViewController.h; sourceTree = ""; }; FBBC53A7188AD1D3004D2BA0 /* StreamFrameViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StreamFrameViewController.m; sourceTree = ""; }; - FBBC53A9188AD48D004D2BA0 /* VideoRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VideoRenderer.h; path = Video/VideoRenderer.h; sourceTree = ""; }; - FBBC53AA188AD48D004D2BA0 /* VideoRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VideoRenderer.m; path = Video/VideoRenderer.m; sourceTree = ""; }; FBBC53AC188AE27D004D2BA0 /* StreamView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StreamView.h; sourceTree = ""; }; FBBC53AD188AE27D004D2BA0 /* StreamView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StreamView.m; sourceTree = ""; }; FBBC53CE188BA7C7004D2BA0 /* opus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = opus.h; sourceTree = ""; }; @@ -3486,6 +3518,39 @@ path = Video; sourceTree = ""; }; + FB4E9485188BC39600CCC583 /* Debug-iphoneos */ = { + isa = PBXGroup; + children = ( + FB4E9486188BC39600CCC583 /* liblimelight-common.a */, + FB4E9487188BC39600CCC583 /* liblimelight-common.a.dSYM */, + ); + name = "Debug-iphoneos"; + path = "../../../Library/Developer/Xcode/DerivedData/limelight-common-c-cfonfottpvhxxcgrusjsydwkdaco/Build/Products/Debug-iphoneos"; + sourceTree = ""; + }; + FB4E948C188BF48300CCC583 /* Limelight-Common */ = { + isa = PBXGroup; + children = ( + FB4E948D188BF49B00CCC583 /* ByteBuffer.c */, + FB4E948E188BF49B00CCC583 /* ByteBuffer.h */, + FB4E948F188BF49B00CCC583 /* Config.c */, + FB4E9490188BF49B00CCC583 /* ControlStream.c */, + FB4E9491188BF49B00CCC583 /* Handshake.c */, + FB4E9492188BF49B00CCC583 /* Limelight.h */, + FB4E9493188BF49B00CCC583 /* LinkedBlockingQueue.c */, + FB4E9494188BF49B00CCC583 /* LinkedBlockingQueue.h */, + FB4E9495188BF49B00CCC583 /* Platform.h */, + FB4E949B188BF49B00CCC583 /* VideoDepacketizer.c */, + FB4E9496188BF49B00CCC583 /* PlatformSockets.c */, + FB4E9497188BF49B00CCC583 /* PlatformSockets.h */, + FB4E9498188BF49B00CCC583 /* PlatformThreads.c */, + FB4E9499188BF49B00CCC583 /* PlatformThreads.h */, + FB4E949A188BF49B00CCC583 /* Video.h */, + FB4E949C188BF49B00CCC583 /* VideoStream.c */, + ); + name = "Limelight-Common"; + sourceTree = ""; + }; FBBC52C6188ACA92004D2BA0 /* armv7s */ = { isa = PBXGroup; children = ( @@ -3987,6 +4052,10 @@ FBC18B2E188A4E0500D5D34E /* VideoDepacketizer.m */, FBC18B30188A5A1100D5D34E /* VideoDecoder.h */, FBC18B31188A5A1100D5D34E /* VideoDecoder.m */, + FB4E945E188BB80700CCC583 /* Connection.h */, + FB4E945F188BB80700CCC583 /* Connection.m */, + FB4E9489188BCC2900CCC583 /* VideoRenderer.h */, + FB4E948A188BCC2900CCC583 /* VideoRenderer.m */, ); name = Video; sourceTree = ""; @@ -3994,6 +4063,7 @@ FBF6AE68188A274100B50578 = { isa = PBXGroup; children = ( + FB4E948C188BF48300CCC583 /* Limelight-Common */, FBF6AE7C188A274100B50578 /* Limelight-iOS */, FBF6AE99188A274100B50578 /* Limelight-iOSTests */, FBF6AE73188A274100B50578 /* Frameworks */, @@ -4013,6 +4083,9 @@ FBF6AE73188A274100B50578 /* Frameworks */ = { isa = PBXGroup; children = ( + FB4E9485188BC39600CCC583 /* Debug-iphoneos */, + FB4E9461188BC09600CCC583 /* liblimelight-common.a */, + FB4E945C188BB6FA00CCC583 /* liblimelight-common.a */, FBBC53E9188BA7FC004D2BA0 /* libavcodec.a */, FBBC53EA188BA7FC004D2BA0 /* libavdevice.a */, FBBC53EB188BA7FC004D2BA0 /* libavfilter.a */, @@ -4058,8 +4131,6 @@ FBC18B2A188A3B9100D5D34E /* MainFrameViewController.m */, FBBC53A6188AD1D3004D2BA0 /* StreamFrameViewController.h */, FBBC53A7188AD1D3004D2BA0 /* StreamFrameViewController.m */, - FBBC53A9188AD48D004D2BA0 /* VideoRenderer.h */, - FBBC53AA188AD48D004D2BA0 /* VideoRenderer.m */, FBBC53AC188AE27D004D2BA0 /* StreamView.h */, FBBC53AD188AE27D004D2BA0 /* StreamView.m */, ); @@ -4104,8 +4175,8 @@ buildConfigurationList = FBF6AEA3188A274100B50578 /* Build configuration list for PBXNativeTarget "Limelight-iOS" */; buildPhases = ( FBF6AE6D188A274100B50578 /* Sources */, - FBF6AE6E188A274100B50578 /* Frameworks */, FBF6AE6F188A274100B50578 /* Resources */, + FBF6AE6E188A274100B50578 /* Frameworks */, ); buildRules = ( ); @@ -4199,7 +4270,16 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - FBBC53AB188AD48D004D2BA0 /* VideoRenderer.m in Sources */, + FB4E94A4188BF49B00CCC583 /* VideoDepacketizer.c in Sources */, + FB4E94A0188BF49B00CCC583 /* Handshake.c in Sources */, + FB4E94A5188BF49B00CCC583 /* VideoStream.c in Sources */, + FB4E94A2188BF49B00CCC583 /* PlatformSockets.c in Sources */, + FB4E949F188BF49B00CCC583 /* ControlStream.c in Sources */, + FB4E94A1188BF49B00CCC583 /* LinkedBlockingQueue.c in Sources */, + FB4E949D188BF49B00CCC583 /* ByteBuffer.c in Sources */, + FB4E94A3188BF49B00CCC583 /* PlatformThreads.c in Sources */, + FB4E949E188BF49B00CCC583 /* Config.c in Sources */, + FB4E948B188BCC2900CCC583 /* VideoRenderer.m in Sources */, FBC18B2F188A4E0500D5D34E /* VideoDepacketizer.m in Sources */, FBF6AE87188A274100B50578 /* AppDelegate.m in Sources */, FBBC53A8188AD1D3004D2BA0 /* StreamFrameViewController.m in Sources */, @@ -4208,6 +4288,7 @@ FBF6AE83188A274100B50578 /* main.m in Sources */, FBBC53AE188AE27D004D2BA0 /* StreamView.m in Sources */, FBC18B2B188A3B9100D5D34E /* MainFrameViewController.m in Sources */, + FB4E9460188BB80700CCC583 /* Connection.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -4525,7 +4606,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; + ARCHS = "$(ARCHS_STANDARD)"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -4543,7 +4624,7 @@ DSTROOT = "/tmp/$(PROJECT_NAME).dst"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; + GCC_OPTIMIZATION_LEVEL = fast; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", @@ -4556,10 +4637,11 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 7.0; - ONLY_ACTIVE_ARCH = YES; + ONLY_ACTIVE_ARCH = NO; PRODUCT_NAME = Limelight; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; + VALID_ARCHS = armv7; }; name = Debug; }; @@ -4567,7 +4649,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; + ARCHS = "$(ARCHS_STANDARD)"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -4585,6 +4667,7 @@ DSTROOT = "/tmp/$(PROJECT_NAME).dst"; ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_OPTIMIZATION_LEVEL = fast; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; @@ -4596,6 +4679,7 @@ SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; + VALID_ARCHS = armv7; }; name = Release; }; @@ -4612,12 +4696,16 @@ "$(inherited)", /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, "/Users/diegowaxemberg/Documents/Repositories/Limelight-iOS/Limelight-iOS/libs/ffmpeg/armv7/include/**", + "/Users/diegowaxemberg/Documents/Repositories/limelight-common-c/limelight-common", ); INFOPLIST_FILE = "Limelight-iOS/Limelight-iOS-Info.plist"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "/Users/diegowaxemberg/Documents/Repositories/Limelight-iOS/Limelight-iOS/libs/ffmpeg/armv7/lib", "/Users/diegowaxemberg/Documents/Repositories/Limelight-iOS/Limelight-iOS/libs/opus/dist-armv7/lib", + "/Users/diegowaxemberg/Library/Developer/Xcode/DerivedData/limelight-common-c-cfonfottpvhxxcgrusjsydwkdaco/Build/Products/Debug-iphoneos", + "$(USER_LIBRARY_DIR)/Developer/Xcode/DerivedData/limelight-common-c-cfonfottpvhxxcgrusjsydwkdaco/Build/Products/Debug-iphoneos", + "$(USER_LIBRARY_DIR)/Developer/Xcode/DerivedData/limelight-common-c-cfonfottpvhxxcgrusjsydwkdaco/Build/Intermediates/limelight-common-c.build/Debug-iphoneos/limelight-common.build/Objects-normal/armv7", ); PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; @@ -4637,12 +4725,16 @@ "$(inherited)", /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, "/Users/diegowaxemberg/Documents/Repositories/Limelight-iOS/Limelight-iOS/libs/ffmpeg/armv7/include/**", + "/Users/diegowaxemberg/Documents/Repositories/limelight-common-c/limelight-common", ); INFOPLIST_FILE = "Limelight-iOS/Limelight-iOS-Info.plist"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "/Users/diegowaxemberg/Documents/Repositories/Limelight-iOS/Limelight-iOS/libs/ffmpeg/armv7/lib", "/Users/diegowaxemberg/Documents/Repositories/Limelight-iOS/Limelight-iOS/libs/opus/dist-armv7/lib", + "/Users/diegowaxemberg/Library/Developer/Xcode/DerivedData/limelight-common-c-cfonfottpvhxxcgrusjsydwkdaco/Build/Products/Debug-iphoneos", + "$(USER_LIBRARY_DIR)/Developer/Xcode/DerivedData/limelight-common-c-cfonfottpvhxxcgrusjsydwkdaco/Build/Products/Debug-iphoneos", + "$(USER_LIBRARY_DIR)/Developer/Xcode/DerivedData/limelight-common-c-cfonfottpvhxxcgrusjsydwkdaco/Build/Intermediates/limelight-common-c.build/Debug-iphoneos/limelight-common.build/Objects-normal/armv7", ); PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; diff --git a/Limelight-iOS.xcodeproj/xcuserdata/diegowaxemberg.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Limelight-iOS.xcodeproj/xcuserdata/diegowaxemberg.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index fe2b454..57c489c 100644 --- a/Limelight-iOS.xcodeproj/xcuserdata/diegowaxemberg.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/Limelight-iOS.xcodeproj/xcuserdata/diegowaxemberg.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -2,4 +2,54 @@ + + + + + + + + + + + + + + diff --git a/Limelight-iOS/AppDelegate.m b/Limelight-iOS/AppDelegate.m index 8e1e684..de302f4 100644 --- a/Limelight-iOS/AppDelegate.m +++ b/Limelight-iOS/AppDelegate.m @@ -54,7 +54,7 @@ if (managedObjectContext != nil) { if ([managedObjectContext hasChanges] && ![managedObjectContext save:&error]) { // Replace this implementation with code to handle the error appropriately. - // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. + // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } diff --git a/Limelight-iOS/Connection.h b/Limelight-iOS/Connection.h new file mode 100644 index 0000000..0d9bd73 --- /dev/null +++ b/Limelight-iOS/Connection.h @@ -0,0 +1,16 @@ +// +// Connection.h +// Limelight-iOS +// +// Created by Diego Waxemberg on 1/19/14. +// Copyright (c) 2014 Diego Waxemberg. All rights reserved. +// + +#import + +@interface Connection : NSOperation + +-(id) initWithHost:(int)ipaddr width:(int)width height:(int)height; +-(void) main; + +@end diff --git a/Limelight-iOS/Connection.m b/Limelight-iOS/Connection.m new file mode 100644 index 0000000..2b5fccc --- /dev/null +++ b/Limelight-iOS/Connection.m @@ -0,0 +1,81 @@ +// +// Connection.m +// Limelight-iOS +// +// Created by Diego Waxemberg on 1/19/14. +// Copyright (c) 2014 Diego Waxemberg. All rights reserved. +// + +#import "Connection.h" + +#include + +#include "VideoDecoder.h" +#include "VideoRenderer.h" + +@implementation Connection { + IP_ADDRESS host; + STREAM_CONFIGURATION streamConfig; + DECODER_RENDERER_CALLBACKS callbacks; +} + +void setup(int width, int height, int fps, void* context, int drFlags) +{ + nv_avc_init(width, height, 0, 2); +} + +void start(void) +{ + [VideoRenderer startRendering]; +} + +void stop(void) +{ + [VideoRenderer stopRendering]; +} + +void release(void) +{ + nv_avc_destroy(); +} + +-(id) initWithHost:(int)ipaddr width:(int)width height:(int)height +{ + self = [super init]; + host = ipaddr; + + streamConfig.width = width; + streamConfig.height = height; + streamConfig.fps = 30; + + callbacks.setup = setup; + callbacks.start = start; + callbacks.stop = stop; + callbacks.release = release; + //callbacks.submitDecodeUnit = submitDecodeUnit; + + return self; +} + +-(void) main +{ + int err; + + NSLog(@"Starting connection process\n"); + + err = performHandshake(host); + NSLog(@"Handshake: %d\n", err); + + err = initializeControlStream(host, &streamConfig); + NSLog(@"Control stream init: %d\n", err); + + initializeVideoStream(host, &streamConfig, &callbacks); + + err = startControlStream(); + NSLog(@"Control stream start: %d\n", err); + + err = startVideoStream(NULL, 0); + NSLog(@"Video stream start: %d\n", err); +} + +@end diff --git a/Limelight-iOS/MainFrameViewController.h b/Limelight-iOS/MainFrameViewController.h index 3e30656..315dc3e 100644 --- a/Limelight-iOS/MainFrameViewController.h +++ b/Limelight-iOS/MainFrameViewController.h @@ -11,6 +11,10 @@ @interface MainFrameViewController : UIViewController - (IBAction)StreamButton:(UIButton *)sender; - (IBAction)PairButton:(UIButton *)sender; +@property (strong, nonatomic) IBOutlet UITextField *HostField; @property (strong, nonatomic) IBOutlet UIPickerView *StreamConfigs; @property (strong, nonatomic) NSArray* streamConfigVals; + ++ (const char*)getHostAddr; + @end diff --git a/Limelight-iOS/MainFrameViewController.m b/Limelight-iOS/MainFrameViewController.m index f6fee16..86e692a 100644 --- a/Limelight-iOS/MainFrameViewController.m +++ b/Limelight-iOS/MainFrameViewController.m @@ -14,6 +14,12 @@ @end @implementation MainFrameViewController +static NSString* hostAddr; + ++ (const char*)getHostAddr +{ + return [hostAddr UTF8String]; +} - (void)PairButton:(UIButton *)sender { @@ -23,7 +29,19 @@ - (void)StreamButton:(UIButton *)sender { NSLog(@"Stream Button Pressed!"); + //67339056 + hostAddr = self.HostField.text; + NSString* host = [NSString stringWithFormat:@"http://%@:47989/launch?uniqueid=0&appid=67339056", self.HostField.text]; + NSLog(@"host: %@", host); + [self performSegueWithIdentifier:@"createStreamFrame" sender:self]; + + NSURL* url = [[NSURL alloc] initWithString:host]; + NSMutableURLRequest* request = [[NSMutableURLRequest alloc] initWithURL:url]; + [request setHTTPMethod:@"GET"]; + NSURLResponse* response = nil; + NSData *response1 = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:NULL]; + NSLog(@"url response: %@", response1); } - (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component diff --git a/Limelight-iOS/StreamFrameViewController.m b/Limelight-iOS/StreamFrameViewController.m index 222226f..231cbde 100644 --- a/Limelight-iOS/StreamFrameViewController.m +++ b/Limelight-iOS/StreamFrameViewController.m @@ -7,7 +7,14 @@ // #import "StreamFrameViewController.h" +#import "MainFrameViewController.h" #import "VideoDepacketizer.h" +#import "Connection.h" +#import "VideoRenderer.h" + +#include +#include +#include @interface StreamFrameViewController () @@ -18,6 +25,8 @@ - (void)viewDidLoad { [super viewDidLoad]; + + [UIApplication sharedApplication].idleTimerDisabled = YES; StreamView* streamView = [[StreamView alloc] initWithFrame:self.view.frame]; streamView.backgroundColor = [UIColor blackColor]; @@ -25,8 +34,6 @@ [self.view addSubview:streamView]; [streamView setNeedsDisplay]; - - CGAffineTransform transform = CGAffineTransformMakeTranslation((streamView.frame.size.height/2) - (streamView.frame.size.width/2), (streamView.frame.size.width/2) - (streamView.frame.size.height/2)); transform = CGAffineTransformRotate(transform, M_PI_2); transform = CGAffineTransformScale(transform, -1, -1); @@ -36,14 +43,17 @@ CGRect contentRect = CGRectMake(0,0, self.view.frame.size.width, self.view.frame.size.height); streamView.bounds = contentRect; - // Do any additional setup after loading the view. + /* // Do any additional setup after loading the view. NSString* path = [[NSBundle mainBundle] pathForResource:@"notpadded" ofType:@"h264"]; NSLog(@"Path: %@", path); - VideoDepacketizer* depacketizer = [[VideoDepacketizer alloc] initWithFile:path renderTarget:streamView]; - NSOperationQueue* opQueue = [[NSOperationQueue alloc] init]; - [opQueue addOperation:depacketizer]; + VideoDepacketizer* depacketizer = [[VideoDepacketizer alloc] initWithFile:path renderTarget:streamView];*/ + Connection* conn = [[Connection alloc] initWithHost:inet_addr([MainFrameViewController getHostAddr]) width:1280 height:720]; + + NSOperationQueue* opQueue = [[NSOperationQueue alloc] init]; + [opQueue addOperation:conn]; + [opQueue addOperation:[[VideoRenderer alloc]initWithTarget:streamView]]; } diff --git a/Limelight-iOS/StreamView.m b/Limelight-iOS/StreamView.m index f38c336..552ab24 100644 --- a/Limelight-iOS/StreamView.m +++ b/Limelight-iOS/StreamView.m @@ -20,9 +20,6 @@ CGImageRef image; unsigned char* pixelData; } -static bool firstFrame = true; - - - (id)initWithFrame:(CGRect)frame { @@ -46,17 +43,18 @@ static bool firstFrame = true; // An empty implementation adversely affects performance during animation. - (void)drawRect:(CGRect)rect { - - if (!nv_avc_get_rgb_frame(pixelData, width*height*4)) - { - NSLog(@"failed to decode frame!"); + if (![VideoRenderer isRendering]) { return; } + if (!nv_avc_get_rgb_frame((char*)pixelData, width*height*4)) + { + //NSLog(@"no new decoded frame!"); + //return; + } - bitmapContext = CGBitmapContextCreate(pixelData, width, height, bitsPerComponent, bytesPerRow, colorSpace, kCGImageAlphaPremultipliedLast); + bitmapContext = CGBitmapContextCreate(pixelData, width, height, bitsPerComponent, bytesPerRow, colorSpace, kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Little); image = CGBitmapContextCreateImage(bitmapContext); - ; struct CGContext* context = UIGraphicsGetCurrentContext(); CGContextRotateCTM(context, -M_PI_2); diff --git a/Limelight-iOS/Video/VideoDepacketizer.m b/Limelight-iOS/Video/VideoDepacketizer.m index 2326e43..8154e6f 100644 --- a/Limelight-iOS/Video/VideoDepacketizer.m +++ b/Limelight-iOS/Video/VideoDepacketizer.m @@ -47,7 +47,7 @@ static int BUFFER_LENGTH = 131072; if (firstStart) { // decode the first i-1 bytes and render a frame - [self.decoder decode:self.byteBuffer length:i]; + //[self.decoder decode:self.byteBuffer length:i]; [self.target performSelectorOnMainThread:@selector(setNeedsDisplay) withObject:NULL waitUntilDone:FALSE]; // move offset back to beginning of start sequence diff --git a/Limelight-iOS/Video/VideoRenderer.m b/Limelight-iOS/Video/VideoRenderer.m deleted file mode 100644 index 50dca9b..0000000 --- a/Limelight-iOS/Video/VideoRenderer.m +++ /dev/null @@ -1,29 +0,0 @@ -// -// VideoRenderer.m -// Limelight-iOS -// -// Created by Diego Waxemberg on 1/18/14. -// Copyright (c) 2014 Diego Waxemberg. All rights reserved. -// - -#import "VideoRenderer.h" - - -@implementation VideoRenderer - -- (void)main -{ - while (true) - { - [self.renderTarget drawRect:CGRectMake(0, 0, 0, 0)]; - } -} - -- (id) initWithTarget:(UIView *)renderTarget -{ - self = [super init]; - self.renderTarget = renderTarget; - return self; -} - -@end diff --git a/Limelight-iOS/VideoDecoder.h b/Limelight-iOS/VideoDecoder.h index a04d19b..8a8c153 100644 --- a/Limelight-iOS/VideoDecoder.h +++ b/Limelight-iOS/VideoDecoder.h @@ -9,7 +9,6 @@ #import @interface VideoDecoder : NSObject -- (void) decode:(uint8_t*)buffer length:(unsigned int)length; int nv_avc_init(int width, int height, int perf_lvl, int thread_count); void nv_avc_destroy(void); diff --git a/Limelight-iOS/VideoDecoder.m b/Limelight-iOS/VideoDecoder.m index c3595e8..b484acf 100644 --- a/Limelight-iOS/VideoDecoder.m +++ b/Limelight-iOS/VideoDecoder.m @@ -11,41 +11,6 @@ #import "swscale.h" #include -@implementation VideoDecoder -- (void)decode:(uint8_t *)buffer length:(unsigned int)length -{ - /*for (int i = 0; i < length; i++) { - printf("%02x ", buffer[i]); - if (i != 0 && i % 16 == 0) { - NSLog(@""); - } - }*/ - int decStat = nv_avc_decode(buffer, length); -} - -- (id) init -{ - self = [super init]; - nv_avc_init(1280, 720, 0, 2); - return self; -} - -// General decoder and renderer state -AVPacket pkt; -AVCodec* decoder; -AVCodecContext* decoder_ctx; -AVFrame* yuv_frame; -AVFrame* dec_frame; -pthread_mutex_t mutex; - -// Color conversion and rendering -AVFrame* rgb_frame; -char* rgb_frame_buf; -struct SwsContext* scaler_ctx; -int render_pix_fmt; - -#define BYTES_PER_PIXEL 4 - // Disables the deblocking filter at the cost of image quality #define DISABLE_LOOP_FILTER 0x1 // Uses the low latency decode flag (disables multithreading) @@ -69,6 +34,30 @@ int render_pix_fmt; // Native color format: RGBA #define NATIVE_COLOR_RGBA 0x400 +@implementation VideoDecoder +- (id) init +{ + self = [super init]; + nv_avc_init(1280, 720, DISABLE_LOOP_FILTER | FAST_DECODE | FAST_BILINEAR_FILTERING, 1); + return self; +} + +// General decoder and renderer state +AVPacket pkt; +AVCodec* decoder; +AVCodecContext* decoder_ctx; +AVFrame* yuv_frame; +AVFrame* dec_frame; +pthread_mutex_t mutex; + +// Color conversion and rendering +AVFrame* rgb_frame; +char* rgb_frame_buf; +struct SwsContext* scaler_ctx; +int render_pix_fmt; + +#define BYTES_PER_PIXEL 4 + // This function must be called before // any other decoding functions int nv_avc_init(int width, int height, int perf_lvl, int thread_count) { @@ -123,7 +112,7 @@ int nv_avc_init(int width, int height, int perf_lvl, int thread_count) { decoder_ctx->height = height; decoder_ctx->pix_fmt = PIX_FMT_YUV420P; - render_pix_fmt = AV_PIX_FMT_RGBA; + render_pix_fmt = AV_PIX_FMT_BGR0; err = avcodec_open2(decoder_ctx, decoder, NULL); if (err < 0) { @@ -323,7 +312,7 @@ int nv_avc_get_input_padding_size(void) { // packets must be decoded in order // indata must be inlen + FF_INPUT_BUFFER_PADDING_SIZE in length int nv_avc_decode(unsigned char* indata, int inlen) { - int err; + int err = 0; int got_pic = 0; pkt.data = indata; diff --git a/Limelight-iOS/Video/VideoRenderer.h b/Limelight-iOS/VideoRenderer.h similarity index 55% rename from Limelight-iOS/Video/VideoRenderer.h rename to Limelight-iOS/VideoRenderer.h index f7df17b..813597b 100644 --- a/Limelight-iOS/Video/VideoRenderer.h +++ b/Limelight-iOS/VideoRenderer.h @@ -2,16 +2,17 @@ // VideoRenderer.h // Limelight-iOS // -// Created by Diego Waxemberg on 1/18/14. +// Created by Diego Waxemberg on 1/19/14. // Copyright (c) 2014 Diego Waxemberg. All rights reserved. // #import -#import "VideoDecoder.h" +#import @interface VideoRenderer : NSOperation @property UIView* renderTarget; -@property VideoDecoder* decoder; - -- (id) initWithTarget:(UIView*)renderTarget; +- (id) initWithTarget:(UIView*)target; ++ (void) startRendering; ++ (void) stopRendering; ++ (BOOL) isRendering; @end diff --git a/Limelight-iOS/VideoRenderer.m b/Limelight-iOS/VideoRenderer.m new file mode 100644 index 0000000..1fb3683 --- /dev/null +++ b/Limelight-iOS/VideoRenderer.m @@ -0,0 +1,51 @@ +// +// VideoRenderer.m +// Limelight-iOS +// +// Created by Diego Waxemberg on 1/19/14. +// Copyright (c) 2014 Diego Waxemberg. All rights reserved. +// + +#import "VideoRenderer.h" + +@implementation VideoRenderer +static bool render = false; + +- (id)initWithTarget:(UIView *)target +{ + self = [super init]; + + self.renderTarget = target; + + return self; +} + +- (void)main +{ + while (true) + { + if (render) + { + [self.renderTarget performSelectorOnMainThread:@selector(setNeedsDisplay) withObject:NULL waitUntilDone:TRUE]; + usleep(5000); + } else { + sleep(1); + } + } +} + ++ (void) startRendering +{ + render = true; +} + ++ (void) stopRendering +{ + render = false; +} + ++ (BOOL) isRendering +{ + return render; +} +@end diff --git a/MainFrame.storyboard b/MainFrame.storyboard index 5d7de02..e5e50c4 100644 --- a/MainFrame.storyboard +++ b/MainFrame.storyboard @@ -31,7 +31,7 @@