Use the new private headers
This commit is contained in:
1 parent
d69be89c01
commit
eedbf1452d
14 files changed
+55
-22
No files matched your search
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import "MP42AudioTrack.h"
|
||||
#import "MP42Track+Private.h"
|
||||
#import "MP42PrivateUtilities.h"
|
||||
#import "MP42MediaFormat.h"
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import "MP42ChapterTrack.h"
|
||||
#import "MP42Track+Private.h"
|
||||
#import "MP42SubUtilities.h"
|
||||
#import "MP42PrivateUtilities.h"
|
||||
#import "MP42MediaFormat.h"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import "MP42ClosedCaptionTrack.h"
|
||||
#import "MP42Track+Private.h"
|
||||
#import "MP42MediaFormat.h"
|
||||
|
||||
@implementation MP42ClosedCaptionTrack
|
||||
|
||||
@@ -97,8 +97,8 @@ static NSMutableDictionary *_loadedComponents;
|
||||
- (BOOL)componentLoadedForFormat:(OSType)format {
|
||||
BOOL loaded = NO;
|
||||
|
||||
if ([_loadedComponents valueForKey:@(FourCC2Str(format))]) {
|
||||
loaded = YES;;
|
||||
if (_loadedComponents[@(FourCC2Str(format))]) {
|
||||
loaded = YES;
|
||||
} else {
|
||||
AudioComponentDescription acd = { 0 };
|
||||
acd.componentType = kAudioDecoderComponentType;
|
||||
@@ -137,7 +137,7 @@ static NSMutableDictionary *_loadedComponents;
|
||||
{
|
||||
OSType err = 1;
|
||||
|
||||
if ([_loadedComponents valueForKey:@(FourCC2Str(format))]) {
|
||||
if (_loadedComponents[@(FourCC2Str(format))]) {
|
||||
return noErr;
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ static NSMutableDictionary *_loadedComponents;
|
||||
{
|
||||
OSType err = 1;
|
||||
|
||||
if ([_loadedComponents valueForKey:@(FourCC2Str(format))]) {
|
||||
if (_loadedComponents[@(FourCC2Str(format))]) {
|
||||
return noErr;
|
||||
}
|
||||
|
||||
|
||||
+6
-2
@@ -13,7 +13,9 @@
|
||||
#import "MP42PrivateUtilities.h"
|
||||
#import "MP42Languages.h"
|
||||
#import "MP42Track+Muxer.h"
|
||||
#import "MP42Track+Private.h"
|
||||
#import "MP42PreviewGenerator.h"
|
||||
#import "MP42Metadata+Private.h"
|
||||
|
||||
#import "mp4v2.h"
|
||||
|
||||
@@ -99,8 +101,10 @@ static void logCallback(MP4LogLevel loglevel, const char *fmt, va_list ap) {
|
||||
@synthesize muxer = _muxer;
|
||||
|
||||
+ (void)initialize {
|
||||
MP4SetLogCallback(logCallback);
|
||||
MP4LogSetLevel(MP4_LOG_INFO);
|
||||
if (self == [MP42File class]) {
|
||||
MP4SetLogCallback(logCallback);
|
||||
MP4LogSetLevel(MP4_LOG_INFO);
|
||||
}
|
||||
}
|
||||
|
||||
+ (void)setGlobalLogger:(id<MP42Logging>)logger
|
||||
|
||||
@@ -23,7 +23,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic, copy) NSArray<MP42Track *> *inputTracks;
|
||||
@property (nonatomic, copy) NSArray<MP42Track *> *outputsTracks;
|
||||
|
||||
- (BOOL)containsTrack:(MP42Track *)track;
|
||||
- (MP42Track *)inputTrackWithTrackID:(MP42TrackId)trackId;
|
||||
|
||||
- (void)setActiveTrack:(MP42Track *)track;
|
||||
@@ -33,7 +32,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
- (void)enqueue:(MP42SampleBuffer *)sample;
|
||||
|
||||
- (CGFloat)progress;
|
||||
- (double)progress;
|
||||
|
||||
- (BOOL)done;
|
||||
- (void)setDone;
|
||||
|
||||
@@ -6,8 +6,13 @@
|
||||
// Copyright © 2015 Damiano Galassi. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef MP42Metadata_Private_h
|
||||
#define MP42Metadata_Private_h
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MP42Metadata (Private)
|
||||
|
||||
#endif /* MP42Metadata_Private_h */
|
||||
- (instancetype) initWithFileHandle:(MP42FileHandle)fileHandle;
|
||||
- (BOOL) writeMetadataWithFileHandle: (MP42FileHandle) fileHandle;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -548,7 +548,7 @@ int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, uint64_t
|
||||
else if (!strcmp(trackInfo->CodecID, "A_EAC3")) {
|
||||
// parse EAC3 header
|
||||
|
||||
uint64_t strmtyp, substreamid;
|
||||
/*uint64_t strmtyp, substreamid;
|
||||
uint64_t frmsiz, fscod, bsid, bsmod, acmod, lfeon;
|
||||
|
||||
strmtyp = (*(frame+2) >> 6) & 0x3;
|
||||
@@ -571,13 +571,13 @@ int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, uint64_t
|
||||
bsid = (*(frame+5) >> 3) & 0x1f;
|
||||
bsmod = 0;
|
||||
|
||||
if (acmod == 0x0) { /* if 1+1 mode (dual mono, so some items need a second value) */
|
||||
if (acmod == 0x0) { // if 1+1 mode (dual mono, so some items need a second value)
|
||||
|
||||
}
|
||||
|
||||
if (strmtyp == 0x1) { /* if dependent stream */
|
||||
if (strmtyp == 0x1) { // if dependent stream
|
||||
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
mkv_Seek(_matroskaFile, 0, 0);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import "MP42SubtitleTrack.h"
|
||||
#import "MP42Track+Private.h"
|
||||
#import "MP42PrivateUtilities.h"
|
||||
#import "MP42MediaFormat.h"
|
||||
#import "MP42HtmlParser.h"
|
||||
|
||||
@@ -6,8 +6,13 @@
|
||||
// Copyright © 2015 Damiano Galassi. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef MP42Track_Private_h
|
||||
#define MP42Track_Private_h
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MP42Track (Private)
|
||||
|
||||
#endif /* MP42Track_Private_h */
|
||||
- (instancetype)initWithSourceURL:(NSURL *)URL trackID:(NSInteger)trackID fileHandle:(MP42FileHandle)fileHandle;
|
||||
- (BOOL)writeToFile:(MP42FileHandle)fileHandle error:(NSError **)outError;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -50,10 +50,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
void *_helper;
|
||||
}
|
||||
|
||||
- (instancetype)initWithSourceURL:(NSURL *)URL trackID:(NSInteger)trackID fileHandle:(MP42FileHandle)fileHandle;
|
||||
|
||||
- (BOOL)writeToFile:(MP42FileHandle)fileHandle error:(NSError **)outError;
|
||||
|
||||
@property(nonatomic, readwrite) MP42TrackId trackId;
|
||||
@property(nonatomic, readwrite) MP42TrackId sourceId;
|
||||
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
//
|
||||
|
||||
#import "MP42VideoTrack.h"
|
||||
#import "MP42Track+Private.h"
|
||||
#import "MP42MediaFormat.h"
|
||||
#import "MP42Track+Private.h"
|
||||
#import <mp4v2.h>
|
||||
|
||||
@implementation MP42VideoTrack
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
@implementation NSString (MP42Additions)
|
||||
|
||||
- (NSArray<NSString *> *)MP42_componentsSeparatedByRegex:(NSString *)regex {
|
||||
|
||||
NSParameterAssert(regex);
|
||||
|
||||
NSMutableArray<NSString *> *results = [NSMutableArray array];
|
||||
__block NSRange start = NSMakeRange(0, 0);
|
||||
|
||||
@@ -40,6 +43,9 @@
|
||||
}
|
||||
|
||||
- (BOOL)MP42_isMatchedByRegex:(NSString *)regex {
|
||||
|
||||
NSParameterAssert(regex);
|
||||
|
||||
NSRegularExpression *r = [NSRegularExpression regularExpressionWithPattern:regex
|
||||
options:NSRegularExpressionCaseInsensitive
|
||||
error:nil];
|
||||
|
||||
@@ -79,12 +79,16 @@
|
||||
A96523471BAC315900E994E0 /* NSString+MP42Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = A96523441BAC315900E994E0 /* NSString+MP42Additions.m */; settings = {ASSET_TAGS = (); }; };
|
||||
A96523481BAC315900E994E0 /* NSString+MP42Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = A96523441BAC315900E994E0 /* NSString+MP42Additions.m */; settings = {ASSET_TAGS = (); }; };
|
||||
A96523491BAC315900E994E0 /* NSString+MP42Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = A96523441BAC315900E994E0 /* NSString+MP42Additions.m */; settings = {ASSET_TAGS = (); }; };
|
||||
A96D28931BAD390400403327 /* MP42Metadata+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A96D28921BAD390400403327 /* MP42Metadata+Private.h */; settings = {ASSET_TAGS = (); }; };
|
||||
A96D28941BAD390400403327 /* MP42Metadata+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A96D28921BAD390400403327 /* MP42Metadata+Private.h */; settings = {ASSET_TAGS = (); }; };
|
||||
A989F1001823AB2E0070AD8C /* MP42Track+Muxer.h in Headers */ = {isa = PBXBuildFile; fileRef = A989F0FF1823AB2E0070AD8C /* MP42Track+Muxer.h */; };
|
||||
A989F10F1823B3B40070AD8C /* MP42TextSample.h in Headers */ = {isa = PBXBuildFile; fileRef = A989F10D1823B3B40070AD8C /* MP42TextSample.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
A989F1101823B3B40070AD8C /* MP42TextSample.m in Sources */ = {isa = PBXBuildFile; fileRef = A989F10E1823B3B40070AD8C /* MP42TextSample.m */; };
|
||||
A991714C195AAAEF005AD68E /* MP42Track+Muxer.m in Sources */ = {isa = PBXBuildFile; fileRef = A991714B195AAAEF005AD68E /* MP42Track+Muxer.m */; };
|
||||
A991714D195AAAEF005AD68E /* MP42Track+Muxer.m in Sources */ = {isa = PBXBuildFile; fileRef = A991714B195AAAEF005AD68E /* MP42Track+Muxer.m */; };
|
||||
A991714E195AAAEF005AD68E /* MP42Track+Muxer.m in Sources */ = {isa = PBXBuildFile; fileRef = A991714B195AAAEF005AD68E /* MP42Track+Muxer.m */; };
|
||||
A99FCBC41BAD65EF0058E27A /* MP42Track+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A99FCBC31BAD65EF0058E27A /* MP42Track+Private.h */; settings = {ASSET_TAGS = (); }; };
|
||||
A99FCBC51BAD65EF0058E27A /* MP42Track+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A99FCBC31BAD65EF0058E27A /* MP42Track+Private.h */; settings = {ASSET_TAGS = (); }; };
|
||||
A9A0C99C19814B0800A72763 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9A0C99B19814B0800A72763 /* CoreAudio.framework */; };
|
||||
A9A0C9A419814C9B00A72763 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9A0C9A319814C9B00A72763 /* AudioUnit.framework */; };
|
||||
A9A0C9B11981593900A72763 /* MP42ComponentLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = A9A0C9AF1981593900A72763 /* MP42ComponentLoader.h */; };
|
||||
@@ -274,10 +278,12 @@
|
||||
A94BFB2C184C862A00810224 /* eng.traineddata */ = {isa = PBXFileReference; lastKnownFileType = file; name = eng.traineddata; path = Tesseract/share/tessdata/eng.traineddata; sourceTree = SOURCE_ROOT; };
|
||||
A96523431BAC315900E994E0 /* NSString+MP42Additions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+MP42Additions.h"; sourceTree = "<group>"; };
|
||||
A96523441BAC315900E994E0 /* NSString+MP42Additions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+MP42Additions.m"; sourceTree = "<group>"; };
|
||||
A96D28921BAD390400403327 /* MP42Metadata+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MP42Metadata+Private.h"; sourceTree = "<group>"; };
|
||||
A989F0FF1823AB2E0070AD8C /* MP42Track+Muxer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MP42Track+Muxer.h"; sourceTree = "<group>"; };
|
||||
A989F10D1823B3B40070AD8C /* MP42TextSample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MP42TextSample.h; sourceTree = "<group>"; };
|
||||
A989F10E1823B3B40070AD8C /* MP42TextSample.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MP42TextSample.m; sourceTree = "<group>"; };
|
||||
A991714B195AAAEF005AD68E /* MP42Track+Muxer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MP42Track+Muxer.m"; sourceTree = "<group>"; };
|
||||
A99FCBC31BAD65EF0058E27A /* MP42Track+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MP42Track+Private.h"; sourceTree = "<group>"; };
|
||||
A9A0C99B19814B0800A72763 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
|
||||
A9A0C9A319814C9B00A72763 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; };
|
||||
A9A0C9AF1981593900A72763 /* MP42ComponentLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MP42ComponentLoader.h; sourceTree = "<group>"; };
|
||||
@@ -528,6 +534,7 @@
|
||||
A9B9C2311823923100416A4E /* MP42File.m */,
|
||||
A9B9C2501823923100416A4E /* MP42Track.h */,
|
||||
A9B9C2511823923100416A4E /* MP42Track.m */,
|
||||
A99FCBC31BAD65EF0058E27A /* MP42Track+Private.h */,
|
||||
A9B9C2541823923100416A4E /* MP42VideoTrack.h */,
|
||||
A9B9C2551823923100416A4E /* MP42VideoTrack.m */,
|
||||
A9B9C2211823923100416A4E /* MP42AudioTrack.h */,
|
||||
@@ -540,6 +547,7 @@
|
||||
A9B9C22C1823923100416A4E /* MP42ClosedCaptionTrack.m */,
|
||||
A9B9C23C1823923100416A4E /* MP42Metadata.h */,
|
||||
A9B9C23D1823923100416A4E /* MP42Metadata.m */,
|
||||
A96D28921BAD390400403327 /* MP42Metadata+Private.h */,
|
||||
A9B9C23A1823923100416A4E /* MP42MediaFormat.h */,
|
||||
A9B9C23B1823923100416A4E /* MP42MediaFormat.m */,
|
||||
A917286519FD2BCE00348DF8 /* MP42Logging.h */,
|
||||
@@ -717,7 +725,9 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
A9A0C9B21981593900A72763 /* MP42ComponentLoader.h in Headers */,
|
||||
A96D28941BAD390400403327 /* MP42Metadata+Private.h in Headers */,
|
||||
A917286719FD2BCE00348DF8 /* MP42Logging.h in Headers */,
|
||||
A99FCBC51BAD65EF0058E27A /* MP42Track+Private.h in Headers */,
|
||||
A9AEFE161B9B111B00771292 /* MP42FileImporter+Private.h in Headers */,
|
||||
A96523461BAC315900E994E0 /* NSString+MP42Additions.h in Headers */,
|
||||
);
|
||||
@@ -744,6 +754,7 @@
|
||||
A9B9C2831823923200416A4E /* MP42Image.h in Headers */,
|
||||
A9B9C2C41823957800416A4E /* MP42Languages.h in Headers */,
|
||||
A9B9C2CF182396A100416A4E /* MP42Ratings.h in Headers */,
|
||||
A99FCBC41BAD65EF0058E27A /* MP42Track+Private.h in Headers */,
|
||||
A925AAAF18379AF800BE84D4 /* MP42Utilities.h in Headers */,
|
||||
A9B9C2911823923200416A4E /* MP42QTImporter.h in Headers */,
|
||||
A9B9C28F1823923200416A4E /* MP42OCRWrapper.h in Headers */,
|
||||
@@ -777,6 +788,7 @@
|
||||
A9B9C2A11823923200416A4E /* MP42VobSubImporter.h in Headers */,
|
||||
A9B9C2AC1823923200416A4E /* mbs.h in Headers */,
|
||||
A9B9C2891823923200416A4E /* MP42MkvImporter.h in Headers */,
|
||||
A96D28931BAD390400403327 /* MP42Metadata+Private.h in Headers */,
|
||||
A925AABC1837A16500BE84D4 /* QTKitDecrap.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
||||
Reference in new issue
Block a user