Update MP4Dump.
This commit is contained in:
4 files changed
+36
-31
No files matched your search
@@ -14,17 +14,17 @@ NSString *libraryPath = nil;
|
|||||||
void logCallback(MP4LogLevel loglevel, const char* fmt, va_list ap)
|
void logCallback(MP4LogLevel loglevel, const char* fmt, va_list ap)
|
||||||
{
|
{
|
||||||
if (!libraryPath) {
|
if (!libraryPath) {
|
||||||
NSString *libraryDir = NSSearchPathForDirectoriesInDomains( NSLibraryDirectory,
|
NSString *libraryDir = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,
|
||||||
NSUserDomainMask,
|
NSUserDomainMask,
|
||||||
YES ).firstObject;
|
YES).firstObject;
|
||||||
NSString *AppSupportDirectory = [[libraryDir stringByAppendingPathComponent:@"Application Support"]
|
NSString *AppSupportDirectory = [[libraryDir stringByAppendingPathComponent:@"Application Support"]
|
||||||
stringByAppendingPathComponent:@"MP4Dump"];
|
stringByAppendingPathComponent:@"MP4Dump"];
|
||||||
|
|
||||||
if (![[NSFileManager defaultManager] fileExistsAtPath:AppSupportDirectory]) {
|
if (![NSFileManager.defaultManager fileExistsAtPath:AppSupportDirectory]) {
|
||||||
[[NSFileManager defaultManager] createDirectoryAtPath:AppSupportDirectory
|
[NSFileManager.defaultManager createDirectoryAtPath:AppSupportDirectory
|
||||||
withIntermediateDirectories:YES
|
withIntermediateDirectories:YES
|
||||||
attributes:nil
|
attributes:nil
|
||||||
error:NULL];
|
error:NULL];
|
||||||
}
|
}
|
||||||
libraryPath = [AppSupportDirectory stringByAppendingPathComponent:@"temp.txt"];
|
libraryPath = [AppSupportDirectory stringByAppendingPathComponent:@"temp.txt"];
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="12106.1" systemVersion="16E154a" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
|
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="15504" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<deployment identifier="macosx"/>
|
<deployment identifier="macosx"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="12106.1"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15504"/>
|
||||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<objects>
|
<objects>
|
||||||
@@ -18,45 +18,45 @@
|
|||||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||||
<rect key="contentRect" x="69" y="418" width="637" height="542"/>
|
<rect key="contentRect" x="69" y="418" width="637" height="542"/>
|
||||||
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1028"/>
|
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1177"/>
|
||||||
<value key="minSize" type="size" width="94" height="86"/>
|
<value key="minSize" type="size" width="94" height="86"/>
|
||||||
<view key="contentView" id="6">
|
<view key="contentView" id="6">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="637" height="542"/>
|
<rect key="frame" x="0.0" y="0.0" width="637" height="542"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<scrollView horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" id="100021">
|
<scrollView fixedFrame="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="100021">
|
||||||
<rect key="frame" x="-1" y="22" width="639" height="521"/>
|
<rect key="frame" x="-1" y="22" width="639" height="521"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<clipView key="contentView" id="vWS-ib-gMH">
|
<clipView key="contentView" ambiguous="YES" drawsBackground="NO" id="vWS-ib-gMH">
|
||||||
<rect key="frame" x="1" y="1" width="637" height="519"/>
|
<rect key="frame" x="1" y="1" width="622" height="519"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<textView editable="NO" importsGraphics="NO" richText="NO" findStyle="bar" id="100024">
|
<textView ambiguous="YES" editable="NO" importsGraphics="NO" richText="NO" verticallyResizable="YES" findStyle="bar" incrementalSearchingEnabled="YES" allowsCharacterPickerTouchBarItem="NO" allowsNonContiguousLayout="YES" textCompletion="NO" id="100024">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="637" height="519"/>
|
<rect key="frame" x="0.0" y="0.0" width="637" height="519"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||||
<size key="minSize" width="637" height="519"/>
|
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||||
|
<size key="minSize" width="622" height="519"/>
|
||||||
<size key="maxSize" width="1261" height="10000000"/>
|
<size key="maxSize" width="1261" height="10000000"/>
|
||||||
<color key="insertionPointColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
|
<color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||||
</textView>
|
</textView>
|
||||||
</subviews>
|
</subviews>
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
|
||||||
</clipView>
|
</clipView>
|
||||||
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="100023">
|
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="100023">
|
||||||
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
|
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
</scroller>
|
</scroller>
|
||||||
<scroller key="verticalScroller" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="100022">
|
<scroller key="verticalScroller" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="100022">
|
||||||
<rect key="frame" x="622" y="1" width="16" height="519"/>
|
<rect key="frame" x="623" y="1" width="15" height="519"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
</scroller>
|
</scroller>
|
||||||
</scrollView>
|
</scrollView>
|
||||||
<popUpButton id="100025">
|
<popUpButton fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="100025">
|
||||||
<rect key="frame" x="-1" y="-2" width="100" height="26"/>
|
<rect key="frame" x="-1" y="-2" width="100" height="26"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
<popUpButtonCell key="cell" type="bevel" title="Info" bezelStyle="regularSquare" imagePosition="left" alignment="center" lineBreakMode="truncatingTail" state="on" borderStyle="bezel" tag="3" inset="2" selectedItem="100042" id="100026">
|
<popUpButtonCell key="cell" type="bevel" title="Info" bezelStyle="regularSquare" imagePosition="left" alignment="center" lineBreakMode="truncatingTail" state="on" borderStyle="bezel" tag="3" inset="2" selectedItem="100042" id="100026">
|
||||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||||
<font key="font" metaFont="menu"/>
|
<font key="font" metaFont="system"/>
|
||||||
<menu key="menu" title="OtherViews" id="100027">
|
<menu key="menu" title="OtherViews" id="100027">
|
||||||
<items>
|
<items>
|
||||||
<menuItem title="Error" tag="1" id="100029">
|
<menuItem title="Error" tag="1" id="100029">
|
||||||
@@ -103,6 +103,7 @@
|
|||||||
<connections>
|
<connections>
|
||||||
<outlet property="delegate" destination="-2" id="17"/>
|
<outlet property="delegate" destination="-2" id="17"/>
|
||||||
</connections>
|
</connections>
|
||||||
|
<point key="canvasLocation" x="157" y="128"/>
|
||||||
</window>
|
</window>
|
||||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||||
</objects>
|
</objects>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
archiveVersion = 1;
|
archiveVersion = 1;
|
||||||
classes = {
|
classes = {
|
||||||
};
|
};
|
||||||
objectVersion = 46;
|
objectVersion = 50;
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
@@ -158,10 +158,10 @@
|
|||||||
2A37F4A9FDCFA73011CA2CEA /* Project object */ = {
|
2A37F4A9FDCFA73011CA2CEA /* Project object */ = {
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastUpgradeCheck = 1020;
|
LastUpgradeCheck = 1120;
|
||||||
};
|
};
|
||||||
buildConfigurationList = C05733CB08A9546B00998B17 /* Build configuration list for PBXProject "MP4Dump" */;
|
buildConfigurationList = C05733CB08A9546B00998B17 /* Build configuration list for PBXProject "MP4Dump" */;
|
||||||
compatibilityVersion = "Xcode 3.2";
|
compatibilityVersion = "Xcode 9.3";
|
||||||
developmentRegion = en;
|
developmentRegion = en;
|
||||||
hasScannedForEncodings = 1;
|
hasScannedForEncodings = 1;
|
||||||
knownRegions = (
|
knownRegions = (
|
||||||
@@ -248,6 +248,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "-";
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
GCC_DYNAMIC_NO_PIC = NO;
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
@@ -272,6 +273,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "-";
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
GCC_MODEL_TUNING = G5;
|
GCC_MODEL_TUNING = G5;
|
||||||
|
|||||||
@@ -60,14 +60,17 @@ extern NSString *libraryPath;
|
|||||||
{
|
{
|
||||||
MP4FileHandle fileHandle = MP4Read(absoluteURL.fileSystemRepresentation);
|
MP4FileHandle fileHandle = MP4Read(absoluteURL.fileSystemRepresentation);
|
||||||
|
|
||||||
MP4Dump(fileHandle, 0);
|
MP4LogLevel level = (MP4LogLevel)[NSUserDefaults.standardUserDefaults integerForKey:@"LogLevel"];
|
||||||
|
|
||||||
|
MP4LogSetLevel(level);
|
||||||
|
MP4Dump(fileHandle, 0);
|
||||||
MP4Close(fileHandle, 0);
|
MP4Close(fileHandle, 0);
|
||||||
|
|
||||||
result = [NSString stringWithContentsOfFile:libraryPath encoding:NSASCIIStringEncoding error:outError];
|
result = [NSString stringWithContentsOfFile:libraryPath encoding:NSASCIIStringEncoding error:outError];
|
||||||
|
|
||||||
if ([[NSFileManager defaultManager] isDeletableFileAtPath:libraryPath])
|
if ([NSFileManager.defaultManager isDeletableFileAtPath:libraryPath]) {
|
||||||
[[NSFileManager defaultManager] removeItemAtPath:libraryPath error:nil];
|
[NSFileManager.defaultManager removeItemAtPath:libraryPath error:nil];
|
||||||
|
}
|
||||||
if (result) {
|
if (result) {
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
@@ -80,7 +83,6 @@ extern NSString *libraryPath;
|
|||||||
{
|
{
|
||||||
if (outError != NULL && ![self _loadFileDump:absoluteURL error:outError]) {
|
if (outError != NULL && ![self _loadFileDump:absoluteURL error:outError]) {
|
||||||
*outError = [NSError errorWithDomain:NSOSStatusErrorDomain code:unimpErr userInfo:NULL];
|
*outError = [NSError errorWithDomain:NSOSStatusErrorDomain code:unimpErr userInfo:NULL];
|
||||||
|
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,7 +96,7 @@ extern NSString *libraryPath;
|
|||||||
- (IBAction)setLogLevel:(id)sender
|
- (IBAction)setLogLevel:(id)sender
|
||||||
{
|
{
|
||||||
MP4LogLevel level = (MP4LogLevel)[sender tag];
|
MP4LogLevel level = (MP4LogLevel)[sender tag];
|
||||||
[[NSUserDefaults standardUserDefaults] setInteger:level forKey:@"LogLevel"];
|
[NSUserDefaults.standardUserDefaults setInteger:level forKey:@"LogLevel"];
|
||||||
MP4LogSetLevel(level);
|
MP4LogSetLevel(level);
|
||||||
|
|
||||||
if ([self _loadFileDump:self.fileURL error:nil]) {
|
if ([self _loadFileDump:self.fileURL error:nil]) {
|
||||||
|
|||||||
Reference in new issue
Block a user