mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2025-07-23 20:53:49 +00:00
added code to launch a stream and decode and render the stream
This commit is contained in:
parent
1ef314d3bd
commit
e0cf044d60
@ -7,9 +7,19 @@
|
|||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* 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 */; };
|
FBBC53A5188ACD01004D2BA0 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = FBBC53A4188ACD01004D2BA0 /* libz.dylib */; };
|
||||||
FBBC53A8188AD1D3004D2BA0 /* StreamFrameViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FBBC53A7188AD1D3004D2BA0 /* StreamFrameViewController.m */; };
|
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 */; };
|
FBBC53AE188AE27D004D2BA0 /* StreamView.m in Sources */ = {isa = PBXBuildFile; fileRef = FBBC53AD188AE27D004D2BA0 /* StreamView.m */; };
|
||||||
FBBC53E4188BA7C7004D2BA0 /* libopus.la in Resources */ = {isa = PBXBuildFile; fileRef = FBBC53D4188BA7C7004D2BA0 /* libopus.la */; };
|
FBBC53E4188BA7C7004D2BA0 /* libopus.la in Resources */ = {isa = PBXBuildFile; fileRef = FBBC53D4188BA7C7004D2BA0 /* libopus.la */; };
|
||||||
FBBC53E5188BA7C7004D2BA0 /* opus.pc in Resources */ = {isa = PBXBuildFile; fileRef = FBBC53D6188BA7C7004D2BA0 /* opus.pc */; };
|
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 = "<group>"; };
|
FB272BC4188A93370093CCC9 /* VideoDepacketizer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VideoDepacketizer.m; sourceTree = "<group>"; };
|
||||||
FB272BC5188A93370093CCC9 /* VideoDecoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VideoDecoder.h; sourceTree = "<group>"; };
|
FB272BC5188A93370093CCC9 /* VideoDecoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VideoDecoder.h; sourceTree = "<group>"; };
|
||||||
FB272BC6188A93370093CCC9 /* VideoDecoder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VideoDecoder.m; sourceTree = "<group>"; };
|
FB272BC6188A93370093CCC9 /* VideoDecoder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VideoDecoder.m; sourceTree = "<group>"; };
|
||||||
|
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 = "<group>"; };
|
||||||
|
FB4E945E188BB80700CCC583 /* Connection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Connection.h; sourceTree = "<group>"; };
|
||||||
|
FB4E945F188BB80700CCC583 /* Connection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Connection.m; sourceTree = "<group>"; };
|
||||||
|
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 = "<group>"; };
|
||||||
|
FB4E9486188BC39600CCC583 /* liblimelight-common.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "liblimelight-common.a"; sourceTree = "<group>"; };
|
||||||
|
FB4E9487188BC39600CCC583 /* liblimelight-common.a.dSYM */ = {isa = PBXFileReference; lastKnownFileType = wrapper.dsym; path = "liblimelight-common.a.dSYM"; sourceTree = "<group>"; };
|
||||||
|
FB4E9489188BCC2900CCC583 /* VideoRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoRenderer.h; sourceTree = "<group>"; };
|
||||||
|
FB4E948A188BCC2900CCC583 /* VideoRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VideoRenderer.m; sourceTree = "<group>"; };
|
||||||
|
FB4E948D188BF49B00CCC583 /* ByteBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ByteBuffer.c; path = "../limelight-common-c/limelight-common/ByteBuffer.c"; sourceTree = "<group>"; };
|
||||||
|
FB4E948E188BF49B00CCC583 /* ByteBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ByteBuffer.h; path = "../limelight-common-c/limelight-common/ByteBuffer.h"; sourceTree = "<group>"; };
|
||||||
|
FB4E948F188BF49B00CCC583 /* Config.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Config.c; path = "../limelight-common-c/limelight-common/Config.c"; sourceTree = "<group>"; };
|
||||||
|
FB4E9490188BF49B00CCC583 /* ControlStream.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ControlStream.c; path = "../limelight-common-c/limelight-common/ControlStream.c"; sourceTree = "<group>"; };
|
||||||
|
FB4E9491188BF49B00CCC583 /* Handshake.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Handshake.c; path = "../limelight-common-c/limelight-common/Handshake.c"; sourceTree = "<group>"; };
|
||||||
|
FB4E9492188BF49B00CCC583 /* Limelight.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Limelight.h; path = "../limelight-common-c/limelight-common/Limelight.h"; sourceTree = "<group>"; };
|
||||||
|
FB4E9493188BF49B00CCC583 /* LinkedBlockingQueue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = LinkedBlockingQueue.c; path = "../limelight-common-c/limelight-common/LinkedBlockingQueue.c"; sourceTree = "<group>"; };
|
||||||
|
FB4E9494188BF49B00CCC583 /* LinkedBlockingQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LinkedBlockingQueue.h; path = "../limelight-common-c/limelight-common/LinkedBlockingQueue.h"; sourceTree = "<group>"; };
|
||||||
|
FB4E9495188BF49B00CCC583 /* Platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Platform.h; path = "../limelight-common-c/limelight-common/Platform.h"; sourceTree = "<group>"; };
|
||||||
|
FB4E9496188BF49B00CCC583 /* PlatformSockets.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = PlatformSockets.c; path = "../limelight-common-c/limelight-common/PlatformSockets.c"; sourceTree = "<group>"; };
|
||||||
|
FB4E9497188BF49B00CCC583 /* PlatformSockets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatformSockets.h; path = "../limelight-common-c/limelight-common/PlatformSockets.h"; sourceTree = "<group>"; };
|
||||||
|
FB4E9498188BF49B00CCC583 /* PlatformThreads.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = PlatformThreads.c; path = "../limelight-common-c/limelight-common/PlatformThreads.c"; sourceTree = "<group>"; };
|
||||||
|
FB4E9499188BF49B00CCC583 /* PlatformThreads.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatformThreads.h; path = "../limelight-common-c/limelight-common/PlatformThreads.h"; sourceTree = "<group>"; };
|
||||||
|
FB4E949A188BF49B00CCC583 /* Video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Video.h; path = "../limelight-common-c/limelight-common/Video.h"; sourceTree = "<group>"; };
|
||||||
|
FB4E949B188BF49B00CCC583 /* VideoDepacketizer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = VideoDepacketizer.c; path = "../limelight-common-c/limelight-common/VideoDepacketizer.c"; sourceTree = "<group>"; };
|
||||||
|
FB4E949C188BF49B00CCC583 /* VideoStream.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = VideoStream.c; path = "../limelight-common-c/limelight-common/VideoStream.c"; sourceTree = "<group>"; };
|
||||||
FBBC52C9188ACA92004D2BA0 /* avcodec.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = avcodec.h; sourceTree = "<group>"; };
|
FBBC52C9188ACA92004D2BA0 /* avcodec.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = avcodec.h; sourceTree = "<group>"; };
|
||||||
FBBC52CA188ACA92004D2BA0 /* avfft.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = avfft.h; sourceTree = "<group>"; };
|
FBBC52CA188ACA92004D2BA0 /* avfft.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = avfft.h; sourceTree = "<group>"; };
|
||||||
FBBC52CB188ACA92004D2BA0 /* dxva2.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = dxva2.h; sourceTree = "<group>"; };
|
FBBC52CB188ACA92004D2BA0 /* dxva2.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = dxva2.h; sourceTree = "<group>"; };
|
||||||
@ -1165,8 +1199,6 @@
|
|||||||
FBBC53A4188ACD01004D2BA0 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
|
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 = "<group>"; };
|
FBBC53A6188AD1D3004D2BA0 /* StreamFrameViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StreamFrameViewController.h; sourceTree = "<group>"; };
|
||||||
FBBC53A7188AD1D3004D2BA0 /* StreamFrameViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StreamFrameViewController.m; sourceTree = "<group>"; };
|
FBBC53A7188AD1D3004D2BA0 /* StreamFrameViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StreamFrameViewController.m; sourceTree = "<group>"; };
|
||||||
FBBC53A9188AD48D004D2BA0 /* VideoRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VideoRenderer.h; path = Video/VideoRenderer.h; sourceTree = "<group>"; };
|
|
||||||
FBBC53AA188AD48D004D2BA0 /* VideoRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VideoRenderer.m; path = Video/VideoRenderer.m; sourceTree = "<group>"; };
|
|
||||||
FBBC53AC188AE27D004D2BA0 /* StreamView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StreamView.h; sourceTree = "<group>"; };
|
FBBC53AC188AE27D004D2BA0 /* StreamView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StreamView.h; sourceTree = "<group>"; };
|
||||||
FBBC53AD188AE27D004D2BA0 /* StreamView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StreamView.m; sourceTree = "<group>"; };
|
FBBC53AD188AE27D004D2BA0 /* StreamView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StreamView.m; sourceTree = "<group>"; };
|
||||||
FBBC53CE188BA7C7004D2BA0 /* opus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = opus.h; sourceTree = "<group>"; };
|
FBBC53CE188BA7C7004D2BA0 /* opus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = opus.h; sourceTree = "<group>"; };
|
||||||
@ -3486,6 +3518,39 @@
|
|||||||
path = Video;
|
path = Video;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
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 = "<group>";
|
||||||
|
};
|
||||||
|
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 = "<group>";
|
||||||
|
};
|
||||||
FBBC52C6188ACA92004D2BA0 /* armv7s */ = {
|
FBBC52C6188ACA92004D2BA0 /* armv7s */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@ -3987,6 +4052,10 @@
|
|||||||
FBC18B2E188A4E0500D5D34E /* VideoDepacketizer.m */,
|
FBC18B2E188A4E0500D5D34E /* VideoDepacketizer.m */,
|
||||||
FBC18B30188A5A1100D5D34E /* VideoDecoder.h */,
|
FBC18B30188A5A1100D5D34E /* VideoDecoder.h */,
|
||||||
FBC18B31188A5A1100D5D34E /* VideoDecoder.m */,
|
FBC18B31188A5A1100D5D34E /* VideoDecoder.m */,
|
||||||
|
FB4E945E188BB80700CCC583 /* Connection.h */,
|
||||||
|
FB4E945F188BB80700CCC583 /* Connection.m */,
|
||||||
|
FB4E9489188BCC2900CCC583 /* VideoRenderer.h */,
|
||||||
|
FB4E948A188BCC2900CCC583 /* VideoRenderer.m */,
|
||||||
);
|
);
|
||||||
name = Video;
|
name = Video;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -3994,6 +4063,7 @@
|
|||||||
FBF6AE68188A274100B50578 = {
|
FBF6AE68188A274100B50578 = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
FB4E948C188BF48300CCC583 /* Limelight-Common */,
|
||||||
FBF6AE7C188A274100B50578 /* Limelight-iOS */,
|
FBF6AE7C188A274100B50578 /* Limelight-iOS */,
|
||||||
FBF6AE99188A274100B50578 /* Limelight-iOSTests */,
|
FBF6AE99188A274100B50578 /* Limelight-iOSTests */,
|
||||||
FBF6AE73188A274100B50578 /* Frameworks */,
|
FBF6AE73188A274100B50578 /* Frameworks */,
|
||||||
@ -4013,6 +4083,9 @@
|
|||||||
FBF6AE73188A274100B50578 /* Frameworks */ = {
|
FBF6AE73188A274100B50578 /* Frameworks */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
FB4E9485188BC39600CCC583 /* Debug-iphoneos */,
|
||||||
|
FB4E9461188BC09600CCC583 /* liblimelight-common.a */,
|
||||||
|
FB4E945C188BB6FA00CCC583 /* liblimelight-common.a */,
|
||||||
FBBC53E9188BA7FC004D2BA0 /* libavcodec.a */,
|
FBBC53E9188BA7FC004D2BA0 /* libavcodec.a */,
|
||||||
FBBC53EA188BA7FC004D2BA0 /* libavdevice.a */,
|
FBBC53EA188BA7FC004D2BA0 /* libavdevice.a */,
|
||||||
FBBC53EB188BA7FC004D2BA0 /* libavfilter.a */,
|
FBBC53EB188BA7FC004D2BA0 /* libavfilter.a */,
|
||||||
@ -4058,8 +4131,6 @@
|
|||||||
FBC18B2A188A3B9100D5D34E /* MainFrameViewController.m */,
|
FBC18B2A188A3B9100D5D34E /* MainFrameViewController.m */,
|
||||||
FBBC53A6188AD1D3004D2BA0 /* StreamFrameViewController.h */,
|
FBBC53A6188AD1D3004D2BA0 /* StreamFrameViewController.h */,
|
||||||
FBBC53A7188AD1D3004D2BA0 /* StreamFrameViewController.m */,
|
FBBC53A7188AD1D3004D2BA0 /* StreamFrameViewController.m */,
|
||||||
FBBC53A9188AD48D004D2BA0 /* VideoRenderer.h */,
|
|
||||||
FBBC53AA188AD48D004D2BA0 /* VideoRenderer.m */,
|
|
||||||
FBBC53AC188AE27D004D2BA0 /* StreamView.h */,
|
FBBC53AC188AE27D004D2BA0 /* StreamView.h */,
|
||||||
FBBC53AD188AE27D004D2BA0 /* StreamView.m */,
|
FBBC53AD188AE27D004D2BA0 /* StreamView.m */,
|
||||||
);
|
);
|
||||||
@ -4104,8 +4175,8 @@
|
|||||||
buildConfigurationList = FBF6AEA3188A274100B50578 /* Build configuration list for PBXNativeTarget "Limelight-iOS" */;
|
buildConfigurationList = FBF6AEA3188A274100B50578 /* Build configuration list for PBXNativeTarget "Limelight-iOS" */;
|
||||||
buildPhases = (
|
buildPhases = (
|
||||||
FBF6AE6D188A274100B50578 /* Sources */,
|
FBF6AE6D188A274100B50578 /* Sources */,
|
||||||
FBF6AE6E188A274100B50578 /* Frameworks */,
|
|
||||||
FBF6AE6F188A274100B50578 /* Resources */,
|
FBF6AE6F188A274100B50578 /* Resources */,
|
||||||
|
FBF6AE6E188A274100B50578 /* Frameworks */,
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
@ -4199,7 +4270,16 @@
|
|||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
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 */,
|
FBC18B2F188A4E0500D5D34E /* VideoDepacketizer.m in Sources */,
|
||||||
FBF6AE87188A274100B50578 /* AppDelegate.m in Sources */,
|
FBF6AE87188A274100B50578 /* AppDelegate.m in Sources */,
|
||||||
FBBC53A8188AD1D3004D2BA0 /* StreamFrameViewController.m in Sources */,
|
FBBC53A8188AD1D3004D2BA0 /* StreamFrameViewController.m in Sources */,
|
||||||
@ -4208,6 +4288,7 @@
|
|||||||
FBF6AE83188A274100B50578 /* main.m in Sources */,
|
FBF6AE83188A274100B50578 /* main.m in Sources */,
|
||||||
FBBC53AE188AE27D004D2BA0 /* StreamView.m in Sources */,
|
FBBC53AE188AE27D004D2BA0 /* StreamView.m in Sources */,
|
||||||
FBC18B2B188A3B9100D5D34E /* MainFrameViewController.m in Sources */,
|
FBC18B2B188A3B9100D5D34E /* MainFrameViewController.m in Sources */,
|
||||||
|
FB4E9460188BB80700CCC583 /* Connection.m in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@ -4525,7 +4606,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
|
ARCHS = "$(ARCHS_STANDARD)";
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
@ -4543,7 +4624,7 @@
|
|||||||
DSTROOT = "/tmp/$(PROJECT_NAME).dst";
|
DSTROOT = "/tmp/$(PROJECT_NAME).dst";
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
GCC_DYNAMIC_NO_PIC = NO;
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
GCC_OPTIMIZATION_LEVEL = fast;
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
"DEBUG=1",
|
"DEBUG=1",
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@ -4556,10 +4637,11 @@
|
|||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = NO;
|
||||||
PRODUCT_NAME = Limelight;
|
PRODUCT_NAME = Limelight;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
VALID_ARCHS = armv7;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@ -4567,7 +4649,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
|
ARCHS = "$(ARCHS_STANDARD)";
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
@ -4585,6 +4667,7 @@
|
|||||||
DSTROOT = "/tmp/$(PROJECT_NAME).dst";
|
DSTROOT = "/tmp/$(PROJECT_NAME).dst";
|
||||||
ENABLE_NS_ASSERTIONS = NO;
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = fast;
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
@ -4596,6 +4679,7 @@
|
|||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
|
VALID_ARCHS = armv7;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
@ -4612,12 +4696,16 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
/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-iOS/Limelight-iOS/libs/ffmpeg/armv7/include/**",
|
||||||
|
"/Users/diegowaxemberg/Documents/Repositories/limelight-common-c/limelight-common",
|
||||||
);
|
);
|
||||||
INFOPLIST_FILE = "Limelight-iOS/Limelight-iOS-Info.plist";
|
INFOPLIST_FILE = "Limelight-iOS/Limelight-iOS-Info.plist";
|
||||||
LIBRARY_SEARCH_PATHS = (
|
LIBRARY_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"/Users/diegowaxemberg/Documents/Repositories/Limelight-iOS/Limelight-iOS/libs/ffmpeg/armv7/lib",
|
"/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/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)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
WRAPPER_EXTENSION = app;
|
WRAPPER_EXTENSION = app;
|
||||||
@ -4637,12 +4725,16 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
/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-iOS/Limelight-iOS/libs/ffmpeg/armv7/include/**",
|
||||||
|
"/Users/diegowaxemberg/Documents/Repositories/limelight-common-c/limelight-common",
|
||||||
);
|
);
|
||||||
INFOPLIST_FILE = "Limelight-iOS/Limelight-iOS-Info.plist";
|
INFOPLIST_FILE = "Limelight-iOS/Limelight-iOS-Info.plist";
|
||||||
LIBRARY_SEARCH_PATHS = (
|
LIBRARY_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"/Users/diegowaxemberg/Documents/Repositories/Limelight-iOS/Limelight-iOS/libs/ffmpeg/armv7/lib",
|
"/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/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)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
WRAPPER_EXTENSION = app;
|
WRAPPER_EXTENSION = app;
|
||||||
|
@ -2,4 +2,54 @@
|
|||||||
<Bucket
|
<Bucket
|
||||||
type = "1"
|
type = "1"
|
||||||
version = "2.0">
|
version = "2.0">
|
||||||
|
<Breakpoints>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
shouldBeEnabled = "No"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "../limelight-common-c/limelight-common/PlatformThreads.c"
|
||||||
|
timestampString = "411825593.028836"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "23"
|
||||||
|
endingLineNumber = "23"
|
||||||
|
landmarkName = "ThreadProc(void* context)"
|
||||||
|
landmarkType = "7">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
shouldBeEnabled = "No"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "../limelight-common-c/limelight-common/PlatformThreads.c"
|
||||||
|
timestampString = "411825595.58162"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "21"
|
||||||
|
endingLineNumber = "21"
|
||||||
|
landmarkName = "ThreadProc(void* context)"
|
||||||
|
landmarkType = "7">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
shouldBeEnabled = "No"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "../limelight-common-c/limelight-common/PlatformThreads.c"
|
||||||
|
timestampString = "411825599.779408"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "95"
|
||||||
|
endingLineNumber = "95"
|
||||||
|
landmarkName = "PltCreateThread(ThreadEntry entry, void* context, PLT_THREAD *thread)"
|
||||||
|
landmarkType = "7">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
</Breakpoints>
|
||||||
</Bucket>
|
</Bucket>
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
if (managedObjectContext != nil) {
|
if (managedObjectContext != nil) {
|
||||||
if ([managedObjectContext hasChanges] && ![managedObjectContext save:&error]) {
|
if ([managedObjectContext hasChanges] && ![managedObjectContext save:&error]) {
|
||||||
// Replace this implementation with code to handle the error appropriately.
|
// 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]);
|
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
16
Limelight-iOS/Connection.h
Normal file
16
Limelight-iOS/Connection.h
Normal file
@ -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 <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
@interface Connection : NSOperation <NSStreamDelegate>
|
||||||
|
|
||||||
|
-(id) initWithHost:(int)ipaddr width:(int)width height:(int)height;
|
||||||
|
-(void) main;
|
||||||
|
|
||||||
|
@end
|
81
Limelight-iOS/Connection.m
Normal file
81
Limelight-iOS/Connection.m
Normal file
@ -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 <Limelight.h>
|
||||||
|
|
||||||
|
#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
|
@ -11,6 +11,10 @@
|
|||||||
@interface MainFrameViewController : UIViewController <UIPickerViewDataSource,UIPickerViewDelegate>
|
@interface MainFrameViewController : UIViewController <UIPickerViewDataSource,UIPickerViewDelegate>
|
||||||
- (IBAction)StreamButton:(UIButton *)sender;
|
- (IBAction)StreamButton:(UIButton *)sender;
|
||||||
- (IBAction)PairButton:(UIButton *)sender;
|
- (IBAction)PairButton:(UIButton *)sender;
|
||||||
|
@property (strong, nonatomic) IBOutlet UITextField *HostField;
|
||||||
@property (strong, nonatomic) IBOutlet UIPickerView *StreamConfigs;
|
@property (strong, nonatomic) IBOutlet UIPickerView *StreamConfigs;
|
||||||
@property (strong, nonatomic) NSArray* streamConfigVals;
|
@property (strong, nonatomic) NSArray* streamConfigVals;
|
||||||
|
|
||||||
|
+ (const char*)getHostAddr;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -14,6 +14,12 @@
|
|||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation MainFrameViewController
|
@implementation MainFrameViewController
|
||||||
|
static NSString* hostAddr;
|
||||||
|
|
||||||
|
+ (const char*)getHostAddr
|
||||||
|
{
|
||||||
|
return [hostAddr UTF8String];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)PairButton:(UIButton *)sender
|
- (void)PairButton:(UIButton *)sender
|
||||||
{
|
{
|
||||||
@ -23,7 +29,19 @@
|
|||||||
- (void)StreamButton:(UIButton *)sender
|
- (void)StreamButton:(UIButton *)sender
|
||||||
{
|
{
|
||||||
NSLog(@"Stream Button Pressed!");
|
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];
|
[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
|
- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component
|
||||||
|
@ -7,7 +7,14 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import "StreamFrameViewController.h"
|
#import "StreamFrameViewController.h"
|
||||||
|
#import "MainFrameViewController.h"
|
||||||
#import "VideoDepacketizer.h"
|
#import "VideoDepacketizer.h"
|
||||||
|
#import "Connection.h"
|
||||||
|
#import "VideoRenderer.h"
|
||||||
|
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
@interface StreamFrameViewController ()
|
@interface StreamFrameViewController ()
|
||||||
|
|
||||||
@ -18,6 +25,8 @@
|
|||||||
- (void)viewDidLoad
|
- (void)viewDidLoad
|
||||||
{
|
{
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
|
|
||||||
|
[UIApplication sharedApplication].idleTimerDisabled = YES;
|
||||||
|
|
||||||
StreamView* streamView = [[StreamView alloc] initWithFrame:self.view.frame];
|
StreamView* streamView = [[StreamView alloc] initWithFrame:self.view.frame];
|
||||||
streamView.backgroundColor = [UIColor blackColor];
|
streamView.backgroundColor = [UIColor blackColor];
|
||||||
@ -25,8 +34,6 @@
|
|||||||
[self.view addSubview:streamView];
|
[self.view addSubview:streamView];
|
||||||
[streamView setNeedsDisplay];
|
[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));
|
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 = CGAffineTransformRotate(transform, M_PI_2);
|
||||||
transform = CGAffineTransformScale(transform, -1, -1);
|
transform = CGAffineTransformScale(transform, -1, -1);
|
||||||
@ -36,14 +43,17 @@
|
|||||||
CGRect contentRect = CGRectMake(0,0, self.view.frame.size.width, self.view.frame.size.height);
|
CGRect contentRect = CGRectMake(0,0, self.view.frame.size.width, self.view.frame.size.height);
|
||||||
streamView.bounds = contentRect;
|
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"
|
NSString* path = [[NSBundle mainBundle] pathForResource:@"notpadded"
|
||||||
ofType:@"h264"];
|
ofType:@"h264"];
|
||||||
NSLog(@"Path: %@", path);
|
NSLog(@"Path: %@", path);
|
||||||
VideoDepacketizer* depacketizer = [[VideoDepacketizer alloc] initWithFile:path renderTarget:streamView];
|
VideoDepacketizer* depacketizer = [[VideoDepacketizer alloc] initWithFile:path renderTarget:streamView];*/
|
||||||
NSOperationQueue* opQueue = [[NSOperationQueue alloc] init];
|
|
||||||
[opQueue addOperation:depacketizer];
|
|
||||||
|
|
||||||
|
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]];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,9 +20,6 @@
|
|||||||
CGImageRef image;
|
CGImageRef image;
|
||||||
unsigned char* pixelData;
|
unsigned char* pixelData;
|
||||||
}
|
}
|
||||||
static bool firstFrame = true;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- (id)initWithFrame:(CGRect)frame
|
- (id)initWithFrame:(CGRect)frame
|
||||||
{
|
{
|
||||||
@ -46,17 +43,18 @@ static bool firstFrame = true;
|
|||||||
// An empty implementation adversely affects performance during animation.
|
// An empty implementation adversely affects performance during animation.
|
||||||
- (void)drawRect:(CGRect)rect
|
- (void)drawRect:(CGRect)rect
|
||||||
{
|
{
|
||||||
|
if (![VideoRenderer isRendering]) {
|
||||||
if (!nv_avc_get_rgb_frame(pixelData, width*height*4))
|
|
||||||
{
|
|
||||||
NSLog(@"failed to decode frame!");
|
|
||||||
return;
|
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);
|
image = CGBitmapContextCreateImage(bitmapContext);
|
||||||
|
|
||||||
;
|
|
||||||
struct CGContext* context = UIGraphicsGetCurrentContext();
|
struct CGContext* context = UIGraphicsGetCurrentContext();
|
||||||
|
|
||||||
CGContextRotateCTM(context, -M_PI_2);
|
CGContextRotateCTM(context, -M_PI_2);
|
||||||
|
@ -47,7 +47,7 @@ static int BUFFER_LENGTH = 131072;
|
|||||||
if (firstStart)
|
if (firstStart)
|
||||||
{
|
{
|
||||||
// decode the first i-1 bytes and render a frame
|
// 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];
|
[self.target performSelectorOnMainThread:@selector(setNeedsDisplay) withObject:NULL waitUntilDone:FALSE];
|
||||||
|
|
||||||
// move offset back to beginning of start sequence
|
// move offset back to beginning of start sequence
|
||||||
|
@ -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
|
|
@ -9,7 +9,6 @@
|
|||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
@interface VideoDecoder : NSObject
|
@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);
|
int nv_avc_init(int width, int height, int perf_lvl, int thread_count);
|
||||||
void nv_avc_destroy(void);
|
void nv_avc_destroy(void);
|
||||||
|
|
||||||
|
@ -11,41 +11,6 @@
|
|||||||
#import "swscale.h"
|
#import "swscale.h"
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
@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
|
// Disables the deblocking filter at the cost of image quality
|
||||||
#define DISABLE_LOOP_FILTER 0x1
|
#define DISABLE_LOOP_FILTER 0x1
|
||||||
// Uses the low latency decode flag (disables multithreading)
|
// Uses the low latency decode flag (disables multithreading)
|
||||||
@ -69,6 +34,30 @@ int render_pix_fmt;
|
|||||||
// Native color format: RGBA
|
// Native color format: RGBA
|
||||||
#define NATIVE_COLOR_RGBA 0x400
|
#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
|
// This function must be called before
|
||||||
// any other decoding functions
|
// any other decoding functions
|
||||||
int nv_avc_init(int width, int height, int perf_lvl, int thread_count) {
|
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->height = height;
|
||||||
decoder_ctx->pix_fmt = PIX_FMT_YUV420P;
|
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);
|
err = avcodec_open2(decoder_ctx, decoder, NULL);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
@ -323,7 +312,7 @@ int nv_avc_get_input_padding_size(void) {
|
|||||||
// packets must be decoded in order
|
// packets must be decoded in order
|
||||||
// indata must be inlen + FF_INPUT_BUFFER_PADDING_SIZE in length
|
// indata must be inlen + FF_INPUT_BUFFER_PADDING_SIZE in length
|
||||||
int nv_avc_decode(unsigned char* indata, int inlen) {
|
int nv_avc_decode(unsigned char* indata, int inlen) {
|
||||||
int err;
|
int err = 0;
|
||||||
int got_pic = 0;
|
int got_pic = 0;
|
||||||
|
|
||||||
pkt.data = indata;
|
pkt.data = indata;
|
||||||
|
@ -2,16 +2,17 @@
|
|||||||
// VideoRenderer.h
|
// VideoRenderer.h
|
||||||
// Limelight-iOS
|
// 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.
|
// Copyright (c) 2014 Diego Waxemberg. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
#import "VideoDecoder.h"
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
@interface VideoRenderer : NSOperation
|
@interface VideoRenderer : NSOperation
|
||||||
@property UIView* renderTarget;
|
@property UIView* renderTarget;
|
||||||
@property VideoDecoder* decoder;
|
- (id) initWithTarget:(UIView*)target;
|
||||||
|
+ (void) startRendering;
|
||||||
- (id) initWithTarget:(UIView*)renderTarget;
|
+ (void) stopRendering;
|
||||||
|
+ (BOOL) isRendering;
|
||||||
@end
|
@end
|
51
Limelight-iOS/VideoRenderer.m
Normal file
51
Limelight-iOS/VideoRenderer.m
Normal file
@ -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
|
@ -31,7 +31,7 @@
|
|||||||
</connections>
|
</connections>
|
||||||
</pickerView>
|
</pickerView>
|
||||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="taW-Um-zc6" userLabel="Start Stream Btn">
|
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="taW-Um-zc6" userLabel="Start Stream Btn">
|
||||||
<rect key="frame" x="317" y="421" width="391" height="141"/>
|
<rect key="frame" x="317" y="145" width="391" height="141"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
<fontDescription key="fontDescription" type="system" pointSize="26"/>
|
<fontDescription key="fontDescription" type="system" pointSize="26"/>
|
||||||
<state key="normal" title="Start Streaming Steam!">
|
<state key="normal" title="Start Streaming Steam!">
|
||||||
@ -58,6 +58,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
|
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
|
||||||
<connections>
|
<connections>
|
||||||
|
<outlet property="HostField" destination="iC2-gT-zgS" id="JsQ-oS-2QL"/>
|
||||||
<outlet property="StreamConfigs" destination="rnA-uG-hAA" id="LPP-jQ-5eW"/>
|
<outlet property="StreamConfigs" destination="rnA-uG-hAA" id="LPP-jQ-5eW"/>
|
||||||
<segue destination="OIm-0n-i9v" kind="modal" identifier="createStreamFrame" modalPresentationStyle="fullScreen" id="MOD-9A-3Sk"/>
|
<segue destination="OIm-0n-i9v" kind="modal" identifier="createStreamFrame" modalPresentationStyle="fullScreen" id="MOD-9A-3Sk"/>
|
||||||
</connections>
|
</connections>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user