summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authortiter <[email protected]>2006-02-15 23:09:01 +0000
committertiter <[email protected]>2006-02-15 23:09:01 +0000
commit1b8b1c6c2689da418d21201ba4765eb8042ca1ec (patch)
tree9ad9d2d6885715326af7ab6ca4a118caf7f4f51d /macosx
parent518b6e989690c17a12f17ad26d9da7b03b7d2996 (diff)
Started iPod-dedicated interface
Set svn:ignore properties git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@23 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r--macosx/English.lproj/Portable.nib/classes.nib93
-rw-r--r--macosx/English.lproj/Portable.nib/info.nib28
-rw-r--r--macosx/English.lproj/Portable.nib/keyedobjects.nibbin0 -> 31557 bytes
-rw-r--r--macosx/HandBrake.plist (renamed from macosx/Info.plist)0
-rw-r--r--macosx/HandBrake.xcodeproj/project.pbxproj239
-rw-r--r--macosx/Portable.plist24
-rw-r--r--macosx/PortableController.h40
-rw-r--r--macosx/PortableController.m324
8 files changed, 739 insertions, 9 deletions
diff --git a/macosx/English.lproj/Portable.nib/classes.nib b/macosx/English.lproj/Portable.nib/classes.nib
new file mode 100644
index 000000000..2c3a4a7a9
--- /dev/null
+++ b/macosx/English.lproj/Portable.nib/classes.nib
@@ -0,0 +1,93 @@
+{
+ IBClasses = (
+ {
+ ACTIONS = {
+ convertGo = id;
+ openBrowse = id;
+ openGo = id;
+ openMatrixChanged = id;
+ openShow = id;
+ };
+ CLASS = EmbeddedController;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ fConvertFolderPopUp = NSPopUpButton;
+ fConvertIndicator = NSProgressIndicator;
+ fConvertTableView = NSTableView;
+ fConvertView = NSView;
+ fEmptyView = NSView;
+ fOpenBrowseButton = NSButton;
+ fOpenFolderField = NSTextField;
+ fOpenGoButton = NSButton;
+ fOpenIndicator = NSProgressIndicator;
+ fOpenMatrix = NSMatrix;
+ fOpenPopUp = NSPopUpButton;
+ fOpenView = NSView;
+ fWindow = NSWindow;
+ };
+ SUPERCLASS = NSObject;
+ },
+ {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
+ {
+ ACTIONS = {
+ ClosePanel = id;
+ NextPicture = id;
+ PreviousPicture = id;
+ SettingsChanged = id;
+ };
+ CLASS = PictureController;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ fCropBottomField = NSTextField;
+ fCropBottomStepper = NSStepper;
+ fCropLeftField = NSTextField;
+ fCropLeftStepper = NSStepper;
+ fCropMatrix = NSMatrix;
+ fCropRightField = NSTextField;
+ fCropRightStepper = NSStepper;
+ fCropTopField = NSTextField;
+ fCropTopStepper = NSStepper;
+ fDeinterlaceCheck = NSButton;
+ fEffectsCheck = NSButton;
+ fHeightField = NSTextField;
+ fHeightStepper = NSStepper;
+ fInfoField = NSTextField;
+ fNextButton = NSButton;
+ fPictureGLView = HBPictureGLView;
+ fPrevButton = NSButton;
+ fRatioCheck = NSButton;
+ fWidthField = NSTextField;
+ fWidthStepper = NSStepper;
+ };
+ SUPERCLASS = NSObject;
+ },
+ {
+ ACTIONS = {
+ convertGo = id;
+ openBrowse = id;
+ openGo = id;
+ openMatrixChanged = id;
+ openShow = id;
+ };
+ CLASS = PortableController;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ fConvertFolderPopUp = NSPopUpButton;
+ fConvertIndicator = NSProgressIndicator;
+ fConvertTableView = NSTableView;
+ fConvertView = NSView;
+ fEmptyView = NSView;
+ fOpenBrowseButton = NSButton;
+ fOpenFolderField = NSTextField;
+ fOpenGoButton = NSButton;
+ fOpenIndicator = NSProgressIndicator;
+ fOpenMatrix = NSMatrix;
+ fOpenPopUp = NSPopUpButton;
+ fOpenView = NSView;
+ fWindow = NSWindow;
+ };
+ SUPERCLASS = NSObject;
+ }
+ );
+ IBVersion = 1;
+} \ No newline at end of file
diff --git a/macosx/English.lproj/Portable.nib/info.nib b/macosx/English.lproj/Portable.nib/info.nib
new file mode 100644
index 000000000..3bfcd9a2e
--- /dev/null
+++ b/macosx/English.lproj/Portable.nib/info.nib
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IBDocumentLocation</key>
+ <string>55 353 371 303 0 0 1280 832 </string>
+ <key>IBEditorPositions</key>
+ <dict>
+ <key>248</key>
+ <string>335 391 420 276 0 0 1280 832 </string>
+ <key>259</key>
+ <string>411 335 420 438 0 0 1280 832 </string>
+ <key>29</key>
+ <string>33 298 338 44 0 0 1280 832 </string>
+ <key>303</key>
+ <string>543 501 155 107 0 0 1280 832 </string>
+ </dict>
+ <key>IBFramework Version</key>
+ <string>443.0</string>
+ <key>IBOpenObjects</key>
+ <array>
+ <integer>29</integer>
+ <integer>259</integer>
+ </array>
+ <key>IBSystem Version</key>
+ <string>8H14</string>
+</dict>
+</plist>
diff --git a/macosx/English.lproj/Portable.nib/keyedobjects.nib b/macosx/English.lproj/Portable.nib/keyedobjects.nib
new file mode 100644
index 000000000..b9bd1d092
--- /dev/null
+++ b/macosx/English.lproj/Portable.nib/keyedobjects.nib
Binary files differ
diff --git a/macosx/Info.plist b/macosx/HandBrake.plist
index 12935842a..12935842a 100644
--- a/macosx/Info.plist
+++ b/macosx/HandBrake.plist
diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj
index e733e1991..929b5657f 100644
--- a/macosx/HandBrake.xcodeproj/project.pbxproj
+++ b/macosx/HandBrake.xcodeproj/project.pbxproj
@@ -7,6 +7,10 @@
objects = {
/* Begin PBXBuildFile section */
+ 4D1EA2EA0993B09A00FDC1A2 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.mm */; };
+ 4D1EA2F60993B0CA00FDC1A2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
+ 4D1EA3010993B13700FDC1A2 /* Portable.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4D1EA3000993B13700FDC1A2 /* Portable.nib */; };
+ 4D1EA31C0993B24700FDC1A2 /* PortableController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D1EA31B0993B24700FDC1A2 /* PortableController.m */; };
4DD93F8F082036E8008E1322 /* Controller.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DF3C8CB052889CD00A80101 /* Controller.h */; };
4DD93F90082036E8008E1322 /* PictureGLView.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D85758F052B78E300C39CA9 /* PictureGLView.h */; };
4DD93F91082036E8008E1322 /* ScanController.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D86C74F07281F4E007BA979 /* ScanController.h */; };
@@ -26,7 +30,7 @@
4DD93FA2082036E8008E1322 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
4DD93FA3082036E8008E1322 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DEB2024052B055F00C39CA9 /* IOKit.framework */; };
4DD93FA4082036E8008E1322 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DDE9724052B7B2B00C39CA9 /* OpenGL.framework */; };
- 4DE09E63082038A400FB751F /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4DE09E62082038A400FB751F /* Info.plist */; };
+ 4DE09E63082038A400FB751F /* HandBrake.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4DE09E62082038A400FB751F /* HandBrake.plist */; };
/* End PBXBuildFile section */
/* Begin PBXBuildStyle section */
@@ -34,7 +38,7 @@
isa = PBXBuildStyle;
buildSettings = {
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = "0.7.0";
+ CURRENT_PROJECT_VERSION = 0.7.0;
GCC_DYNAMIC_NO_PIC = YES;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
@@ -65,6 +69,11 @@
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
4D118405053054CD00C39CA9 /* HandBrake.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = HandBrake.icns; sourceTree = "<group>"; };
+ 4D1EA2DA0993B01000FDC1A2 /* HandBrake Portable.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "HandBrake Portable.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4D1EA2DC0993B01000FDC1A2 /* Portable.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Portable.plist; sourceTree = "<group>"; };
+ 4D1EA3000993B13700FDC1A2 /* Portable.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Portable.nib; path = English.lproj/Portable.nib; sourceTree = "<group>"; };
+ 4D1EA31A0993B24700FDC1A2 /* PortableController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PortableController.h; sourceTree = "<group>"; };
+ 4D1EA31B0993B24700FDC1A2 /* PortableController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = PortableController.m; sourceTree = "<group>"; };
4D1FD381073D19CE00E46515 /* PictureController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PictureController.h; sourceTree = "<group>"; };
4D1FD382073D19CE00E46515 /* PictureController.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = PictureController.mm; sourceTree = "<group>"; };
4D85758E052B78E300C39CA9 /* PictureGLView.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = PictureGLView.mm; sourceTree = "<group>"; };
@@ -75,7 +84,7 @@
4DD27BA607C0065C0023D231 /* QueueController.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = QueueController.mm; sourceTree = SOURCE_ROOT; };
4DD93FA6082036E8008E1322 /* HandBrake.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HandBrake.app; sourceTree = BUILT_PRODUCTS_DIR; };
4DDE9724052B7B2B00C39CA9 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
- 4DE09E62082038A400FB751F /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = Info.plist; sourceTree = "<group>"; };
+ 4DE09E62082038A400FB751F /* HandBrake.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = HandBrake.plist; sourceTree = "<group>"; };
4DE93A3507F5A2C900F3C78F /* PrefsController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PrefsController.h; sourceTree = "<group>"; };
4DE93A3607F5A2C900F3C78F /* PrefsController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = PrefsController.m; sourceTree = "<group>"; };
4DEB2024052B055F00C39CA9 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
@@ -84,6 +93,14 @@
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
+ 4D1EA2D80993B01000FDC1A2 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4D1EA2F60993B0CA00FDC1A2 /* Cocoa.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
4DD93FA1082036E8008E1322 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -100,6 +117,8 @@
080E96DDFE201D6D7F000001 /* Classes */ = {
isa = PBXGroup;
children = (
+ 4D1EA31A0993B24700FDC1A2 /* PortableController.h */,
+ 4D1EA31B0993B24700FDC1A2 /* PortableController.m */,
4D1FD381073D19CE00E46515 /* PictureController.h */,
4D1FD382073D19CE00E46515 /* PictureController.mm */,
4DF3C8CB052889CD00A80101 /* Controller.h */,
@@ -139,6 +158,7 @@
isa = PBXGroup;
children = (
4DD93FA6082036E8008E1322 /* HandBrake.app */,
+ 4D1EA2DA0993B01000FDC1A2 /* HandBrake Portable.app */,
);
name = Products;
sourceTree = "<group>";
@@ -151,7 +171,8 @@
29B97317FDCFA39411CA2CEA /* Resources */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
19C28FACFE9D520D11CA2CBB /* Products */,
- 4DE09E62082038A400FB751F /* Info.plist */,
+ 4DE09E62082038A400FB751F /* HandBrake.plist */,
+ 4D1EA2DC0993B01000FDC1A2 /* Portable.plist */,
);
name = HandBrake;
sourceTree = "<group>";
@@ -169,6 +190,7 @@
children = (
29B97318FDCFA39411CA2CEA /* MainMenu.nib */,
4D118405053054CD00C39CA9 /* HandBrake.icns */,
+ 4D1EA3000993B13700FDC1A2 /* Portable.nib */,
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
);
name = Resources;
@@ -202,6 +224,66 @@
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
+ 4D1EA2D90993B01000FDC1A2 /* HandBrake Portable */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4D1EA2DD0993B01100FDC1A2 /* Build configuration list for PBXNativeTarget "HandBrake Portable" */;
+ buildPhases = (
+ 4D1EA2D60993B01000FDC1A2 /* Resources */,
+ 4D1EA2D70993B01000FDC1A2 /* Sources */,
+ 4D1EA2D80993B01000FDC1A2 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ buildSettings = {
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+ INFOPLIST_FILE = "HandBrake Portable.plist";
+ INSTALL_PATH = "$(HOME)/Applications";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Foundation,
+ "-framework",
+ AppKit,
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = "HandBrake Portable";
+ WRAPPER_EXTENSION = app;
+ ZERO_LINK = YES;
+ };
+ dependencies = (
+ );
+ name = "HandBrake Portable";
+ productName = "HandBrake Portable";
+ productReference = 4D1EA2DA0993B01000FDC1A2 /* HandBrake Portable.app */;
+ productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
+<plist version=\"1.0\">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.HandBrake Portable</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>NSMainNibFile</key>
+ <string>MainMenu</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+</dict>
+</plist>
+";
+ productType = "com.apple.product-type.application";
+ };
4DD93F8D082036E8008E1322 /* HandBrake */ = {
isa = PBXNativeTarget;
buildConfigurationList = 4D4E7BC0087804870051572B /* Build configuration list for PBXNativeTarget "HandBrake" */;
@@ -274,11 +356,20 @@
projectDirPath = "";
targets = (
4DD93F8D082036E8008E1322 /* HandBrake */,
+ 4D1EA2D90993B01000FDC1A2 /* HandBrake Portable */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
+ 4D1EA2D60993B01000FDC1A2 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4D1EA3010993B13700FDC1A2 /* Portable.nib in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
4DD93F95082036E8008E1322 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@@ -286,13 +377,22 @@
4DD93F96082036E8008E1322 /* MainMenu.nib in Resources */,
4DD93F97082036E8008E1322 /* InfoPlist.strings in Resources */,
4DD93F98082036E8008E1322 /* HandBrake.icns in Resources */,
- 4DE09E63082038A400FB751F /* Info.plist in Resources */,
+ 4DE09E63082038A400FB751F /* HandBrake.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
+ 4D1EA2D70993B01000FDC1A2 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4D1EA2EA0993B09A00FDC1A2 /* main.mm in Sources */,
+ 4D1EA31C0993B24700FDC1A2 /* PortableController.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
4DD93F99082036E8008E1322 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -329,11 +429,122 @@
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
+ 4D1EA2DE0993B01100FDC1A2 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+ HEADER_SEARCH_PATHS = ../libhb;
+ INFOPLIST_FILE = Portable.plist;
+ INSTALL_PATH = "$(HOME)/Applications";
+ OTHER_LDFLAGS = (
+ ../libhb/libhb.a,
+ ../contrib/lib/liba52.a,
+ ../contrib/lib/libavcodec.a,
+ ../contrib/lib/libavutil.a,
+ ../contrib/lib/libdvdread.a,
+ ../contrib/lib/libdvdcss.a,
+ ../contrib/lib/libfaac.a,
+ ../contrib/lib/libmp3lame.a,
+ ../contrib/lib/libmp4v2.a,
+ ../contrib/lib/libmpeg2.a,
+ ../contrib/lib/libvorbis.a,
+ ../contrib/lib/libvorbisenc.a,
+ ../contrib/lib/libogg.a,
+ ../contrib/lib/libsamplerate.a,
+ ../contrib/lib/libx264.a,
+ ../contrib/lib/libxvidcore.a,
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = "HandBrake Portable";
+ WRAPPER_EXTENSION = app;
+ ZERO_LINK = NO;
+ };
+ name = Development;
+ };
+ 4D1EA2DF0993B01100FDC1A2 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+ HEADER_SEARCH_PATHS = ../libhb;
+ INFOPLIST_FILE = Portable.plist;
+ INSTALL_PATH = "$(HOME)/Applications";
+ OTHER_LDFLAGS = (
+ ../libhb/libhb.a,
+ ../contrib/lib/liba52.a,
+ ../contrib/lib/libavcodec.a,
+ ../contrib/lib/libavutil.a,
+ ../contrib/lib/libdvdread.a,
+ ../contrib/lib/libdvdcss.a,
+ ../contrib/lib/libfaac.a,
+ ../contrib/lib/libmp3lame.a,
+ ../contrib/lib/libmp4v2.a,
+ ../contrib/lib/libmpeg2.a,
+ ../contrib/lib/libvorbis.a,
+ ../contrib/lib/libvorbisenc.a,
+ ../contrib/lib/libogg.a,
+ ../contrib/lib/libsamplerate.a,
+ ../contrib/lib/libx264.a,
+ ../contrib/lib/libxvidcore.a,
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = "HandBrake Portable";
+ WRAPPER_EXTENSION = app;
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 4D1EA2E00993B01100FDC1A2 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+ HEADER_SEARCH_PATHS = ../libhb;
+ INFOPLIST_FILE = Portable.plist;
+ INSTALL_PATH = "$(HOME)/Applications";
+ OTHER_LDFLAGS = (
+ ../libhb/libhb.a,
+ ../contrib/lib/liba52.a,
+ ../contrib/lib/libavcodec.a,
+ ../contrib/lib/libavutil.a,
+ ../contrib/lib/libdvdread.a,
+ ../contrib/lib/libdvdcss.a,
+ ../contrib/lib/libfaac.a,
+ ../contrib/lib/libmp3lame.a,
+ ../contrib/lib/libmp4v2.a,
+ ../contrib/lib/libmpeg2.a,
+ ../contrib/lib/libvorbis.a,
+ ../contrib/lib/libvorbisenc.a,
+ ../contrib/lib/libogg.a,
+ ../contrib/lib/libsamplerate.a,
+ ../contrib/lib/libx264.a,
+ ../contrib/lib/libxvidcore.a,
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = "HandBrake Portable";
+ WRAPPER_EXTENSION = app;
+ ZERO_LINK = NO;
+ };
+ name = Default;
+ };
4D4E7BC1087804870051572B /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = "0.7.0";
+ CURRENT_PROJECT_VERSION = 0.7.0;
FRAMEWORK_SEARCH_PATHS = "";
GCC_DYNAMIC_NO_PIC = YES;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
@@ -341,7 +552,7 @@
GCC_OPTIMIZATION_LEVEL = 3;
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
HEADER_SEARCH_PATHS = ../libhb;
- INFOPLIST_FILE = Info.plist;
+ INFOPLIST_FILE = HandBrake.plist;
LIBRARY_SEARCH_PATHS = "";
OTHER_CFLAGS = "";
OTHER_LDFLAGS = (
@@ -383,7 +594,7 @@
GCC_OPTIMIZATION_LEVEL = 3;
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
HEADER_SEARCH_PATHS = ../libhb;
- INFOPLIST_FILE = Info.plist;
+ INFOPLIST_FILE = HandBrake.plist;
LIBRARY_SEARCH_PATHS = "";
OTHER_CFLAGS = "";
OTHER_LDFLAGS = (
@@ -423,7 +634,7 @@
GCC_OPTIMIZATION_LEVEL = 3;
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
HEADER_SEARCH_PATHS = ../libhb;
- INFOPLIST_FILE = Info.plist;
+ INFOPLIST_FILE = HandBrake.plist;
LIBRARY_SEARCH_PATHS = "";
OTHER_CFLAGS = "";
OTHER_LDFLAGS = (
@@ -476,6 +687,16 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
+ 4D1EA2DD0993B01100FDC1A2 /* Build configuration list for PBXNativeTarget "HandBrake Portable" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4D1EA2DE0993B01100FDC1A2 /* Development */,
+ 4D1EA2DF0993B01100FDC1A2 /* Deployment */,
+ 4D1EA2E00993B01100FDC1A2 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
4D4E7BC0087804870051572B /* Build configuration list for PBXNativeTarget "HandBrake" */ = {
isa = XCConfigurationList;
buildConfigurations = (
diff --git a/macosx/Portable.plist b/macosx/Portable.plist
new file mode 100644
index 000000000..bb5a8597f
--- /dev/null
+++ b/macosx/Portable.plist
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.m0k.handbrake.portable</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>NSMainNibFile</key>
+ <string>Portable</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+</dict>
+</plist>
diff --git a/macosx/PortableController.h b/macosx/PortableController.h
new file mode 100644
index 000000000..3ba3c34ae
--- /dev/null
+++ b/macosx/PortableController.h
@@ -0,0 +1,40 @@
+/* PortableController */
+
+#import <Cocoa/Cocoa.h>
+#import "hb.h"
+
+@interface PortableController : NSObject
+
+{
+ hb_handle_t * fHandle;
+ hb_list_t * fList;
+
+ IBOutlet NSWindow * fWindow;
+ IBOutlet NSView * fEmptyView;
+
+ IBOutlet NSView * fOpenView;
+ IBOutlet NSMatrix * fOpenMatrix;
+ IBOutlet NSPopUpButton * fOpenPopUp;
+ IBOutlet NSTextField * fOpenFolderField;
+ IBOutlet NSButton * fOpenBrowseButton;
+ IBOutlet NSProgressIndicator * fOpenIndicator;
+ IBOutlet NSButton * fOpenGoButton;
+ NSString * fOpenFolderString;
+
+ IBOutlet NSView * fConvertView;
+ IBOutlet NSTableView * fConvertTableView;
+ IBOutlet NSPopUpButton * fConvertFolderPopUp;
+ IBOutlet NSProgressIndicator * fConvertIndicator;
+ NSMutableArray * fConvertCheckArray;
+ NSString * fConvertFolderString;
+}
+
+- (void) openShow: (id) sender;
+- (void) openMatrixChanged: (id) sender;
+- (void) openBrowse: (id) sender;
+- (void) openGo: (id) sender;
+
+- (void) convertGo: (id) sender;
+
+@end
+
diff --git a/macosx/PortableController.m b/macosx/PortableController.m
new file mode 100644
index 000000000..dc3450d0a
--- /dev/null
+++ b/macosx/PortableController.m
@@ -0,0 +1,324 @@
+#import "PortableController.h"
+
+@interface PortableController (Private)
+
+- (void) openBrowseDidEnd: (NSOpenPanel *) sheet returnCode: (int)
+ returnCode contextInfo: (void *) contextInfo;
+- (void) openEnable: (BOOL) b;
+- (void) openTimer: (NSTimer *) timer;
+
+- (void) convertShow;
+- (void) convertTimer: (NSTimer *) timer;
+
+@end
+
+@implementation PortableController
+
+/***********************************************************************
+ * Application delegate methods
+ **********************************************************************/
+- (void) awakeFromNib
+{
+ /* Show the "Open DVD" interface */
+ [self openEnable: YES];
+ [fWindow setContentSize: [fOpenView frame].size];
+ [fWindow setContentView: fOpenView];
+ [fWindow center];
+ [fWindow makeKeyAndOrderFront: nil];
+
+ /* NSTableView initializations */
+ NSTableColumn * tableColumn = [fConvertTableView
+ tableColumnWithIdentifier: @"Check"];
+ NSButtonCell * buttonCell = [[[NSButtonCell alloc]
+ initTextCell: @""] autorelease];
+ [buttonCell setEditable: YES];
+ [buttonCell setButtonType: NSSwitchButton];
+ [tableColumn setDataCell: buttonCell];
+
+ /* Preferences */
+ fConvertFolderString = [@"~/Movies" stringByExpandingTildeInPath];
+ [fConvertFolderString retain];
+}
+
+- (void) applicationWillFinishLaunching: (NSNotification *) n
+{
+ fHandle = hb_init( HB_DEBUG_NONE, 0 );
+ fList = hb_get_titles( fHandle );
+}
+
+- (void) applicationWillTerminate: (NSNotification *) n
+{
+ hb_close( &fHandle );
+}
+
+/***********************************************************************
+ * Tableview delegate methods
+ **********************************************************************/
+- (int) numberOfRowsInTableView: (NSTableView *) t
+{
+ if( !fHandle )
+ return 0;
+
+ return hb_list_count( fList );
+}
+
+- (id) tableView:(NSTableView *) t objectValueForTableColumn:
+ (NSTableColumn *) col row: (int) row
+{
+ if( [[col identifier] isEqualToString: @"Title"] )
+ {
+ hb_title_t * title = hb_list_item( fList, row );
+ return [@"Title " stringByAppendingFormat: @"%d", title->index];
+ }
+ else if( [[col identifier] isEqualToString: @"Check"] )
+ {
+ return [fConvertCheckArray objectAtIndex: row];
+ }
+ return nil;
+}
+
+- (void) tableView: (NSTableView *) t setObjectValue: (id) object
+ forTableColumn: (NSTableColumn *) col row: (int) row
+{
+ if( [[col identifier] isEqualToString: @"Check"] )
+ {
+ [fConvertCheckArray replaceObjectAtIndex: row withObject: object];
+ }
+}
+
+/***********************************************************************
+ * User events methods
+ **********************************************************************/
+- (void) openShow: (id) sender
+{
+ NSRect frame = [fWindow frame];
+ float offset = [fConvertView frame].size.height -
+ [fOpenView frame].size.height;
+
+ frame.origin.y += offset;
+ frame.size.height -= offset;
+ [fWindow setContentView: fEmptyView];
+ [fWindow setFrame: frame display: YES animate: YES];
+ [fWindow setContentView: fOpenView];
+}
+
+- (void) openMatrixChanged: (id) sender
+{
+ [self openEnable: YES];
+}
+
+- (void) openBrowse: (id) sender
+{
+ NSOpenPanel * panel = [NSOpenPanel openPanel];
+ [panel setAllowsMultipleSelection: NO];
+ [panel setCanChooseFiles: YES];
+ [panel setCanChooseDirectories: YES ];
+ [panel beginSheetForDirectory: nil file: nil types: nil
+ modalForWindow: fWindow modalDelegate: self
+ didEndSelector: @selector( openBrowseDidEnd:returnCode:contextInfo: )
+ contextInfo: nil];
+}
+
+- (void) openGo: (id) sender
+{
+ [self openEnable: NO];
+ [fOpenIndicator setIndeterminate: YES];
+ [fOpenIndicator startAnimation: nil];
+
+ hb_scan( fHandle, [fOpenFolderString UTF8String], 0 );
+
+ NSTimer * timer = [NSTimer scheduledTimerWithTimeInterval: 0.5
+ target: self selector: @selector( openTimer: ) userInfo: nil
+ repeats: YES];
+}
+
+- (void) convertGo: (id) sender
+{
+ int i;
+
+ for( i = 0; i < hb_list_count( fList ); i++ )
+ {
+ if( ![[fConvertCheckArray objectAtIndex: i] boolValue] )
+ continue;
+
+ hb_title_t * title = hb_list_item( fList, i );
+ hb_job_t * job = title->job;
+
+ job->width = 320;
+ for( ;; )
+ {
+ /* XXX */
+ hb_fix_aspect( job, HB_KEEP_WIDTH );
+ if( job->height == 240 )
+ {
+ break;
+ }
+ else if( job->height < 240 )
+ {
+ job->crop[2] += 2;
+ job->crop[3] += 2;
+ }
+ else
+ {
+ job->crop[0] += 2;
+ job->crop[1] += 2;
+ }
+ }
+ job->vquality = -1.0;
+ job->vbitrate = 600;
+ job->vcodec = HB_VCODEC_X264;
+ job->h264_13 = 1;
+ job->file = strdup( [[NSString stringWithFormat:
+ @"%@/%p - Title %d.mp4", fConvertFolderString, self, i]
+ UTF8String] );
+ hb_add( fHandle, job );
+ }
+
+ hb_start( fHandle );
+
+ NSTimer * timer = [NSTimer scheduledTimerWithTimeInterval: 0.5
+ target: self selector: @selector( convertTimer: ) userInfo: nil
+ repeats: YES];
+}
+
+@end
+
+/***********************************************************************
+ * Private methods
+ **********************************************************************/
+
+@implementation PortableController (Private)
+
+- (void) openBrowseDidEnd: (NSOpenPanel *) sheet returnCode: (int)
+ returnCode contextInfo: (void *) contextInfo
+{
+ if( returnCode != NSOKButton )
+ return;
+
+ if( fOpenFolderString )
+ [fOpenFolderString release];
+ fOpenFolderString = [[[sheet filenames] objectAtIndex: 0] retain];
+ [fOpenFolderField setStringValue: [fOpenFolderString lastPathComponent]];
+}
+
+- (void) openEnable: (BOOL) b
+{
+ [fOpenMatrix setEnabled: b];
+ [fOpenPopUp setEnabled: b];
+ [fOpenFolderField setEnabled: b];
+ [fOpenBrowseButton setEnabled: b];
+ [fOpenGoButton setEnabled: b];
+
+ if( b )
+ {
+ if( [fOpenMatrix selectedRow] )
+ {
+ [fOpenPopUp setEnabled: NO];
+ }
+ else
+ {
+ [fOpenFolderField setEnabled: NO];
+ [fOpenBrowseButton setEnabled: NO];
+ }
+ }
+}
+
+- (void) openTimer: (NSTimer *) timer
+{
+ hb_state_t s;
+ hb_get_state( fHandle, &s );
+ switch( s.state )
+ {
+#define p s.param.scanning
+ case HB_STATE_SCANNING:
+ [fOpenIndicator setIndeterminate: NO];
+ [fOpenIndicator setDoubleValue: 100.0 *
+ ( (float) p.title_cur - 0.5 ) / p.title_count];
+ break;
+#undef p
+
+ case HB_STATE_SCANDONE:
+ [timer invalidate];
+
+ [fOpenIndicator setIndeterminate: NO];
+ [fOpenIndicator setDoubleValue: 0.0];
+ [self openEnable: YES];
+
+ if( hb_list_count( fList ) )
+ {
+ [self convertShow];
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+- (void) convertShow
+{
+ int i;
+
+ fConvertCheckArray = [[NSMutableArray alloc] initWithCapacity:
+ hb_list_count( fList )];
+ for( i = 0; i < hb_list_count( fList ); i++ )
+ {
+ /* Default is to convert titles longer than 30 minutes. */
+ hb_title_t * title = hb_list_item( fList, i );
+ [fConvertCheckArray addObject: [NSNumber numberWithBool:
+ ( 60 * title->hours + title->minutes > 30 )]];
+ }
+ [fConvertTableView reloadData];
+
+ NSRect frame = [fWindow frame];
+ float offset = [fConvertView frame].size.height -
+ [fOpenView frame].size.height;
+ frame.origin.y -= offset;
+ frame.size.height += offset;
+ [fWindow setContentView: fEmptyView];
+ [fWindow setFrame: frame display: YES animate: YES];
+ [fWindow setContentView: fConvertView];
+
+ /* Folder popup */
+ NSMenuItem * item = [fConvertFolderPopUp itemAtIndex: 0];
+ [item setTitle: [fConvertFolderString lastPathComponent]];
+ NSImage * image32 = [[NSWorkspace sharedWorkspace] iconForFile:
+ fConvertFolderString];
+ NSImage * image16 = [[NSImage alloc] initWithSize:
+ NSMakeSize(16,16)];
+ [image16 lockFocus];
+ [[NSGraphicsContext currentContext]
+ setImageInterpolation: NSImageInterpolationHigh];
+ [image32 drawInRect: NSMakeRect(0,0,16,16)
+ fromRect: NSMakeRect(0,0,32,32) operation: NSCompositeCopy
+ fraction: 1.0];
+ [image16 unlockFocus];
+ [item setImage: image16];
+ [image16 release];
+}
+
+- (void) convertTimer: (NSTimer *) timer
+{
+ hb_state_t s;
+ hb_get_state( fHandle, &s );
+ switch( s.state )
+ {
+#define p s.param.working
+ case HB_STATE_WORKING:
+ [fConvertIndicator setIndeterminate: NO];
+ [fConvertIndicator setDoubleValue: 100.0 * p.progress];
+ break;
+#undef p
+
+ case HB_STATE_WORKDONE:
+ [timer invalidate];
+ [fConvertIndicator setIndeterminate: NO];
+ [fConvertIndicator setDoubleValue: 0.0];
+ break;
+
+ default:
+ break;
+ }
+}
+
+@end