Update MP4Dump.
This commit is contained in:
1 parent
7a2e773d85
commit
d7982171fd
5 files changed
+87
-91
No files matched your search
@@ -9,7 +9,5 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
|
||||
@interface AppDelegate : NSObject {
|
||||
}
|
||||
|
||||
@interface AppDelegate : NSObject
|
||||
@end
|
||||
@@ -14,9 +14,9 @@ NSString *libraryPath = nil;
|
||||
void logCallback(MP4LogLevel loglevel, const char* fmt, va_list ap)
|
||||
{
|
||||
if (!libraryPath) {
|
||||
NSString *libraryDir = [NSSearchPathForDirectoriesInDomains( NSLibraryDirectory,
|
||||
NSString *libraryDir = NSSearchPathForDirectoriesInDomains( NSLibraryDirectory,
|
||||
NSUserDomainMask,
|
||||
YES ) objectAtIndex:0];
|
||||
YES ).firstObject;
|
||||
NSString *AppSupportDirectory = [[libraryDir stringByAppendingPathComponent:@"Application Support"]
|
||||
stringByAppendingPathComponent:@"MP4Dump"];
|
||||
|
||||
@@ -26,11 +26,11 @@ void logCallback(MP4LogLevel loglevel, const char* fmt, va_list ap)
|
||||
attributes:nil
|
||||
error:NULL];
|
||||
}
|
||||
libraryPath = [[AppSupportDirectory stringByAppendingPathComponent:@"temp.txt"] retain];
|
||||
libraryPath = [AppSupportDirectory stringByAppendingPathComponent:@"temp.txt"];
|
||||
|
||||
}
|
||||
|
||||
FILE *file = fopen([libraryPath UTF8String], "a");
|
||||
FILE *file = fopen(libraryPath.fileSystemRepresentation, "a");
|
||||
|
||||
vfprintf(file, fmt, ap);
|
||||
fprintf(file, "\n");
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.galad.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
8D15AC310486D014006FF6A4 /* MyDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4ACFDCFA73011CA2CEA /* MyDocument.m */; settings = {ATTRIBUTES = (); }; };
|
||||
8D15AC320486D014006FF6A4 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4B0FDCFA73011CA2CEA /* main.mm */; settings = {ATTRIBUTES = (); }; };
|
||||
8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */; };
|
||||
A9CEC004185C4D5B00CE039E /* libmp4v2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9CEBFF4185C4D5B00CE039E /* libmp4v2.a */; };
|
||||
A936D5841D8304C90049CE46 /* libmp4v2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A936D5811D8303E20049CE46 /* libmp4v2.a */; };
|
||||
A9DAC2FD133204BD007CA155 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A9DAC2FC133204BD007CA155 /* AppDelegate.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
@@ -33,21 +33,7 @@
|
||||
2A37F4C5FDCFA73011CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
|
||||
8D15AC360486D014006FF6A4 /* MP4Dump-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "MP4Dump-Info.plist"; sourceTree = "<group>"; };
|
||||
8D15AC370486D014006FF6A4 /* MP4Dump.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MP4Dump.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
A9CEBFF4185C4D5B00CE039E /* libmp4v2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libmp4v2.a; sourceTree = "<group>"; };
|
||||
A9CEBFF6185C4D5B00CE039E /* chapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chapter.h; sourceTree = "<group>"; };
|
||||
A9CEBFF7185C4D5B00CE039E /* file.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = file.h; sourceTree = "<group>"; };
|
||||
A9CEBFF8185C4D5B00CE039E /* file_prop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = file_prop.h; sourceTree = "<group>"; };
|
||||
A9CEBFF9185C4D5B00CE039E /* general.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = general.h; sourceTree = "<group>"; };
|
||||
A9CEBFFA185C4D5B00CE039E /* isma.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = isma.h; sourceTree = "<group>"; };
|
||||
A9CEBFFB185C4D5B00CE039E /* itmf_generic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = itmf_generic.h; sourceTree = "<group>"; };
|
||||
A9CEBFFC185C4D5B00CE039E /* itmf_tags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = itmf_tags.h; sourceTree = "<group>"; };
|
||||
A9CEBFFD185C4D5B00CE039E /* platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = platform.h; sourceTree = "<group>"; };
|
||||
A9CEBFFE185C4D5B00CE039E /* project.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = project.h; sourceTree = "<group>"; };
|
||||
A9CEBFFF185C4D5B00CE039E /* sample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sample.h; sourceTree = "<group>"; };
|
||||
A9CEC000185C4D5B00CE039E /* streaming.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = streaming.h; sourceTree = "<group>"; };
|
||||
A9CEC001185C4D5B00CE039E /* track.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = track.h; sourceTree = "<group>"; };
|
||||
A9CEC002185C4D5B00CE039E /* track_prop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = track_prop.h; sourceTree = "<group>"; };
|
||||
A9CEC003185C4D5B00CE039E /* mp4v2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mp4v2.h; sourceTree = "<group>"; };
|
||||
A936D5811D8303E20049CE46 /* libmp4v2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmp4v2.a; path = ../../MP42Foundation/contrib/mp42v2/libmp4v2.a; sourceTree = SOURCE_ROOT; };
|
||||
A9DAC2FB133204BD007CA155 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||
A9DAC2FC133204BD007CA155 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
@@ -58,7 +44,7 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */,
|
||||
A9CEC004185C4D5B00CE039E /* libmp4v2.a in Frameworks */,
|
||||
A936D5841D8304C90049CE46 /* libmp4v2.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -68,7 +54,6 @@
|
||||
1058C7A6FEA54F5311CA2CBB /* Linked Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A9CEBFF3185C4D5B00CE039E /* mp4v2 */,
|
||||
1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */,
|
||||
);
|
||||
name = "Linked Frameworks";
|
||||
@@ -139,43 +124,13 @@
|
||||
2A37F4C3FDCFA73011CA2CEA /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A936D5811D8303E20049CE46 /* libmp4v2.a */,
|
||||
1058C7A6FEA54F5311CA2CBB /* Linked Frameworks */,
|
||||
1058C7A8FEA54F5311CA2CBB /* Other Frameworks */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A9CEBFF3185C4D5B00CE039E /* mp4v2 */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A9CEBFF4185C4D5B00CE039E /* libmp4v2.a */,
|
||||
A9CEBFF5185C4D5B00CE039E /* mp4v2 */,
|
||||
A9CEC003185C4D5B00CE039E /* mp4v2.h */,
|
||||
);
|
||||
name = mp4v2;
|
||||
path = ../../MP42Foundation/mp4v2;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A9CEBFF5185C4D5B00CE039E /* mp4v2 */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A9CEBFF6185C4D5B00CE039E /* chapter.h */,
|
||||
A9CEBFF7185C4D5B00CE039E /* file.h */,
|
||||
A9CEBFF8185C4D5B00CE039E /* file_prop.h */,
|
||||
A9CEBFF9185C4D5B00CE039E /* general.h */,
|
||||
A9CEBFFA185C4D5B00CE039E /* isma.h */,
|
||||
A9CEBFFB185C4D5B00CE039E /* itmf_generic.h */,
|
||||
A9CEBFFC185C4D5B00CE039E /* itmf_tags.h */,
|
||||
A9CEBFFD185C4D5B00CE039E /* platform.h */,
|
||||
A9CEBFFE185C4D5B00CE039E /* project.h */,
|
||||
A9CEBFFF185C4D5B00CE039E /* sample.h */,
|
||||
A9CEC000185C4D5B00CE039E /* streaming.h */,
|
||||
A9CEC001185C4D5B00CE039E /* track.h */,
|
||||
A9CEC002185C4D5B00CE039E /* track_prop.h */,
|
||||
);
|
||||
path = mp4v2;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@@ -203,7 +158,7 @@
|
||||
2A37F4A9FDCFA73011CA2CEA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0610;
|
||||
LastUpgradeCheck = 0800;
|
||||
};
|
||||
buildConfigurationList = C05733CB08A9546B00998B17 /* Build configuration list for PBXProject "MP4Dump" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
@@ -291,6 +246,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
@@ -299,12 +255,14 @@
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = MP4Dump_Prefix.pch;
|
||||
HEADER_SEARCH_PATHS = "$(SRCROOT)/../../MP42Foundation/contrib/**";
|
||||
INFOPLIST_FILE = "MP4Dump-Info.plist";
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/../../MP42Foundation/mp4v2\"",
|
||||
"$(PROJECT_DIR)/../../MP42Foundation/contrib/**",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.galad.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = MP4Dump;
|
||||
};
|
||||
name = Debug;
|
||||
@@ -313,17 +271,20 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = MP4Dump_Prefix.pch;
|
||||
HEADER_SEARCH_PATHS = "$(SRCROOT)/../../MP42Foundation/contrib/**";
|
||||
INFOPLIST_FILE = "MP4Dump-Info.plist";
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/../../MP42Foundation/mp4v2\"",
|
||||
"$(PROJECT_DIR)/../../MP42Foundation/contrib/**",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.galad.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = MP4Dump;
|
||||
};
|
||||
name = Release;
|
||||
@@ -331,28 +292,64 @@
|
||||
C05733CC08A9546B00998B17 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_CXX_LIBRARY = "libstdc++";
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LIBRARY = "compiler-default";
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../MP42Foundation/mp4v2\"/**";
|
||||
HEADER_SEARCH_PATHS = "$(SRCROOT)/../../MP42Foundation/contrib/**";
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx;
|
||||
VALID_ARCHS = x86_64;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C05733CD08A9546B00998B17 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_CXX_LIBRARY = "libstdc++";
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LIBRARY = "compiler-default";
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../MP42Foundation/mp4v2\"/**";
|
||||
HEADER_SEARCH_PATHS = "$(SRCROOT)/../../MP42Foundation/contrib/**";
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx;
|
||||
VALID_ARCHS = x86_64;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
||||
@@ -13,23 +13,17 @@ extern NSString *libraryPath;
|
||||
|
||||
@implementation MyDocument
|
||||
|
||||
- (id)init
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
|
||||
// Add your subclass-specific initialization here.
|
||||
// If an error occurs here, send a [self release] message and return nil.
|
||||
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSString *)windowNibName
|
||||
{
|
||||
// Override returning the nib file name of the document
|
||||
// If you need to use a subclass of NSWindowController or if your document supports multiple NSWindowControllers,
|
||||
// you should remove this method and override -makeWindowControllers instead.
|
||||
return @"MyDocument";
|
||||
}
|
||||
|
||||
@@ -38,58 +32,65 @@ extern NSString *libraryPath;
|
||||
if ([[NSUserDefaults standardUserDefaults] valueForKey:@"LogLevel"])
|
||||
[logLevelButton selectItemWithTag:[[NSUserDefaults standardUserDefaults] integerForKey:@"LogLevel"]];
|
||||
[super windowControllerDidLoadNib:aController];
|
||||
[textView setFont:[NSFont fontWithName:@"Monaco" size:10]];
|
||||
[textView setString:@""];
|
||||
[textView insertText:result];
|
||||
|
||||
[self _resetTextView];
|
||||
NSAttributedString *attributedString = [[NSAttributedString alloc] initWithString:result];
|
||||
[textView.textStorage appendAttributedString:attributedString];
|
||||
}
|
||||
|
||||
- (void)_resetTextView
|
||||
{
|
||||
textView.font = [NSFont fontWithName:@"Monaco" size:10];
|
||||
textView.string = @"";
|
||||
[textView setContinuousSpellCheckingEnabled:NO];
|
||||
}
|
||||
|
||||
- (BOOL) loadFileDump:(NSURL *)absoluteURL error:(NSError **)outError
|
||||
- (BOOL)_loadFileDump:(NSURL *)absoluteURL error:(NSError **)outError
|
||||
{
|
||||
MP4FileHandle fileHandle = MP4Read([[absoluteURL path] UTF8String]);
|
||||
MP4FileHandle fileHandle = MP4Read(absoluteURL.fileSystemRepresentation);
|
||||
|
||||
MP4Dump(fileHandle, 0);
|
||||
|
||||
MP4Close(fileHandle, 0);
|
||||
result = [NSString stringWithContentsOfFile:libraryPath encoding:NSASCIIStringEncoding error:outError];
|
||||
|
||||
if([[NSFileManager defaultManager] isDeletableFileAtPath:libraryPath])
|
||||
if ([[NSFileManager defaultManager] isDeletableFileAtPath:libraryPath])
|
||||
[[NSFileManager defaultManager] removeItemAtPath:libraryPath error:nil];
|
||||
|
||||
if (result)
|
||||
if (result) {
|
||||
return YES;
|
||||
else
|
||||
}
|
||||
else {
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)readFromURL:(NSURL *)absoluteURL ofType:(NSString *)typeName error:(NSError **)outError
|
||||
{
|
||||
if ( outError != NULL && ![self loadFileDump:absoluteURL error:outError]) {
|
||||
if (outError != NULL && ![self _loadFileDump:absoluteURL error:outError]) {
|
||||
*outError = [NSError errorWithDomain:NSOSStatusErrorDomain code:unimpErr userInfo:NULL];
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
if([[NSFileManager defaultManager] isDeletableFileAtPath:libraryPath])
|
||||
if ([[NSFileManager defaultManager] isDeletableFileAtPath:libraryPath]) {
|
||||
[[NSFileManager defaultManager] removeItemAtPath:libraryPath error:nil];
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (IBAction) setLogLevel: (id) sender
|
||||
- (IBAction)setLogLevel:(id)sender
|
||||
{
|
||||
NSInteger level = [sender tag];
|
||||
MP4LogLevel level = (MP4LogLevel)[sender tag];
|
||||
[[NSUserDefaults standardUserDefaults] setInteger:level forKey:@"LogLevel"];
|
||||
MP4LogSetLevel(level);
|
||||
|
||||
if ([self loadFileDump:[self fileURL] error:nil]) {
|
||||
[textView setString:@""];
|
||||
[textView insertText:result];
|
||||
if ([self _loadFileDump:self.fileURL error:nil]) {
|
||||
[self _resetTextView];
|
||||
NSAttributedString *attributedString = [[NSAttributedString alloc] initWithString:result];
|
||||
[textView.textStorage appendAttributedString:attributedString];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)updateChangeCount:(NSDocumentChangeType)changeType
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user