ref: b6ed8cc76771949c0b583ddc9e37c0fb9f11b993
parent: 2adc22cae3e3add654b30fe3eaf6bde746848f92
parent: 7818c4f30bb10086cf69195bab6a0ade1e582f4b
author: HaiboZhu <[email protected]>
date: Mon Jun 9 05:56:26 EDT 2014
Merge pull request #928 from syureyi/iosutdemo Iosutdemo
--- a/Makefile
+++ b/Makefile
@@ -113,12 +113,12 @@
ifeq ($(HAVE_GTEST),Yes)
test: codec_unittest$(EXEEXT)
-ifeq (android, $(OS))
-
-else
-
+ifneq (android,$(OS))
+ifneq (ios,$(OS))
./codec_unittest
endif
+endif
+
else
test:
@echo "./gtest : No such file or directory."
@@ -137,7 +137,12 @@
endif
endif
+ifneq (ios, $(OS))
libraries: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX)
+else
+libraries: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX)
+endif
+
LIBRARIES += $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX)
$(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX): $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS)
@@ -173,7 +178,12 @@
include test/encoder/targets.mk
include test/processing/targets.mk
+LIBRARIES += $(LIBPREFIX)ut.$(LIBSUFFIX)
+$(LIBPREFIX)ut.$(LIBSUFFIX): $(DECODER_UNITTEST_OBJS) $(ENCODER_UNITTEST_OBJS) $(PROCESSING_UNITTEST_OBJS) $(API_TEST_OBJS)
+ $(QUIET)rm -f $@
+ $(QUIET_AR)$(AR) $(AR_OPTS) $+
+
LIBRARIES +=$(LIBPREFIX)ut.$(SHAREDLIBSUFFIX)
$(LIBPREFIX)ut.$(SHAREDLIBSUFFIX): $(DECODER_UNITTEST_OBJS) $(ENCODER_UNITTEST_OBJS) $(PROCESSING_UNITTEST_OBJS) $(API_TEST_OBJS) $(CODEC_UNITTEST_DEPS)
$(QUIET)rm -f $@
@@ -182,10 +192,12 @@
binaries: codec_unittest$(EXEEXT)
BINARIES += codec_unittest$(EXEEXT)
-ifeq (android,$(OS))
+ifeq (ios,$(OS))
+codec_unittest$(EXEEXT): $(LIBPREFIX)ut.$(LIBSUFFIX)
-
-codec_unittest$(EXEEXT):$(LIBPREFIX)ut.$(SHAREDLIBSUFFIX)
+else
+ifeq (android,$(OS))
+codec_unittest$(EXEEXT): $(LIBPREFIX)ut.$(SHAREDLIBSUFFIX)
cd ./test/build/android && $(NDKROOT)/ndk-build -B APP_ABI=$(APP_ABI) && android update project -t $(TARGET) -p . && ant debug
clean_Android: clean_Android_ut
@@ -196,7 +208,10 @@
codec_unittest$(EXEEXT): $(DECODER_UNITTEST_OBJS) $(ENCODER_UNITTEST_OBJS) $(PROCESSING_UNITTEST_OBJS) $(API_TEST_OBJS) $(CODEC_UNITTEST_DEPS)
$(QUIET)rm -f $@
$(QUIET_CXX)$(CXX) $(CXX_LINK_O) $+ $(CODEC_UNITTEST_LDFLAGS) $(LDFLAGS)
+
endif
+endif
+
else
binaries:
@:
--- a/build/platform-ios.mk
+++ b/build/platform-ios.mk
@@ -10,7 +10,8 @@
SDK = $(shell xcrun --sdk $(shell echo $(SDKTYPE) | tr A-Z a-z) --show-sdk-version)
SDK_MIN = 5.1
-SDKROOT = /Applications/Xcode.app/Contents/Developer/Platforms/$(SDKTYPE).platform/Developer/SDKs/$(SDKTYPE)$(SDK).sdk
+XCODE=$(shell xcode-select -p)
+SDKROOT = $(XCODE)/Platforms/$(SDKTYPE).platform/Developer/SDKs/$(SDKTYPE)$(SDK).sdk
CFLAGS += -arch $(ARCH) -isysroot $(SDKROOT) -miphoneos-version-min=$(SDK_MIN) -DAPPLE_IOS
LDFLAGS += -arch $(ARCH) -isysroot $(SDKROOT) -miphoneos-version-min=$(SDK_MIN)
--- a/test/api/simple_test.cpp
+++ b/test/api/simple_test.cpp
@@ -4,8 +4,7 @@
#endif
-
-#if defined(ANDROID_NDK)
+#if (defined(ANDROID_NDK)||defined(APPLE_IOS))
int CodecUtMain(int argc , char** argv ) {
#else
int main (int argc, char** argv) {
--- /dev/null
+++ b/test/build/ios/codec_unittest/.gitignore
@@ -1,0 +1,1 @@
+build
--- /dev/null
+++ b/test/build/ios/codec_unittest/codec_unittest.xcodeproj/project.pbxproj
@@ -1,0 +1,351 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 5447AB0219404B54001CD240 /* libgtest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5447AB0019404B54001CD240 /* libgtest.a */; };
+ 5447AB0319404B54001CD240 /* libopenh264.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5447AB0119404B54001CD240 /* libopenh264.a */; };
+ 54EABE861940453B00F70476 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 54EABE851940453B00F70476 /* Foundation.framework */; };
+ 54EABE881940453B00F70476 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 54EABE871940453B00F70476 /* CoreGraphics.framework */; };
+ 54EABE8A1940453B00F70476 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 54EABE891940453B00F70476 /* UIKit.framework */; };
+ 54EABE901940453B00F70476 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 54EABE8E1940453B00F70476 /* InfoPlist.strings */; };
+ 54EABE921940453B00F70476 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 54EABE911940453B00F70476 /* main.m */; };
+ 54EABE961940453B00F70476 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 54EABE951940453B00F70476 /* AppDelegate.m */; };
+ 54EABE991940453B00F70476 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 54EABE971940453B00F70476 /* Main.storyboard */; };
+ 54EABE9C1940453B00F70476 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 54EABE9B1940453B00F70476 /* ViewController.m */; };
+ 54EABE9E1940453B00F70476 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 54EABE9D1940453B00F70476 /* Images.xcassets */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 5447AB0019404B54001CD240 /* libgtest.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libgtest.a; path = ../../../../libgtest.a; sourceTree = "<group>"; };
+ 5447AB0119404B54001CD240 /* libopenh264.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libopenh264.a; path = ../../../../libopenh264.a; sourceTree = "<group>"; };
+ 54EABE821940453B00F70476 /* codec_unittest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = codec_unittest.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 54EABE851940453B00F70476 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 54EABE871940453B00F70476 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ 54EABE891940453B00F70476 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ 54EABE8D1940453B00F70476 /* codec_unittest-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "codec_unittest-Info.plist"; sourceTree = "<group>"; };
+ 54EABE8F1940453B00F70476 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 54EABE911940453B00F70476 /* main.m */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; path = main.m; sourceTree = "<group>"; };
+ 54EABE931940453B00F70476 /* codec_unittest-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "codec_unittest-Prefix.pch"; sourceTree = "<group>"; };
+ 54EABE941940453B00F70476 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+ 54EABE951940453B00F70476 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+ 54EABE981940453B00F70476 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
+ 54EABE9A1940453B00F70476 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
+ 54EABE9B1940453B00F70476 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
+ 54EABE9D1940453B00F70476 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 54EABE7F1940453B00F70476 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 5447AB0219404B54001CD240 /* libgtest.a in Frameworks */,
+ 5447AB0319404B54001CD240 /* libopenh264.a in Frameworks */,
+ 54EABE881940453B00F70476 /* CoreGraphics.framework in Frameworks */,
+ 54EABE8A1940453B00F70476 /* UIKit.framework in Frameworks */,
+ 54EABE861940453B00F70476 /* Foundation.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 54EABE791940453B00F70476 = {
+ isa = PBXGroup;
+ children = (
+ 54EABE8B1940453B00F70476 /* codec_unittest */,
+ 54EABE841940453B00F70476 /* Frameworks */,
+ 54EABE831940453B00F70476 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 54EABE831940453B00F70476 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 54EABE821940453B00F70476 /* codec_unittest.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 54EABE841940453B00F70476 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 5447AB0019404B54001CD240 /* libgtest.a */,
+ 5447AB0119404B54001CD240 /* libopenh264.a */,
+ 54EABE851940453B00F70476 /* Foundation.framework */,
+ 54EABE871940453B00F70476 /* CoreGraphics.framework */,
+ 54EABE891940453B00F70476 /* UIKit.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 54EABE8B1940453B00F70476 /* codec_unittest */ = {
+ isa = PBXGroup;
+ children = (
+ 54EABE941940453B00F70476 /* AppDelegate.h */,
+ 54EABE951940453B00F70476 /* AppDelegate.m */,
+ 54EABE971940453B00F70476 /* Main.storyboard */,
+ 54EABE9A1940453B00F70476 /* ViewController.h */,
+ 54EABE9B1940453B00F70476 /* ViewController.m */,
+ 54EABE9D1940453B00F70476 /* Images.xcassets */,
+ 54EABE8C1940453B00F70476 /* Supporting Files */,
+ );
+ path = codec_unittest;
+ sourceTree = "<group>";
+ };
+ 54EABE8C1940453B00F70476 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 54EABE8D1940453B00F70476 /* codec_unittest-Info.plist */,
+ 54EABE8E1940453B00F70476 /* InfoPlist.strings */,
+ 54EABE911940453B00F70476 /* main.m */,
+ 54EABE931940453B00F70476 /* codec_unittest-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 54EABE811940453B00F70476 /* codec_unittest */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 54EABEB41940453C00F70476 /* Build configuration list for PBXNativeTarget "codec_unittest" */;
+ buildPhases = (
+ 54EABE7E1940453B00F70476 /* Sources */,
+ 54EABE7F1940453B00F70476 /* Frameworks */,
+ 54EABE801940453B00F70476 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = codec_unittest;
+ productName = codec_unittest;
+ productReference = 54EABE821940453B00F70476 /* codec_unittest.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 54EABE7A1940453B00F70476 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0500;
+ ORGANIZATIONNAME = com.cisco;
+ };
+ buildConfigurationList = 54EABE7D1940453B00F70476 /* Build configuration list for PBXProject "codec_unittest" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 54EABE791940453B00F70476;
+ productRefGroup = 54EABE831940453B00F70476 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 54EABE811940453B00F70476 /* codec_unittest */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 54EABE801940453B00F70476 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 54EABE9E1940453B00F70476 /* Images.xcassets in Resources */,
+ 54EABE901940453B00F70476 /* InfoPlist.strings in Resources */,
+ 54EABE991940453B00F70476 /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 54EABE7E1940453B00F70476 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 54EABE9C1940453B00F70476 /* ViewController.m in Sources */,
+ 54EABE961940453B00F70476 /* AppDelegate.m in Sources */,
+ 54EABE921940453B00F70476 /* main.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 54EABE8E1940453B00F70476 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 54EABE8F1940453B00F70476 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 54EABE971940453B00F70476 /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 54EABE981940453B00F70476 /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 54EABEB21940453C00F70476 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD)";
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 7.0;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ 54EABEB31940453C00F70476 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD)";
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = YES;
+ ENABLE_NS_ASSERTIONS = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 7.0;
+ SDKROOT = iphoneos;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 54EABEB51940453C00F70476 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = armv7;
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
+ CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
+ CLANG_CXX_LIBRARY = "libstdc++";
+ GCC_C_LANGUAGE_STANDARD = "compiler-default";
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "codec_unittest/codec_unittest-Prefix.pch";
+ INFOPLIST_FILE = "codec_unittest/codec_unittest-Info.plist";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ ../../../../,
+ );
+ OTHER_LDFLAGS = (
+ "-force_load",
+ ../../../../libut.a,
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ 54EABEB61940453C00F70476 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = armv7;
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
+ CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
+ CLANG_CXX_LIBRARY = "libstdc++";
+ GCC_C_LANGUAGE_STANDARD = "compiler-default";
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "codec_unittest/codec_unittest-Prefix.pch";
+ INFOPLIST_FILE = "codec_unittest/codec_unittest-Info.plist";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ ../../../../,
+ );
+ OTHER_LDFLAGS = (
+ "-force_load",
+ ../../../../libut.a,
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 54EABE7D1940453B00F70476 /* Build configuration list for PBXProject "codec_unittest" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 54EABEB21940453C00F70476 /* Debug */,
+ 54EABEB31940453C00F70476 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 54EABEB41940453C00F70476 /* Build configuration list for PBXNativeTarget "codec_unittest" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 54EABEB51940453C00F70476 /* Debug */,
+ 54EABEB61940453C00F70476 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 54EABE7A1940453B00F70476 /* Project object */;
+}
--- /dev/null
+++ b/test/build/ios/codec_unittest/codec_unittest/AppDelegate.h
@@ -1,0 +1,15 @@
+//
+// AppDelegate.h
+// codec_unittest
+//
+// Created by openh264 on 14-6-5.
+// Copyright (c) 2014年 com.cisco. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface AppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@end
--- /dev/null
+++ b/test/build/ios/codec_unittest/codec_unittest/AppDelegate.m
@@ -1,0 +1,45 @@
+//
+// AppDelegate.m
+// codec_unittest
+//
+// Created by openh264 on 14-6-5.
+// Copyright (c) 2014年 com.cisco. All rights reserved.
+//
+
+#import "AppDelegate.h"
+
+@implementation AppDelegate
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ // Override point for customization after application launch.
+ return YES;
+}
+- (void)applicationWillResignActive:(UIApplication *)application
+{
+ // 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.
+ // 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.
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application
+{
+ // 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.
+ // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+ // 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.
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application
+{
+ // 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.
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application
+{
+ // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
+}
+
+@end
--- /dev/null
+++ b/test/build/ios/codec_unittest/codec_unittest/Base.lproj/Main.storyboard
@@ -1,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4451" systemVersion="13A461" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="vXZ-lx-hvc">
+ <dependencies>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3676"/>
+ </dependencies>
+ <scenes>
+ <!--class Prefix:identifier View Controller-->
+ <scene sceneID="ufC-wZ-h7g">
+ <objects>
+ <viewController id="vXZ-lx-hvc" customClass="ViewController" sceneMemberID="viewController">
+ <view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
+ <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ </view>
+ </viewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
+ </objects>
+ </scene>
+ </scenes>
+ <simulatedMetricsContainer key="defaultSimulatedMetrics">
+ <simulatedStatusBarMetrics key="statusBar"/>
+ <simulatedOrientationMetrics key="orientation"/>
+ <simulatedScreenMetrics key="destination" type="retina4"/>
+ </simulatedMetricsContainer>
+</document>
\ No newline at end of file
--- /dev/null
+++ b/test/build/ios/codec_unittest/codec_unittest/Images.xcassets/AppIcon.appiconset/Contents.json
@@ -1,0 +1,23 @@
+{
+ "images" : [
+ {
+ "idiom" : "iphone",
+ "size" : "29x29",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "40x40",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "60x60",
+ "scale" : "2x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
--- /dev/null
+++ b/test/build/ios/codec_unittest/codec_unittest/Images.xcassets/LaunchImage.launchimage/Contents.json
@@ -1,0 +1,23 @@
+{
+ "images" : [
+ {
+ "orientation" : "portrait",
+ "idiom" : "iphone",
+ "extent" : "full-screen",
+ "minimum-system-version" : "7.0",
+ "scale" : "2x"
+ },
+ {
+ "orientation" : "portrait",
+ "idiom" : "iphone",
+ "subtype" : "retina4",
+ "extent" : "full-screen",
+ "minimum-system-version" : "7.0",
+ "scale" : "2x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
--- /dev/null
+++ b/test/build/ios/codec_unittest/codec_unittest/ViewController.h
@@ -1,0 +1,13 @@
+//
+// ViewController.h
+// codec_unittest
+//
+// Created by openh264 on 14-6-5.
+// Copyright (c) 2014年 com.cisco. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface ViewController : UIViewController
+
+@end
--- /dev/null
+++ b/test/build/ios/codec_unittest/codec_unittest/ViewController.m
@@ -1,0 +1,29 @@
+//
+// ViewController.m
+// codec_unittest
+//
+// Created by openh264 on 14-6-5.
+// Copyright (c) 2014年 com.cisco. All rights reserved.
+//
+
+#import "ViewController.h"
+
+@interface ViewController ()
+
+@end
+
+@implementation ViewController
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ // Do any additional setup after loading the view, typically from a nib.
+}
+
+- (void)didReceiveMemoryWarning
+{
+ [super didReceiveMemoryWarning];
+ // Dispose of any resources that can be recreated.
+}
+
+@end
--- /dev/null
+++ b/test/build/ios/codec_unittest/codec_unittest/codec_unittest-Info.plist
@@ -1,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.cisco.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIMainStoryboardFile</key>
+ <string>Main</string>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
--- /dev/null
+++ b/test/build/ios/codec_unittest/codec_unittest/codec_unittest-Prefix.pch
@@ -1,0 +1,16 @@
+//
+// Prefix header
+//
+// The contents of this file are implicitly included at the beginning of every source file.
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_5_0
+#warning "This project uses features only available in iOS SDK 5.0 and later."
+#endif
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+#endif
--- /dev/null
+++ b/test/build/ios/codec_unittest/codec_unittest/en.lproj/InfoPlist.strings
@@ -1,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
--- /dev/null
+++ b/test/build/ios/codec_unittest/codec_unittest/main.m
@@ -1,0 +1,59 @@
+//
+// main.m
+// codec_unittest
+//
+// Created by openh264 on 14-6-5.
+// Copyright (c) 2014年 com.cisco. All rights reserved.
+//
+
+
+#import <UIKit/UIKit.h>
+
+#import "AppDelegate.h"
+extern int CodecUtMain(int argc, char** argv);
+
+
+int GetDocumentPath(char *pPath, unsigned long *pLen)
+{
+ if (!pLen) return 1;
+ unsigned long uPathLen = *pLen;
+ if(NULL == pPath || 0 == uPathLen)
+ {
+ return 1;
+ }
+ NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+ if([paths count] == 0)
+ {
+ return 2;
+ }
+ NSString* document = [paths objectAtIndex:0];
+ NSString* escapedPath = [document stringByReplacingOccurrencesOfString:@" " withString:@"\\ "];
+ unsigned long uDocumentPathLen = [escapedPath length];
+ uPathLen= (uDocumentPathLen <= uPathLen) ? uDocumentPathLen : uPathLen;
+ memcpy(pPath,[escapedPath UTF8String],uPathLen);
+ return 0;
+}
+
+
+
+
+int main(int argc, char * argv[])
+{
+ //Call the UT
+#ifdef IOS_SIMULATOR
+ const char* path="/tmp/codec_unittest.xml";
+#else
+ char xmlWritePath[1024] = "";
+ unsigned long uPathLen = 1024;
+ char path[1024] = "";
+ GetDocumentPath(xmlWritePath,&uPathLen);
+ sprintf(path, "%s%s",xmlWritePath,"/codec_unittest.xml");
+#endif
+ argc =2;
+ argv[0]="codec_unittest";
+ argv[1]=path;
+ CodecUtMain(argc,argv);
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
+ }
+}