├── .clang-format ├── .gitignore ├── .gitmodules ├── GJLiveEngineDemo.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ ├── GJCaptureTool.xcscmblueprint │ ├── IDEWorkspaceChecks.plist │ └── WorkspaceSettings.xcsettings ├── GJLiveEngineDemo ├── AppDelegate.h ├── AppDelegate.m ├── GJLiveDemoPrivate.h ├── GJLivePushViewController.h ├── GJLivePushViewController.m ├── GJLiveStartViewController.h ├── GJLiveStartViewController.m ├── GJSunSystemARScene.h ├── GJSunSystemARScene.m ├── Info.plist ├── Resource │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Image │ │ ├── 0.png │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ ├── index0.png │ │ ├── index1.png │ │ ├── index2.png │ │ ├── index3.png │ │ ├── index4.png │ │ └── index5.png │ ├── MixTest.mp3 │ ├── OrganRun.m4a │ ├── Particle.png │ ├── art.scnassets │ │ ├── earth │ │ │ ├── Credit.txt │ │ │ ├── cloudsTransparency-mini.png │ │ │ ├── cloudsTransparency.png │ │ │ ├── earth-bump.png │ │ │ ├── earth-diffuse-mini.jpg │ │ │ ├── earth-diffuse.jpg │ │ │ ├── earth-emissive-mini.jpg │ │ │ ├── earth-emissive-mini2.jpg │ │ │ ├── earth-emissive.jpg │ │ │ ├── earth-reflective.jpg │ │ │ ├── earth-specular-mini.jpg │ │ │ ├── earth-specular.jpg │ │ │ ├── jupiter.jpg │ │ │ ├── jupiter_loop.png │ │ │ ├── mars.jpg │ │ │ ├── mercury.jpg │ │ │ ├── moon.jpg │ │ │ ├── neptune.jpg │ │ │ ├── neptune_loop.png │ │ │ ├── orbit.png │ │ │ ├── orbit1.png │ │ │ ├── pluto.jpg │ │ │ ├── saturn.jpg │ │ │ ├── saturn_cloud.png │ │ │ ├── saturn_loop.png │ │ │ ├── sun-halo.png │ │ │ ├── sun.jpg │ │ │ ├── uranus.jpg │ │ │ ├── uranus_loop.png │ │ │ └── venus.jpg │ │ ├── shipc.scn │ │ └── texture.png │ ├── bd.zip │ ├── bear.zip │ ├── client.json │ ├── hkbs.zip │ ├── ios.h264 │ ├── lb.zip │ ├── sahua.gif │ └── track_data.dat ├── SCNViewController.h ├── Support Files │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── GJCaptureTool.entitlements │ └── main.m ├── ViewController.h ├── ViewController.mm ├── ZipArchive │ ├── ZipArchive.h │ ├── ZipArchive.m │ └── minizip │ │ ├── crypt.h │ │ ├── ioapi.c │ │ ├── ioapi.h │ │ ├── mztools.c │ │ ├── mztools.h │ │ ├── unzip.c │ │ ├── unzip.h │ │ ├── zip.c │ │ └── zip.h ├── audioqueue.h └── rvopserver.h ├── GJLiveEngineDemoConfig ├── GJCaptureToolConfig.entitlements ├── Info.plist ├── SourceEditorCommand.h ├── SourceEditorCommand.m ├── SourceEditorExtension.h └── SourceEditorExtension.m ├── Info.plist ├── LICENSE └── README.md /.clang-format: -------------------------------------------------------------------------------- 1 | # 你的项目基于的基础样式,我的项目是基于LLVM的 2 | #BasedOnStyle: LLVM 3 | # 缩进宽度 4 | IndentWidth: 4 5 | # 圆括号的换行方式 6 | BreakBeforeBraces: Attach 7 | # 支持一行的if 8 | AllowShortIfStatementsOnASingleLine: true 9 | # switch的case缩进 10 | IndentCaseLabels: true 11 | # 针对OC的block的缩进宽度 12 | ObjCBlockIndentWidth: 4 13 | # 针对OC,属性名后加空格 14 | ObjCSpaceAfterProperty: true 15 | # 每行字符的长度 16 | ColumnLimit: 0 17 | # 注释对齐 18 | AlignTrailingComments: true 19 | # 括号后加空格 20 | SpaceAfterCStyleCast: true 21 | # 不在小括号里加空格 22 | SpacesInParentheses: false 23 | # 不在中括号里加空格 24 | SpacesInSquareBrackets: false 25 | #等于号对齐 26 | AlignConsecutiveAssignments: true 27 | #声明对齐 28 | AlignConsecutiveDeclarations: true 29 | #注释对齐 30 | AlignTrailingComments: true 31 | #允许短语句一行 32 | AllowShortBlocksOnASingleLine: true 33 | #块起始处空行 34 | KeepEmptyLinesAtTheStartOfBlocks: true 35 | #最大空行 36 | MaxEmptyLinesToKeep: 1 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | *.a 30 | 31 | # CocoaPods 32 | # 33 | # We recommend against adding the Pods directory to your .gitignore. However 34 | # you should judge for yourself, the pros and cons are mentioned at: 35 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 36 | # 37 | # Pods/ 38 | 39 | # Carthage 40 | # 41 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 42 | # Carthage/Checkouts 43 | 44 | Carthage/Build 45 | 46 | # fastlane 47 | # 48 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 49 | # screenshots whenever they are needed. 50 | # For more information about the recommended setup visit: 51 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 52 | 53 | fastlane/report.xml 54 | fastlane/screenshots 55 | 56 | #Code Injection 57 | # 58 | # After new code Injection tools there's a generated folder /iOSInjectionProject 59 | # https://github.com/johnno1962/injectionforxcode 60 | 61 | iOSInjectionProject/ 62 | GJLiveEngineDemo/.DS_Store 63 | GJLiveEngineDemo/Discard 64 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "GJLiveEngine"] 2 | path = GJLiveEngine 3 | url = git@github.com:MinorUncle/GJLiveEngine.git 4 | -------------------------------------------------------------------------------- /GJLiveEngineDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 47; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2707293420F24C9E00DA051F /* unzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 2707292A20F24C9E00DA051F /* unzip.c */; }; 11 | 2707293520F24C9E00DA051F /* zip.c in Sources */ = {isa = PBXBuildFile; fileRef = 2707292B20F24C9E00DA051F /* zip.c */; }; 12 | 2707293620F24C9E00DA051F /* ioapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 2707292C20F24C9E00DA051F /* ioapi.c */; }; 13 | 2707293720F24C9E00DA051F /* mztools.c in Sources */ = {isa = PBXBuildFile; fileRef = 2707292D20F24C9E00DA051F /* mztools.c */; }; 14 | 2707293820F24C9E00DA051F /* ZipArchive.m in Sources */ = {isa = PBXBuildFile; fileRef = 2707293320F24C9E00DA051F /* ZipArchive.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 15 | 275299C72118368B00DD0403 /* GJLiveStartViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6AB297E41F4D8A9C00115220 /* GJLiveStartViewController.m */; }; 16 | 275299C821183C0C00DD0403 /* libstdc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 046F599D1E2E1C38007901EB /* libstdc++.tbd */; }; 17 | 275299C921183C1100DD0403 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = C573F16F1D4B4146002607B6 /* libz.tbd */; }; 18 | 275299CA21183C9800DD0403 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A40DFCD1EE8E1320047E0F0 /* Accelerate.framework */; }; 19 | 276408AD21245D8600D6171E /* GJLiveEngine.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 276408AC21245D8600D6171E /* GJLiveEngine.framework */; }; 20 | 276F43812179CF3800ECF347 /* sahua.gif in Resources */ = {isa = PBXBuildFile; fileRef = 276F43802179CF3800ECF347 /* sahua.gif */; }; 21 | 27FD50B2214A66ED00315655 /* MixTest.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 6A85F9941F00F0B00037A64F /* MixTest.mp3 */; }; 22 | 6A04022020CA5A190098A86C /* GJLivePushViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 041702841E5FC3D100D5B5D9 /* GJLivePushViewController.m */; }; 23 | 6AF9DDB91FA976A100F6B4F7 /* GJSunSystemARScene.m in Sources */ = {isa = PBXBuildFile; fileRef = 6AF9DDB81FA976A100F6B4F7 /* GJSunSystemARScene.m */; }; 24 | 6AF9DDBB1FA97A6000F6B4F7 /* art.scnassets in Resources */ = {isa = PBXBuildFile; fileRef = 6AF9DDBA1FA97A5F00F6B4F7 /* art.scnassets */; }; 25 | C561AC9B1D51D3DC00113453 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C561ABEB1D51D3DC00113453 /* AppDelegate.m */; }; 26 | C561AC9C1D51D3DC00113453 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C561ABEC1D51D3DC00113453 /* Assets.xcassets */; }; 27 | C561ACA31D51D3DC00113453 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C561ABFA1D51D3DC00113453 /* LaunchScreen.storyboard */; }; 28 | C561ACA41D51D3DC00113453 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C561ABFC1D51D3DC00113453 /* Main.storyboard */; }; 29 | C561ACB51D51D3DC00113453 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C561AC8C1D51D3DC00113453 /* main.m */; }; 30 | /* End PBXBuildFile section */ 31 | 32 | /* Begin PBXContainerItemProxy section */ 33 | 276408C12124613E00D6171E /* PBXContainerItemProxy */ = { 34 | isa = PBXContainerItemProxy; 35 | containerPortal = C54FA8A01D21006000A0D3C3 /* Project object */; 36 | proxyType = 1; 37 | remoteGlobalIDString = 276408B12124611500D6171E; 38 | remoteInfo = GJCaptureToolConfig; 39 | }; 40 | 27BD9BA721193877006300A6 /* PBXContainerItemProxy */ = { 41 | isa = PBXContainerItemProxy; 42 | containerPortal = 27BD9B9921193876006300A6 /* GJLiveEngine.xcodeproj */; 43 | proxyType = 2; 44 | remoteGlobalIDString = 279AC67F2117E86600F5FD7C; 45 | remoteInfo = GJLiveEngine; 46 | }; 47 | 27BD9BA921193877006300A6 /* PBXContainerItemProxy */ = { 48 | isa = PBXContainerItemProxy; 49 | containerPortal = 27BD9B9921193876006300A6 /* GJLiveEngine.xcodeproj */; 50 | proxyType = 2; 51 | remoteGlobalIDString = 27BD9B53211878DF006300A6; 52 | remoteInfo = GJLiveEngineConfigure; 53 | }; 54 | /* End PBXContainerItemProxy section */ 55 | 56 | /* Begin PBXFileReference section */ 57 | 040EBEC81DFFD2660040AED0 /* GJCaptureTool.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = GJCaptureTool.entitlements; sourceTree = ""; }; 58 | 041702831E5FC3D100D5B5D9 /* GJLivePushViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GJLivePushViewController.h; sourceTree = ""; }; 59 | 041702841E5FC3D100D5B5D9 /* GJLivePushViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GJLivePushViewController.m; sourceTree = ""; }; 60 | 046F599D1E2E1C38007901EB /* libstdc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libstdc++.tbd"; path = "usr/lib/libstdc++.tbd"; sourceTree = SDKROOT; }; 61 | 2707292820F24C9E00DA051F /* ZipArchive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZipArchive.h; sourceTree = ""; }; 62 | 2707292A20F24C9E00DA051F /* unzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = unzip.c; sourceTree = ""; }; 63 | 2707292B20F24C9E00DA051F /* zip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zip.c; sourceTree = ""; }; 64 | 2707292C20F24C9E00DA051F /* ioapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ioapi.c; sourceTree = ""; }; 65 | 2707292D20F24C9E00DA051F /* mztools.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mztools.c; sourceTree = ""; }; 66 | 2707292E20F24C9E00DA051F /* crypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crypt.h; sourceTree = ""; }; 67 | 2707292F20F24C9E00DA051F /* zip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zip.h; sourceTree = ""; }; 68 | 2707293020F24C9E00DA051F /* unzip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unzip.h; sourceTree = ""; }; 69 | 2707293120F24C9E00DA051F /* mztools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mztools.h; sourceTree = ""; }; 70 | 2707293220F24C9E00DA051F /* ioapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ioapi.h; sourceTree = ""; }; 71 | 2707293320F24C9E00DA051F /* ZipArchive.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZipArchive.m; sourceTree = ""; }; 72 | 2707293B20F24DAD00DA051F /* track_data.dat */ = {isa = PBXFileReference; lastKnownFileType = file; path = track_data.dat; sourceTree = ""; }; 73 | 2707293D20F24F0C00DA051F /* bd.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = bd.zip; sourceTree = ""; }; 74 | 2707293E20F24F0C00DA051F /* hkbs.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = hkbs.zip; sourceTree = ""; }; 75 | 2707293F20F24F0D00DA051F /* lb.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = lb.zip; sourceTree = ""; }; 76 | 2707294020F24F0D00DA051F /* bear.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = bear.zip; sourceTree = ""; }; 77 | 2707297420F389C400DA051F /* ios.h264 */ = {isa = PBXFileReference; lastKnownFileType = file; path = ios.h264; sourceTree = ""; }; 78 | 27529A2121184C8700DD0403 /* g711.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = g711.cpp; sourceTree = ""; }; 79 | 27529A2221184C8700DD0403 /* PlayMediaDecodec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlayMediaDecodec.cpp; sourceTree = ""; }; 80 | 27529A2321184C8700DD0403 /* mp4.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mp4.h; sourceTree = ""; }; 81 | 27529A2421184C8700DD0403 /* aac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aac.h; sourceTree = ""; }; 82 | 27529A2521184C8700DD0403 /* mp4.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mp4.cpp; sourceTree = ""; }; 83 | 27529A2621184C8700DD0403 /* audio_ffmpeg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audio_ffmpeg.h; sourceTree = ""; }; 84 | 27529A2721184C8700DD0403 /* PlayMediaEncode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlayMediaEncode.cpp; sourceTree = ""; }; 85 | 27529A2821184C8700DD0403 /* aac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = aac.cpp; sourceTree = ""; }; 86 | 27529A2921184C8700DD0403 /* PlayMediaFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlayMediaFormat.cpp; sourceTree = ""; }; 87 | 27529A2A21184C8700DD0403 /* g711.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = g711.h; sourceTree = ""; }; 88 | 27529A2B21184C8700DD0403 /* PlayMediaSDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlayMediaSDK.h; sourceTree = ""; }; 89 | 27529A2C21184C8700DD0403 /* PlayMediaSDK.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlayMediaSDK.cpp; sourceTree = ""; }; 90 | 27529A2D21184C8700DD0403 /* audio_ffmpeg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = audio_ffmpeg.cpp; sourceTree = ""; }; 91 | 27529A2F21184C8700DD0403 /* OpenGLView20.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OpenGLView20.m; sourceTree = ""; }; 92 | 27529A3021184C8700DD0403 /* OpenGLView20.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpenGLView20.h; sourceTree = ""; }; 93 | 276408AC21245D8600D6171E /* GJLiveEngine.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GJLiveEngine.framework; path = GJLiveEngine/GJLiveEngine.framework; sourceTree = ""; }; 94 | 276408B22124611500D6171E /* GJLiveEngineDemoConfig.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = GJLiveEngineDemoConfig.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 95 | 276408B62124611500D6171E /* SourceEditorExtension.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SourceEditorExtension.h; sourceTree = ""; }; 96 | 276408B72124611500D6171E /* SourceEditorExtension.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SourceEditorExtension.m; sourceTree = ""; }; 97 | 276408B92124611500D6171E /* SourceEditorCommand.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SourceEditorCommand.h; sourceTree = ""; }; 98 | 276408BA2124611500D6171E /* SourceEditorCommand.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SourceEditorCommand.m; sourceTree = ""; }; 99 | 276408BC2124611500D6171E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 100 | 276408BD2124611500D6171E /* GJCaptureToolConfig.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = GJCaptureToolConfig.entitlements; sourceTree = ""; }; 101 | 276409632126D34B00D6171E /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = GJLiveEngineDemo/Info.plist; sourceTree = SOURCE_ROOT; }; 102 | 276F43802179CF3800ECF347 /* sahua.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = sahua.gif; sourceTree = ""; }; 103 | 27BD8C2A215B7F660051336D /* GJLiveDemoPrivate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GJLiveDemoPrivate.h; sourceTree = ""; }; 104 | 27BD9B9921193876006300A6 /* GJLiveEngine.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GJLiveEngine.xcodeproj; path = ../GJLiveEngine/GJLiveEngine.xcodeproj; sourceTree = ""; }; 105 | 27BD9BAB2119769C006300A6 /* StreamAddr.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StreamAddr.h; sourceTree = ""; }; 106 | 6A03892A1FF13004005AC7CE /* Particle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Particle.png; sourceTree = ""; }; 107 | 6A34882B1F453803008223AA /* 0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 0.png; sourceTree = ""; }; 108 | 6A34882C1F453803008223AA /* 1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 1.png; sourceTree = ""; }; 109 | 6A34882D1F453803008223AA /* 2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 2.png; sourceTree = ""; }; 110 | 6A34882E1F453803008223AA /* 3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 3.png; sourceTree = ""; }; 111 | 6A34882F1F453803008223AA /* 4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 4.png; sourceTree = ""; }; 112 | 6A3488301F453803008223AA /* 5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 5.png; sourceTree = ""; }; 113 | 6A3488321F453803008223AA /* index0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = index0.png; sourceTree = ""; }; 114 | 6A3488331F453803008223AA /* index1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = index1.png; sourceTree = ""; }; 115 | 6A3488341F453803008223AA /* index2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = index2.png; sourceTree = ""; }; 116 | 6A3488351F453803008223AA /* index3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = index3.png; sourceTree = ""; }; 117 | 6A3488361F453803008223AA /* index4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = index4.png; sourceTree = ""; }; 118 | 6A3488371F453803008223AA /* index5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = index5.png; sourceTree = ""; }; 119 | 6A40DFCD1EE8E1320047E0F0 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; 120 | 6A582238202AF473002AFF76 /* client.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = client.json; sourceTree = ""; }; 121 | 6A7B2C661EFBBEF10036CE92 /* OrganRun.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = OrganRun.m4a; sourceTree = ""; }; 122 | 6A85F9941F00F0B00037A64F /* MixTest.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = MixTest.mp3; sourceTree = ""; }; 123 | 6AB297E31F4D8A9C00115220 /* GJLiveStartViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GJLiveStartViewController.h; sourceTree = ""; }; 124 | 6AB297E41F4D8A9C00115220 /* GJLiveStartViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GJLiveStartViewController.m; sourceTree = ""; }; 125 | 6AF9DDB51FA9763C00F6B4F7 /* SCNViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCNViewController.h; sourceTree = ""; }; 126 | 6AF9DDB71FA976A100F6B4F7 /* GJSunSystemARScene.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GJSunSystemARScene.h; sourceTree = ""; }; 127 | 6AF9DDB81FA976A100F6B4F7 /* GJSunSystemARScene.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GJSunSystemARScene.m; sourceTree = ""; }; 128 | 6AF9DDBA1FA97A5F00F6B4F7 /* art.scnassets */ = {isa = PBXFileReference; lastKnownFileType = wrapper.scnassets; path = art.scnassets; sourceTree = ""; }; 129 | C54FA8A81D21006000A0D3C3 /* GJLiveEngineDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GJLiveEngineDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 130 | C561ABEA1D51D3DC00113453 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 131 | C561ABEB1D51D3DC00113453 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 132 | C561ABEC1D51D3DC00113453 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 133 | C561ABFB1D51D3DC00113453 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 134 | C561ABFD1D51D3DC00113453 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 135 | C561AC8C1D51D3DC00113453 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 136 | C561AC931D51D3DC00113453 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 137 | C561AC941D51D3DC00113453 /* ViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ViewController.mm; sourceTree = ""; }; 138 | C573F16F1D4B4146002607B6 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; 139 | /* End PBXFileReference section */ 140 | 141 | /* Begin PBXFrameworksBuildPhase section */ 142 | 276408AF2124611500D6171E /* Frameworks */ = { 143 | isa = PBXFrameworksBuildPhase; 144 | buildActionMask = 2147483647; 145 | files = ( 146 | ); 147 | runOnlyForDeploymentPostprocessing = 0; 148 | }; 149 | C54FA8A51D21006000A0D3C3 /* Frameworks */ = { 150 | isa = PBXFrameworksBuildPhase; 151 | buildActionMask = 2147483647; 152 | files = ( 153 | 276408AD21245D8600D6171E /* GJLiveEngine.framework in Frameworks */, 154 | 275299CA21183C9800DD0403 /* Accelerate.framework in Frameworks */, 155 | 275299C921183C1100DD0403 /* libz.tbd in Frameworks */, 156 | 275299C821183C0C00DD0403 /* libstdc++.tbd in Frameworks */, 157 | ); 158 | runOnlyForDeploymentPostprocessing = 0; 159 | }; 160 | /* End PBXFrameworksBuildPhase section */ 161 | 162 | /* Begin PBXGroup section */ 163 | 2707292720F24C9E00DA051F /* ZipArchive */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | 2707292820F24C9E00DA051F /* ZipArchive.h */, 167 | 2707292920F24C9E00DA051F /* minizip */, 168 | 2707293320F24C9E00DA051F /* ZipArchive.m */, 169 | ); 170 | path = ZipArchive; 171 | sourceTree = ""; 172 | }; 173 | 2707292920F24C9E00DA051F /* minizip */ = { 174 | isa = PBXGroup; 175 | children = ( 176 | 2707292A20F24C9E00DA051F /* unzip.c */, 177 | 2707292B20F24C9E00DA051F /* zip.c */, 178 | 2707292C20F24C9E00DA051F /* ioapi.c */, 179 | 2707292D20F24C9E00DA051F /* mztools.c */, 180 | 2707292E20F24C9E00DA051F /* crypt.h */, 181 | 2707292F20F24C9E00DA051F /* zip.h */, 182 | 2707293020F24C9E00DA051F /* unzip.h */, 183 | 2707293120F24C9E00DA051F /* mztools.h */, 184 | 2707293220F24C9E00DA051F /* ioapi.h */, 185 | ); 186 | path = minizip; 187 | sourceTree = ""; 188 | }; 189 | 27529A1E21184B2600DD0403 /* Resource */ = { 190 | isa = PBXGroup; 191 | children = ( 192 | 6A34882A1F453803008223AA /* Image */, 193 | 6A85F9941F00F0B00037A64F /* MixTest.mp3 */, 194 | 276F43802179CF3800ECF347 /* sahua.gif */, 195 | 2707297420F389C400DA051F /* ios.h264 */, 196 | 2707293D20F24F0C00DA051F /* bd.zip */, 197 | 2707294020F24F0D00DA051F /* bear.zip */, 198 | 2707293E20F24F0C00DA051F /* hkbs.zip */, 199 | 2707293F20F24F0D00DA051F /* lb.zip */, 200 | 2707293B20F24DAD00DA051F /* track_data.dat */, 201 | 6A582238202AF473002AFF76 /* client.json */, 202 | 6A03892A1FF13004005AC7CE /* Particle.png */, 203 | 6AF9DDBA1FA97A5F00F6B4F7 /* art.scnassets */, 204 | C561ABEC1D51D3DC00113453 /* Assets.xcassets */, 205 | 6A7B2C661EFBBEF10036CE92 /* OrganRun.m4a */, 206 | ); 207 | path = Resource; 208 | sourceTree = ""; 209 | }; 210 | 27529A1F21184C8700DD0403 /* Discard */ = { 211 | isa = PBXGroup; 212 | children = ( 213 | 27529A2021184C8700DD0403 /* PlayMediaSDK */, 214 | 27529A2E21184C8700DD0403 /* OpenGLPlayer */, 215 | 27BD9BAB2119769C006300A6 /* StreamAddr.h */, 216 | ); 217 | path = Discard; 218 | sourceTree = ""; 219 | }; 220 | 27529A2021184C8700DD0403 /* PlayMediaSDK */ = { 221 | isa = PBXGroup; 222 | children = ( 223 | 27529A2121184C8700DD0403 /* g711.cpp */, 224 | 27529A2221184C8700DD0403 /* PlayMediaDecodec.cpp */, 225 | 27529A2321184C8700DD0403 /* mp4.h */, 226 | 27529A2421184C8700DD0403 /* aac.h */, 227 | 27529A2521184C8700DD0403 /* mp4.cpp */, 228 | 27529A2621184C8700DD0403 /* audio_ffmpeg.h */, 229 | 27529A2721184C8700DD0403 /* PlayMediaEncode.cpp */, 230 | 27529A2821184C8700DD0403 /* aac.cpp */, 231 | 27529A2921184C8700DD0403 /* PlayMediaFormat.cpp */, 232 | 27529A2A21184C8700DD0403 /* g711.h */, 233 | 27529A2B21184C8700DD0403 /* PlayMediaSDK.h */, 234 | 27529A2C21184C8700DD0403 /* PlayMediaSDK.cpp */, 235 | 27529A2D21184C8700DD0403 /* audio_ffmpeg.cpp */, 236 | ); 237 | path = PlayMediaSDK; 238 | sourceTree = ""; 239 | }; 240 | 27529A2E21184C8700DD0403 /* OpenGLPlayer */ = { 241 | isa = PBXGroup; 242 | children = ( 243 | 27529A2F21184C8700DD0403 /* OpenGLView20.m */, 244 | 27529A3021184C8700DD0403 /* OpenGLView20.h */, 245 | ); 246 | path = OpenGLPlayer; 247 | sourceTree = ""; 248 | }; 249 | 27529A45211851B700DD0403 /* Support Files */ = { 250 | isa = PBXGroup; 251 | children = ( 252 | 276409632126D34B00D6171E /* Info.plist */, 253 | C561AC8C1D51D3DC00113453 /* main.m */, 254 | 040EBEC81DFFD2660040AED0 /* GJCaptureTool.entitlements */, 255 | C561ABFA1D51D3DC00113453 /* LaunchScreen.storyboard */, 256 | C561ABFC1D51D3DC00113453 /* Main.storyboard */, 257 | ); 258 | path = "Support Files"; 259 | sourceTree = ""; 260 | }; 261 | 276408B52124611500D6171E /* GJLiveEngineDemoConfig */ = { 262 | isa = PBXGroup; 263 | children = ( 264 | 276408B62124611500D6171E /* SourceEditorExtension.h */, 265 | 276408B72124611500D6171E /* SourceEditorExtension.m */, 266 | 276408B92124611500D6171E /* SourceEditorCommand.h */, 267 | 276408BA2124611500D6171E /* SourceEditorCommand.m */, 268 | 276408BC2124611500D6171E /* Info.plist */, 269 | 276408BD2124611500D6171E /* GJCaptureToolConfig.entitlements */, 270 | ); 271 | path = GJLiveEngineDemoConfig; 272 | sourceTree = ""; 273 | }; 274 | 27BD9B9A21193876006300A6 /* Products */ = { 275 | isa = PBXGroup; 276 | children = ( 277 | 27BD9BA821193877006300A6 /* GJLiveEngine.framework */, 278 | 27BD9BAA21193877006300A6 /* GJLiveEngineConfigure.kext */, 279 | ); 280 | name = Products; 281 | sourceTree = ""; 282 | }; 283 | 6A34882A1F453803008223AA /* Image */ = { 284 | isa = PBXGroup; 285 | children = ( 286 | 6A34882B1F453803008223AA /* 0.png */, 287 | 6A34882C1F453803008223AA /* 1.png */, 288 | 6A34882D1F453803008223AA /* 2.png */, 289 | 6A34882E1F453803008223AA /* 3.png */, 290 | 6A34882F1F453803008223AA /* 4.png */, 291 | 6A3488301F453803008223AA /* 5.png */, 292 | 6A3488321F453803008223AA /* index0.png */, 293 | 6A3488331F453803008223AA /* index1.png */, 294 | 6A3488341F453803008223AA /* index2.png */, 295 | 6A3488351F453803008223AA /* index3.png */, 296 | 6A3488361F453803008223AA /* index4.png */, 297 | 6A3488371F453803008223AA /* index5.png */, 298 | ); 299 | path = Image; 300 | sourceTree = ""; 301 | }; 302 | AEFEF2291DB3B9A80004CF39 /* Frameworks */ = { 303 | isa = PBXGroup; 304 | children = ( 305 | 276408AC21245D8600D6171E /* GJLiveEngine.framework */, 306 | 6A40DFCD1EE8E1320047E0F0 /* Accelerate.framework */, 307 | C573F16F1D4B4146002607B6 /* libz.tbd */, 308 | 046F599D1E2E1C38007901EB /* libstdc++.tbd */, 309 | ); 310 | name = Frameworks; 311 | sourceTree = ""; 312 | }; 313 | C54FA89F1D21006000A0D3C3 = { 314 | isa = PBXGroup; 315 | children = ( 316 | 27BD9B9921193876006300A6 /* GJLiveEngine.xcodeproj */, 317 | C561ABE91D51D3DC00113453 /* GJLiveEngineDemo */, 318 | 276408B52124611500D6171E /* GJLiveEngineDemoConfig */, 319 | C54FA8A91D21006000A0D3C3 /* Products */, 320 | AEFEF2291DB3B9A80004CF39 /* Frameworks */, 321 | ); 322 | sourceTree = ""; 323 | }; 324 | C54FA8A91D21006000A0D3C3 /* Products */ = { 325 | isa = PBXGroup; 326 | children = ( 327 | C54FA8A81D21006000A0D3C3 /* GJLiveEngineDemo.app */, 328 | 276408B22124611500D6171E /* GJLiveEngineDemoConfig.appex */, 329 | ); 330 | name = Products; 331 | sourceTree = ""; 332 | }; 333 | C561ABE91D51D3DC00113453 /* GJLiveEngineDemo */ = { 334 | isa = PBXGroup; 335 | children = ( 336 | 27529A1F21184C8700DD0403 /* Discard */, 337 | 27529A1E21184B2600DD0403 /* Resource */, 338 | 2707292720F24C9E00DA051F /* ZipArchive */, 339 | 27529A45211851B700DD0403 /* Support Files */, 340 | C561ABEA1D51D3DC00113453 /* AppDelegate.h */, 341 | C561ABEB1D51D3DC00113453 /* AppDelegate.m */, 342 | C561AC931D51D3DC00113453 /* ViewController.h */, 343 | C561AC941D51D3DC00113453 /* ViewController.mm */, 344 | 6AF9DDB51FA9763C00F6B4F7 /* SCNViewController.h */, 345 | 6AF9DDB71FA976A100F6B4F7 /* GJSunSystemARScene.h */, 346 | 6AF9DDB81FA976A100F6B4F7 /* GJSunSystemARScene.m */, 347 | 041702831E5FC3D100D5B5D9 /* GJLivePushViewController.h */, 348 | 041702841E5FC3D100D5B5D9 /* GJLivePushViewController.m */, 349 | 27BD8C2A215B7F660051336D /* GJLiveDemoPrivate.h */, 350 | 6AB297E31F4D8A9C00115220 /* GJLiveStartViewController.h */, 351 | 6AB297E41F4D8A9C00115220 /* GJLiveStartViewController.m */, 352 | ); 353 | path = GJLiveEngineDemo; 354 | sourceTree = ""; 355 | }; 356 | /* End PBXGroup section */ 357 | 358 | /* Begin PBXNativeTarget section */ 359 | 276408B12124611500D6171E /* GJLiveEngineDemoConfig */ = { 360 | isa = PBXNativeTarget; 361 | buildConfigurationList = 276408BE2124611500D6171E /* Build configuration list for PBXNativeTarget "GJLiveEngineDemoConfig" */; 362 | buildPhases = ( 363 | 276408AE2124611500D6171E /* Sources */, 364 | 276408AF2124611500D6171E /* Frameworks */, 365 | 276408B02124611500D6171E /* Resources */, 366 | 276408C32124615A00D6171E /* ShellScript */, 367 | ); 368 | buildRules = ( 369 | ); 370 | dependencies = ( 371 | ); 372 | name = GJLiveEngineDemoConfig; 373 | productName = GJCaptureToolConfig; 374 | productReference = 276408B22124611500D6171E /* GJLiveEngineDemoConfig.appex */; 375 | productType = "com.apple.product-type.xcode-extension"; 376 | }; 377 | C54FA8A71D21006000A0D3C3 /* GJLiveEngineDemo */ = { 378 | isa = PBXNativeTarget; 379 | buildConfigurationList = C54FA8BF1D21006100A0D3C3 /* Build configuration list for PBXNativeTarget "GJLiveEngineDemo" */; 380 | buildPhases = ( 381 | C54FA8A41D21006000A0D3C3 /* Sources */, 382 | C54FA8A51D21006000A0D3C3 /* Frameworks */, 383 | C54FA8A61D21006000A0D3C3 /* Resources */, 384 | ); 385 | buildRules = ( 386 | ); 387 | dependencies = ( 388 | 276408C22124613E00D6171E /* PBXTargetDependency */, 389 | ); 390 | name = GJLiveEngineDemo; 391 | productName = media; 392 | productReference = C54FA8A81D21006000A0D3C3 /* GJLiveEngineDemo.app */; 393 | productType = "com.apple.product-type.application"; 394 | }; 395 | /* End PBXNativeTarget section */ 396 | 397 | /* Begin PBXProject section */ 398 | C54FA8A01D21006000A0D3C3 /* Project object */ = { 399 | isa = PBXProject; 400 | attributes = { 401 | LastUpgradeCheck = 0830; 402 | ORGANIZATIONNAME = MinorUncle; 403 | TargetAttributes = { 404 | 276408B12124611500D6171E = { 405 | CreatedOnToolsVersion = 9.4.1; 406 | ProvisioningStyle = Manual; 407 | }; 408 | C54FA8A71D21006000A0D3C3 = { 409 | CreatedOnToolsVersion = 7.3; 410 | DevelopmentTeam = XXHND5J98K; 411 | ProvisioningStyle = Manual; 412 | SystemCapabilities = { 413 | com.apple.BackgroundModes = { 414 | enabled = 1; 415 | }; 416 | com.apple.Keychain = { 417 | enabled = 0; 418 | }; 419 | com.apple.WAC = { 420 | enabled = 0; 421 | }; 422 | }; 423 | }; 424 | }; 425 | }; 426 | buildConfigurationList = C54FA8A31D21006000A0D3C3 /* Build configuration list for PBXProject "GJLiveEngineDemo" */; 427 | compatibilityVersion = "Xcode 6.3"; 428 | developmentRegion = English; 429 | hasScannedForEncodings = 0; 430 | knownRegions = ( 431 | en, 432 | Base, 433 | ); 434 | mainGroup = C54FA89F1D21006000A0D3C3; 435 | productRefGroup = C54FA8A91D21006000A0D3C3 /* Products */; 436 | projectDirPath = ""; 437 | projectReferences = ( 438 | { 439 | ProductGroup = 27BD9B9A21193876006300A6 /* Products */; 440 | ProjectRef = 27BD9B9921193876006300A6 /* GJLiveEngine.xcodeproj */; 441 | }, 442 | ); 443 | projectRoot = ""; 444 | targets = ( 445 | C54FA8A71D21006000A0D3C3 /* GJLiveEngineDemo */, 446 | 276408B12124611500D6171E /* GJLiveEngineDemoConfig */, 447 | ); 448 | }; 449 | /* End PBXProject section */ 450 | 451 | /* Begin PBXReferenceProxy section */ 452 | 27BD9BA821193877006300A6 /* GJLiveEngine.framework */ = { 453 | isa = PBXReferenceProxy; 454 | fileType = wrapper.framework; 455 | path = GJLiveEngine.framework; 456 | remoteRef = 27BD9BA721193877006300A6 /* PBXContainerItemProxy */; 457 | sourceTree = BUILT_PRODUCTS_DIR; 458 | }; 459 | 27BD9BAA21193877006300A6 /* GJLiveEngineConfigure.kext */ = { 460 | isa = PBXReferenceProxy; 461 | fileType = wrapper.cfbundle; 462 | path = GJLiveEngineConfigure.kext; 463 | remoteRef = 27BD9BA921193877006300A6 /* PBXContainerItemProxy */; 464 | sourceTree = BUILT_PRODUCTS_DIR; 465 | }; 466 | /* End PBXReferenceProxy section */ 467 | 468 | /* Begin PBXResourcesBuildPhase section */ 469 | 276408B02124611500D6171E /* Resources */ = { 470 | isa = PBXResourcesBuildPhase; 471 | buildActionMask = 2147483647; 472 | files = ( 473 | ); 474 | runOnlyForDeploymentPostprocessing = 0; 475 | }; 476 | C54FA8A61D21006000A0D3C3 /* Resources */ = { 477 | isa = PBXResourcesBuildPhase; 478 | buildActionMask = 2147483647; 479 | files = ( 480 | 6AF9DDBB1FA97A6000F6B4F7 /* art.scnassets in Resources */, 481 | C561ACA41D51D3DC00113453 /* Main.storyboard in Resources */, 482 | C561AC9C1D51D3DC00113453 /* Assets.xcassets in Resources */, 483 | C561ACA31D51D3DC00113453 /* LaunchScreen.storyboard in Resources */, 484 | 276F43812179CF3800ECF347 /* sahua.gif in Resources */, 485 | 27FD50B2214A66ED00315655 /* MixTest.mp3 in Resources */, 486 | ); 487 | runOnlyForDeploymentPostprocessing = 0; 488 | }; 489 | /* End PBXResourcesBuildPhase section */ 490 | 491 | /* Begin PBXShellScriptBuildPhase section */ 492 | 276408C32124615A00D6171E /* ShellScript */ = { 493 | isa = PBXShellScriptBuildPhase; 494 | buildActionMask = 2147483647; 495 | files = ( 496 | ); 497 | inputPaths = ( 498 | ); 499 | outputPaths = ( 500 | ); 501 | runOnlyForDeploymentPostprocessing = 0; 502 | shellPath = /bin/sh; 503 | shellScript = "if [ ! -f \"./GJLiveEngine/GJLiveEngine.framework/GJLiveEngine\" ]; then\nrm -rf ./GJLiveEngine\ngit clone git@github.com:MinorUncle/GJLiveEngine.git\ncd GJLiveEngine\nliveEngineID=`git rev-parse --short HEAD`\ncd ..\nplistFIle=\"GJLiveEngineDemo/Info.plist\"\n/usr/libexec/PlistBuddy -c \"Set GJLiveEngineID ${liveEngineID}\" $plistFIle\nelif [ ! -d \"./GJLiveEngine/GJLiveEngine.framework\" ]; then\n\ncd GJLiveEngine\ngit pull\ngit checkout .\nliveEngineID=`git rev-parse --short HEAD`\ncd ..\n\nplistFIle=\"GJLiveEngineDemo/Info.plist\"\n/usr/libexec/PlistBuddy -c \"Set GJLiveEngineID ${liveEngineID}\" $plistFIle\nfi\n"; 504 | }; 505 | /* End PBXShellScriptBuildPhase section */ 506 | 507 | /* Begin PBXSourcesBuildPhase section */ 508 | 276408AE2124611500D6171E /* Sources */ = { 509 | isa = PBXSourcesBuildPhase; 510 | buildActionMask = 2147483647; 511 | files = ( 512 | ); 513 | runOnlyForDeploymentPostprocessing = 0; 514 | }; 515 | C54FA8A41D21006000A0D3C3 /* Sources */ = { 516 | isa = PBXSourcesBuildPhase; 517 | buildActionMask = 2147483647; 518 | files = ( 519 | 2707293420F24C9E00DA051F /* unzip.c in Sources */, 520 | C561AC9B1D51D3DC00113453 /* AppDelegate.m in Sources */, 521 | 2707293720F24C9E00DA051F /* mztools.c in Sources */, 522 | 2707293620F24C9E00DA051F /* ioapi.c in Sources */, 523 | 275299C72118368B00DD0403 /* GJLiveStartViewController.m in Sources */, 524 | 6AF9DDB91FA976A100F6B4F7 /* GJSunSystemARScene.m in Sources */, 525 | C561ACB51D51D3DC00113453 /* main.m in Sources */, 526 | 2707293820F24C9E00DA051F /* ZipArchive.m in Sources */, 527 | 2707293520F24C9E00DA051F /* zip.c in Sources */, 528 | 6A04022020CA5A190098A86C /* GJLivePushViewController.m in Sources */, 529 | ); 530 | runOnlyForDeploymentPostprocessing = 0; 531 | }; 532 | /* End PBXSourcesBuildPhase section */ 533 | 534 | /* Begin PBXTargetDependency section */ 535 | 276408C22124613E00D6171E /* PBXTargetDependency */ = { 536 | isa = PBXTargetDependency; 537 | target = 276408B12124611500D6171E /* GJLiveEngineDemoConfig */; 538 | targetProxy = 276408C12124613E00D6171E /* PBXContainerItemProxy */; 539 | }; 540 | /* End PBXTargetDependency section */ 541 | 542 | /* Begin PBXVariantGroup section */ 543 | C561ABFA1D51D3DC00113453 /* LaunchScreen.storyboard */ = { 544 | isa = PBXVariantGroup; 545 | children = ( 546 | C561ABFB1D51D3DC00113453 /* Base */, 547 | ); 548 | name = LaunchScreen.storyboard; 549 | sourceTree = ""; 550 | }; 551 | C561ABFC1D51D3DC00113453 /* Main.storyboard */ = { 552 | isa = PBXVariantGroup; 553 | children = ( 554 | C561ABFD1D51D3DC00113453 /* Base */, 555 | ); 556 | name = Main.storyboard; 557 | sourceTree = ""; 558 | }; 559 | /* End PBXVariantGroup section */ 560 | 561 | /* Begin XCBuildConfiguration section */ 562 | 276408BF2124611500D6171E /* Debug */ = { 563 | isa = XCBuildConfiguration; 564 | buildSettings = { 565 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 566 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 567 | CLANG_ENABLE_OBJC_WEAK = YES; 568 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 569 | CLANG_WARN_COMMA = YES; 570 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 571 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 572 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 573 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 574 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 575 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 576 | CLANG_WARN_STRICT_PROTOTYPES = YES; 577 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 578 | CODE_SIGN_ENTITLEMENTS = ""; 579 | CODE_SIGN_IDENTITY = ""; 580 | CODE_SIGN_STYLE = Manual; 581 | COMBINE_HIDPI_IMAGES = YES; 582 | DEVELOPMENT_TEAM = ""; 583 | GCC_C_LANGUAGE_STANDARD = gnu11; 584 | HEADER_SEARCH_PATHS = ""; 585 | INFOPLIST_FILE = GJLiveEngineDemoConfig/Info.plist; 586 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks"; 587 | MACOSX_DEPLOYMENT_TARGET = 10.13; 588 | PRODUCT_BUNDLE_IDENTIFIER = GJ.GJLiveEngineDemoConfig; 589 | PRODUCT_NAME = "$(TARGET_NAME)"; 590 | PROVISIONING_PROFILE_SPECIFIER = ""; 591 | SDKROOT = macosx; 592 | SKIP_INSTALL = YES; 593 | }; 594 | name = Debug; 595 | }; 596 | 276408C02124611500D6171E /* Release */ = { 597 | isa = XCBuildConfiguration; 598 | buildSettings = { 599 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 600 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 601 | CLANG_ENABLE_OBJC_WEAK = YES; 602 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 603 | CLANG_WARN_COMMA = YES; 604 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 605 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 606 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 607 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 608 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 609 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 610 | CLANG_WARN_STRICT_PROTOTYPES = YES; 611 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 612 | CODE_SIGN_ENTITLEMENTS = ""; 613 | CODE_SIGN_IDENTITY = ""; 614 | CODE_SIGN_STYLE = Manual; 615 | COMBINE_HIDPI_IMAGES = YES; 616 | DEVELOPMENT_TEAM = ""; 617 | GCC_C_LANGUAGE_STANDARD = gnu11; 618 | HEADER_SEARCH_PATHS = ""; 619 | INFOPLIST_FILE = GJLiveEngineDemoConfig/Info.plist; 620 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks"; 621 | MACOSX_DEPLOYMENT_TARGET = 10.13; 622 | PRODUCT_BUNDLE_IDENTIFIER = GJ.GJLiveEngineDemoConfig; 623 | PRODUCT_NAME = "$(TARGET_NAME)"; 624 | PROVISIONING_PROFILE_SPECIFIER = ""; 625 | SDKROOT = macosx; 626 | SKIP_INSTALL = YES; 627 | }; 628 | name = Release; 629 | }; 630 | C54FA8BD1D21006100A0D3C3 /* Debug */ = { 631 | isa = XCBuildConfiguration; 632 | buildSettings = { 633 | ALWAYS_SEARCH_USER_PATHS = NO; 634 | CLANG_ANALYZER_NONNULL = YES; 635 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 636 | CLANG_CXX_LIBRARY = "libc++"; 637 | CLANG_ENABLE_MODULES = YES; 638 | CLANG_ENABLE_OBJC_ARC = YES; 639 | CLANG_WARN_BOOL_CONVERSION = YES; 640 | CLANG_WARN_CONSTANT_CONVERSION = YES; 641 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 642 | CLANG_WARN_EMPTY_BODY = YES; 643 | CLANG_WARN_ENUM_CONVERSION = YES; 644 | CLANG_WARN_INFINITE_RECURSION = YES; 645 | CLANG_WARN_INT_CONVERSION = YES; 646 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 647 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 648 | CLANG_WARN_UNREACHABLE_CODE = YES; 649 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 650 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 651 | COPY_PHASE_STRIP = NO; 652 | DEBUG_INFORMATION_FORMAT = dwarf; 653 | ENABLE_BITCODE = NO; 654 | ENABLE_STRICT_OBJC_MSGSEND = YES; 655 | ENABLE_TESTABILITY = YES; 656 | GCC_C_LANGUAGE_STANDARD = gnu99; 657 | GCC_DYNAMIC_NO_PIC = NO; 658 | GCC_NO_COMMON_BLOCKS = YES; 659 | GCC_OPTIMIZATION_LEVEL = 0; 660 | GCC_PREPROCESSOR_DEFINITIONS = ( 661 | "DEBUG=1", 662 | "$(inherited)", 663 | ); 664 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 665 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 666 | GCC_WARN_UNDECLARED_SELECTOR = YES; 667 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 668 | GCC_WARN_UNUSED_FUNCTION = YES; 669 | GCC_WARN_UNUSED_VARIABLE = YES; 670 | HEADER_SEARCH_PATHS = ( 671 | "\"$(SRCROOT)/GJCaptureTool/FFmpeg/include\"", 672 | "\"$(SRCROOT)/../GJMp4Demo/Mp4v2Code/include\"/**", 673 | ); 674 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 675 | MTL_ENABLE_DEBUG_INFO = YES; 676 | ONLY_ACTIVE_ARCH = YES; 677 | SDKROOT = iphoneos; 678 | }; 679 | name = Debug; 680 | }; 681 | C54FA8BE1D21006100A0D3C3 /* Release */ = { 682 | isa = XCBuildConfiguration; 683 | buildSettings = { 684 | ALWAYS_SEARCH_USER_PATHS = NO; 685 | CLANG_ANALYZER_NONNULL = YES; 686 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 687 | CLANG_CXX_LIBRARY = "libc++"; 688 | CLANG_ENABLE_MODULES = YES; 689 | CLANG_ENABLE_OBJC_ARC = YES; 690 | CLANG_WARN_BOOL_CONVERSION = YES; 691 | CLANG_WARN_CONSTANT_CONVERSION = YES; 692 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 693 | CLANG_WARN_EMPTY_BODY = YES; 694 | CLANG_WARN_ENUM_CONVERSION = YES; 695 | CLANG_WARN_INFINITE_RECURSION = YES; 696 | CLANG_WARN_INT_CONVERSION = YES; 697 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 698 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 699 | CLANG_WARN_UNREACHABLE_CODE = YES; 700 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 701 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 702 | COPY_PHASE_STRIP = NO; 703 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 704 | ENABLE_BITCODE = NO; 705 | ENABLE_NS_ASSERTIONS = NO; 706 | ENABLE_STRICT_OBJC_MSGSEND = YES; 707 | GCC_C_LANGUAGE_STANDARD = gnu99; 708 | GCC_NO_COMMON_BLOCKS = YES; 709 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 710 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 711 | GCC_WARN_UNDECLARED_SELECTOR = YES; 712 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 713 | GCC_WARN_UNUSED_FUNCTION = YES; 714 | GCC_WARN_UNUSED_VARIABLE = YES; 715 | HEADER_SEARCH_PATHS = ( 716 | "\"$(SRCROOT)/GJCaptureTool/FFmpeg/include\"", 717 | "\"$(SRCROOT)/../GJMp4Demo/Mp4v2Code/include\"/**", 718 | ); 719 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 720 | MTL_ENABLE_DEBUG_INFO = NO; 721 | SDKROOT = iphoneos; 722 | VALIDATE_PRODUCT = YES; 723 | }; 724 | name = Release; 725 | }; 726 | C54FA8C01D21006100A0D3C3 /* Debug */ = { 727 | isa = XCBuildConfiguration; 728 | buildSettings = { 729 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 730 | CODE_SIGN_IDENTITY = "iPhone Developer"; 731 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 732 | CODE_SIGN_STYLE = Manual; 733 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 734 | DEVELOPMENT_TEAM = XXHND5J98K; 735 | ENABLE_BITCODE = NO; 736 | FRAMEWORK_SEARCH_PATHS = ( 737 | "$(inherited)", 738 | "$(PROJECT_DIR)", 739 | "$(PROJECT_DIR)/GJLiveEngine", 740 | ); 741 | HEADER_SEARCH_PATHS = ""; 742 | INFOPLIST_FILE = GJLiveEngineDemo/Info.plist; 743 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 744 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 745 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 746 | PRODUCT_BUNDLE_IDENTIFIER = com.melot.engine.gjtest; 747 | PRODUCT_NAME = GJLiveEngineDemo; 748 | PROVISIONING_PROFILE = ""; 749 | PROVISIONING_PROFILE_SPECIFIER = BytedanceTech_Wildcard; 750 | USER_HEADER_SEARCH_PATHS = ""; 751 | }; 752 | name = Debug; 753 | }; 754 | C54FA8C11D21006100A0D3C3 /* Release */ = { 755 | isa = XCBuildConfiguration; 756 | buildSettings = { 757 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 758 | CODE_SIGN_IDENTITY = "iPhone Developer"; 759 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 760 | CODE_SIGN_STYLE = Manual; 761 | DEVELOPMENT_TEAM = ""; 762 | ENABLE_BITCODE = NO; 763 | FRAMEWORK_SEARCH_PATHS = ( 764 | "$(inherited)", 765 | "$(PROJECT_DIR)", 766 | "$(PROJECT_DIR)/GJLiveEngine", 767 | ); 768 | HEADER_SEARCH_PATHS = ""; 769 | INFOPLIST_FILE = GJLiveEngineDemo/Info.plist; 770 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 771 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 772 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 773 | ONLY_ACTIVE_ARCH = YES; 774 | PRODUCT_BUNDLE_IDENTIFIER = com.melot.engine.gjtest; 775 | PRODUCT_NAME = GJLiveEngineDemo; 776 | PROVISIONING_PROFILE = ""; 777 | PROVISIONING_PROFILE_SPECIFIER = ""; 778 | USER_HEADER_SEARCH_PATHS = ""; 779 | }; 780 | name = Release; 781 | }; 782 | /* End XCBuildConfiguration section */ 783 | 784 | /* Begin XCConfigurationList section */ 785 | 276408BE2124611500D6171E /* Build configuration list for PBXNativeTarget "GJLiveEngineDemoConfig" */ = { 786 | isa = XCConfigurationList; 787 | buildConfigurations = ( 788 | 276408BF2124611500D6171E /* Debug */, 789 | 276408C02124611500D6171E /* Release */, 790 | ); 791 | defaultConfigurationIsVisible = 0; 792 | defaultConfigurationName = Release; 793 | }; 794 | C54FA8A31D21006000A0D3C3 /* Build configuration list for PBXProject "GJLiveEngineDemo" */ = { 795 | isa = XCConfigurationList; 796 | buildConfigurations = ( 797 | C54FA8BD1D21006100A0D3C3 /* Debug */, 798 | C54FA8BE1D21006100A0D3C3 /* Release */, 799 | ); 800 | defaultConfigurationIsVisible = 0; 801 | defaultConfigurationName = Release; 802 | }; 803 | C54FA8BF1D21006100A0D3C3 /* Build configuration list for PBXNativeTarget "GJLiveEngineDemo" */ = { 804 | isa = XCConfigurationList; 805 | buildConfigurations = ( 806 | C54FA8C01D21006100A0D3C3 /* Debug */, 807 | C54FA8C11D21006100A0D3C3 /* Release */, 808 | ); 809 | defaultConfigurationIsVisible = 0; 810 | defaultConfigurationName = Release; 811 | }; 812 | /* End XCConfigurationList section */ 813 | }; 814 | rootObject = C54FA8A01D21006000A0D3C3 /* Project object */; 815 | } 816 | -------------------------------------------------------------------------------- /GJLiveEngineDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /GJLiveEngineDemo.xcodeproj/project.xcworkspace/xcshareddata/GJCaptureTool.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "8531738AFD4FE1FAF1D2FBB5BC4445ED8B189CFD", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "9670387BEDE34F0C92575289D60ABAE42AB2C0EC" : 9223372036854775807, 8 | "209E9479A1A97E12124DF571AB7D5159BE114365" : 9223372036854775807, 9 | "36C67C0385EBFE1DD9D872E42E2540A54C89CF0D" : 9223372036854775807, 10 | "1C9FDC6BD57F4F885A769CBC0880C8568DFADE4E" : 9223372036854775807, 11 | "70C44531FBADDC48462D431D1E6F94654B163C8D" : 9223372036854775807, 12 | "8531738AFD4FE1FAF1D2FBB5BC4445ED8B189CFD" : 9223372036854775807, 13 | "D157E2235DB6CAA02B4866781723863E4DFFD9EA" : 9223372036854775807, 14 | "1F24E7429ED5C58BA1FE17D97548CE86D6FD0783" : 9223372036854775807, 15 | "0B93145D3ABCBD6C31A0B6C6E9862005A459ADD3" : 9223372036854775807, 16 | "77616FF66051A7C7FCD7F759AF4655FEEA08155B" : 9223372036854775807 17 | }, 18 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "4A40DBAC-5404-444B-91AB-93552CD743F6", 19 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 20 | "9670387BEDE34F0C92575289D60ABAE42AB2C0EC" : "GJQueue\/", 21 | "209E9479A1A97E12124DF571AB7D5159BE114365" : "queue\/", 22 | "36C67C0385EBFE1DD9D872E42E2540A54C89CF0D" : "x264Code\/", 23 | "1C9FDC6BD57F4F885A769CBC0880C8568DFADE4E" : "DarwinStreamingServerCode\/", 24 | "70C44531FBADDC48462D431D1E6F94654B163C8D" : "GJImage\/GJImage\/", 25 | "8531738AFD4FE1FAF1D2FBB5BC4445ED8B189CFD" : "GJCaptureTool\/", 26 | "D157E2235DB6CAA02B4866781723863E4DFFD9EA" : "GJMp4Demo\/", 27 | "1F24E7429ED5C58BA1FE17D97548CE86D6FD0783" : "GJImage\/", 28 | "0B93145D3ABCBD6C31A0B6C6E9862005A459ADD3" : "ffmpegCode\/", 29 | "77616FF66051A7C7FCD7F759AF4655FEEA08155B" : "rtmpAndOpenssl\/" 30 | }, 31 | "DVTSourceControlWorkspaceBlueprintNameKey" : "GJCaptureTool", 32 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 33 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "GJCaptureTool.xcodeproj", 34 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 35 | { 36 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/MinorUncle\/ffmpegCode.git", 37 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 38 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "0B93145D3ABCBD6C31A0B6C6E9862005A459ADD3" 39 | }, 40 | { 41 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/MinorUncle\/DarwinStreamingServerCode.git", 42 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 43 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "1C9FDC6BD57F4F885A769CBC0880C8568DFADE4E" 44 | }, 45 | { 46 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/MinorUncle\/GJImage.git", 47 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 48 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "1F24E7429ED5C58BA1FE17D97548CE86D6FD0783" 49 | }, 50 | { 51 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:MinorUncle\/queue.git", 52 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 53 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "209E9479A1A97E12124DF571AB7D5159BE114365" 54 | }, 55 | { 56 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/MinorUncle\/x264Code.git", 57 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 58 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "36C67C0385EBFE1DD9D872E42E2540A54C89CF0D" 59 | }, 60 | { 61 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/MinorUncle\/GJImage.git", 62 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 63 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "70C44531FBADDC48462D431D1E6F94654B163C8D" 64 | }, 65 | { 66 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/MinorUncle\/rtmpAndOpenssl.git", 67 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 68 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "77616FF66051A7C7FCD7F759AF4655FEEA08155B" 69 | }, 70 | { 71 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/MinorUncle\/GJCaptureTool.git", 72 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 73 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "8531738AFD4FE1FAF1D2FBB5BC4445ED8B189CFD" 74 | }, 75 | { 76 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/MinorUncle\/GJQueue.git", 77 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 78 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "9670387BEDE34F0C92575289D60ABAE42AB2C0EC" 79 | }, 80 | { 81 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/MinorUncle\/GJMp4Demo.git", 82 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 83 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "D157E2235DB6CAA02B4866781723863E4DFFD9EA" 84 | } 85 | ] 86 | } -------------------------------------------------------------------------------- /GJLiveEngineDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /GJLiveEngineDemo.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // GJCaptureTool 4 | // 5 | // Created by tongguan on 16/6/27. 6 | // Copyright © 2016年 MinorUncle. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // GJCaptureTool 4 | // 5 | // Created by tongguan on 16/6/27. 6 | // Copyright © 2016年 MinorUncle. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ViewController.h" 11 | #import "GJLiveStartViewController.h" 12 | #import 13 | @interface AppDelegate () 14 | 15 | @end 16 | 17 | @implementation AppDelegate 18 | 19 | 20 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 21 | #ifdef DEBUG 22 | [UncaughtExceptionHandler InstallUncaughtExceptionHandler]; 23 | #endif 24 | // Override point for customization after application launch. 25 | self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds]; 26 | 27 | LIveStartViewController* controller = [[LIveStartViewController alloc]init]; 28 | // ViewController * controller = [[ViewController alloc]init]; 29 | UINavigationController* nav = [[UINavigationController alloc]initWithRootViewController:controller]; 30 | // nav.navigationBarHidden = YES; 31 | //设置背景透明图片 32 | [nav.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; 33 | // //去掉 bar 下面有一条黑色的线 34 | [nav.navigationBar setShadowImage:[UIImage new]]; 35 | // nav.navigationBar.userInteractionEnabled = NO; 36 | // nav.navigationBar.translucent = true; 37 | // [[[nav.navigationBar subviews] objectAtIndex:0] setAlpha:0]; 38 | self.window.rootViewController = nav; 39 | [self.window makeKeyAndVisible]; 40 | return YES; 41 | } 42 | 43 | - (void)applicationWillResignActive:(UIApplication *)application { 44 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 45 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 46 | } 47 | 48 | static int backgroundTaskCount = 0; 49 | - (int)getBackgroundTaskCount { 50 | return backgroundTaskCount; 51 | } 52 | 53 | - (void)incrementBackgroundTaskCount { 54 | if (backgroundTaskCount >= 0) { 55 | backgroundTaskCount++; 56 | } 57 | } 58 | 59 | - (void)resetBackgroundTaskCount { 60 | backgroundTaskCount = 0; 61 | } 62 | 63 | UIBackgroundTaskIdentifier backgroundTask = 0; 64 | UIBackgroundTaskIdentifier helperBackgroundTask = 0; 65 | static int backgroundTaskTimeLimit = 0; 66 | static const int MAXIMUM_BACKGROUND_TASKS = 2; 67 | 68 | dispatch_block_t helperBackgroundTaskBlock = ^{ 69 | [[NSThread currentThread] setName:@"helperBackgroundTaskBlock.init"]; 70 | [[UIApplication sharedApplication] endBackgroundTask:helperBackgroundTask]; 71 | helperBackgroundTask = UIBackgroundTaskInvalid; 72 | helperBackgroundTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:helperBackgroundTaskBlock]; 73 | }; 74 | 75 | 76 | -(void)stopHelperBackgroundTask { 77 | NSLog(@"stopHelperBackgroundTask called"); 78 | helperBackgroundTaskBlock = ^{ 79 | [[NSThread currentThread] setName:@"helperBackgroundTaskBlock.stopped"]; 80 | [[UIApplication sharedApplication] endBackgroundTask:helperBackgroundTask]; 81 | helperBackgroundTask = UIBackgroundTaskInvalid; 82 | }; 83 | if (helperBackgroundTask) { 84 | [[UIApplication sharedApplication] endBackgroundTask:helperBackgroundTask]; 85 | helperBackgroundTask = UIBackgroundTaskInvalid; 86 | } 87 | } 88 | 89 | - (void)stopBackgroundTask { 90 | 91 | NSLog(@"stopBackgroundTask called"); 92 | UIBackgroundTaskIdentifier identifier = backgroundTask; 93 | backgroundTask = 0; 94 | [[UIApplication sharedApplication] endBackgroundTask:identifier]; 95 | 96 | } 97 | -(void)startHelperBackgroundTask { 98 | NSLog(@"startHelperBackgroundTask called"); 99 | if (!helperBackgroundTaskBlock) { 100 | helperBackgroundTaskBlock = ^{ 101 | [[NSThread currentThread] setName:@"helperBackgroundTaskBlock.started"]; 102 | [[UIApplication sharedApplication] endBackgroundTask:helperBackgroundTask]; 103 | helperBackgroundTask = UIBackgroundTaskInvalid; 104 | }; 105 | } 106 | helperBackgroundTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:helperBackgroundTaskBlock]; 107 | } 108 | -(void)setBackgroundTaskTimeLimit { 109 | [self startHelperBackgroundTask]; 110 | 111 | // Wait for background async task by 'OhadM': 112 | // http://stackoverflow.com/a/31893720 113 | dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); 114 | 115 | dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{ 116 | @autoreleasepool { 117 | 118 | [[NSThread currentThread] setName:@"setBackgroundTaskTimeLimit.dispatch_async"]; 119 | backgroundTaskTimeLimit = [[UIApplication sharedApplication ] backgroundTimeRemaining]; 120 | NSLog(@"setBackgroundTaskTimeLimit to: %i", backgroundTaskTimeLimit); 121 | 122 | } 123 | dispatch_semaphore_signal(semaphore); 124 | }); 125 | 126 | dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); 127 | [self stopHelperBackgroundTask]; 128 | } 129 | -(void)doBackgroundTaskAsync:(SEL)selector { 130 | 131 | NSLog(@"doBackgroundTaskAsync called"); 132 | if ([[UIApplication sharedApplication] applicationState] != UIApplicationStateBackground 133 | || [self getBackgroundTaskCount] >= MAXIMUM_BACKGROUND_TASKS) { 134 | NSLog(@"doBackgroundTaskAsync denied start"); 135 | return; 136 | } 137 | 138 | [self startHelperBackgroundTask]; 139 | 140 | [self incrementBackgroundTaskCount]; 141 | dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{ 142 | [[NSThread currentThread] setName:@"doBackgroundTaskAsync.dispatch_async"]; 143 | while ([[UIApplication sharedApplication] applicationState] == UIApplicationStateBackground) { 144 | NSLog(@"doBackgroundTaskAsync in while loop. TR: %f", [[UIApplication sharedApplication] backgroundTimeRemaining]); 145 | [self performSelector: @selector(keepAlive)]; 146 | sleep(5.0); 147 | } 148 | NSLog(@"doBackgroundTaskAsync task ended"); 149 | }); 150 | } 151 | - (void)applicationDidEnterBackground:(UIApplication *)application { 152 | // NSLog(@"handleBackgroundTasks called"); 153 | // UIDevice *device = [UIDevice currentDevice]; 154 | // BOOL backgroundSupported = NO; 155 | // if ([device respondsToSelector:@selector(isMultitaskingSupported)]) { 156 | // backgroundSupported = device.multitaskingSupported; 157 | // } 158 | // if (backgroundSupported) { // perform a background task 159 | // 160 | // [self setBackgroundTaskTimeLimit]; 161 | // [self doBackgroundTaskAsync:@selector(keepAlive)]; 162 | // [self performSelector:@selector(doBackgroundTaskAsync:) withObject:nil afterDelay:[self getBackgroundTaskStartupDelay]]; 163 | // 164 | // } 165 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 166 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 167 | } 168 | -(int)getBackgroundTaskStartupDelay { 169 | int target = 10; 170 | int startupDelay = 0; 171 | 172 | if (backgroundTaskTimeLimit >= target) { 173 | startupDelay = backgroundTaskTimeLimit - target; 174 | } 175 | 176 | return startupDelay; 177 | } 178 | -(void)keepAlive { 179 | // [AirFloatSharedAppDelegate startRaopServer]; 180 | NSLog(@"keepAlive"); 181 | } 182 | - (void)applicationWillEnterForeground:(UIApplication *)application { 183 | // NSLog(@"handleForegroundTasks called"); 184 | // [self resetBackgroundTaskCount]; 185 | // [self stopHelperBackgroundTask]; 186 | // [self stopBackgroundTask]; 187 | 188 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 189 | } 190 | 191 | - (void)applicationDidBecomeActive:(UIApplication *)application { 192 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 193 | } 194 | 195 | - (void)applicationWillTerminate:(UIApplication *)application { 196 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 197 | } 198 | 199 | @end 200 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/GJLiveDemoPrivate.h: -------------------------------------------------------------------------------- 1 | // 2 | // GJLiveDemoPrivate.h 3 | // GJLiveEngineDemo 4 | // 5 | // Created by kyle on 2018/9/26. 6 | // Copyright © 2018年 MinorUncle. All rights reserved. 7 | // 8 | 9 | #ifndef GJLiveDemoPrivate_h 10 | #define GJLiveDemoPrivate_h 11 | 12 | #define PULL_URL @"rtmp://live.hkstv.hk.lxdns.com/live/hks"; 13 | #define RECODE_NET 14 | #define PULL_COUNT 1 15 | 16 | //请注释 #import "StreamAddr.h",自行通过以下宏配置推拉流地址。 17 | #import "StreamAddr.h" 18 | //#define PUSH_URL 19 | //#define PULL_URL 20 | //#undef PUSH_URL 21 | //#define PULL_URL @"http://pull-flv-l6-spe.ixigua.com/fantasy/stream-6613909499315129091_720p.flv" 22 | #endif /* GJLiveDemoPrivate_h */ 23 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/GJLivePushViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // GJLivePushViewController.h 3 | // GJCaptureTool 4 | // 5 | // Created by mac on 17/2/24. 6 | // Copyright © 2017年 MinorUncle. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | @interface GJLivePushViewController : UIViewController 12 | @property(nonatomic,copy)NSString* pullAddr; 13 | @property(nonatomic,copy)NSString* pushAddr; 14 | @property(nonatomic,assign)GJCaptureType type; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/GJLiveStartViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // LIveStartViewController.h 3 | // GJCaptureTool 4 | // 5 | // Created by melot on 2017/8/23. 6 | // Copyright © 2017年 MinorUncle. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LIveStartViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/GJLiveStartViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // LIveStartViewController.m 3 | // GJCaptureTool 4 | // 5 | // Created by melot on 2017/8/23. 6 | // Copyright © 2017年 MinorUncle. All rights reserved. 7 | // 8 | 9 | #import "GJLiveStartViewController.h" 10 | #import "GJLivePushViewController.h" 11 | #import "GJLiveDemoPrivate.h" 12 | 13 | 14 | @interface LIveStartViewController () 15 | { 16 | UIButton* _startBtn; 17 | UIButton* _arStartBtn; 18 | UIButton* _uiStartBtn; 19 | UIButton* _paintStartBtn; 20 | UITextField* _pushAddr; 21 | UITextField* _pullAddr; 22 | 23 | } 24 | @end 25 | 26 | @implementation LIveStartViewController 27 | 28 | - (void)viewDidLoad { 29 | [super viewDidLoad]; 30 | 31 | // int a[2] = {0}; 32 | // a[2] = 2; 33 | // self.navigationController.navigationBarHidden = YES; 34 | self.view.backgroundColor = [UIColor whiteColor]; 35 | 36 | int yCount = 6; 37 | CGFloat yPadding = 100; 38 | CGFloat height = 50; 39 | CGFloat marrgin = (self.view.bounds.size.height - yPadding*2 - yCount * height)/(yCount - 1); 40 | 41 | CGRect rect = CGRectMake(0, yPadding, 80, height); 42 | UILabel* leftLab = [[UILabel alloc]initWithFrame:rect]; 43 | leftLab.text = @"拉流地址"; 44 | [self.view addSubview:leftLab]; 45 | 46 | rect.origin.y = CGRectGetMaxY(rect)+marrgin; 47 | leftLab = [[UILabel alloc]initWithFrame:rect]; 48 | leftLab.text = @"推流地址"; 49 | [self.view addSubview:leftLab]; 50 | 51 | rect.origin.y = yPadding; 52 | rect.origin.x = leftLab.frame.size.width; 53 | rect.size.width = self.view.bounds.size.width - rect.size.width; 54 | 55 | _pullAddr = [[UITextField alloc]initWithFrame:rect]; 56 | _pullAddr.borderStyle = UITextBorderStyleRoundedRect; 57 | #ifdef PULL_URL 58 | _pullAddr.text = PULL_URL; 59 | #endif 60 | [self.view addSubview:_pullAddr]; 61 | 62 | rect.origin.y = CGRectGetMaxY(rect)+marrgin; 63 | _pushAddr = [[UITextField alloc]initWithFrame:rect]; 64 | #ifdef PUSH_URL 65 | _pushAddr.text = PUSH_URL; 66 | #endif 67 | _pushAddr.borderStyle = UITextBorderStyleRoundedRect; 68 | [self.view addSubview:_pushAddr]; 69 | 70 | rect.origin.y = CGRectGetMaxY(rect)+marrgin; 71 | rect.origin.x = 0; 72 | rect.size.width = self.view.bounds.size.width; 73 | _startBtn = [[UIButton alloc]initWithFrame:rect]; 74 | [_startBtn addTarget:self action:@selector(startBtn:) forControlEvents:UIControlEventTouchUpInside]; 75 | [_startBtn setTitle:@"相机直播" forState:UIControlStateNormal]; 76 | [_startBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; 77 | [self.view addSubview:_startBtn]; 78 | 79 | rect.origin.y = CGRectGetMaxY(rect)+marrgin; 80 | _arStartBtn = [[UIButton alloc]initWithFrame:rect]; 81 | [_arStartBtn addTarget:self action:@selector(startBtn:) forControlEvents:UIControlEventTouchUpInside]; 82 | [_arStartBtn setTitle:@"AR直播" forState:UIControlStateNormal]; 83 | [_arStartBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; 84 | [self.view addSubview:_arStartBtn]; 85 | 86 | rect.origin.y = CGRectGetMaxY(rect)+marrgin; 87 | _uiStartBtn = [[UIButton alloc]initWithFrame:rect]; 88 | [_uiStartBtn addTarget:self action:@selector(startBtn:) forControlEvents:UIControlEventTouchUpInside]; 89 | [_uiStartBtn setTitle:@"view直播" forState:UIControlStateNormal]; 90 | [_uiStartBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; 91 | [self.view addSubview:_uiStartBtn]; 92 | 93 | rect.origin.y = CGRectGetMaxY(rect)+marrgin; 94 | _paintStartBtn = [[UIButton alloc]initWithFrame:rect]; 95 | [_paintStartBtn addTarget:self action:@selector(startBtn:) forControlEvents:UIControlEventTouchUpInside]; 96 | [_paintStartBtn setTitle:@"画笔直播" forState:UIControlStateNormal]; 97 | [_paintStartBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; 98 | [self.view addSubview:_paintStartBtn]; 99 | // Do any additional setup after loading the view. 100 | } 101 | -(void)startBtn:(UIButton*)btn{ 102 | NSString* pull = _pullAddr.text; 103 | NSString* push = _pushAddr.text; 104 | if (!pull || !pull) { 105 | return; 106 | } 107 | // NSString* path = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES)[0]; 108 | //// path = [path stringByAppendingPathComponent:@"demo.mp4"]; 109 | //// 110 | GJLivePushViewController* c = [[GJLivePushViewController alloc]init]; 111 | // pull = [[NSBundle mainBundle]pathForResource:@"ios" ofType:@"h264"]; 112 | c.pullAddr = pull; 113 | c.pushAddr = push; 114 | 115 | if (btn == _arStartBtn) { 116 | c.type = kGJCaptureTypeAR; 117 | }else if (btn == _startBtn){ 118 | c.type = kGJCaptureTypeCamera; 119 | }else if(btn == _paintStartBtn){ 120 | c.type = kGJCaptureTypePaint; 121 | }else if (btn == _uiStartBtn){ 122 | c.type = kGJCaptureTypeView; 123 | } 124 | [self.navigationController pushViewController:c animated:YES]; 125 | } 126 | 127 | - (void)didReceiveMemoryWarning { 128 | [super didReceiveMemoryWarning]; 129 | // Dispose of any resources that can be recreated. 130 | } 131 | 132 | /* 133 | #pragma mark - Navigation 134 | 135 | // In a storyboard-based application, you will often want to do a little preparation before navigation 136 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 137 | // Get the new view controller using [segue destinationViewController]. 138 | // Pass the selected object to the new view controller. 139 | } 140 | */ 141 | 142 | @end 143 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/GJSunSystemARScene.h: -------------------------------------------------------------------------------- 1 | // 2 | // GJSunSystemARScene.h 3 | // GJCaptureTool 4 | // 5 | // Created by melot on 2017/11/1. 6 | // Copyright © 2017年 MinorUncle. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SCNViewController.h" 11 | #import 12 | 13 | API_AVAILABLE(ios(11.0)) 14 | @interface GJSunSystemARScene:NSObject 15 | @property(nonatomic,retain) SCNViewController* controller; 16 | @property(nonatomic,retain,readonly) ARSCNView* scene; 17 | @property(nonatomic,assign) NSInteger updateFps; 18 | @property(readonly, nonatomic) BOOL isRunning; 19 | @property(nonatomic,assign) ARUpdateBlock updateBlock; 20 | - (AVCaptureDevicePosition)cameraPosition; 21 | - (void)rotateCamera; 22 | 23 | -(BOOL)startRun; 24 | -(void)stopRun; 25 | -(void)pause; 26 | -(BOOL)resume; 27 | @end 28 | 29 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/GJSunSystemARScene.m: -------------------------------------------------------------------------------- 1 | // 2 | // GJSunSystemARScene.m 3 | // GJCaptureTool 4 | // 5 | // Created by melot on 2017/11/1. 6 | // Copyright © 2017年 MinorUncle. All rights reserved. 7 | // 8 | 9 | #import "GJSunSystemARScene.h" 10 | 11 | @implementation GJSunSystemARScene 12 | @synthesize isRunning = _isRunning; 13 | - (instancetype)init 14 | { 15 | self = [super init]; 16 | if (self) { 17 | _controller = [[SCNViewController alloc]init]; 18 | _scene = _controller.arRightView; 19 | _updateFps = 60; 20 | } 21 | return self; 22 | } 23 | 24 | -(void)setUpdateBlock:(ARUpdateBlock)updateBlock{ 25 | _updateBlock = updateBlock; 26 | _controller.updateBlock = updateBlock; 27 | } 28 | -(void)rotateCamera{ 29 | return ; 30 | } 31 | -(AVCaptureDevicePosition)cameraPosition{ 32 | return AVCaptureDevicePositionBack; 33 | } 34 | 35 | -(BOOL)startRun{ 36 | _controller.view.backgroundColor = [UIColor redColor]; 37 | [_controller.arSession runWithConfiguration:_controller.arSessionConfiguration options:ARSessionRunOptionRemoveExistingAnchors|ARSessionRunOptionResetTracking]; 38 | _isRunning = YES; 39 | return YES; 40 | } 41 | -(void)stopRun{ 42 | [_controller.arSession pause]; 43 | _scene.scene.paused = YES; 44 | _isRunning = NO; 45 | } 46 | 47 | -(void)pause{ 48 | [_controller.arSession pause]; 49 | _scene.scene.paused = YES; 50 | _isRunning = NO; 51 | 52 | } 53 | -(BOOL)resume{ 54 | [_controller.arSession runWithConfiguration:_controller.arSessionConfiguration options:0]; 55 | _scene.scene.paused = NO; 56 | _isRunning = YES; 57 | return YES; 58 | } 59 | 60 | -(BOOL)isRunning{ 61 | return _isRunning; 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | GJLiveEngineID 24 | 56a1234 25 | LSRequiresIPhoneOS 26 | 27 | NSCameraUsageDescription 28 | 相机 29 | NSMicrophoneUsageDescription 30 | 麦克风 31 | UIBackgroundModes 32 | 33 | audio 34 | 35 | UILaunchStoryboardName 36 | LaunchScreen 37 | UIRequiredDeviceCapabilities 38 | 39 | armv7 40 | 41 | UISupportedInterfaceOrientations 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationLandscapeLeft 45 | UIInterfaceOrientationLandscapeRight 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "size" : "1024x1024", 46 | "scale" : "1x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/Image/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/Image/0.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/Image/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/Image/1.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/Image/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/Image/2.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/Image/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/Image/3.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/Image/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/Image/4.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/Image/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/Image/5.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/Image/index0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/Image/index0.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/Image/index1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/Image/index1.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/Image/index2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/Image/index2.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/Image/index3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/Image/index3.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/Image/index4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/Image/index4.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/Image/index5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/Image/index5.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/MixTest.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/MixTest.mp3 -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/OrganRun.m4a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/OrganRun.m4a -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/Particle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/Particle.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/Credit.txt: -------------------------------------------------------------------------------- 1 | Images courtesy of NASA and Visible Earth http://visibleearth.nasa.gov -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/cloudsTransparency-mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/cloudsTransparency-mini.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/cloudsTransparency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/cloudsTransparency.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/earth-bump.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/earth-bump.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/earth-diffuse-mini.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/earth-diffuse-mini.jpg -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/earth-diffuse.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/earth-diffuse.jpg -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/earth-emissive-mini.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/earth-emissive-mini.jpg -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/earth-emissive-mini2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/earth-emissive-mini2.jpg -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/earth-emissive.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/earth-emissive.jpg -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/earth-reflective.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/earth-reflective.jpg -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/earth-specular-mini.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/earth-specular-mini.jpg -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/earth-specular.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/earth-specular.jpg -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/jupiter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/jupiter.jpg -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/jupiter_loop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/jupiter_loop.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/mars.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/mars.jpg -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/mercury.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/mercury.jpg -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/moon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/moon.jpg -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/neptune.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/neptune.jpg -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/neptune_loop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/neptune_loop.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/orbit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/orbit.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/orbit1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/orbit1.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/pluto.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/pluto.jpg -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/saturn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/saturn.jpg -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/saturn_cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/saturn_cloud.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/saturn_loop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/saturn_loop.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/sun-halo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/sun-halo.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/sun.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/sun.jpg -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/uranus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/uranus.jpg -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/uranus_loop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/uranus_loop.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/earth/venus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/earth/venus.jpg -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/shipc.scn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/shipc.scn -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/art.scnassets/texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/art.scnassets/texture.png -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/bd.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/bd.zip -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/bear.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/bear.zip -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/client.json: -------------------------------------------------------------------------------- 1 | { 2 | "localport": 1935, 3 | "local表示client监听本地tcp的地址,本地tcp需要发送到该地址,server表示上层tcp服务器的监听IP地址,端口都使用1935,rtmp端口地址":1935, 4 | "remoteaddr": "10.0.22.213", 5 | "remote表示对端服务器的kcp监听地址,client收到tcp数据后通过kcp发送数据到此地址,server表示收到kcp数据后通过tcp发送到本机该地址,所以服务器该地址一定为127.0.0.1":0, 6 | "remoteport": 1935, 7 | "key": "14789632a", 8 | "crypt": "none", 9 | "mode": "fast", 10 | "mtu": 1400, 11 | "sndwnd": 4096, 12 | "rcvwnd": 512, 13 | "datashard": 10, 14 | "parityshard": 3, 15 | "dscp": 0, 16 | "nocomp": true, 17 | "acknodelay": false, 18 | "nodelay": 0, 19 | "interval": 20, 20 | "resend": 2, 21 | "nc": 1, 22 | "sockbuf": 4194304, 23 | "keepalive": 10 24 | } 25 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/hkbs.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/hkbs.zip -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/ios.h264: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/ios.h264 -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/lb.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/lb.zip -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/sahua.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/sahua.gif -------------------------------------------------------------------------------- /GJLiveEngineDemo/Resource/track_data.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MinorUncle/GJLiveEngineDemo/086b99fe593bbeaa8f193fe93ee5f5db247f8acf/GJLiveEngineDemo/Resource/track_data.dat -------------------------------------------------------------------------------- /GJLiveEngineDemo/SCNViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SCNViewController.h 3 | // ARPlayDemo 4 | // 5 | // Created by alexyang on 2017/7/11. 6 | // Copyright © 2017年 alexyang. All rights reserved. 7 | // 8 | 9 | #import 10 | //3D游戏框架 11 | #import 12 | //ARKit框架 13 | #import 14 | typedef void(^ARUpdateBlock)(); 15 | 16 | API_AVAILABLE(ios(11.0)) 17 | @interface SCNViewController : UIViewController 18 | @property(nonatomic, assign) BOOL isCardBoard; 19 | //AR视图:展示3D界面 20 | @property (nonatomic, strong)ARSCNView *arSCNView; 21 | @property (nonatomic, strong)ARSCNView *arLeftView; 22 | @property (nonatomic, strong)ARSCNView *arRightView; 23 | @property(nonatomic,copy) ARUpdateBlock updateBlock; 24 | 25 | //AR会话,负责管理相机追踪配置及3D相机坐标 26 | @property(nonatomic,strong)ARSession *arSession; 27 | 28 | //会话追踪配置 29 | @property(nonatomic,strong)ARWorldTrackingConfiguration *arSessionConfiguration; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/Support Files/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/Support Files/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 32 | 33 | 34 | 35 | 43 | 55 | 60 | 61 | 62 | 63 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/Support Files/GJCaptureTool.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/Support Files/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // GJCaptureTool 4 | // 5 | // Created by tongguan on 16/6/27. 6 | // Copyright © 2016年 MinorUncle. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // GJCaptureTool 4 | // 5 | // Created by tongguan on 16/6/27. 6 | // Copyright © 2016年 MinorUncle. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/ZipArchive/ZipArchive.h: -------------------------------------------------------------------------------- 1 | /** 2 | // @header ZipArchive.h 3 | // 4 | // An objective C wrapper for minizip and libz for creating and exanding ZIP files. 5 | // 6 | // @author Created by aish on 08-9-11. 7 | // acsolu@gmail.com 8 | // @copyright Copyright 2008 Inc. All rights reserved. 9 | // 10 | */ 11 | 12 | 13 | #include "minizip/zip.h" 14 | #include "minizip/unzip.h" 15 | #import 16 | 17 | 18 | /** 19 | a block that is called from UnzipFileTo:overwrite:withProgressBlock: where the percentage of 20 | files processed (as an integer from 0 to 100), the number of files processed so far and the 21 | total number of files in the archive is called after each file is processed. 22 | */ 23 | typedef void(^ZipArchiveProgressUpdateBlock)(int percentage, int filesProcessed, int numFiles); 24 | 25 | /** 26 | @protocol 27 | @discussion methods for a delegate to receive error notifications and control overwriting of files 28 | */ 29 | 30 | @protocol ZipArchiveDelegate 31 | @optional 32 | 33 | /** 34 | @brief Delegate method to be notified of errors 35 | 36 | ZipArchive calls this selector on the delegate when errors are encountered. 37 | 38 | @param msg a string describing the error. 39 | @result void 40 | */ 41 | 42 | -(void) ErrorMessage:(NSString*) msg; 43 | 44 | /** 45 | @brief Delegate method to determine if a file should be replaced 46 | 47 | When an zip file is being expanded and a file is about to be replaced, this selector 48 | is called on the delegate to notify that file is about to be replaced. The delegate method 49 | should return YES to overwrite the file, or NO to skip it. 50 | 51 | @param file - path to the file to be overwritten. 52 | @result a BOOL - YES to replace, NO to skip 53 | */ 54 | 55 | -(BOOL) OverWriteOperation:(NSString*) file; 56 | 57 | @end 58 | 59 | /** 60 | @class 61 | @brief An object that can create zip files and expand existing ones. 62 | This class provides methods to create a zip file (optionally with a password) and 63 | add files to that zip archive. 64 | 65 | It also provides methods to expand an existing archive file (optionally with a password), 66 | and extract the files. 67 | */ 68 | 69 | @interface ZipArchive : NSObject { 70 | @private 71 | zipFile _zipFile; 72 | unzFile _unzFile; 73 | 74 | int _numFiles; 75 | NSString* _password; 76 | id _delegate; 77 | ZipArchiveProgressUpdateBlock _progressBlock; 78 | 79 | NSArray* _unzippedFiles; 80 | } 81 | 82 | /** a delegate object conforming to ZipArchiveDelegate protocol */ 83 | @property (nonatomic, assign) id delegate; 84 | @property (nonatomic, readonly) int numFiles; 85 | @property (nonatomic, copy) ZipArchiveProgressUpdateBlock progressBlock; 86 | 87 | /** an array of files that were successfully expanded. Available after calling UnzipFileTo:overWrite: */ 88 | @property (nonatomic, readonly) NSArray* unzippedFiles; 89 | 90 | -(BOOL) CreateZipFile2:(NSString*) zipFile; 91 | -(BOOL) CreateZipFile2:(NSString*) zipFile Password:(NSString*) password; 92 | -(BOOL) addFileToZip:(NSString*) file newname:(NSString*) newname; 93 | -(BOOL) CloseZipFile2; 94 | 95 | -(BOOL) UnzipOpenFile:(NSString*) zipFile; 96 | -(BOOL) UnzipOpenFile:(NSString*) zipFile Password:(NSString*) password; 97 | -(BOOL) UnzipFileTo:(NSString*) path overWrite:(BOOL) overwrite; 98 | -(BOOL) UnzipCloseFile; 99 | -(NSArray*) getZipFileContents; // list the contents of the zip archive. must be called after UnzipOpenFile 100 | 101 | @end 102 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/ZipArchive/ZipArchive.m: -------------------------------------------------------------------------------- 1 | /** 2 | // ZipArchive.m 3 | // 4 | // 5 | // Created by aish on 08-9-11. 6 | // acsolu@gmail.com 7 | // Copyright 2008 Inc. All rights reserved. 8 | // 9 | */ 10 | 11 | #import "ZipArchive.h" 12 | #import "zlib.h" 13 | #import "zconf.h" 14 | 15 | 16 | @interface NSFileManager(ZipArchive) 17 | - (NSDictionary *)_attributesOfItemAtPath:(NSString *)path followingSymLinks:(BOOL)followingSymLinks error:(NSError **)error; 18 | @end 19 | 20 | @interface ZipArchive () 21 | 22 | -(void) OutputErrorMessage:(NSString*) msg; 23 | -(BOOL) OverWrite:(NSString*) file; 24 | -(NSDate*) Date1980; 25 | 26 | @property (nonatomic,copy) NSString* password; 27 | @end 28 | 29 | 30 | 31 | @implementation ZipArchive 32 | @synthesize delegate = _delegate; 33 | @synthesize numFiles = _numFiles; 34 | @synthesize password = _password; 35 | @synthesize unzippedFiles = _unzippedFiles; 36 | @synthesize progressBlock = _progressBlock; 37 | 38 | -(id) init 39 | { 40 | if( self=[super init] ) 41 | { 42 | _zipFile = NULL; 43 | } 44 | return self; 45 | } 46 | 47 | -(void) dealloc 48 | { 49 | // close any open file operations 50 | [self CloseZipFile2]; 51 | [self UnzipCloseFile]; 52 | 53 | // release retained/copied properties. 54 | [_password release]; 55 | [_unzippedFiles release]; 56 | 57 | [super dealloc]; 58 | } 59 | 60 | /** 61 | * Create a new zip file at the specified path, ready for new files to be added. 62 | * 63 | * @param zipFile the path of the zip file to create 64 | * @returns BOOL YES on success 65 | */ 66 | 67 | -(BOOL) CreateZipFile2:(NSString*) zipFile 68 | { 69 | _zipFile = zipOpen( (const char*)[zipFile UTF8String], 0 ); 70 | if( !_zipFile ) 71 | return NO; 72 | return YES; 73 | } 74 | 75 | /** 76 | * Create a new zip file at the specified path, ready for new files to be added. 77 | * 78 | * @param zipFile the path of the zip file to create 79 | * @param password a password used to encrypt the zip file 80 | * @returns BOOL YES on success 81 | */ 82 | 83 | -(BOOL) CreateZipFile2:(NSString*) zipFile Password:(NSString*) password 84 | { 85 | self.password = password; 86 | return [self CreateZipFile2:zipFile]; 87 | } 88 | 89 | /** 90 | * add an existing file on disk to the zip archive, compressing it. 91 | * 92 | * @param file the path to the file to compress 93 | * @param newname the name of the file in the zip archive, ie: path relative to the zip archive root. 94 | * @returns BOOL YES on success 95 | */ 96 | 97 | -(BOOL) addFileToZip:(NSString*) file newname:(NSString*) newname; 98 | { 99 | if( !_zipFile ) 100 | return NO; 101 | // tm_zip filetime; 102 | time_t current; 103 | time( ¤t ); 104 | 105 | zip_fileinfo zipInfo = {0}; 106 | zipInfo.dosDate = (unsigned long) current; 107 | 108 | NSError* error = nil; 109 | NSDictionary* attr = [[NSFileManager defaultManager] _attributesOfItemAtPath:file followingSymLinks:YES error:&error]; 110 | if( attr ) 111 | { 112 | NSDate* fileDate = (NSDate*)[attr objectForKey:NSFileModificationDate]; 113 | if( fileDate ) 114 | { 115 | zipInfo.dosDate = [fileDate timeIntervalSinceDate:[self Date1980] ]; 116 | } 117 | } 118 | 119 | int ret ; 120 | NSData* data = nil; 121 | if( [_password length] == 0 ) 122 | { 123 | ret = zipOpenNewFileInZip( _zipFile, 124 | (const char*) [newname UTF8String], 125 | &zipInfo, 126 | NULL,0, 127 | NULL,0, 128 | NULL,//comment 129 | Z_DEFLATED, 130 | Z_DEFAULT_COMPRESSION ); 131 | } 132 | else 133 | { 134 | data = [ NSData dataWithContentsOfFile:file]; 135 | uLong crcValue = crc32( 0L,NULL, 0L ); 136 | crcValue = crc32( crcValue, (const Bytef*)[data bytes], (uInt)[data length] ); 137 | ret = zipOpenNewFileInZip3( _zipFile, 138 | (const char*) [newname UTF8String], 139 | &zipInfo, 140 | NULL,0, 141 | NULL,0, 142 | NULL,//comment 143 | Z_DEFLATED, 144 | Z_DEFAULT_COMPRESSION, 145 | 0, 146 | 15, 147 | 8, 148 | Z_DEFAULT_STRATEGY, 149 | [_password cStringUsingEncoding:NSASCIIStringEncoding], 150 | crcValue ); 151 | } 152 | if( ret!=Z_OK ) 153 | { 154 | return NO; 155 | } 156 | if( data==nil ) 157 | { 158 | data = [ NSData dataWithContentsOfFile:file]; 159 | } 160 | unsigned int dataLen = (uInt)[data length]; 161 | ret = zipWriteInFileInZip( _zipFile, (const void*)[data bytes], dataLen); 162 | if( ret!=Z_OK ) 163 | { 164 | return NO; 165 | } 166 | ret = zipCloseFileInZip( _zipFile ); 167 | if( ret!=Z_OK ) 168 | return NO; 169 | return YES; 170 | } 171 | 172 | /** 173 | * Close a zip file after creating and added files to it. 174 | * 175 | * @returns BOOL YES on success 176 | */ 177 | 178 | -(BOOL) CloseZipFile2 179 | { 180 | self.password = nil; 181 | if( _zipFile==NULL ) 182 | return NO; 183 | BOOL ret = zipClose( _zipFile,NULL )==Z_OK?YES:NO; 184 | _zipFile = NULL; 185 | return ret; 186 | } 187 | 188 | /** 189 | * open an existing zip file ready for expanding. 190 | * 191 | * @param zipFile the path to a zip file to be opened. 192 | * @returns BOOL YES on success 193 | */ 194 | 195 | -(BOOL) UnzipOpenFile:(NSString*) zipFile 196 | { 197 | // create an array to receive the list of unzipped files. 198 | if (_unzippedFiles) [_unzippedFiles release]; 199 | _unzippedFiles = [[NSMutableArray alloc] initWithCapacity:1]; 200 | 201 | _unzFile = unzOpen( (const char*)[zipFile UTF8String] ); 202 | if( _unzFile ) 203 | { 204 | unz_global_info globalInfo = {0}; 205 | if( unzGetGlobalInfo(_unzFile, &globalInfo )==UNZ_OK ) 206 | { 207 | _numFiles = globalInfo.number_entry; 208 | NSLog(@"%lu entries in the zip file", globalInfo.number_entry); 209 | } 210 | } 211 | return _unzFile!=NULL; 212 | } 213 | 214 | /** 215 | * open an existing zip file with a password ready for expanding. 216 | * 217 | * @param zipFile the path to a zip file to be opened. 218 | * @param password the password to use decrpyting the file. 219 | * @returns BOOL YES on success 220 | */ 221 | 222 | -(BOOL) UnzipOpenFile:(NSString*) zipFile Password:(NSString*) password 223 | { 224 | self.password = password; 225 | return [self UnzipOpenFile:zipFile]; 226 | } 227 | 228 | /** 229 | * Expand all files in the zip archive into the specified directory. 230 | * 231 | * If a delegate has been set and responds to OverWriteOperation: it can 232 | * return YES to overwrite a file, or NO to skip that file. 233 | * 234 | * On completion, the property `unzippedFiles` will be an array populated 235 | * with the full paths of each file that was successfully expanded. 236 | * 237 | * @param path the directory where expanded files will be created 238 | * @param overwrite should existing files be overwritten 239 | * @returns BOOL YES on success 240 | */ 241 | 242 | -(BOOL) UnzipFileTo:(NSString*) path overWrite:(BOOL) overwrite 243 | { 244 | BOOL success = YES; 245 | int index = 0; 246 | int progress = -1; 247 | int ret = unzGoToFirstFile( _unzFile ); 248 | unsigned char buffer[4096] = {0}; 249 | NSFileManager* fman = [NSFileManager defaultManager]; 250 | if( ret!=UNZ_OK ) 251 | { 252 | [self OutputErrorMessage:@"Failed"]; 253 | } 254 | 255 | const char* password = [_password cStringUsingEncoding:NSASCIIStringEncoding]; 256 | 257 | do{ 258 | if( [_password length]==0 ) 259 | ret = unzOpenCurrentFile( _unzFile ); 260 | else 261 | ret = unzOpenCurrentFilePassword( _unzFile, password ); 262 | if( ret!=UNZ_OK ) 263 | { 264 | [self OutputErrorMessage:@"Error occurs"]; 265 | success = NO; 266 | break; 267 | } 268 | // reading data and write to file 269 | int read ; 270 | unz_file_info fileInfo ={0}; 271 | ret = unzGetCurrentFileInfo(_unzFile, &fileInfo, NULL, 0, NULL, 0, NULL, 0); 272 | if( ret!=UNZ_OK ) 273 | { 274 | [self OutputErrorMessage:@"Error occurs while getting file info"]; 275 | success = NO; 276 | unzCloseCurrentFile( _unzFile ); 277 | break; 278 | } 279 | char* filename = (char*) malloc( fileInfo.size_filename +1 ); 280 | unzGetCurrentFileInfo(_unzFile, &fileInfo, filename, fileInfo.size_filename + 1, NULL, 0, NULL, 0); 281 | filename[fileInfo.size_filename] = '\0'; 282 | 283 | // check if it contains directory 284 | NSString * strPath = [NSString stringWithCString:filename encoding:NSASCIIStringEncoding]; 285 | BOOL isDirectory = NO; 286 | if( filename[fileInfo.size_filename-1]=='/' || filename[fileInfo.size_filename-1]=='\\') 287 | isDirectory = YES; 288 | free( filename ); 289 | if( [strPath rangeOfCharacterFromSet:[NSCharacterSet characterSetWithCharactersInString:@"/\\"]].location!=NSNotFound ) 290 | {// contains a path 291 | strPath = [strPath stringByReplacingOccurrencesOfString:@"\\" withString:@"/"]; 292 | } 293 | NSString* fullPath = [path stringByAppendingPathComponent:strPath]; 294 | 295 | if( isDirectory ) 296 | [fman createDirectoryAtPath:fullPath withIntermediateDirectories:YES attributes:nil error:nil]; 297 | else 298 | [fman createDirectoryAtPath:[fullPath stringByDeletingLastPathComponent] withIntermediateDirectories:YES attributes:nil error:nil]; 299 | 300 | FILE* fp = NULL; 301 | do 302 | { 303 | read = unzReadCurrentFile(_unzFile, buffer, 4096); 304 | if (read >= 0) 305 | { 306 | if (fp == NULL) { 307 | if( [fman fileExistsAtPath:fullPath] && !isDirectory && !overwrite ) 308 | { 309 | if( ![self OverWrite:fullPath] ) 310 | { 311 | // don't process any more of the file, but continue 312 | break; 313 | } 314 | } 315 | fp = fopen( (const char*)[fullPath UTF8String], "wb"); 316 | if (fp == NULL) { 317 | [self OutputErrorMessage:@"Failed to open output file for writing"]; 318 | break; 319 | } 320 | } 321 | fwrite(buffer, read, 1, fp ); 322 | } 323 | else // if (read < 0) 324 | { 325 | ret = read; // result will be an error code 326 | success = NO; 327 | [self OutputErrorMessage:@"Failed to reading zip file"]; 328 | } 329 | } while (read > 0); 330 | 331 | if (fp) 332 | { 333 | fclose( fp ); 334 | 335 | // add the full path of this file to the output array 336 | [(NSMutableArray*)_unzippedFiles addObject:fullPath]; 337 | 338 | // set the orignal datetime property 339 | if( fileInfo.dosDate!=0 ) 340 | { 341 | NSDate* orgDate = [[NSDate alloc] 342 | initWithTimeInterval:(NSTimeInterval)fileInfo.dosDate 343 | sinceDate:[self Date1980] ]; 344 | 345 | NSDictionary* attr = [NSDictionary dictionaryWithObject:orgDate forKey:NSFileModificationDate]; //[[NSFileManager defaultManager] fileAttributesAtPath:fullPath traverseLink:YES]; 346 | if( attr ) 347 | { 348 | // [attr setValue:orgDate forKey:NSFileCreationDate]; 349 | if( ![[NSFileManager defaultManager] setAttributes:attr ofItemAtPath:fullPath error:nil] ) 350 | { 351 | // cann't set attributes 352 | NSLog(@"Failed to set attributes"); 353 | } 354 | 355 | } 356 | [orgDate release]; 357 | orgDate = nil; 358 | } 359 | 360 | } 361 | 362 | if (ret == UNZ_OK) { 363 | ret = unzCloseCurrentFile( _unzFile ); 364 | if (ret != UNZ_OK) { 365 | [self OutputErrorMessage:@"file was unzipped but failed crc check"]; 366 | success = NO; 367 | } 368 | } 369 | 370 | if (ret == UNZ_OK) { 371 | ret = unzGoToNextFile( _unzFile ); 372 | } 373 | 374 | if (_progressBlock && _numFiles) { 375 | index++; 376 | int p = index*100/_numFiles; 377 | progress = p; 378 | _progressBlock(progress, index, _numFiles); 379 | } 380 | } while (ret==UNZ_OK && ret!=UNZ_END_OF_LIST_OF_FILE); 381 | return success; 382 | } 383 | 384 | /** 385 | * Close the zip file. 386 | * 387 | * @returns BOOL YES on success 388 | */ 389 | 390 | -(BOOL) UnzipCloseFile 391 | { 392 | self.password = nil; 393 | if( _unzFile ) { 394 | int err = unzClose( _unzFile ); 395 | _unzFile = nil; 396 | return err ==UNZ_OK; 397 | } 398 | return YES; 399 | } 400 | 401 | 402 | /** 403 | * Return a list of filenames that are in the zip archive. 404 | * No path information is available as this can be called before the zip is expanded. 405 | * 406 | * @returns NSArray list of filenames in the zip archive. 407 | */ 408 | 409 | -(NSArray*) getZipFileContents // list the contents of the zip archive. must be called after UnzipOpenFile 410 | { 411 | int ret = unzGoToFirstFile( _unzFile ); 412 | NSMutableArray * allFilenames = [NSMutableArray arrayWithCapacity:40]; 413 | 414 | if( ret!=UNZ_OK ) 415 | { 416 | [self OutputErrorMessage:@"Failed"]; 417 | } 418 | 419 | const char* password = [_password cStringUsingEncoding:NSASCIIStringEncoding]; 420 | 421 | do{ 422 | if( [_password length]==0 ) 423 | ret = unzOpenCurrentFile( _unzFile ); 424 | else 425 | ret = unzOpenCurrentFilePassword( _unzFile, password ); 426 | if( ret!=UNZ_OK ) 427 | { 428 | [self OutputErrorMessage:@"Error occured"]; 429 | break; 430 | } 431 | 432 | // reading data and write to file 433 | unz_file_info fileInfo ={0}; 434 | ret = unzGetCurrentFileInfo(_unzFile, &fileInfo, NULL, 0, NULL, 0, NULL, 0); 435 | if( ret!=UNZ_OK ) 436 | { 437 | [self OutputErrorMessage:@"Error occurs while getting file info"]; 438 | unzCloseCurrentFile( _unzFile ); 439 | break; 440 | } 441 | char* filename = (char*) malloc( fileInfo.size_filename +1 ); 442 | unzGetCurrentFileInfo(_unzFile, &fileInfo, filename, fileInfo.size_filename + 1, NULL, 0, NULL, 0); 443 | filename[fileInfo.size_filename] = '\0'; 444 | 445 | // check if it contains directory 446 | NSString * strPath = [NSString stringWithCString:filename encoding:NSASCIIStringEncoding]; 447 | free( filename ); 448 | if( [strPath rangeOfCharacterFromSet:[NSCharacterSet characterSetWithCharactersInString:@"/\\"]].location!=NSNotFound ) 449 | {// contains a path 450 | strPath = [strPath stringByReplacingOccurrencesOfString:@"\\" withString:@"/"]; 451 | } 452 | 453 | // Copy name to array 454 | [allFilenames addObject:strPath]; 455 | 456 | unzCloseCurrentFile( _unzFile ); 457 | ret = unzGoToNextFile( _unzFile ); 458 | } while( ret==UNZ_OK && UNZ_OK!=UNZ_END_OF_LIST_OF_FILE ); 459 | 460 | // return an immutable array. 461 | return [NSArray arrayWithArray:allFilenames]; 462 | } 463 | 464 | 465 | #pragma mark wrapper for delegate 466 | 467 | /** 468 | * send the ErrorMessage: to the delegate if it responds to it. 469 | */ 470 | -(void) OutputErrorMessage:(NSString*) msg 471 | { 472 | if( _delegate && [_delegate respondsToSelector:@selector(ErrorMessage:)] ) 473 | [_delegate ErrorMessage:msg]; 474 | } 475 | 476 | /** 477 | * send the OverWriteOperation: selector to the delegate if it responds to it, 478 | * returning the result, or YES by default. 479 | */ 480 | 481 | -(BOOL) OverWrite:(NSString*) file 482 | { 483 | if( _delegate && [_delegate respondsToSelector:@selector(OverWriteOperation:)] ) 484 | return [_delegate OverWriteOperation:file]; 485 | return YES; 486 | } 487 | 488 | #pragma mark get NSDate object for 1980-01-01 489 | -(NSDate*) Date1980 490 | { 491 | NSDateComponents *comps = [[NSDateComponents alloc] init]; 492 | [comps setDay:1]; 493 | [comps setMonth:1]; 494 | [comps setYear:1980]; 495 | NSCalendar *gregorian = [[NSCalendar alloc] 496 | initWithCalendarIdentifier:NSGregorianCalendar]; 497 | NSDate *date = [gregorian dateFromComponents:comps]; 498 | 499 | [comps release]; 500 | [gregorian release]; 501 | return date; 502 | } 503 | 504 | 505 | @end 506 | 507 | 508 | @implementation NSFileManager(ZipArchive) 509 | 510 | - (NSDictionary *)_attributesOfItemAtPath:(NSString *)path followingSymLinks:(BOOL)followingSymLinks error:(NSError **)error 511 | { 512 | // call file manager default action, which is to not follow symlinks 513 | NSDictionary* results = [self attributesOfItemAtPath:path error:error]; 514 | if (followingSymLinks && results && (error ? *error == nil : YES)) { 515 | if ([[results fileType] isEqualToString:NSFileTypeSymbolicLink]) { 516 | // follow the symlink 517 | NSString* realPath = [self destinationOfSymbolicLinkAtPath:path error:error]; 518 | if (realPath && (error ? *error == nil : YES)) { 519 | return [self _attributesOfItemAtPath:realPath followingSymLinks:followingSymLinks error:error]; 520 | } else { 521 | // failure to resolve symlink should be an error returning nil and error will already be set. 522 | return nil; 523 | } 524 | } 525 | } 526 | return results; 527 | } 528 | 529 | @end 530 | 531 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/ZipArchive/minizip/crypt.h: -------------------------------------------------------------------------------- 1 | /* crypt.h -- base code for crypt/uncrypt ZIPfile 2 | 3 | 4 | Version 1.01h, December 28th, 2009 5 | 6 | Copyright (C) 1998-2009 Gilles Vollant 7 | 8 | This code is a modified version of crypting code in Infozip distribution 9 | 10 | The encryption/decryption parts of this source code (as opposed to the 11 | non-echoing password parts) were originally written in Europe. The 12 | whole source package can be freely distributed, including from the USA. 13 | (Prior to January 2000, re-export from the US was a violation of US law.) 14 | 15 | This encryption code is a direct transcription of the algorithm from 16 | Roger Schlafly, described by Phil Katz in the file appnote.txt. This 17 | file (appnote.txt) is distributed with the PKZIP program (even in the 18 | version without encryption capabilities). 19 | 20 | If you don't need crypting in your application, just define symbols 21 | NOCRYPT and NOUNCRYPT. 22 | 23 | This code support the "Traditional PKWARE Encryption". 24 | 25 | The new AES encryption added on Zip format by Winzip (see the page 26 | http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong 27 | Encryption is not supported. 28 | */ 29 | 30 | #define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8)) 31 | 32 | /*********************************************************************** 33 | * Return the next byte in the pseudo-random sequence 34 | */ 35 | static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab) 36 | { 37 | unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an 38 | * unpredictable manner on 16-bit systems; not a problem 39 | * with any known compiler so far, though */ 40 | 41 | temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2; 42 | return (int)(((temp * (temp ^ 1)) >> 8) & 0xff); 43 | } 44 | 45 | /*********************************************************************** 46 | * Update the encryption keys with the next byte of plain text 47 | */ 48 | static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c) 49 | { 50 | (*(pkeys+0)) = CRC32((*(pkeys+0)), c); 51 | (*(pkeys+1)) += (*(pkeys+0)) & 0xff; 52 | (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1; 53 | { 54 | register int keyshift = (int)((*(pkeys+1)) >> 24); 55 | (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift); 56 | } 57 | return c; 58 | } 59 | 60 | 61 | /*********************************************************************** 62 | * Initialize the encryption keys and the random header according to 63 | * the given password. 64 | */ 65 | static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab) 66 | { 67 | *(pkeys+0) = 305419896L; 68 | *(pkeys+1) = 591751049L; 69 | *(pkeys+2) = 878082192L; 70 | while (*passwd != '\0') { 71 | update_keys(pkeys,pcrc_32_tab,(int)*passwd); 72 | passwd++; 73 | } 74 | } 75 | 76 | #define zdecode(pkeys,pcrc_32_tab,c) \ 77 | (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab))) 78 | 79 | #define zencode(pkeys,pcrc_32_tab,c,t) \ 80 | (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c)) 81 | 82 | #ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED 83 | 84 | #define RAND_HEAD_LEN 12 85 | /* "last resort" source for second part of crypt seed pattern */ 86 | # ifndef ZCR_SEED2 87 | # define ZCR_SEED2 3141592654UL /* use PI as default pattern */ 88 | # endif 89 | 90 | static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting) 91 | const char *passwd; /* password string */ 92 | unsigned char *buf; /* where to write header */ 93 | int bufSize; 94 | unsigned long* pkeys; 95 | const unsigned long* pcrc_32_tab; 96 | unsigned long crcForCrypting; 97 | { 98 | int n; /* index in random header */ 99 | int t; /* temporary */ 100 | int c; /* random byte */ 101 | unsigned char header[RAND_HEAD_LEN-2]; /* random header */ 102 | static unsigned calls = 0; /* ensure different random header each time */ 103 | 104 | if (bufSize> 7) & 0xff; 119 | header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t); 120 | } 121 | /* Encrypt random header (last two bytes is high word of crc) */ 122 | init_keys(passwd, pkeys, pcrc_32_tab); 123 | for (n = 0; n < RAND_HEAD_LEN-2; n++) 124 | { 125 | buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t); 126 | } 127 | buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t); 128 | buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t); 129 | return n; 130 | } 131 | 132 | #endif 133 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/ZipArchive/minizip/ioapi.c: -------------------------------------------------------------------------------- 1 | /* ioapi.c -- IO base function header for compress/uncompress .zip 2 | files using zlib + zip or unzip API 3 | 4 | Version 1.01h, December 28th, 2009 5 | 6 | Copyright (C) 1998-2009 Gilles Vollant 7 | */ 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | #include "zlib.h" 14 | #include "ioapi.h" 15 | 16 | 17 | 18 | /* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */ 19 | 20 | #ifndef SEEK_CUR 21 | #define SEEK_CUR 1 22 | #endif 23 | 24 | #ifndef SEEK_END 25 | #define SEEK_END 2 26 | #endif 27 | 28 | #ifndef SEEK_SET 29 | #define SEEK_SET 0 30 | #endif 31 | 32 | voidpf ZCALLBACK fopen_file_func OF(( 33 | voidpf opaque, 34 | const char* filename, 35 | int mode)); 36 | 37 | uLong ZCALLBACK fread_file_func OF(( 38 | voidpf opaque, 39 | voidpf stream, 40 | void* buf, 41 | uLong size)); 42 | 43 | uLong ZCALLBACK fwrite_file_func OF(( 44 | voidpf opaque, 45 | voidpf stream, 46 | const void* buf, 47 | uLong size)); 48 | 49 | long ZCALLBACK ftell_file_func OF(( 50 | voidpf opaque, 51 | voidpf stream)); 52 | 53 | long ZCALLBACK fseek_file_func OF(( 54 | voidpf opaque, 55 | voidpf stream, 56 | uLong offset, 57 | int origin)); 58 | 59 | int ZCALLBACK fclose_file_func OF(( 60 | voidpf opaque, 61 | voidpf stream)); 62 | 63 | int ZCALLBACK ferror_file_func OF(( 64 | voidpf opaque, 65 | voidpf stream)); 66 | 67 | 68 | voidpf ZCALLBACK fopen_file_func (opaque, filename, mode) 69 | voidpf opaque; 70 | const char* filename; 71 | int mode; 72 | { 73 | FILE* file = NULL; 74 | const char* mode_fopen = NULL; 75 | if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) 76 | mode_fopen = "rb"; 77 | else 78 | if (mode & ZLIB_FILEFUNC_MODE_EXISTING) 79 | mode_fopen = "r+b"; 80 | else 81 | if (mode & ZLIB_FILEFUNC_MODE_CREATE) 82 | mode_fopen = "wb"; 83 | 84 | if ((filename!=NULL) && (mode_fopen != NULL)) 85 | file = fopen(filename, mode_fopen); 86 | return file; 87 | } 88 | 89 | 90 | uLong ZCALLBACK fread_file_func (opaque, stream, buf, size) 91 | voidpf opaque; 92 | voidpf stream; 93 | void* buf; 94 | uLong size; 95 | { 96 | uLong ret; 97 | ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream); 98 | return ret; 99 | } 100 | 101 | 102 | uLong ZCALLBACK fwrite_file_func (opaque, stream, buf, size) 103 | voidpf opaque; 104 | voidpf stream; 105 | const void* buf; 106 | uLong size; 107 | { 108 | uLong ret; 109 | ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream); 110 | return ret; 111 | } 112 | 113 | long ZCALLBACK ftell_file_func (opaque, stream) 114 | voidpf opaque; 115 | voidpf stream; 116 | { 117 | long ret; 118 | ret = ftell((FILE *)stream); 119 | return ret; 120 | } 121 | 122 | long ZCALLBACK fseek_file_func (opaque, stream, offset, origin) 123 | voidpf opaque; 124 | voidpf stream; 125 | uLong offset; 126 | int origin; 127 | { 128 | int fseek_origin=0; 129 | long ret; 130 | switch (origin) 131 | { 132 | case ZLIB_FILEFUNC_SEEK_CUR : 133 | fseek_origin = SEEK_CUR; 134 | break; 135 | case ZLIB_FILEFUNC_SEEK_END : 136 | fseek_origin = SEEK_END; 137 | break; 138 | case ZLIB_FILEFUNC_SEEK_SET : 139 | fseek_origin = SEEK_SET; 140 | break; 141 | default: return -1; 142 | } 143 | ret = 0; 144 | if (fseek((FILE *)stream, offset, fseek_origin) != 0) 145 | ret = -1; 146 | return ret; 147 | } 148 | 149 | int ZCALLBACK fclose_file_func (opaque, stream) 150 | voidpf opaque; 151 | voidpf stream; 152 | { 153 | int ret; 154 | ret = fclose((FILE *)stream); 155 | return ret; 156 | } 157 | 158 | int ZCALLBACK ferror_file_func (opaque, stream) 159 | voidpf opaque; 160 | voidpf stream; 161 | { 162 | int ret; 163 | ret = ferror((FILE *)stream); 164 | return ret; 165 | } 166 | 167 | void fill_fopen_filefunc (pzlib_filefunc_def) 168 | zlib_filefunc_def* pzlib_filefunc_def; 169 | { 170 | pzlib_filefunc_def->zopen_file = fopen_file_func; 171 | pzlib_filefunc_def->zread_file = fread_file_func; 172 | pzlib_filefunc_def->zwrite_file = fwrite_file_func; 173 | pzlib_filefunc_def->ztell_file = ftell_file_func; 174 | pzlib_filefunc_def->zseek_file = fseek_file_func; 175 | pzlib_filefunc_def->zclose_file = fclose_file_func; 176 | pzlib_filefunc_def->zerror_file = ferror_file_func; 177 | pzlib_filefunc_def->opaque = NULL; 178 | } 179 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/ZipArchive/minizip/ioapi.h: -------------------------------------------------------------------------------- 1 | /* ioapi.h -- IO base function header for compress/uncompress .zip 2 | files using zlib + zip or unzip API 3 | 4 | Version 1.01h, December 28th, 2009 5 | 6 | Copyright (C) 1998-2009 Gilles Vollant 7 | */ 8 | 9 | #ifndef _ZLIBIOAPI_H 10 | #define _ZLIBIOAPI_H 11 | 12 | 13 | #define ZLIB_FILEFUNC_SEEK_CUR (1) 14 | #define ZLIB_FILEFUNC_SEEK_END (2) 15 | #define ZLIB_FILEFUNC_SEEK_SET (0) 16 | 17 | #define ZLIB_FILEFUNC_MODE_READ (1) 18 | #define ZLIB_FILEFUNC_MODE_WRITE (2) 19 | #define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3) 20 | 21 | #define ZLIB_FILEFUNC_MODE_EXISTING (4) 22 | #define ZLIB_FILEFUNC_MODE_CREATE (8) 23 | 24 | 25 | #ifndef ZCALLBACK 26 | 27 | #if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK) 28 | #define ZCALLBACK CALLBACK 29 | #else 30 | #define ZCALLBACK 31 | #endif 32 | #endif 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); 39 | typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); 40 | typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); 41 | typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); 42 | typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); 43 | typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); 44 | typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); 45 | 46 | typedef struct zlib_filefunc_def_s 47 | { 48 | open_file_func zopen_file; 49 | read_file_func zread_file; 50 | write_file_func zwrite_file; 51 | tell_file_func ztell_file; 52 | seek_file_func zseek_file; 53 | close_file_func zclose_file; 54 | testerror_file_func zerror_file; 55 | voidpf opaque; 56 | } zlib_filefunc_def; 57 | 58 | 59 | 60 | void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); 61 | 62 | #define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size)) 63 | #define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size)) 64 | #define ZTELL(filefunc,filestream) ((*((filefunc).ztell_file))((filefunc).opaque,filestream)) 65 | #define ZSEEK(filefunc,filestream,pos,mode) ((*((filefunc).zseek_file))((filefunc).opaque,filestream,pos,mode)) 66 | #define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream)) 67 | #define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream)) 68 | 69 | 70 | #ifdef __cplusplus 71 | } 72 | #endif 73 | 74 | #endif 75 | 76 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/ZipArchive/minizip/mztools.c: -------------------------------------------------------------------------------- 1 | /* 2 | Additional tools for Minizip 3 | Code: Xavier Roche '2004 4 | License: Same as ZLIB (www.gzip.org) 5 | */ 6 | 7 | /* Code */ 8 | #include 9 | #include 10 | #include 11 | #include "zlib.h" 12 | #include "unzip.h" 13 | 14 | #define READ_8(adr) ((unsigned char)*(adr)) 15 | #define READ_16(adr) ( READ_8(adr) | (READ_8(adr+1) << 8) ) 16 | #define READ_32(adr) ( READ_16(adr) | (READ_16((adr)+2) << 16) ) 17 | 18 | #define WRITE_8(buff, n) do { \ 19 | *((unsigned char*)(buff)) = (unsigned char) ((n) & 0xff); \ 20 | } while(0) 21 | #define WRITE_16(buff, n) do { \ 22 | WRITE_8((unsigned char*)(buff), n); \ 23 | WRITE_8(((unsigned char*)(buff)) + 1, (n) >> 8); \ 24 | } while(0) 25 | #define WRITE_32(buff, n) do { \ 26 | WRITE_16((unsigned char*)(buff), (n) & 0xffff); \ 27 | WRITE_16((unsigned char*)(buff) + 2, (n) >> 16); \ 28 | } while(0) 29 | 30 | extern int ZEXPORT unzRepair(file, fileOut, fileOutTmp, nRecovered, bytesRecovered) 31 | const char* file; 32 | const char* fileOut; 33 | const char* fileOutTmp; 34 | uLong* nRecovered; 35 | uLong* bytesRecovered; 36 | { 37 | int err = Z_OK; 38 | FILE* fpZip = fopen(file, "rb"); 39 | FILE* fpOut = fopen(fileOut, "wb"); 40 | FILE* fpOutCD = fopen(fileOutTmp, "wb"); 41 | if (fpZip != NULL && fpOut != NULL) { 42 | int entries = 0; 43 | uLong totalBytes = 0; 44 | char header[30]; 45 | char filename[256]; 46 | char extra[1024]; 47 | int offset = 0; 48 | int offsetCD = 0; 49 | while ( fread(header, 1, 30, fpZip) == 30 ) { 50 | int currentOffset = offset; 51 | 52 | /* File entry */ 53 | if (READ_32(header) == 0x04034b50) { 54 | unsigned int version = READ_16(header + 4); 55 | unsigned int gpflag = READ_16(header + 6); 56 | unsigned int method = READ_16(header + 8); 57 | unsigned int filetime = READ_16(header + 10); 58 | unsigned int filedate = READ_16(header + 12); 59 | unsigned int crc = READ_32(header + 14); /* crc */ 60 | unsigned int cpsize = READ_32(header + 18); /* compressed size */ 61 | unsigned int uncpsize = READ_32(header + 22); /* uncompressed sz */ 62 | unsigned int fnsize = READ_16(header + 26); /* file name length */ 63 | unsigned int extsize = READ_16(header + 28); /* extra field length */ 64 | filename[0] = extra[0] = '\0'; 65 | 66 | /* Header */ 67 | if (fwrite(header, 1, 30, fpOut) == 30) { 68 | offset += 30; 69 | } else { 70 | err = Z_ERRNO; 71 | break; 72 | } 73 | 74 | /* Filename */ 75 | if (fnsize > 0) { 76 | if (fread(filename, 1, fnsize, fpZip) == fnsize) { 77 | if (fwrite(filename, 1, fnsize, fpOut) == fnsize) { 78 | offset += fnsize; 79 | } else { 80 | err = Z_ERRNO; 81 | break; 82 | } 83 | } else { 84 | err = Z_ERRNO; 85 | break; 86 | } 87 | } else { 88 | err = Z_STREAM_ERROR; 89 | break; 90 | } 91 | 92 | /* Extra field */ 93 | if (extsize > 0) { 94 | if (fread(extra, 1, extsize, fpZip) == extsize) { 95 | if (fwrite(extra, 1, extsize, fpOut) == extsize) { 96 | offset += extsize; 97 | } else { 98 | err = Z_ERRNO; 99 | break; 100 | } 101 | } else { 102 | err = Z_ERRNO; 103 | break; 104 | } 105 | } 106 | 107 | /* Data */ 108 | { 109 | int dataSize = cpsize; 110 | if (dataSize == 0) { 111 | dataSize = uncpsize; 112 | } 113 | if (dataSize > 0) { 114 | char* data = malloc(dataSize); 115 | if (data != NULL) { 116 | if ((int)fread(data, 1, dataSize, fpZip) == dataSize) { 117 | if ((int)fwrite(data, 1, dataSize, fpOut) == dataSize) { 118 | offset += dataSize; 119 | totalBytes += dataSize; 120 | } else { 121 | err = Z_ERRNO; 122 | } 123 | } else { 124 | err = Z_ERRNO; 125 | } 126 | free(data); 127 | if (err != Z_OK) { 128 | break; 129 | } 130 | } else { 131 | err = Z_MEM_ERROR; 132 | break; 133 | } 134 | } 135 | } 136 | 137 | /* Central directory entry */ 138 | { 139 | char header[46]; 140 | char* comment = ""; 141 | int comsize = (int) strlen(comment); 142 | WRITE_32(header, 0x02014b50); 143 | WRITE_16(header + 4, version); 144 | WRITE_16(header + 6, version); 145 | WRITE_16(header + 8, gpflag); 146 | WRITE_16(header + 10, method); 147 | WRITE_16(header + 12, filetime); 148 | WRITE_16(header + 14, filedate); 149 | WRITE_32(header + 16, crc); 150 | WRITE_32(header + 20, cpsize); 151 | WRITE_32(header + 24, uncpsize); 152 | WRITE_16(header + 28, fnsize); 153 | WRITE_16(header + 30, extsize); 154 | WRITE_16(header + 32, comsize); 155 | WRITE_16(header + 34, 0); /* disk # */ 156 | WRITE_16(header + 36, 0); /* int attrb */ 157 | WRITE_32(header + 38, 0); /* ext attrb */ 158 | WRITE_32(header + 42, currentOffset); 159 | /* Header */ 160 | if (fwrite(header, 1, 46, fpOutCD) == 46) { 161 | offsetCD += 46; 162 | 163 | /* Filename */ 164 | if (fnsize > 0) { 165 | if (fwrite(filename, 1, fnsize, fpOutCD) == fnsize) { 166 | offsetCD += fnsize; 167 | } else { 168 | err = Z_ERRNO; 169 | break; 170 | } 171 | } else { 172 | err = Z_STREAM_ERROR; 173 | break; 174 | } 175 | 176 | /* Extra field */ 177 | if (extsize > 0) { 178 | if (fwrite(extra, 1, extsize, fpOutCD) == extsize) { 179 | offsetCD += extsize; 180 | } else { 181 | err = Z_ERRNO; 182 | break; 183 | } 184 | } 185 | 186 | /* Comment field */ 187 | if (comsize > 0) { 188 | if ((int)fwrite(comment, 1, comsize, fpOutCD) == comsize) { 189 | offsetCD += comsize; 190 | } else { 191 | err = Z_ERRNO; 192 | break; 193 | } 194 | } 195 | 196 | 197 | } else { 198 | err = Z_ERRNO; 199 | break; 200 | } 201 | } 202 | 203 | /* Success */ 204 | entries++; 205 | 206 | } else { 207 | break; 208 | } 209 | } 210 | 211 | /* Final central directory */ 212 | { 213 | int entriesZip = entries; 214 | char header[22]; 215 | char* comment = ""; // "ZIP File recovered by zlib/minizip/mztools"; 216 | int comsize = (int) strlen(comment); 217 | if (entriesZip > 0xffff) { 218 | entriesZip = 0xffff; 219 | } 220 | WRITE_32(header, 0x06054b50); 221 | WRITE_16(header + 4, 0); /* disk # */ 222 | WRITE_16(header + 6, 0); /* disk # */ 223 | WRITE_16(header + 8, entriesZip); /* hack */ 224 | WRITE_16(header + 10, entriesZip); /* hack */ 225 | WRITE_32(header + 12, offsetCD); /* size of CD */ 226 | WRITE_32(header + 16, offset); /* offset to CD */ 227 | WRITE_16(header + 20, comsize); /* comment */ 228 | 229 | /* Header */ 230 | if (fwrite(header, 1, 22, fpOutCD) == 22) { 231 | 232 | /* Comment field */ 233 | if (comsize > 0) { 234 | if ((int)fwrite(comment, 1, comsize, fpOutCD) != comsize) { 235 | err = Z_ERRNO; 236 | } 237 | } 238 | 239 | } else { 240 | err = Z_ERRNO; 241 | } 242 | } 243 | 244 | /* Final merge (file + central directory) */ 245 | fclose(fpOutCD); 246 | if (err == Z_OK) { 247 | fpOutCD = fopen(fileOutTmp, "rb"); 248 | if (fpOutCD != NULL) { 249 | int nRead; 250 | char buffer[8192]; 251 | while ( (nRead = (int)fread(buffer, 1, sizeof(buffer), fpOutCD)) > 0) { 252 | if ((int)fwrite(buffer, 1, nRead, fpOut) != nRead) { 253 | err = Z_ERRNO; 254 | break; 255 | } 256 | } 257 | fclose(fpOutCD); 258 | } 259 | } 260 | 261 | /* Close */ 262 | fclose(fpZip); 263 | fclose(fpOut); 264 | 265 | /* Wipe temporary file */ 266 | (void)remove(fileOutTmp); 267 | 268 | /* Number of recovered entries */ 269 | if (err == Z_OK) { 270 | if (nRecovered != NULL) { 271 | *nRecovered = entries; 272 | } 273 | if (bytesRecovered != NULL) { 274 | *bytesRecovered = totalBytes; 275 | } 276 | } 277 | } else { 278 | err = Z_STREAM_ERROR; 279 | } 280 | return err; 281 | } 282 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/ZipArchive/minizip/mztools.h: -------------------------------------------------------------------------------- 1 | /* 2 | Additional tools for Minizip 3 | Code: Xavier Roche '2004 4 | License: Same as ZLIB (www.gzip.org) 5 | */ 6 | 7 | #ifndef _zip_tools_H 8 | #define _zip_tools_H 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #ifndef _ZLIB_H 15 | #include "zlib.h" 16 | #endif 17 | 18 | #include "unzip.h" 19 | 20 | /* Repair a ZIP file (missing central directory) 21 | file: file to recover 22 | fileOut: output file after recovery 23 | fileOutTmp: temporary file name used for recovery 24 | */ 25 | extern int ZEXPORT unzRepair(const char* file, 26 | const char* fileOut, 27 | const char* fileOutTmp, 28 | uLong* nRecovered, 29 | uLong* bytesRecovered); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/ZipArchive/minizip/unzip.h: -------------------------------------------------------------------------------- 1 | /* unzip.h -- IO for uncompress .zip files using zlib 2 | Version 1.01h, December 28th, 2009 3 | 4 | Copyright (C) 1998-2009 Gilles Vollant 5 | 6 | This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g 7 | WinZip, InfoZip tools and compatible. 8 | 9 | Multi volume ZipFile (span) are not supported. 10 | Encryption compatible with pkzip 2.04g only supported 11 | Old compressions used by old PKZip 1.x are not supported 12 | 13 | 14 | I WAIT FEEDBACK at mail info@winimage.com 15 | Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution 16 | 17 | Condition of use and distribution are the same than zlib : 18 | 19 | This software is provided 'as-is', without any express or implied 20 | warranty. In no event will the authors be held liable for any damages 21 | arising from the use of this software. 22 | 23 | Permission is granted to anyone to use this software for any purpose, 24 | including commercial applications, and to alter it and redistribute it 25 | freely, subject to the following restrictions: 26 | 27 | 1. The origin of this software must not be misrepresented; you must not 28 | claim that you wrote the original software. If you use this software 29 | in a product, an acknowledgment in the product documentation would be 30 | appreciated but is not required. 31 | 2. Altered source versions must be plainly marked as such, and must not be 32 | misrepresented as being the original software. 33 | 3. This notice may not be removed or altered from any source distribution. 34 | 35 | 36 | */ 37 | 38 | /* for more info about .ZIP format, see 39 | http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip 40 | http://www.info-zip.org/pub/infozip/doc/ 41 | PkWare has also a specification at : 42 | ftp://ftp.pkware.com/probdesc.zip 43 | */ 44 | 45 | #ifndef _unz_H 46 | #define _unz_H 47 | 48 | #ifdef __cplusplus 49 | extern "C" { 50 | #endif 51 | 52 | #ifndef _ZLIB_H 53 | #include "zlib.h" 54 | #endif 55 | 56 | #ifndef _ZLIBIOAPI_H 57 | #include "ioapi.h" 58 | #endif 59 | 60 | #ifdef HAVE_BZIP2 61 | #include "bzlib.h" 62 | #endif 63 | 64 | #define Z_BZIP2ED 12 65 | 66 | #if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP) 67 | /* like the STRICT of WIN32, we define a pointer that cannot be converted 68 | from (void*) without cast */ 69 | typedef struct TagunzFile__ { int unused; } unzFile__; 70 | typedef unzFile__ *unzFile; 71 | #else 72 | typedef voidp unzFile; 73 | #endif 74 | 75 | 76 | #define UNZ_OK (0) 77 | #define UNZ_END_OF_LIST_OF_FILE (-100) 78 | #define UNZ_ERRNO (Z_ERRNO) 79 | #define UNZ_EOF (0) 80 | #define UNZ_PARAMERROR (-102) 81 | #define UNZ_BADZIPFILE (-103) 82 | #define UNZ_INTERNALERROR (-104) 83 | #define UNZ_CRCERROR (-105) 84 | 85 | /* tm_unz contain date/time info */ 86 | typedef struct tm_unz_s 87 | { 88 | uInt tm_sec; /* seconds after the minute - [0,59] */ 89 | uInt tm_min; /* minutes after the hour - [0,59] */ 90 | uInt tm_hour; /* hours since midnight - [0,23] */ 91 | uInt tm_mday; /* day of the month - [1,31] */ 92 | uInt tm_mon; /* months since January - [0,11] */ 93 | uInt tm_year; /* years - [1980..2044] */ 94 | } tm_unz; 95 | 96 | /* unz_global_info structure contain global data about the ZIPfile 97 | These data comes from the end of central dir */ 98 | typedef struct unz_global_info_s 99 | { 100 | uLong number_entry; /* total number of entries in 101 | the central dir on this disk */ 102 | uLong size_comment; /* size of the global comment of the zipfile */ 103 | } unz_global_info; 104 | 105 | 106 | /* unz_file_info contain information about a file in the zipfile */ 107 | typedef struct unz_file_info_s 108 | { 109 | uLong version; /* version made by 2 bytes */ 110 | uLong version_needed; /* version needed to extract 2 bytes */ 111 | uLong flag; /* general purpose bit flag 2 bytes */ 112 | uLong compression_method; /* compression method 2 bytes */ 113 | uLong dosDate; /* last mod file date in Dos fmt 4 bytes */ 114 | uLong crc; /* crc-32 4 bytes */ 115 | uLong compressed_size; /* compressed size 4 bytes */ 116 | uLong uncompressed_size; /* uncompressed size 4 bytes */ 117 | uLong size_filename; /* filename length 2 bytes */ 118 | uLong size_file_extra; /* extra field length 2 bytes */ 119 | uLong size_file_comment; /* file comment length 2 bytes */ 120 | 121 | uLong disk_num_start; /* disk number start 2 bytes */ 122 | uLong internal_fa; /* internal file attributes 2 bytes */ 123 | uLong external_fa; /* external file attributes 4 bytes */ 124 | 125 | tm_unz tmu_date; 126 | } unz_file_info; 127 | 128 | extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1, 129 | const char* fileName2, 130 | int iCaseSensitivity)); 131 | /* 132 | Compare two filename (fileName1,fileName2). 133 | If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) 134 | If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi 135 | or strcasecmp) 136 | If iCaseSenisivity = 0, case sensitivity is defaut of your operating system 137 | (like 1 on Unix, 2 on Windows) 138 | */ 139 | 140 | 141 | extern unzFile ZEXPORT unzOpen OF((const char *path)); 142 | /* 143 | Open a Zip file. path contain the full pathname (by example, 144 | on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer 145 | "zlib/zlib113.zip". 146 | If the zipfile cannot be opened (file don't exist or in not valid), the 147 | return value is NULL. 148 | Else, the return value is a unzFile Handle, usable with other function 149 | of this unzip package. 150 | */ 151 | 152 | extern unzFile ZEXPORT unzOpen2 OF((const char *path, 153 | zlib_filefunc_def* pzlib_filefunc_def)); 154 | /* 155 | Open a Zip file, like unzOpen, but provide a set of file low level API 156 | for read/write the zip file (see ioapi.h) 157 | */ 158 | 159 | extern int ZEXPORT unzClose OF((unzFile file)); 160 | /* 161 | Close a ZipFile opened with unzipOpen. 162 | If there is files inside the .Zip opened with unzOpenCurrentFile (see later), 163 | these files MUST be closed with unzipCloseCurrentFile before call unzipClose. 164 | return UNZ_OK if there is no problem. */ 165 | 166 | extern int ZEXPORT unzGetGlobalInfo OF((unzFile file, 167 | unz_global_info *pglobal_info)); 168 | /* 169 | Write info about the ZipFile in the *pglobal_info structure. 170 | No preparation of the structure is needed 171 | return UNZ_OK if there is no problem. */ 172 | 173 | 174 | extern int ZEXPORT unzGetGlobalComment OF((unzFile file, 175 | char *szComment, 176 | uLong uSizeBuf)); 177 | /* 178 | Get the global comment string of the ZipFile, in the szComment buffer. 179 | uSizeBuf is the size of the szComment buffer. 180 | return the number of byte copied or an error code <0 181 | */ 182 | 183 | 184 | /***************************************************************************/ 185 | /* Unzip package allow you browse the directory of the zipfile */ 186 | 187 | extern int ZEXPORT unzGoToFirstFile OF((unzFile file)); 188 | /* 189 | Set the current file of the zipfile to the first file. 190 | return UNZ_OK if there is no problem 191 | */ 192 | 193 | extern int ZEXPORT unzGoToNextFile OF((unzFile file)); 194 | /* 195 | Set the current file of the zipfile to the next file. 196 | return UNZ_OK if there is no problem 197 | return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. 198 | */ 199 | 200 | extern int ZEXPORT unzLocateFile OF((unzFile file, 201 | const char *szFileName, 202 | int iCaseSensitivity)); 203 | /* 204 | Try locate the file szFileName in the zipfile. 205 | For the iCaseSensitivity signification, see unzStringFileNameCompare 206 | 207 | return value : 208 | UNZ_OK if the file is found. It becomes the current file. 209 | UNZ_END_OF_LIST_OF_FILE if the file is not found 210 | */ 211 | 212 | 213 | /* ****************************************** */ 214 | /* Ryan supplied functions */ 215 | /* unz_file_info contain information about a file in the zipfile */ 216 | typedef struct unz_file_pos_s 217 | { 218 | uLong pos_in_zip_directory; /* offset in zip file directory */ 219 | uLong num_of_file; /* # of file */ 220 | } unz_file_pos; 221 | 222 | extern int ZEXPORT unzGetFilePos( 223 | unzFile file, 224 | unz_file_pos* file_pos); 225 | 226 | extern int ZEXPORT unzGoToFilePos( 227 | unzFile file, 228 | unz_file_pos* file_pos); 229 | 230 | /* ****************************************** */ 231 | 232 | extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file, 233 | unz_file_info *pfile_info, 234 | char *szFileName, 235 | uLong fileNameBufferSize, 236 | void *extraField, 237 | uLong extraFieldBufferSize, 238 | char *szComment, 239 | uLong commentBufferSize)); 240 | /* 241 | Get Info about the current file 242 | if pfile_info!=NULL, the *pfile_info structure will contain somes info about 243 | the current file 244 | if szFileName!=NULL, the filemane string will be copied in szFileName 245 | (fileNameBufferSize is the size of the buffer) 246 | if extraField!=NULL, the extra field information will be copied in extraField 247 | (extraFieldBufferSize is the size of the buffer). 248 | This is the Central-header version of the extra field 249 | if szComment!=NULL, the comment string of the file will be copied in szComment 250 | (commentBufferSize is the size of the buffer) 251 | */ 252 | 253 | /***************************************************************************/ 254 | /* for reading the content of the current zipfile, you can open it, read data 255 | from it, and close it (you can close it before reading all the file) 256 | */ 257 | 258 | extern int ZEXPORT unzOpenCurrentFile OF((unzFile file)); 259 | /* 260 | Open for reading data the current file in the zipfile. 261 | If there is no error, the return value is UNZ_OK. 262 | */ 263 | 264 | extern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file, 265 | const char* password)); 266 | /* 267 | Open for reading data the current file in the zipfile. 268 | password is a crypting password 269 | If there is no error, the return value is UNZ_OK. 270 | */ 271 | 272 | extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file, 273 | int* method, 274 | int* level, 275 | int raw)); 276 | /* 277 | Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) 278 | if raw==1 279 | *method will receive method of compression, *level will receive level of 280 | compression 281 | note : you can set level parameter as NULL (if you did not want known level, 282 | but you CANNOT set method parameter as NULL 283 | */ 284 | 285 | extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file, 286 | int* method, 287 | int* level, 288 | int raw, 289 | const char* password)); 290 | /* 291 | Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) 292 | if raw==1 293 | *method will receive method of compression, *level will receive level of 294 | compression 295 | note : you can set level parameter as NULL (if you did not want known level, 296 | but you CANNOT set method parameter as NULL 297 | */ 298 | 299 | 300 | extern int ZEXPORT unzCloseCurrentFile OF((unzFile file)); 301 | /* 302 | Close the file in zip opened with unzOpenCurrentFile 303 | Return UNZ_CRCERROR if all the file was read but the CRC is not good 304 | */ 305 | 306 | extern int ZEXPORT unzReadCurrentFile OF((unzFile file, 307 | voidp buf, 308 | unsigned len)); 309 | /* 310 | Read bytes from the current file (opened by unzOpenCurrentFile) 311 | buf contain buffer where data must be copied 312 | len the size of buf. 313 | 314 | return the number of byte copied if somes bytes are copied 315 | return 0 if the end of file was reached 316 | return <0 with error code if there is an error 317 | (UNZ_ERRNO for IO error, or zLib error for uncompress error) 318 | */ 319 | 320 | extern z_off_t ZEXPORT unztell OF((unzFile file)); 321 | /* 322 | Give the current position in uncompressed data 323 | */ 324 | 325 | extern int ZEXPORT unzeof OF((unzFile file)); 326 | /* 327 | return 1 if the end of file was reached, 0 elsewhere 328 | */ 329 | 330 | extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file, 331 | voidp buf, 332 | unsigned len)); 333 | /* 334 | Read extra field from the current file (opened by unzOpenCurrentFile) 335 | This is the local-header version of the extra field (sometimes, there is 336 | more info in the local-header version than in the central-header) 337 | 338 | if buf==NULL, it return the size of the local extra field 339 | 340 | if buf!=NULL, len is the size of the buffer, the extra header is copied in 341 | buf. 342 | the return value is the number of bytes copied in buf, or (if <0) 343 | the error code 344 | */ 345 | 346 | /***************************************************************************/ 347 | 348 | /* Get the current file offset */ 349 | extern uLong ZEXPORT unzGetOffset (unzFile file); 350 | 351 | /* Set the current file offset */ 352 | extern int ZEXPORT unzSetOffset (unzFile file, uLong pos); 353 | 354 | 355 | 356 | #ifdef __cplusplus 357 | } 358 | #endif 359 | 360 | #endif /* _unz_H */ 361 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/ZipArchive/minizip/zip.h: -------------------------------------------------------------------------------- 1 | /* zip.h -- IO for compress .zip files using zlib 2 | Version 1.01h, December 28th, 2009 3 | 4 | Copyright (C) 1998-2009 Gilles Vollant 5 | 6 | This unzip package allow creates .ZIP file, compatible with PKZip 2.04g 7 | WinZip, InfoZip tools and compatible. 8 | Multi volume ZipFile (span) are not supported. 9 | Encryption compatible with pkzip 2.04g only supported 10 | Old compressions used by old PKZip 1.x are not supported 11 | 12 | For uncompress .zip file, look at unzip.h 13 | 14 | 15 | I WAIT FEEDBACK at mail info@winimage.com 16 | Visit also http://www.winimage.com/zLibDll/unzip.html for evolution 17 | 18 | Condition of use and distribution are the same than zlib : 19 | 20 | This software is provided 'as-is', without any express or implied 21 | warranty. In no event will the authors be held liable for any damages 22 | arising from the use of this software. 23 | 24 | Permission is granted to anyone to use this software for any purpose, 25 | including commercial applications, and to alter it and redistribute it 26 | freely, subject to the following restrictions: 27 | 28 | 1. The origin of this software must not be misrepresented; you must not 29 | claim that you wrote the original software. If you use this software 30 | in a product, an acknowledgment in the product documentation would be 31 | appreciated but is not required. 32 | 2. Altered source versions must be plainly marked as such, and must not be 33 | misrepresented as being the original software. 34 | 3. This notice may not be removed or altered from any source distribution. 35 | 36 | 37 | */ 38 | 39 | /* for more info about .ZIP format, see 40 | http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip 41 | http://www.info-zip.org/pub/infozip/doc/ 42 | PkWare has also a specification at : 43 | ftp://ftp.pkware.com/probdesc.zip 44 | */ 45 | 46 | #ifndef _zip_H 47 | #define _zip_H 48 | 49 | #ifdef __cplusplus 50 | extern "C" { 51 | #endif 52 | 53 | #ifndef _ZLIB_H 54 | #include "zlib.h" 55 | #endif 56 | 57 | #ifndef _ZLIBIOAPI_H 58 | #include "ioapi.h" 59 | #endif 60 | 61 | #if defined(STRICTZIP) || defined(STRICTZIPUNZIP) 62 | /* like the STRICT of WIN32, we define a pointer that cannot be converted 63 | from (void*) without cast */ 64 | typedef struct TagzipFile__ { int unused; } zipFile__; 65 | typedef zipFile__ *zipFile; 66 | #else 67 | typedef voidp zipFile; 68 | #endif 69 | 70 | #define ZIP_OK (0) 71 | #define ZIP_EOF (0) 72 | #define ZIP_ERRNO (Z_ERRNO) 73 | #define ZIP_PARAMERROR (-102) 74 | #define ZIP_BADZIPFILE (-103) 75 | #define ZIP_INTERNALERROR (-104) 76 | 77 | #ifndef DEF_MEM_LEVEL 78 | # if MAX_MEM_LEVEL >= 8 79 | # define DEF_MEM_LEVEL 8 80 | # else 81 | # define DEF_MEM_LEVEL MAX_MEM_LEVEL 82 | # endif 83 | #endif 84 | /* default memLevel */ 85 | 86 | /* tm_zip contain date/time info */ 87 | typedef struct tm_zip_s 88 | { 89 | uInt tm_sec; /* seconds after the minute - [0,59] */ 90 | uInt tm_min; /* minutes after the hour - [0,59] */ 91 | uInt tm_hour; /* hours since midnight - [0,23] */ 92 | uInt tm_mday; /* day of the month - [1,31] */ 93 | uInt tm_mon; /* months since January - [0,11] */ 94 | uInt tm_year; /* years - [1980..2044] */ 95 | } tm_zip; 96 | 97 | typedef struct 98 | { 99 | tm_zip tmz_date; /* date in understandable format */ 100 | uLong dosDate; /* if dos_date == 0, tmu_date is used */ 101 | /* uLong flag; */ /* general purpose bit flag 2 bytes */ 102 | 103 | uLong internal_fa; /* internal file attributes 2 bytes */ 104 | uLong external_fa; /* external file attributes 4 bytes */ 105 | } zip_fileinfo; 106 | 107 | typedef const char* zipcharpc; 108 | 109 | 110 | #define APPEND_STATUS_CREATE (0) 111 | #define APPEND_STATUS_CREATEAFTER (1) 112 | #define APPEND_STATUS_ADDINZIP (2) 113 | 114 | extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append)); 115 | /* 116 | Create a zipfile. 117 | pathname contain on Windows XP a filename like "c:\\zlib\\zlib113.zip" or on 118 | an Unix computer "zlib/zlib113.zip". 119 | if the file pathname exist and append==APPEND_STATUS_CREATEAFTER, the zip 120 | will be created at the end of the file. 121 | (useful if the file contain a self extractor code) 122 | if the file pathname exist and append==APPEND_STATUS_ADDINZIP, we will 123 | add files in existing zip (be sure you don't add file that doesn't exist) 124 | If the zipfile cannot be opened, the return value is NULL. 125 | Else, the return value is a zipFile Handle, usable with other function 126 | of this zip package. 127 | */ 128 | 129 | /* Note : there is no delete function into a zipfile. 130 | If you want delete file into a zipfile, you must open a zipfile, and create another 131 | Of couse, you can use RAW reading and writing to copy the file you did not want delte 132 | */ 133 | 134 | extern zipFile ZEXPORT zipOpen2 OF((const char *pathname, 135 | int append, 136 | zipcharpc* globalcomment, 137 | zlib_filefunc_def* pzlib_filefunc_def)); 138 | 139 | extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file, 140 | const char* filename, 141 | const zip_fileinfo* zipfi, 142 | const void* extrafield_local, 143 | uInt size_extrafield_local, 144 | const void* extrafield_global, 145 | uInt size_extrafield_global, 146 | const char* comment, 147 | int method, 148 | int level)); 149 | /* 150 | Open a file in the ZIP for writing. 151 | filename : the filename in zip (if NULL, '-' without quote will be used 152 | *zipfi contain supplemental information 153 | if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local 154 | contains the extrafield data the the local header 155 | if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global 156 | contains the extrafield data the the local header 157 | if comment != NULL, comment contain the comment string 158 | method contain the compression method (0 for store, Z_DEFLATED for deflate) 159 | level contain the level of compression (can be Z_DEFAULT_COMPRESSION) 160 | */ 161 | 162 | 163 | extern int ZEXPORT zipOpenNewFileInZip2 OF((zipFile file, 164 | const char* filename, 165 | const zip_fileinfo* zipfi, 166 | const void* extrafield_local, 167 | uInt size_extrafield_local, 168 | const void* extrafield_global, 169 | uInt size_extrafield_global, 170 | const char* comment, 171 | int method, 172 | int level, 173 | int raw)); 174 | 175 | /* 176 | Same than zipOpenNewFileInZip, except if raw=1, we write raw file 177 | */ 178 | 179 | extern int ZEXPORT zipOpenNewFileInZip3 OF((zipFile file, 180 | const char* filename, 181 | const zip_fileinfo* zipfi, 182 | const void* extrafield_local, 183 | uInt size_extrafield_local, 184 | const void* extrafield_global, 185 | uInt size_extrafield_global, 186 | const char* comment, 187 | int method, 188 | int level, 189 | int raw, 190 | int windowBits, 191 | int memLevel, 192 | int strategy, 193 | const char* password, 194 | uLong crcForCrypting)); 195 | /* 196 | Same than zipOpenNewFileInZip2, except 197 | windowBits,memLevel,,strategy : see parameter strategy in deflateInit2 198 | password : crypting password (NULL for no crypting) 199 | crcForCtypting : crc of file to compress (needed for crypting) 200 | */ 201 | 202 | extern int ZEXPORT zipOpenNewFileInZip4 OF((zipFile file, 203 | const char* filename, 204 | const zip_fileinfo* zipfi, 205 | const void* extrafield_local, 206 | uInt size_extrafield_local, 207 | const void* extrafield_global, 208 | uInt size_extrafield_global, 209 | const char* comment, 210 | int method, 211 | int level, 212 | int raw, 213 | int windowBits, 214 | int memLevel, 215 | int strategy, 216 | const char* password, 217 | uLong crcForCrypting, 218 | uLong versionMadeBy, 219 | uLong flagBase)); 220 | /* 221 | Same than zipOpenNewFileInZip4, except 222 | versionMadeBy : value for Version made by field 223 | flag : value for flag field (compression level info will be added) 224 | */ 225 | 226 | extern int ZEXPORT zipWriteInFileInZip OF((zipFile file, 227 | const void* buf, 228 | unsigned len)); 229 | /* 230 | Write data in the zipfile 231 | */ 232 | 233 | extern int ZEXPORT zipCloseFileInZip OF((zipFile file)); 234 | /* 235 | Close the current file in the zipfile 236 | */ 237 | 238 | extern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file, 239 | uLong uncompressed_size, 240 | uLong crc32)); 241 | /* 242 | Close the current file in the zipfile, for fiel opened with 243 | parameter raw=1 in zipOpenNewFileInZip2 244 | uncompressed_size and crc32 are value for the uncompressed size 245 | */ 246 | 247 | extern int ZEXPORT zipClose OF((zipFile file, 248 | const char* global_comment)); 249 | /* 250 | Close the zipfile 251 | */ 252 | 253 | #ifdef __cplusplus 254 | } 255 | #endif 256 | 257 | #endif /* _zip_H */ 258 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/audioqueue.h: -------------------------------------------------------------------------------- 1 | // 2 | // audioqueue.h 3 | // AirFloat 4 | // 5 | // Copyright (c) 2013, Kristian Trenskow All rights reserved. 6 | // 7 | // Redistribution and use in source and binary forms, with or 8 | // without modification, are permitted provided that the following 9 | // conditions are met: 10 | // 11 | // Redistributions of source code must retain the above copyright 12 | // notice, this list of conditions and the following disclaimer. 13 | // Redistributions in binary form must reproduce the above 14 | // copyright notice, this list of conditions and the following 15 | // disclaimer in the documentation and/or other materials provided 16 | // with the distribution. THIS SOFTWARE IS PROVIDED BY THE 17 | // COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 18 | // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 21 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 24 | // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 28 | // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | 31 | #ifndef AirFloat_AudioQueue_h 32 | #define AirFloat_AudioQueue_h 33 | 34 | #include 35 | #include 36 | 37 | #include "audiooutput.h" 38 | #include "decoder.h" 39 | 40 | typedef struct audio_queue_t *audio_queue_p; 41 | 42 | typedef void(*audio_queue_received_audio_callback)(audio_queue_p aq, void* ctx); 43 | 44 | struct audio_queue_missing_packet_window { 45 | uint16_t seq_no; 46 | uint16_t packet_count; 47 | }; 48 | 49 | audio_queue_p audio_queue_create(decoder_p decoder); 50 | void audio_queue_destroy(audio_queue_p aq); 51 | void audio_queue_set_received_audio_callback(audio_queue_p aq, audio_queue_received_audio_callback callback, void* ctx); 52 | void audio_queue_disable_synchronization(audio_queue_p aq); 53 | void audio_queue_synchronize(audio_queue_p aq, uint32_t current_sample_time, double current_time, uint32_t next_sample_time); 54 | void audio_queue_set_remote_time(audio_queue_p aq, double remote_time); 55 | uint32_t audio_queue_add_packet(audio_queue_p aq, void* encoded_buffer, size_t encoded_buffer_size, uint16_t seq_no, uint32_t sample_time); 56 | struct audio_queue_missing_packet_window audio_queue_get_next_missing_window(audio_queue_p aq); 57 | void audio_queue_start(audio_queue_p aq); 58 | void audio_queue_flush(audio_queue_p aq, uint16_t last_seq_no); 59 | bool audio_queue_wait_for_space(audio_queue_p aq); 60 | audio_output_p audio_queue_get_output(audio_queue_p aq); 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /GJLiveEngineDemo/rvopserver.h: -------------------------------------------------------------------------------- 1 | // 2 | // rvopserver.h 3 | // AirFloat 4 | // 5 | // Copyright (c) 2013, Kristian Trenskow All rights reserved. 6 | // 7 | // Redistribution and use in source and binary forms, with or 8 | // without modification, are permitted provided that the following 9 | // conditions are met: 10 | // 11 | // Redistributions of source code must retain the above copyright 12 | // notice, this list of conditions and the following disclaimer. 13 | // Redistributions in binary form must reproduce the above 14 | // copyright notice, this list of conditions and the following 15 | // disclaimer in the documentation and/or other materials provided 16 | // with the distribution. THIS SOFTWARE IS PROVIDED BY THE 17 | // COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 18 | // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 21 | // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 24 | // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 28 | // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | 31 | #ifndef _rvopserver_h 32 | #define _rvopserver_h 33 | 34 | #include 35 | #include 36 | 37 | struct rvop_server_settings_t { 38 | const char* name; 39 | const char* password; 40 | bool ignore_source_volume; 41 | }; 42 | 43 | typedef struct rvop_server_t *rvop_server_p; 44 | 45 | #ifndef _rsp 46 | typedef struct rvop_session_t *rvop_session_p; 47 | #define _rsp 48 | #endif 49 | 50 | typedef void(*rvop_server_new_session_callback)(rvop_server_p server, rvop_session_p new_session, void* ctx); 51 | typedef bool(*rvop_server_accept_callback)(rvop_server_p server, const char* connection_host, uint16_t connection_port, void* ctx); 52 | 53 | rvop_server_p rvop_server_create(struct rvop_server_settings_t settings); 54 | void rvop_server_destroy(rvop_server_p rs); 55 | bool rvop_server_start(rvop_server_p rs, uint16_t port); 56 | bool rvop_server_is_running(rvop_server_p rs); 57 | bool rvop_server_is_recording(rvop_server_p rs); 58 | struct rvop_server_settings_t rvop_server_get_settings(rvop_server_p rs); 59 | void rvop_server_set_settings(rvop_server_p rs, struct rvop_server_settings_t settings); 60 | void rvop_server_stop(rvop_server_p rs); 61 | void rvop_server_set_new_session_callback(rvop_server_p rs, rvop_server_new_session_callback new_session_callback, void* ctx); 62 | void rvop_server_set_session_accept_callback(rvop_server_p rs, rvop_server_accept_callback session_accept_callback, void* ctx); 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /GJLiveEngineDemoConfig/GJCaptureToolConfig.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /GJLiveEngineDemoConfig/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | GJCaptureToolConfig 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSExtension 26 | 27 | NSExtensionAttributes 28 | 29 | XCSourceEditorCommandDefinitions 30 | 31 | 32 | XCSourceEditorCommandClassName 33 | SourceEditorCommand 34 | XCSourceEditorCommandIdentifier 35 | $(PRODUCT_BUNDLE_IDENTIFIER).SourceEditorCommand 36 | XCSourceEditorCommandName 37 | Source Editor Command 38 | 39 | 40 | XCSourceEditorExtensionPrincipalClass 41 | SourceEditorExtension 42 | 43 | NSExtensionPointIdentifier 44 | com.apple.dt.Xcode.extension.source-editor 45 | 46 | NSHumanReadableCopyright 47 | Copyright © 2018年 MinorUncle. All rights reserved. 48 | 49 | 50 | -------------------------------------------------------------------------------- /GJLiveEngineDemoConfig/SourceEditorCommand.h: -------------------------------------------------------------------------------- 1 | // 2 | // SourceEditorCommand.h 3 | // GJCaptureToolConfig 4 | // 5 | // Created by kyle on 2018/8/15. 6 | // Copyright © 2018年 MinorUncle. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SourceEditorCommand : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /GJLiveEngineDemoConfig/SourceEditorCommand.m: -------------------------------------------------------------------------------- 1 | // 2 | // SourceEditorCommand.m 3 | // GJCaptureToolConfig 4 | // 5 | // Created by kyle on 2018/8/15. 6 | // Copyright © 2018年 MinorUncle. All rights reserved. 7 | // 8 | 9 | #import "SourceEditorCommand.h" 10 | 11 | @implementation SourceEditorCommand 12 | 13 | - (void)performCommandWithInvocation:(XCSourceEditorCommandInvocation *)invocation completionHandler:(void (^)(NSError * _Nullable nilOrError))completionHandler 14 | { 15 | // Implement your command here, invoking the completion handler when done. Pass it nil on success, and an NSError on failure. 16 | 17 | completionHandler(nil); 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /GJLiveEngineDemoConfig/SourceEditorExtension.h: -------------------------------------------------------------------------------- 1 | // 2 | // SourceEditorExtension.h 3 | // GJCaptureToolConfig 4 | // 5 | // Created by kyle on 2018/8/15. 6 | // Copyright © 2018年 MinorUncle. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SourceEditorExtension : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /GJLiveEngineDemoConfig/SourceEditorExtension.m: -------------------------------------------------------------------------------- 1 | // 2 | // SourceEditorExtension.m 3 | // GJCaptureToolConfig 4 | // 5 | // Created by kyle on 2018/8/15. 6 | // Copyright © 2018年 MinorUncle. All rights reserved. 7 | // 8 | 9 | #import "SourceEditorExtension.h" 10 | 11 | @implementation SourceEditorExtension 12 | 13 | /* 14 | - (void)extensionDidFinishLaunching 15 | { 16 | // If your extension needs to do any work at launch, implement this optional method. 17 | } 18 | */ 19 | 20 | /* 21 | - (NSArray *> *)commandDefinitions 22 | { 23 | // If your extension needs to return a collection of command definitions that differs from those in its Info.plist, implement this optional property getter. 24 | return @[]; 25 | } 26 | */ 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GJLiveEngineDemo 2 | ## 实时性优势 3 | 1s内超低延迟,150kbps超弱网直播 4 | 5 | 详细评价:https://blog.csdn.net/i1065517719/article/details/82842121 6 | 7 | ## 性能优势 8 | 纯C语言搭建框架,各种数据复用,0多余流数据拷贝 。。。。 9 | 10 | ## 协议优势 11 | 兼容绝大部分TCP类流媒体协议。 12 | 13 | ## 其他优势 14 | 15 | ### 缓存管理:避免频繁的申请内存,无论是内存的复用,还是帧的复用,都能做到实时跟踪,监控未释放缓存。 16 | 17 | ### 内存管理:对内存溢出,内存泄漏都有着监控,再也不怕线上莫名crash。 18 | 19 | ### 队列管理:优雅的信号量封装,杜绝sleep,每一个等待都能及时响应。 20 | 21 | ### 线程复用:多低频线程高效复用。 22 | 23 | ### 接入简单:两步拉流,三部推流。 24 | 25 | 26 | 27 | 28 | --------------------------------------------------------------------------------