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];
|
||||
|
||||
Reference in new issue
Block a user