├── MotionJpegImageView.xcodeproj └── project.pbxproj ├── MotionJpegImageView ├── Localizable.strings ├── MotionJpegImageView-Info.plist ├── MotionJpegImageView-Prefix.pch ├── MotionJpegImageView.h ├── MotionJpegImageView.mm ├── MotionJpegImageViewAppDelegate.h ├── MotionJpegImageViewAppDelegate.mm ├── iPad │ ├── MotionJpegImageViewAppDelegate_iPad.h │ ├── MotionJpegImageViewAppDelegate_iPad.m │ └── en.lproj │ │ └── MainWindow_iPad.xib ├── iPhone │ ├── MotionJpegImageViewAppDelegate_iPhone.h │ ├── MotionJpegImageViewAppDelegate_iPhone.m │ └── en.lproj │ │ └── MainWindow_iPhone.xib └── main.m └── README /MotionJpegImageView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C636B828143B7538008CB95D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C636B827143B7538008CB95D /* UIKit.framework */; }; 11 | C636B82A143B7538008CB95D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C636B829143B7538008CB95D /* Foundation.framework */; }; 12 | C636B82C143B7538008CB95D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C636B82B143B7538008CB95D /* CoreGraphics.framework */; }; 13 | C636B834143B7538008CB95D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C636B833143B7538008CB95D /* main.m */; }; 14 | C636B838143B7538008CB95D /* MotionJpegImageViewAppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = C636B837143B7538008CB95D /* MotionJpegImageViewAppDelegate.mm */; }; 15 | C636B83C143B7538008CB95D /* MotionJpegImageViewAppDelegate_iPhone.m in Sources */ = {isa = PBXBuildFile; fileRef = C636B83B143B7538008CB95D /* MotionJpegImageViewAppDelegate_iPhone.m */; }; 16 | C636B83F143B7538008CB95D /* MainWindow_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = C636B83D143B7538008CB95D /* MainWindow_iPhone.xib */; }; 17 | C636B843143B7538008CB95D /* MotionJpegImageViewAppDelegate_iPad.m in Sources */ = {isa = PBXBuildFile; fileRef = C636B842143B7538008CB95D /* MotionJpegImageViewAppDelegate_iPad.m */; }; 18 | C636B846143B7538008CB95D /* MainWindow_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = C636B844143B7538008CB95D /* MainWindow_iPad.xib */; }; 19 | C636B84D143B760E008CB95D /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C636B84C143B760E008CB95D /* Localizable.strings */; }; 20 | C636B850143B7622008CB95D /* MotionJpegImageView.mm in Sources */ = {isa = PBXBuildFile; fileRef = C636B84F143B7622008CB95D /* MotionJpegImageView.mm */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXFileReference section */ 24 | C636B823143B7538008CB95D /* MotionJpegImageView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MotionJpegImageView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 25 | C636B827143B7538008CB95D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 26 | C636B829143B7538008CB95D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 27 | C636B82B143B7538008CB95D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 28 | C636B82F143B7538008CB95D /* MotionJpegImageView-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "MotionJpegImageView-Info.plist"; sourceTree = ""; }; 29 | C636B833143B7538008CB95D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 30 | C636B835143B7538008CB95D /* MotionJpegImageView-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MotionJpegImageView-Prefix.pch"; sourceTree = ""; }; 31 | C636B836143B7538008CB95D /* MotionJpegImageViewAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MotionJpegImageViewAppDelegate.h; sourceTree = ""; }; 32 | C636B837143B7538008CB95D /* MotionJpegImageViewAppDelegate.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MotionJpegImageViewAppDelegate.mm; sourceTree = ""; }; 33 | C636B83A143B7538008CB95D /* MotionJpegImageViewAppDelegate_iPhone.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MotionJpegImageViewAppDelegate_iPhone.h; path = iPhone/MotionJpegImageViewAppDelegate_iPhone.h; sourceTree = ""; }; 34 | C636B83B143B7538008CB95D /* MotionJpegImageViewAppDelegate_iPhone.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MotionJpegImageViewAppDelegate_iPhone.m; path = iPhone/MotionJpegImageViewAppDelegate_iPhone.m; sourceTree = ""; }; 35 | C636B83E143B7538008CB95D /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = iPhone/en.lproj/MainWindow_iPhone.xib; sourceTree = ""; }; 36 | C636B841143B7538008CB95D /* MotionJpegImageViewAppDelegate_iPad.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MotionJpegImageViewAppDelegate_iPad.h; path = iPad/MotionJpegImageViewAppDelegate_iPad.h; sourceTree = ""; }; 37 | C636B842143B7538008CB95D /* MotionJpegImageViewAppDelegate_iPad.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MotionJpegImageViewAppDelegate_iPad.m; path = iPad/MotionJpegImageViewAppDelegate_iPad.m; sourceTree = ""; }; 38 | C636B845143B7538008CB95D /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = iPad/en.lproj/MainWindow_iPad.xib; sourceTree = ""; }; 39 | C636B84C143B760E008CB95D /* Localizable.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; path = Localizable.strings; sourceTree = ""; }; 40 | C636B84E143B7622008CB95D /* MotionJpegImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MotionJpegImageView.h; sourceTree = ""; }; 41 | C636B84F143B7622008CB95D /* MotionJpegImageView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MotionJpegImageView.mm; sourceTree = ""; }; 42 | /* End PBXFileReference section */ 43 | 44 | /* Begin PBXFrameworksBuildPhase section */ 45 | C636B820143B7538008CB95D /* Frameworks */ = { 46 | isa = PBXFrameworksBuildPhase; 47 | buildActionMask = 2147483647; 48 | files = ( 49 | C636B828143B7538008CB95D /* UIKit.framework in Frameworks */, 50 | C636B82A143B7538008CB95D /* Foundation.framework in Frameworks */, 51 | C636B82C143B7538008CB95D /* CoreGraphics.framework in Frameworks */, 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | C636B818143B7538008CB95D = { 59 | isa = PBXGroup; 60 | children = ( 61 | C636B82D143B7538008CB95D /* MotionJpegImageView */, 62 | C636B826143B7538008CB95D /* Frameworks */, 63 | C636B824143B7538008CB95D /* Products */, 64 | ); 65 | sourceTree = ""; 66 | }; 67 | C636B824143B7538008CB95D /* Products */ = { 68 | isa = PBXGroup; 69 | children = ( 70 | C636B823143B7538008CB95D /* MotionJpegImageView.app */, 71 | ); 72 | name = Products; 73 | sourceTree = ""; 74 | }; 75 | C636B826143B7538008CB95D /* Frameworks */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | C636B827143B7538008CB95D /* UIKit.framework */, 79 | C636B829143B7538008CB95D /* Foundation.framework */, 80 | C636B82B143B7538008CB95D /* CoreGraphics.framework */, 81 | ); 82 | name = Frameworks; 83 | sourceTree = ""; 84 | }; 85 | C636B82D143B7538008CB95D /* MotionJpegImageView */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | C636B836143B7538008CB95D /* MotionJpegImageViewAppDelegate.h */, 89 | C636B837143B7538008CB95D /* MotionJpegImageViewAppDelegate.mm */, 90 | C636B84E143B7622008CB95D /* MotionJpegImageView.h */, 91 | C636B84F143B7622008CB95D /* MotionJpegImageView.mm */, 92 | C636B839143B7538008CB95D /* iPhone */, 93 | C636B840143B7538008CB95D /* iPad */, 94 | C636B82E143B7538008CB95D /* Supporting Files */, 95 | ); 96 | path = MotionJpegImageView; 97 | sourceTree = ""; 98 | }; 99 | C636B82E143B7538008CB95D /* Supporting Files */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | C636B82F143B7538008CB95D /* MotionJpegImageView-Info.plist */, 103 | C636B833143B7538008CB95D /* main.m */, 104 | C636B835143B7538008CB95D /* MotionJpegImageView-Prefix.pch */, 105 | C636B84C143B760E008CB95D /* Localizable.strings */, 106 | ); 107 | name = "Supporting Files"; 108 | sourceTree = ""; 109 | }; 110 | C636B839143B7538008CB95D /* iPhone */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | C636B83A143B7538008CB95D /* MotionJpegImageViewAppDelegate_iPhone.h */, 114 | C636B83B143B7538008CB95D /* MotionJpegImageViewAppDelegate_iPhone.m */, 115 | C636B83D143B7538008CB95D /* MainWindow_iPhone.xib */, 116 | ); 117 | name = iPhone; 118 | sourceTree = ""; 119 | }; 120 | C636B840143B7538008CB95D /* iPad */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | C636B841143B7538008CB95D /* MotionJpegImageViewAppDelegate_iPad.h */, 124 | C636B842143B7538008CB95D /* MotionJpegImageViewAppDelegate_iPad.m */, 125 | C636B844143B7538008CB95D /* MainWindow_iPad.xib */, 126 | ); 127 | name = iPad; 128 | sourceTree = ""; 129 | }; 130 | /* End PBXGroup section */ 131 | 132 | /* Begin PBXNativeTarget section */ 133 | C636B822143B7538008CB95D /* MotionJpegImageView */ = { 134 | isa = PBXNativeTarget; 135 | buildConfigurationList = C636B849143B7538008CB95D /* Build configuration list for PBXNativeTarget "MotionJpegImageView" */; 136 | buildPhases = ( 137 | C636B81F143B7538008CB95D /* Sources */, 138 | C636B820143B7538008CB95D /* Frameworks */, 139 | C636B821143B7538008CB95D /* Resources */, 140 | ); 141 | buildRules = ( 142 | ); 143 | dependencies = ( 144 | ); 145 | name = MotionJpegImageView; 146 | productName = MotionJpegImageView; 147 | productReference = C636B823143B7538008CB95D /* MotionJpegImageView.app */; 148 | productType = "com.apple.product-type.application"; 149 | }; 150 | /* End PBXNativeTarget section */ 151 | 152 | /* Begin PBXProject section */ 153 | C636B81A143B7538008CB95D /* Project object */ = { 154 | isa = PBXProject; 155 | attributes = { 156 | ORGANIZATIONNAME = "ThinkFlood Inc"; 157 | }; 158 | buildConfigurationList = C636B81D143B7538008CB95D /* Build configuration list for PBXProject "MotionJpegImageView" */; 159 | compatibilityVersion = "Xcode 3.2"; 160 | developmentRegion = English; 161 | hasScannedForEncodings = 0; 162 | knownRegions = ( 163 | en, 164 | ); 165 | mainGroup = C636B818143B7538008CB95D; 166 | productRefGroup = C636B824143B7538008CB95D /* Products */; 167 | projectDirPath = ""; 168 | projectRoot = ""; 169 | targets = ( 170 | C636B822143B7538008CB95D /* MotionJpegImageView */, 171 | ); 172 | }; 173 | /* End PBXProject section */ 174 | 175 | /* Begin PBXResourcesBuildPhase section */ 176 | C636B821143B7538008CB95D /* Resources */ = { 177 | isa = PBXResourcesBuildPhase; 178 | buildActionMask = 2147483647; 179 | files = ( 180 | C636B83F143B7538008CB95D /* MainWindow_iPhone.xib in Resources */, 181 | C636B846143B7538008CB95D /* MainWindow_iPad.xib in Resources */, 182 | C636B84D143B760E008CB95D /* Localizable.strings in Resources */, 183 | ); 184 | runOnlyForDeploymentPostprocessing = 0; 185 | }; 186 | /* End PBXResourcesBuildPhase section */ 187 | 188 | /* Begin PBXSourcesBuildPhase section */ 189 | C636B81F143B7538008CB95D /* Sources */ = { 190 | isa = PBXSourcesBuildPhase; 191 | buildActionMask = 2147483647; 192 | files = ( 193 | C636B834143B7538008CB95D /* main.m in Sources */, 194 | C636B838143B7538008CB95D /* MotionJpegImageViewAppDelegate.mm in Sources */, 195 | C636B83C143B7538008CB95D /* MotionJpegImageViewAppDelegate_iPhone.m in Sources */, 196 | C636B843143B7538008CB95D /* MotionJpegImageViewAppDelegate_iPad.m in Sources */, 197 | C636B850143B7622008CB95D /* MotionJpegImageView.mm in Sources */, 198 | ); 199 | runOnlyForDeploymentPostprocessing = 0; 200 | }; 201 | /* End PBXSourcesBuildPhase section */ 202 | 203 | /* Begin PBXVariantGroup section */ 204 | C636B83D143B7538008CB95D /* MainWindow_iPhone.xib */ = { 205 | isa = PBXVariantGroup; 206 | children = ( 207 | C636B83E143B7538008CB95D /* en */, 208 | ); 209 | name = MainWindow_iPhone.xib; 210 | sourceTree = ""; 211 | }; 212 | C636B844143B7538008CB95D /* MainWindow_iPad.xib */ = { 213 | isa = PBXVariantGroup; 214 | children = ( 215 | C636B845143B7538008CB95D /* en */, 216 | ); 217 | name = MainWindow_iPad.xib; 218 | sourceTree = ""; 219 | }; 220 | /* End PBXVariantGroup section */ 221 | 222 | /* Begin XCBuildConfiguration section */ 223 | C636B847143B7538008CB95D /* Debug */ = { 224 | isa = XCBuildConfiguration; 225 | buildSettings = { 226 | ALWAYS_SEARCH_USER_PATHS = NO; 227 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 228 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 229 | COPY_PHASE_STRIP = NO; 230 | GCC_C_LANGUAGE_STANDARD = gnu99; 231 | GCC_DYNAMIC_NO_PIC = NO; 232 | GCC_OPTIMIZATION_LEVEL = 0; 233 | GCC_PREPROCESSOR_DEFINITIONS = ( 234 | "DEBUG=1", 235 | "$(inherited)", 236 | ); 237 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 238 | GCC_VERSION = com.apple.compilers.llvmgcc42; 239 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 240 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 241 | GCC_WARN_UNUSED_VARIABLE = YES; 242 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 243 | SDKROOT = iphoneos; 244 | TARGETED_DEVICE_FAMILY = "1,2"; 245 | }; 246 | name = Debug; 247 | }; 248 | C636B848143B7538008CB95D /* Release */ = { 249 | isa = XCBuildConfiguration; 250 | buildSettings = { 251 | ALWAYS_SEARCH_USER_PATHS = NO; 252 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 253 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 254 | COPY_PHASE_STRIP = YES; 255 | GCC_C_LANGUAGE_STANDARD = gnu99; 256 | GCC_VERSION = com.apple.compilers.llvmgcc42; 257 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 258 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 259 | GCC_WARN_UNUSED_VARIABLE = YES; 260 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 261 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 262 | SDKROOT = iphoneos; 263 | TARGETED_DEVICE_FAMILY = "1,2"; 264 | VALIDATE_PRODUCT = YES; 265 | }; 266 | name = Release; 267 | }; 268 | C636B84A143B7538008CB95D /* Debug */ = { 269 | isa = XCBuildConfiguration; 270 | buildSettings = { 271 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 272 | GCC_PREFIX_HEADER = "MotionJpegImageView/MotionJpegImageView-Prefix.pch"; 273 | INFOPLIST_FILE = "MotionJpegImageView/MotionJpegImageView-Info.plist"; 274 | PRODUCT_NAME = "$(TARGET_NAME)"; 275 | WRAPPER_EXTENSION = app; 276 | }; 277 | name = Debug; 278 | }; 279 | C636B84B143B7538008CB95D /* Release */ = { 280 | isa = XCBuildConfiguration; 281 | buildSettings = { 282 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 283 | GCC_PREFIX_HEADER = "MotionJpegImageView/MotionJpegImageView-Prefix.pch"; 284 | INFOPLIST_FILE = "MotionJpegImageView/MotionJpegImageView-Info.plist"; 285 | PRODUCT_NAME = "$(TARGET_NAME)"; 286 | WRAPPER_EXTENSION = app; 287 | }; 288 | name = Release; 289 | }; 290 | /* End XCBuildConfiguration section */ 291 | 292 | /* Begin XCConfigurationList section */ 293 | C636B81D143B7538008CB95D /* Build configuration list for PBXProject "MotionJpegImageView" */ = { 294 | isa = XCConfigurationList; 295 | buildConfigurations = ( 296 | C636B847143B7538008CB95D /* Debug */, 297 | C636B848143B7538008CB95D /* Release */, 298 | ); 299 | defaultConfigurationIsVisible = 0; 300 | defaultConfigurationName = Release; 301 | }; 302 | C636B849143B7538008CB95D /* Build configuration list for PBXNativeTarget "MotionJpegImageView" */ = { 303 | isa = XCConfigurationList; 304 | buildConfigurations = ( 305 | C636B84A143B7538008CB95D /* Debug */, 306 | C636B84B143B7538008CB95D /* Release */, 307 | ); 308 | defaultConfigurationIsVisible = 0; 309 | defaultConfigurationName = Release; 310 | }; 311 | /* End XCConfigurationList section */ 312 | }; 313 | rootObject = C636B81A143B7538008CB95D /* Project object */; 314 | } 315 | -------------------------------------------------------------------------------- /MotionJpegImageView/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | VideoTest 4 | 5 | Created by Matthew Eagar on 10/4/11. 6 | Copyright 2011 ThinkFlood Inc. All rights reserved. 7 | */ 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is furnished 13 | // to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in all 16 | // copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | // SOFTWARE. 25 | 26 | "CredentialAlertTitle" = "Authorization Required"; 27 | "CancelButtonTitle" = "Cancel"; 28 | "LoginButtonTitle" = "Log In"; 29 | "UsernamePlaceholderText" = "username"; 30 | "PasswordPlaceholderText" = "password"; 31 | -------------------------------------------------------------------------------- /MotionJpegImageView/MotionJpegImageView-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.thinkflood.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 1.0 27 | LSRequiresIPhoneOS 28 | 29 | NSMainNibFile 30 | MainWindow_iPhone 31 | NSMainNibFile~ipad 32 | MainWindow_iPad 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | UIStatusBarHidden 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /MotionJpegImageView/MotionJpegImageView-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'MotionJpegImageView' target in the 'MotionJpegImageView' project 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is furnished 9 | // to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in all 12 | // copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | // SOFTWARE. 21 | 22 | #import 23 | 24 | #ifndef __IPHONE_3_0 25 | #warning "This project uses features only available in iPhone SDK 3.0 and later." 26 | #endif 27 | 28 | #ifdef __OBJC__ 29 | #import 30 | #import 31 | #endif 32 | -------------------------------------------------------------------------------- /MotionJpegImageView/MotionJpegImageView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MotionJpegImageView.h 3 | // VideoTest 4 | // 5 | // Created by Matthew Eagar on 10/3/11. 6 | // Copyright 2011 ThinkFlood Inc. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is furnished 13 | // to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in all 16 | // copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | // SOFTWARE. 25 | 26 | #import 27 | 28 | @interface MotionJpegImageView : UIImageView { 29 | 30 | @private 31 | NSURL *_url; 32 | NSURLConnection *_connection; 33 | NSMutableData *_receivedData; 34 | NSString *_username; 35 | NSString *_password; 36 | BOOL _allowSelfSignedCertificates; 37 | BOOL _allowClearTextCredentials; 38 | 39 | } 40 | 41 | @property (nonatomic, readwrite, copy) NSURL *url; 42 | @property (readonly) BOOL isPlaying; 43 | @property (nonatomic, readwrite, copy) NSString *username; 44 | @property (nonatomic, readwrite, copy) NSString *password; 45 | @property (nonatomic, readwrite, assign) BOOL allowSelfSignedCertificates; 46 | @property (nonatomic, readwrite, assign) BOOL allowClearTextCredentials; 47 | 48 | - (void)play; 49 | - (void)pause; 50 | - (void)clear; 51 | - (void)stop; 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /MotionJpegImageView/MotionJpegImageView.mm: -------------------------------------------------------------------------------- 1 | // 2 | // MotionJpegImageView.mm 3 | // VideoTest 4 | // 5 | // Created by Matthew Eagar on 10/3/11. 6 | // Copyright 2011 ThinkFlood Inc. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is furnished 13 | // to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in all 16 | // copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | // SOFTWARE. 25 | 26 | #import "MotionJpegImageView.h" 27 | 28 | #pragma mark CredentialAlertView Class Declaration 29 | 30 | @class CredentialAlertView; 31 | 32 | @protocol CredentialAlertDelegate 33 | 34 | - (void)credentialAlertCancelled:(CredentialAlertView *)alert; 35 | - (void)credentialAlertSaved:(CredentialAlertView *)alert; 36 | 37 | @end 38 | 39 | @interface CredentialAlertView : UIAlertView 40 | 42 | { 43 | 44 | @private 45 | UITextField *_usernameField; 46 | UITextField *_passwordField; 47 | id _credentialDelegate; 48 | 49 | } 50 | 51 | @property (nonatomic, readwrite, copy) NSString *username; 52 | @property (nonatomic, readwrite, copy) NSString *password; 53 | @property (nonatomic, readwrite, assign) id credentialDelegate; 54 | 55 | - (id)initWithDelegate:(id)delegate 56 | forHost:(NSString *)hostName; 57 | 58 | @end 59 | 60 | #pragma mark - Constants 61 | 62 | #define ALERT_HEIGHT 200.0 63 | #define ALERT_Y_POSITION 55.0 64 | #define BUTTON_MARGIN 15.0 65 | #define TEXT_FIELD_MARGIN 5.0 66 | 67 | #pragma mark - CredentialAlertView Implementation 68 | 69 | @implementation CredentialAlertView 70 | 71 | #pragma mark - Properties 72 | 73 | @dynamic username; 74 | @dynamic password; 75 | @synthesize credentialDelegate = _credentialDelegate; 76 | 77 | - (NSString *)username { 78 | return _usernameField.text; 79 | } 80 | 81 | - (void)setUsername:(NSString *)username { 82 | _usernameField.text = username; 83 | } 84 | 85 | - (NSString *)password { 86 | return _passwordField.text; 87 | } 88 | 89 | - (void)setPassword:(NSString *)password { 90 | _passwordField.text = password; 91 | } 92 | 93 | #pragma mark - Initializers 94 | 95 | - (id)initWithDelegate:(id)delegate 96 | forHost:(NSString *)hostName { 97 | self = [super initWithTitle:NSLocalizedString(@"CredentialAlertTitle", @"") 98 | message:hostName 99 | delegate:self 100 | cancelButtonTitle:NSLocalizedString(@"CancelButtonTitle", @"") 101 | otherButtonTitles:NSLocalizedString(@"LoginButtonTitle", @""), 102 | nil]; 103 | 104 | if (self) { 105 | _credentialDelegate = delegate; 106 | 107 | _usernameField = [[UITextField alloc] initWithFrame:CGRectZero]; 108 | _usernameField.borderStyle = UITextBorderStyleBezel; 109 | _usernameField.backgroundColor = [UIColor whiteColor]; 110 | _usernameField.placeholder = NSLocalizedString(@"UsernamePlaceholderText", @""); 111 | _usernameField.delegate = self; 112 | _usernameField.autocorrectionType = UITextAutocorrectionTypeNo; 113 | _usernameField.autocapitalizationType = UITextAutocapitalizationTypeNone; 114 | _usernameField.returnKeyType = UIReturnKeyNext; 115 | _usernameField.clearButtonMode = UITextFieldViewModeUnlessEditing; 116 | [self addSubview:_usernameField]; 117 | [_usernameField release]; 118 | 119 | _passwordField = [[UITextField alloc] initWithFrame:CGRectZero]; 120 | _passwordField.secureTextEntry = YES; 121 | _passwordField.borderStyle = UITextBorderStyleBezel; 122 | _passwordField.backgroundColor = [UIColor whiteColor]; 123 | _passwordField.placeholder = NSLocalizedString(@"PasswordPlaceholderText", @""); 124 | _passwordField.delegate = self; 125 | _passwordField.autocorrectionType = UITextAutocorrectionTypeNo; 126 | _passwordField.autocapitalizationType = UITextAutocapitalizationTypeNone; 127 | _passwordField.returnKeyType = UIReturnKeyDone; 128 | _passwordField.clearButtonMode = UITextFieldViewModeUnlessEditing; 129 | [self addSubview:_passwordField]; 130 | [_passwordField release]; 131 | } 132 | 133 | return self; 134 | } 135 | 136 | #pragma mark - Overrides 137 | 138 | - (void)dealloc { 139 | [super dealloc]; 140 | } 141 | 142 | - (void)setFrame:(CGRect)frame { 143 | frame.size.height = ALERT_HEIGHT; 144 | frame.origin.y = ALERT_Y_POSITION; 145 | [super setFrame:frame]; 146 | } 147 | 148 | - (void)layoutSubviews { 149 | [super layoutSubviews]; 150 | 151 | NSString *username = _usernameField.text; 152 | _usernameField.text = @"a"; 153 | CGSize textFieldSize = [_usernameField sizeThatFits:CGSizeZero]; 154 | _usernameField.text = username; 155 | 156 | UILabel *titleLabel = nil; 157 | UILabel *messageLabel = nil; 158 | NSMutableArray *buttonViews = [NSMutableArray arrayWithCapacity:3]; 159 | 160 | for (UIView *subview in self.subviews) { 161 | if (subview == _usernameField || 162 | subview == _passwordField) { 163 | // continue 164 | } 165 | else if ([subview isKindOfClass:[UILabel class]]) { 166 | if (titleLabel == nil) { 167 | titleLabel = (UILabel *)subview; 168 | } 169 | else if (titleLabel.frame.origin.y > subview.frame.origin.y) { 170 | messageLabel = titleLabel; 171 | titleLabel = (UILabel *)subview; 172 | } 173 | else { 174 | messageLabel = (UILabel *)subview; 175 | } 176 | } 177 | else if ([subview isKindOfClass:[UIImageView class]]) { 178 | // continue 179 | } 180 | else if ([subview isKindOfClass:[UITextField class]]) { 181 | // continue 182 | } 183 | else { 184 | [buttonViews addObject:subview]; 185 | } 186 | } 187 | 188 | CGFloat buttonViewTop = 0.0; 189 | for (UIView *buttonView in buttonViews) { 190 | CGRect buttonViewFrame = buttonView.frame; 191 | buttonViewFrame.origin.y = 192 | self.bounds.size.height - buttonViewFrame.size.height - BUTTON_MARGIN; 193 | buttonView.frame = buttonViewFrame; 194 | buttonViewTop = CGRectGetMinY(buttonViewFrame); 195 | } 196 | 197 | CGRect labelFrame = messageLabel.frame; 198 | CGRect textFieldFrame = CGRectMake(labelFrame.origin.x, 199 | labelFrame.origin.y + labelFrame.size.height + TEXT_FIELD_MARGIN, 200 | labelFrame.size.width, 201 | textFieldSize.height); 202 | _usernameField.frame = textFieldFrame; 203 | [self bringSubviewToFront:_usernameField]; 204 | 205 | textFieldFrame.origin.y += textFieldFrame.size.height + TEXT_FIELD_MARGIN; 206 | _passwordField.frame = textFieldFrame; 207 | [self bringSubviewToFront:_passwordField]; 208 | } 209 | 210 | #pragma mark - UIAlertView Delegate Methods 211 | 212 | - (void)alertView:(UIAlertView *)alertView 213 | clickedButtonAtIndex:(NSInteger)buttonIndex { 214 | if (buttonIndex == [self cancelButtonIndex]) { 215 | if (_credentialDelegate) { 216 | [_credentialDelegate credentialAlertCancelled:self]; 217 | } 218 | } 219 | else if (_credentialDelegate) { 220 | [_credentialDelegate credentialAlertSaved:self]; 221 | } 222 | 223 | [alertView dismissWithClickedButtonIndex:buttonIndex animated:YES]; 224 | } 225 | 226 | #pragma mark - UITextField Delegate Methods 227 | 228 | - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField { 229 | return YES; 230 | } 231 | 232 | - (void)textFieldDidBeginEditing:(UITextField *)textField { 233 | 234 | } 235 | 236 | - (BOOL)textFieldShouldEndEditing:(UITextField *)textField { 237 | return YES; 238 | } 239 | 240 | - (void)textFieldDidEndEditing:(UITextField *)textField { 241 | 242 | } 243 | 244 | - (BOOL)textField:(UITextField *)textField 245 | shouldChangeCharactersInRange:(NSRange)range 246 | replacementString:(NSString *)string { 247 | return YES; 248 | } 249 | 250 | - (BOOL)textFieldShouldClear:(UITextField *)textField { 251 | return YES; 252 | } 253 | 254 | - (BOOL)textFieldShouldReturn:(UITextField *)textField { 255 | if (textField.text.length == 0) { 256 | // continue 257 | } 258 | else if (textField == _usernameField) { 259 | [_passwordField becomeFirstResponder]; 260 | } 261 | else if (textField == _passwordField) { 262 | [textField resignFirstResponder]; 263 | } 264 | 265 | return NO; 266 | } 267 | 268 | @end 269 | 270 | #pragma mark - Constants 271 | 272 | #define END_MARKER_BYTES { 0xFF, 0xD9 } 273 | 274 | static NSData *_endMarkerData = nil; 275 | 276 | #pragma mark - Private Method Declarations 277 | 278 | @interface MotionJpegImageView () 279 | 280 | - (void)cleanupConnection; 281 | 282 | @end 283 | 284 | #pragma mark - Implementation 285 | 286 | @implementation MotionJpegImageView 287 | 288 | @synthesize url = _url; 289 | @synthesize username = _username; 290 | @synthesize password = _password; 291 | @synthesize allowSelfSignedCertificates = _allowSelfSignedCertificates; 292 | @synthesize allowClearTextCredentials = _allowClearTextCredentials; 293 | @dynamic isPlaying; 294 | 295 | - (BOOL)isPlaying { 296 | return !(_connection == nil); 297 | } 298 | 299 | #pragma mark - Initializers 300 | 301 | - (id)initWithFrame:(CGRect)frame { 302 | self = [super initWithFrame:frame]; 303 | 304 | if (self) { 305 | _url = nil; 306 | _receivedData = nil; 307 | _username = nil; 308 | _password = nil; 309 | _allowSelfSignedCertificates = NO; 310 | 311 | if (_endMarkerData == nil) { 312 | uint8_t endMarker[2] = END_MARKER_BYTES; 313 | _endMarkerData = [[NSData alloc] initWithBytes:endMarker length:2]; 314 | } 315 | 316 | self.contentMode = UIViewContentModeScaleAspectFit; 317 | } 318 | 319 | return self; 320 | } 321 | 322 | -(void)awakeFromNib { 323 | [super awakeFromNib]; 324 | 325 | if (_endMarkerData == nil) { 326 | uint8_t endMarker[2] = END_MARKER_BYTES; 327 | _endMarkerData = [[NSData alloc] initWithBytes:endMarker length:2]; 328 | } 329 | 330 | self.contentMode = UIViewContentModeScaleAspectFit; 331 | } 332 | 333 | #pragma mark - Overrides 334 | 335 | - (void)dealloc { 336 | if (_connection) { 337 | [_connection cancel]; 338 | [self cleanupConnection]; 339 | } 340 | 341 | if (_url) { 342 | [_url release]; 343 | } 344 | 345 | if (_username) { 346 | [_username release]; 347 | } 348 | 349 | if (_password) { 350 | [_password release]; 351 | } 352 | 353 | [super dealloc]; 354 | } 355 | 356 | #pragma mark - Public Methods 357 | 358 | - (void)play { 359 | if (_connection) { 360 | // continue 361 | } 362 | else if (_url) { 363 | _connection = [[NSURLConnection alloc] initWithRequest:[NSURLRequest requestWithURL:_url] 364 | delegate:self]; 365 | } 366 | } 367 | 368 | - (void)pause { 369 | if (_connection) { 370 | [_connection cancel]; 371 | [self cleanupConnection]; 372 | } 373 | } 374 | 375 | - (void)clear { 376 | self.image = nil; 377 | } 378 | 379 | - (void)stop { 380 | [self pause]; 381 | [self clear]; 382 | } 383 | 384 | #pragma mark - Private Methods 385 | 386 | - (void)cleanupConnection { 387 | if (_connection) { 388 | [_connection release]; 389 | _connection = nil; 390 | } 391 | 392 | if (_receivedData) { 393 | [_receivedData release]; 394 | _receivedData = nil; 395 | } 396 | } 397 | 398 | #pragma mark - NSURLConnection Delegate Methods 399 | 400 | - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { 401 | if (_receivedData) { 402 | [_receivedData release]; 403 | } 404 | 405 | _receivedData = [[NSMutableData alloc] init]; 406 | } 407 | 408 | - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { 409 | [_receivedData appendData:data]; 410 | 411 | NSRange endRange = [_receivedData rangeOfData:_endMarkerData 412 | options:0 413 | range:NSMakeRange(0, _receivedData.length)]; 414 | 415 | long long endLocation = endRange.location + endRange.length; 416 | if (_receivedData.length >= endLocation) { 417 | NSData *imageData = [_receivedData subdataWithRange:NSMakeRange(0, endLocation)]; 418 | UIImage *receivedImage = [UIImage imageWithData:imageData]; 419 | if (receivedImage) { 420 | self.image = receivedImage; 421 | } 422 | } 423 | } 424 | 425 | - (void)connectionDidFinishLoading:(NSURLConnection *)connection { 426 | [self cleanupConnection]; 427 | } 428 | 429 | - (BOOL)connection:(NSURLConnection *)connection 430 | canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace { 431 | BOOL allow = NO; 432 | if ([protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) { 433 | allow = _allowSelfSignedCertificates; 434 | } 435 | else { 436 | allow = _allowClearTextCredentials; 437 | } 438 | 439 | return allow; 440 | } 441 | 442 | - (void)connection:(NSURLConnection *)connection 443 | didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge { 444 | if ([challenge previousFailureCount] == 0 && 445 | _username && _username.length > 0 && 446 | _password && _password.length > 0) { 447 | NSURLCredential *credentials = 448 | [NSURLCredential credentialWithUser:_username 449 | password:_password 450 | persistence:NSURLCredentialPersistenceForSession]; 451 | [[challenge sender] useCredential:credentials 452 | forAuthenticationChallenge:challenge]; 453 | } 454 | else { 455 | [[challenge sender] cancelAuthenticationChallenge:challenge]; 456 | [self cleanupConnection]; 457 | 458 | CredentialAlertView *loginAlert = 459 | [[CredentialAlertView alloc] initWithDelegate:self 460 | forHost:_url.host]; 461 | loginAlert.username = self.username; 462 | [loginAlert show]; 463 | } 464 | } 465 | 466 | - (BOOL)connectionShouldUseCredentialStorage:(NSURLConnection *)connection { 467 | return YES; 468 | } 469 | 470 | - (void)connection:(NSURLConnection *)connection 471 | didFailWithError:(NSError *)error { 472 | [self cleanupConnection]; 473 | } 474 | 475 | #pragma mark - CredentialAlertView Delegate Methods 476 | 477 | - (void)credentialAlertCancelled:(CredentialAlertView *)alert { 478 | [alert release]; 479 | } 480 | 481 | - (void)credentialAlertSaved:(CredentialAlertView *)alert { 482 | self.username = alert.username; 483 | self.password = alert.password; 484 | [alert release]; 485 | 486 | [self play]; 487 | } 488 | 489 | @end 490 | -------------------------------------------------------------------------------- /MotionJpegImageView/MotionJpegImageViewAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // MotionJpegImageViewAppDelegate.h 3 | // MotionJpegImageView 4 | // 5 | // Created by Matthew Eagar on 10/4/11. 6 | // Copyright 2011 ThinkFlood Inc. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is furnished 13 | // to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in all 16 | // copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | // SOFTWARE. 25 | 26 | #import 27 | #import "MotionJpegImageView.h" 28 | 29 | @interface MotionJpegImageViewAppDelegate : NSObject 30 | 31 | { 32 | 33 | @private 34 | MotionJpegImageView *_imageView; 35 | UIWebView *_webView; 36 | 37 | } 38 | 39 | @property (nonatomic, retain) IBOutlet UIWindow *window; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /MotionJpegImageView/MotionJpegImageViewAppDelegate.mm: -------------------------------------------------------------------------------- 1 | // 2 | // MotionJpegImageViewAppDelegate.m 3 | // MotionJpegImageView 4 | // 5 | // Created by Matthew Eagar on 10/4/11. 6 | // Copyright 2011 ThinkFlood Inc. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is furnished 13 | // to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in all 16 | // copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | // SOFTWARE. 25 | 26 | #import "MotionJpegImageViewAppDelegate.h" 27 | 28 | @implementation MotionJpegImageViewAppDelegate 29 | 30 | @synthesize window = _window; 31 | 32 | - (BOOL)application:(UIApplication *)application 33 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 34 | // Demonstrates the dramatic performance difference between loading M-JPEGs 35 | // through UIWebView (top) vs MotionJpegImageView (bottom) 36 | 37 | _webView = [[UIWebView alloc] initWithFrame:CGRectMake(0.0, 0.0, 640.0, 480.0)]; 38 | _webView.userInteractionEnabled = NO; 39 | CGFloat scaleRatio = self.window.bounds.size.width / _webView.bounds.size.width; 40 | CGAffineTransform scalingTransform = 41 | CGAffineTransformScale(CGAffineTransformIdentity, scaleRatio, scaleRatio); 42 | [_webView setTransform:scalingTransform]; 43 | CGRect webFrame = _webView.frame; 44 | webFrame.origin.y = 0.0; 45 | webFrame.origin.x = 0.0; 46 | _webView.frame = webFrame; 47 | 48 | NSURL *url = [NSURL URLWithString:@"http://webcam6.med.miami.edu/mjpg/video.mjpg"]; 49 | 50 | NSURLRequest *request = [NSURLRequest requestWithURL:url]; 51 | [_webView loadRequest:request]; 52 | [self.window addSubview:_webView]; 53 | 54 | webFrame.origin.y += webFrame.size.height; 55 | _imageView = [[MotionJpegImageView alloc] initWithFrame:webFrame]; 56 | _imageView.url = url; 57 | [self.window addSubview:_imageView]; 58 | [_imageView play]; 59 | 60 | [self.window makeKeyAndVisible]; 61 | return YES; 62 | } 63 | 64 | - (void)applicationWillResignActive:(UIApplication *)application { 65 | [_webView stopLoading]; 66 | [_imageView pause]; 67 | } 68 | 69 | - (void)applicationDidBecomeActive:(UIApplication *)application { 70 | [_webView reload]; 71 | [_imageView play]; 72 | } 73 | 74 | - (void)dealloc { 75 | [_window release]; 76 | [_webView release]; 77 | [_imageView release]; 78 | 79 | [super dealloc]; 80 | } 81 | 82 | @end 83 | -------------------------------------------------------------------------------- /MotionJpegImageView/iPad/MotionJpegImageViewAppDelegate_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // MotionJpegImageViewAppDelegate_iPad.h 3 | // MotionJpegImageView 4 | // 5 | // Created by Matthew Eagar on 10/4/11. 6 | // Copyright 2011 ThinkFlood Inc. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is furnished 13 | // to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in all 16 | // copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | // SOFTWARE. 25 | 26 | #import "MotionJpegImageViewAppDelegate.h" 27 | 28 | @interface MotionJpegImageViewAppDelegate_iPad : MotionJpegImageViewAppDelegate 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /MotionJpegImageView/iPad/MotionJpegImageViewAppDelegate_iPad.m: -------------------------------------------------------------------------------- 1 | // 2 | // MotionJpegImageViewAppDelegate_iPad.m 3 | // MotionJpegImageView 4 | // 5 | // Created by Matthew Eagar on 10/4/11. 6 | // Copyright 2011 ThinkFlood Inc. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is furnished 13 | // to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in all 16 | // copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | // SOFTWARE. 25 | 26 | #import "MotionJpegImageViewAppDelegate_iPad.h" 27 | 28 | @implementation MotionJpegImageViewAppDelegate_iPad 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /MotionJpegImageView/iPad/en.lproj/MainWindow_iPad.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1024 5 | 10D573 6 | 786 7 | 1038.29 8 | 460.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 112 12 | 13 | 14 | YES 15 | 16 | 17 | 18 | YES 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | YES 23 | 24 | YES 25 | 26 | 27 | YES 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | IBIPadFramework 35 | 36 | 37 | IBFirstResponder 38 | IBIPadFramework 39 | 40 | 41 | 42 | 292 43 | 44 | YES 45 | 46 | 47 | 301 48 | {{284, 501}, {200, 22}} 49 | 50 | NO 51 | YES 52 | 7 53 | NO 54 | IBIPadFramework 55 | My Universal App on iPad 56 | 57 | 1 58 | MCAwIDAAA 59 | 60 | 61 | 1 62 | 10 63 | 64 | 65 | {768, 1024} 66 | 67 | 68 | 1 69 | MSAxIDEAA 70 | 71 | NO 72 | NO 73 | 74 | 2 75 | 76 | IBIPadFramework 77 | YES 78 | 79 | 80 | IBIPadFramework 81 | 82 | 83 | 84 | 85 | YES 86 | 87 | 88 | window 89 | 90 | 91 | 92 | 7 93 | 94 | 95 | 96 | delegate 97 | 98 | 99 | 100 | 8 101 | 102 | 103 | 104 | 105 | YES 106 | 107 | 0 108 | 109 | 110 | 111 | 112 | 113 | -1 114 | 115 | 116 | File's Owner 117 | 118 | 119 | -2 120 | 121 | 122 | 123 | 124 | 2 125 | 126 | 127 | YES 128 | 129 | 130 | 131 | 132 | 133 | 6 134 | 135 | 136 | 137 | 138 | 11 139 | 140 | 141 | 142 | 143 | 144 | 145 | YES 146 | 147 | YES 148 | -1.CustomClassName 149 | -2.CustomClassName 150 | 11.IBPluginDependency 151 | 2.IBEditorWindowLastContentRect 152 | 2.IBPluginDependency 153 | 6.CustomClassName 154 | 6.IBPluginDependency 155 | 156 | 157 | YES 158 | UIApplication 159 | UIResponder 160 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 161 | {{202, 84}, {783, 772}} 162 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 163 | MotionJpegImageViewAppDelegate_iPad 164 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 165 | 166 | 167 | 168 | YES 169 | 170 | 171 | YES 172 | 173 | 174 | 175 | 176 | YES 177 | 178 | 179 | YES 180 | 181 | 182 | 183 | 11 184 | 185 | 186 | 187 | YES 188 | 189 | MotionJpegImageViewAppDelegate 190 | NSObject 191 | 192 | window 193 | UIWindow 194 | 195 | 196 | window 197 | 198 | window 199 | UIWindow 200 | 201 | 202 | 203 | IBProjectSource 204 | Shared/MotionJpegImageViewAppDelegate.h 205 | 206 | 207 | 208 | MotionJpegImageViewAppDelegate_iPad 209 | MotionJpegImageViewAppDelegate 210 | 211 | IBProjectSource 212 | iPad/MotionJpegImageViewAppDelegate_iPad.h 213 | 214 | 215 | 216 | 217 | YES 218 | 219 | NSObject 220 | 221 | IBFrameworkSource 222 | Foundation.framework/Headers/NSError.h 223 | 224 | 225 | 226 | NSObject 227 | 228 | IBFrameworkSource 229 | Foundation.framework/Headers/NSFileManager.h 230 | 231 | 232 | 233 | NSObject 234 | 235 | IBFrameworkSource 236 | Foundation.framework/Headers/NSKeyValueCoding.h 237 | 238 | 239 | 240 | NSObject 241 | 242 | IBFrameworkSource 243 | Foundation.framework/Headers/NSKeyValueObserving.h 244 | 245 | 246 | 247 | NSObject 248 | 249 | IBFrameworkSource 250 | Foundation.framework/Headers/NSKeyedArchiver.h 251 | 252 | 253 | 254 | NSObject 255 | 256 | IBFrameworkSource 257 | Foundation.framework/Headers/NSObject.h 258 | 259 | 260 | 261 | NSObject 262 | 263 | IBFrameworkSource 264 | Foundation.framework/Headers/NSRunLoop.h 265 | 266 | 267 | 268 | NSObject 269 | 270 | IBFrameworkSource 271 | Foundation.framework/Headers/NSThread.h 272 | 273 | 274 | 275 | NSObject 276 | 277 | IBFrameworkSource 278 | Foundation.framework/Headers/NSURL.h 279 | 280 | 281 | 282 | NSObject 283 | 284 | IBFrameworkSource 285 | Foundation.framework/Headers/NSURLConnection.h 286 | 287 | 288 | 289 | NSObject 290 | 291 | IBFrameworkSource 292 | UIKit.framework/Headers/UIAccessibility.h 293 | 294 | 295 | 296 | NSObject 297 | 298 | IBFrameworkSource 299 | UIKit.framework/Headers/UINibLoading.h 300 | 301 | 302 | 303 | NSObject 304 | 305 | IBFrameworkSource 306 | UIKit.framework/Headers/UIResponder.h 307 | 308 | 309 | 310 | UIApplication 311 | UIResponder 312 | 313 | IBFrameworkSource 314 | UIKit.framework/Headers/UIApplication.h 315 | 316 | 317 | 318 | UIResponder 319 | NSObject 320 | 321 | 322 | 323 | UIView 324 | 325 | IBFrameworkSource 326 | UIKit.framework/Headers/UITextField.h 327 | 328 | 329 | 330 | UIView 331 | UIResponder 332 | 333 | IBFrameworkSource 334 | UIKit.framework/Headers/UIView.h 335 | 336 | 337 | 338 | UIWindow 339 | UIView 340 | 341 | IBFrameworkSource 342 | UIKit.framework/Headers/UIWindow.h 343 | 344 | 345 | 346 | 347 | 0 348 | IBIPadFramework 349 | 350 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 351 | 352 | 353 | 354 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 355 | 356 | 357 | YES 358 | ../MotionJpegImageView.xcodeproj 359 | 3 360 | 112 361 | 362 | 363 | -------------------------------------------------------------------------------- /MotionJpegImageView/iPhone/MotionJpegImageViewAppDelegate_iPhone.h: -------------------------------------------------------------------------------- 1 | // 2 | // MotionJpegImageViewAppDelegate_iPhone.h 3 | // MotionJpegImageView 4 | // 5 | // Created by Matthew Eagar on 10/4/11. 6 | // Copyright 2011 ThinkFlood Inc. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is furnished 13 | // to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in all 16 | // copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | // SOFTWARE. 25 | 26 | #import "MotionJpegImageViewAppDelegate.h" 27 | 28 | @interface MotionJpegImageViewAppDelegate_iPhone : MotionJpegImageViewAppDelegate 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /MotionJpegImageView/iPhone/MotionJpegImageViewAppDelegate_iPhone.m: -------------------------------------------------------------------------------- 1 | // 2 | // MotionJpegImageViewAppDelegate_iPhone.m 3 | // MotionJpegImageView 4 | // 5 | // Created by Matthew Eagar on 10/4/11. 6 | // Copyright 2011 ThinkFlood Inc. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is furnished 13 | // to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in all 16 | // copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | // SOFTWARE. 25 | 26 | #import "MotionJpegImageViewAppDelegate_iPhone.h" 27 | 28 | @implementation MotionJpegImageViewAppDelegate_iPhone 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /MotionJpegImageView/iPhone/en.lproj/MainWindow_iPhone.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1024 5 | 10D573 6 | 786 7 | 1038.29 8 | 460.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 112 12 | 13 | 14 | YES 15 | 16 | 17 | 18 | YES 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | YES 23 | 24 | YES 25 | 26 | 27 | YES 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | IBCocoaTouchFramework 35 | 36 | 37 | IBFirstResponder 38 | IBCocoaTouchFramework 39 | 40 | 41 | IBCocoaTouchFramework 42 | 43 | 44 | 45 | 1316 46 | 47 | YES 48 | 49 | 50 | 1325 51 | {{51, 229}, {218, 22}} 52 | 53 | NO 54 | YES 55 | 7 56 | NO 57 | IBCocoaTouchFramework 58 | My Universal App on iPhone 59 | 60 | 1 61 | MCAwIDAAA 62 | 63 | 64 | 1 65 | 10 66 | 67 | 68 | 69 | {320, 480} 70 | 71 | 72 | 1 73 | MSAxIDEAA 74 | 75 | NO 76 | NO 77 | 78 | IBCocoaTouchFramework 79 | YES 80 | 81 | 82 | 83 | 84 | YES 85 | 86 | 87 | delegate 88 | 89 | 90 | 91 | 5 92 | 93 | 94 | 95 | window 96 | 97 | 98 | 99 | 6 100 | 101 | 102 | 103 | 104 | YES 105 | 106 | 0 107 | 108 | 109 | 110 | 111 | 112 | 2 113 | 114 | 115 | YES 116 | 117 | 118 | 119 | 120 | 121 | -1 122 | 123 | 124 | File's Owner 125 | 126 | 127 | 4 128 | 129 | 130 | App Delegate 131 | 132 | 133 | -2 134 | 135 | 136 | 137 | 138 | 8 139 | 140 | 141 | 142 | 143 | 144 | 145 | YES 146 | 147 | YES 148 | -1.CustomClassName 149 | -2.CustomClassName 150 | 2.IBAttributePlaceholdersKey 151 | 2.IBEditorWindowLastContentRect 152 | 2.IBPluginDependency 153 | 2.UIWindow.visibleAtLaunch 154 | 4.CustomClassName 155 | 4.IBPluginDependency 156 | 8.IBPluginDependency 157 | 158 | 159 | YES 160 | UIApplication 161 | UIResponder 162 | 163 | YES 164 | 165 | 166 | YES 167 | 168 | 169 | {{520, 376}, {320, 480}} 170 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 171 | 172 | MotionJpegImageViewAppDelegate_iPhone 173 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 174 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 175 | 176 | 177 | 178 | YES 179 | 180 | 181 | YES 182 | 183 | 184 | 185 | 186 | YES 187 | 188 | 189 | YES 190 | 191 | 192 | 193 | 8 194 | 195 | 196 | 197 | YES 198 | 199 | MotionJpegImageViewAppDelegate 200 | NSObject 201 | 202 | window 203 | UIWindow 204 | 205 | 206 | window 207 | 208 | window 209 | UIWindow 210 | 211 | 212 | 213 | IBProjectSource 214 | Shared/MotionJpegImageViewAppDelegate.h 215 | 216 | 217 | 218 | MotionJpegImageViewAppDelegate_iPhone 219 | MotionJpegImageViewAppDelegate 220 | 221 | IBProjectSource 222 | iPhone/MotionJpegImageViewAppDelegate_iPhone.h 223 | 224 | 225 | 226 | 227 | YES 228 | 229 | NSObject 230 | 231 | IBFrameworkSource 232 | Foundation.framework/Headers/NSError.h 233 | 234 | 235 | 236 | NSObject 237 | 238 | IBFrameworkSource 239 | Foundation.framework/Headers/NSFileManager.h 240 | 241 | 242 | 243 | NSObject 244 | 245 | IBFrameworkSource 246 | Foundation.framework/Headers/NSKeyValueCoding.h 247 | 248 | 249 | 250 | NSObject 251 | 252 | IBFrameworkSource 253 | Foundation.framework/Headers/NSKeyValueObserving.h 254 | 255 | 256 | 257 | NSObject 258 | 259 | IBFrameworkSource 260 | Foundation.framework/Headers/NSKeyedArchiver.h 261 | 262 | 263 | 264 | NSObject 265 | 266 | IBFrameworkSource 267 | Foundation.framework/Headers/NSObject.h 268 | 269 | 270 | 271 | NSObject 272 | 273 | IBFrameworkSource 274 | Foundation.framework/Headers/NSRunLoop.h 275 | 276 | 277 | 278 | NSObject 279 | 280 | IBFrameworkSource 281 | Foundation.framework/Headers/NSThread.h 282 | 283 | 284 | 285 | NSObject 286 | 287 | IBFrameworkSource 288 | Foundation.framework/Headers/NSURL.h 289 | 290 | 291 | 292 | NSObject 293 | 294 | IBFrameworkSource 295 | Foundation.framework/Headers/NSURLConnection.h 296 | 297 | 298 | 299 | NSObject 300 | 301 | IBFrameworkSource 302 | UIKit.framework/Headers/UIAccessibility.h 303 | 304 | 305 | 306 | NSObject 307 | 308 | IBFrameworkSource 309 | UIKit.framework/Headers/UINibLoading.h 310 | 311 | 312 | 313 | NSObject 314 | 315 | IBFrameworkSource 316 | UIKit.framework/Headers/UIResponder.h 317 | 318 | 319 | 320 | UIApplication 321 | UIResponder 322 | 323 | IBFrameworkSource 324 | UIKit.framework/Headers/UIApplication.h 325 | 326 | 327 | 328 | UIResponder 329 | NSObject 330 | 331 | 332 | 333 | UIView 334 | 335 | IBFrameworkSource 336 | UIKit.framework/Headers/UITextField.h 337 | 338 | 339 | 340 | UIView 341 | UIResponder 342 | 343 | IBFrameworkSource 344 | UIKit.framework/Headers/UIView.h 345 | 346 | 347 | 348 | UIWindow 349 | UIView 350 | 351 | IBFrameworkSource 352 | UIKit.framework/Headers/UIWindow.h 353 | 354 | 355 | 356 | 357 | 0 358 | IBCocoaTouchFramework 359 | 360 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 361 | 362 | 363 | 364 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 365 | 366 | 367 | YES 368 | ../MotionJpegImageView.xcodeproj 369 | 3 370 | 112 371 | 372 | 373 | -------------------------------------------------------------------------------- /MotionJpegImageView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // MotionJpegImageView 4 | // 5 | // Created by Matthew Eagar on 10/4/11. 6 | // Copyright 2011 ThinkFlood Inc. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is furnished 13 | // to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in all 16 | // copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | // SOFTWARE. 25 | 26 | #import 27 | 28 | int main(int argc, char *argv[]) { 29 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 30 | int retVal = UIApplicationMain(argc, argv, nil, nil); 31 | [pool release]; 32 | return retVal; 33 | } 34 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | A better-performing alternative to displaying Motion-JPEG streams than embedding a UIWebView. --------------------------------------------------------------------------------