Adopt objc direct attributes where possible.

This commit is contained in:
Damiano Galassi committed 2020-07-01 19:48:11 +02:00
1 parent b9eb2a8993
commit f63e23f878
66 files changed
+222 -130

No files matched your search

+1
View File
@@ -15,6 +15,7 @@
#import "MP42SampleBuffer.h" #import "MP42SampleBuffer.h"
#import "MP42Track+Private.h" #import "MP42Track+Private.h"
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42AACImporter { @implementation MP42AACImporter {
@private @private
FILE *inFile; FILE *inFile;
+1
View File
@@ -37,6 +37,7 @@ typedef struct AudioFileIO
AudioStreamPacketDescription * _Nullable pktDescs; AudioStreamPacketDescription * _Nullable pktDescs;
} AudioFileIO; } AudioFileIO;
MP42_OBJC_DIRECT_MEMBERS
@interface MP42AC3AudioEncoder () @interface MP42AC3AudioEncoder ()
{ {
AVCodecContext *_avctx; AVCodecContext *_avctx;
+1 -1
View File
@@ -22,7 +22,7 @@
#define NUM_AC3_SAMPLING_RATES 4 #define NUM_AC3_SAMPLING_RATES 4
#define NUM_AC3_FRAMECODE_SIZES 19 * 2 #define NUM_AC3_FRAMECODE_SIZES 19 * 2
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42AC3Importer { @implementation MP42AC3Importer {
@private @private
FILE *inFile; FILE *inFile;
+2 -2
View File
@@ -24,6 +24,7 @@
#import <VideoToolbox/VideoToolbox.h> #import <VideoToolbox/VideoToolbox.h>
#import <MediaToolbox/MediaToolbox.h> #import <MediaToolbox/MediaToolbox.h>
MP42_OBJC_DIRECT_MEMBERS
@interface AVFDemuxHelper : NSObject { @interface AVFDemuxHelper : NSObject {
@public @public
MP42TrackId sourceID; MP42TrackId sourceID;
@@ -42,6 +43,7 @@
@implementation AVFDemuxHelper @implementation AVFDemuxHelper
@end @end
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42AVFImporter { @implementation MP42AVFImporter {
AVAsset *_localAsset; AVAsset *_localAsset;
NSMutableArray<AVFDemuxHelper *> *_helpers; NSMutableArray<AVFDemuxHelper *> *_helpers;
@@ -511,8 +513,6 @@
MP42MetadataKeyEncodingTool, AVMetadataCommonKeySoftware, MP42MetadataKeyEncodingTool, AVMetadataCommonKeySoftware,
nil]; nil];
self.metadata = [[MP42Metadata alloc] init];
for (NSString *commonKey in commonItemsDict.allKeys) { for (NSString *commonKey in commonItemsDict.allKeys) {
NSArray<AVMetadataItem *> *items = [AVMetadataItem metadataItemsFromArray:_localAsset.commonMetadata NSArray<AVMetadataItem *> *items = [AVMetadataItem metadataItemsFromArray:_localAsset.commonMetadata
withKey:commonKey withKey:commonKey
+1
View File
@@ -27,6 +27,7 @@
@end @end
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42AudioConverter @implementation MP42AudioConverter
#pragma mark - Init #pragma mark - Init
+1
View File
@@ -43,6 +43,7 @@ struct MP42DecodeContext {
typedef struct MP42DecodeContext MP42DecodeContext; typedef struct MP42DecodeContext MP42DecodeContext;
MP42_OBJC_DIRECT_MEMBERS
@interface MP42AudioDecoder () @interface MP42AudioDecoder ()
{ {
__unsafe_unretained id<MP42AudioUnit> _outputUnit; __unsafe_unretained id<MP42AudioUnit> _outputUnit;
+1
View File
@@ -37,6 +37,7 @@ typedef struct AudioFileIO
AudioStreamPacketDescription * _Nullable pktDescs; AudioStreamPacketDescription * _Nullable pktDescs;
} AudioFileIO; } AudioFileIO;
MP42_OBJC_DIRECT_MEMBERS
@interface MP42AudioEncoder () @interface MP42AudioEncoder ()
{ {
__unsafe_unretained id<MP42AudioUnit> _outputUnit; __unsafe_unretained id<MP42AudioUnit> _outputUnit;
+1 -2
View File
@@ -7,8 +7,7 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <MP42Foundation/MP42Track.h>
#import "MP42Track.h"
@interface MP42AudioTrack : MP42Track <NSSecureCoding, NSCopying> @interface MP42AudioTrack : MP42Track <NSSecureCoding, NSCopying>
+1
View File
@@ -15,6 +15,7 @@
#define FFmpegMaximumSupportedChannels 6 #define FFmpegMaximumSupportedChannels 6
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42AudioTrack @implementation MP42AudioTrack
- (instancetype)initWithSourceURL:(NSURL *)URL trackID:(NSInteger)trackID fileHandle:(MP4FileHandle)fileHandle - (instancetype)initWithSourceURL:(NSURL *)URL trackID:(NSInteger)trackID fileHandle:(MP4FileHandle)fileHandle
+1
View File
@@ -27,6 +27,7 @@
#import <QuartzCore/QuartzCore.h> #import <QuartzCore/QuartzCore.h>
MP42_OBJC_DIRECT_MEMBERS
@interface MP42BitmapSubConverter () @interface MP42BitmapSubConverter ()
{ {
NSThread *decoderThread; NSThread *decoderThread;
+1
View File
@@ -16,6 +16,7 @@
#import "NSString+MP42Additions.h" #import "NSString+MP42Additions.h"
#import "MP42Track+Private.h" #import "MP42Track+Private.h"
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42CCImporter @implementation MP42CCImporter
+ (NSArray<NSString *> *)supportedFileFormats { + (NSArray<NSString *> *)supportedFileFormats {
+2 -2
View File
@@ -7,8 +7,8 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "MP42Track.h" #import <MP42Foundation/MP42Track.h>
#import "MP42TextSample.h" #import <MP42Foundation/MP42TextSample.h>
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
+1
View File
@@ -12,6 +12,7 @@
#import "MP42PrivateUtilities.h" #import "MP42PrivateUtilities.h"
#import "MP42MediaFormat.h" #import "MP42MediaFormat.h"
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42ChapterTrack { @implementation MP42ChapterTrack {
@private @private
NSMutableArray<MP42TextSample *> *_chapters; NSMutableArray<MP42TextSample *> *_chapters;
+1 -1
View File
@@ -7,7 +7,7 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "MP42VideoTrack.h" #import <MP42Foundation/MP42VideoTrack.h>
@interface MP42ClosedCaptionTrack : MP42VideoTrack @interface MP42ClosedCaptionTrack : MP42VideoTrack
@end @end
+1 -1
View File
@@ -7,7 +7,7 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "MP42MediaFormat.h" #import <MP42Foundation/MP42MediaFormat.h>
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
+1
View File
@@ -16,6 +16,7 @@
* by analyzing the doNotDisplay and trimAtStart/End flags * by analyzing the doNotDisplay and trimAtStart/End flags
* TO-DO: doesn't work in all cases yet. * TO-DO: doesn't work in all cases yet.
*/ */
MP42_OBJC_DIRECT_MEMBERS
@interface MP42EditListsReconstructor : NSObject @interface MP42EditListsReconstructor : NSObject
- (void)addSample:(MP42SampleBuffer *)sample; - (void)addSample:(MP42SampleBuffer *)sample;
+1
View File
@@ -10,6 +10,7 @@
#import "MP42MediaFormat.h" #import "MP42MediaFormat.h"
#import "MP42Heap.h" #import "MP42Heap.h"
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42EditListsReconstructor @implementation MP42EditListsReconstructor
{ {
@private @private
+2
View File
@@ -7,9 +7,11 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "MP42Utilities.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
MP42_OBJC_DIRECT_MEMBERS
@interface MP42Fifo<__covariant ObjectType> : NSObject @interface MP42Fifo<__covariant ObjectType> : NSObject
- (instancetype)initWithCapacity:(NSUInteger)capacity NS_DESIGNATED_INITIALIZER; - (instancetype)initWithCapacity:(NSUInteger)capacity NS_DESIGNATED_INITIALIZER;
+1
View File
@@ -8,6 +8,7 @@
#import "MP42Fifo.h" #import "MP42Fifo.h"
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42Fifo { @implementation MP42Fifo {
@private @private
id *_array; id *_array;
+10 -10
View File
@@ -8,18 +8,18 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "MP42Track.h" #import <MP42Foundation/MP42Track.h>
#import "MP42VideoTrack.h" #import <MP42Foundation/MP42VideoTrack.h>
#import "MP42AudioTrack.h" #import <MP42Foundation/MP42AudioTrack.h>
#import "MP42SubtitleTrack.h" #import <MP42Foundation/MP42SubtitleTrack.h>
#import "MP42ClosedCaptionTrack.h" #import <MP42Foundation/MP42ClosedCaptionTrack.h>
#import "MP42ChapterTrack.h" #import <MP42Foundation/MP42ChapterTrack.h>
#import "MP42Metadata.h" #import <MP42Foundation/MP42Metadata.h>
#import "MP42MediaFormat.h" #import <MP42Foundation/MP42MediaFormat.h>
#import "MP42Logging.h" #import <MP42Foundation/MP42Logging.h>
#import "MP42SecurityAccessToken.h" #import <MP42Foundation/MP42SecurityAccessToken.h>
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
+1
View File
@@ -95,6 +95,7 @@ static void logCallback(MP4LogLevel loglevel, const char *fmt, va_list ap) {
@end @end
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42File @implementation MP42File
@synthesize itracks = _tracks; @synthesize itracks = _tracks;
-20
View File
@@ -21,8 +21,6 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)initWithURL:(NSURL *)fileURL; - (instancetype)initWithURL:(NSURL *)fileURL;
@property(nonatomic, readwrite) MP42Metadata *metadata;
- (void)addTrack:(MP42Track *)track; - (void)addTrack:(MP42Track *)track;
- (void)addTracks:(NSArray<MP42Track *> *)tracks; - (void)addTracks:(NSArray<MP42Track *> *)tracks;
@@ -34,26 +32,8 @@ NS_ASSUME_NONNULL_BEGIN
- (void)startReading; - (void)startReading;
- (void)cancelReading; - (void)cancelReading;
- (void)enqueue:(MP42SampleBuffer * NS_RELEASES_ARGUMENT)sample;
@property (nonatomic, readwrite) double progress;
@property (nonatomic, readonly, getter=isCancelled) BOOL cancelled;
- (void)setDone; - (void)setDone;
@end @end
@interface MP42FileImporter (Override)
- (NSUInteger)timescaleForTrack:(MP42Track *)track;
- (NSSize)sizeForTrack:(MP42VideoTrack *)track;
- (nullable NSData *)magicCookieForTrack:(MP42Track *)track;
- (AudioStreamBasicDescription)audioDescriptionForTrack:(MP42AudioTrack *)track;
- (BOOL)cleanUp:(MP42Track *)track fileHandle:(MP42FileHandle)fileHandle;
- (BOOL)audioTrackUsesExplicitEncoderDelay:(MP42Track *)track;
- (BOOL)supportsPreciseTimestamps;
@end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
+26
View File
@@ -7,12 +7,19 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <AudioToolbox/AudioToolbox.h>
#import <MP42Foundation/MP42Utilities.h>
@class MP42SampleBuffer;
@class MP42AudioTrack;
@class MP42VideoTrack;
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@class MP42Metadata; @class MP42Metadata;
@class MP42Track; @class MP42Track;
@interface MP42FileImporter : NSObject @interface MP42FileImporter : NSObject
+ (NSArray<NSString *> *)supportedFileFormats; + (NSArray<NSString *> *)supportedFileFormats;
@@ -24,6 +31,25 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, readonly) MP42Metadata *metadata; @property (nonatomic, readonly) MP42Metadata *metadata;
@property (nonatomic, readonly) NSArray<MP42Track *> *tracks; @property (nonatomic, readonly) NSArray<MP42Track *> *tracks;
#pragma mark - Override
- (NSUInteger)timescaleForTrack:(MP42Track *)track;
- (NSSize)sizeForTrack:(MP42VideoTrack *)track;
- (nullable NSData *)magicCookieForTrack:(MP42Track *)track;
- (AudioStreamBasicDescription)audioDescriptionForTrack:(MP42AudioTrack *)track;
- (BOOL)cleanUp:(MP42Track *)track fileHandle:(MP42FileHandle)fileHandle;
- (BOOL)audioTrackUsesExplicitEncoderDelay:(MP42Track *)track;
- (BOOL)supportsPreciseTimestamps;
- (void)demux;
#pragma mark - Private
- (void)enqueue:(MP42SampleBuffer * NS_RELEASES_ARGUMENT)sample MP42_OBJC_DIRECT;
@property (nonatomic, readwrite MP42_DIRECT) double progress;
@property (nonatomic, readonly, getter=isCancelled MP42_DIRECT) BOOL cancelled;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
+55 -50
View File
@@ -7,6 +7,7 @@
// //
#import "MP42FileImporter.h" #import "MP42FileImporter.h"
#import "MP42FileImporter+Private.h"
#import "MP42MkvImporter.h" #import "MP42MkvImporter.h"
#import "MP42Mp4Importer.h" #import "MP42Mp4Importer.h"
#import "MP42SrtImporter.h" #import "MP42SrtImporter.h"
@@ -23,6 +24,7 @@
#import "MP42AudioTrack.h" #import "MP42AudioTrack.h"
#import "MP42Track+Private.h" #import "MP42Track+Private.h"
#import "MP42SampleBuffer.h" #import "MP42SampleBuffer.h"
#import "MP42Metadata.h"
#import "mp4v2.h" #import "mp4v2.h"
@@ -108,6 +110,7 @@ static NSArray<NSString *> *_supportedFileFormats;
_fileURL = fileURL; _fileURL = fileURL;
_tracksArray = [[NSMutableArray alloc] init]; _tracksArray = [[NSMutableArray alloc] init];
_doneSem = dispatch_semaphore_create(0); _doneSem = dispatch_semaphore_create(0);
_metadata = [[MP42Metadata alloc] init];
} }
return self; return self;
} }
@@ -139,56 +142,6 @@ static NSArray<NSString *> *_supportedFileFormats;
@synthesize tracks = _tracksArray; @synthesize tracks = _tracksArray;
- (NSUInteger)timescaleForTrack:(MP42Track *)track
{
@throw [NSException exceptionWithName:NSInternalInconsistencyException
reason:[NSString stringWithFormat:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)]
userInfo:nil];
}
- (NSSize)sizeForTrack:(MP42VideoTrack *)track
{
@throw [NSException exceptionWithName:NSInternalInconsistencyException
reason:[NSString stringWithFormat:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)]
userInfo:nil];
}
- (nullable NSData *)magicCookieForTrack:(MP42Track *)track
{
@throw [NSException exceptionWithName:NSInternalInconsistencyException
reason:[NSString stringWithFormat:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)]
userInfo:nil];
}
- (AudioStreamBasicDescription)audioDescriptionForTrack:(MP42AudioTrack *)track
{
@throw [NSException exceptionWithName:NSInternalInconsistencyException
reason:[NSString stringWithFormat:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)]
userInfo:nil];
}
- (void)demux
{
@throw [NSException exceptionWithName:NSInternalInconsistencyException
reason:[NSString stringWithFormat:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)]
userInfo:nil];
}
- (BOOL)audioTrackUsesExplicitEncoderDelay:(MP42Track *)track;
{
return NO;
}
- (BOOL)supportsPreciseTimestamps
{
return NO;
}
- (BOOL)cleanUp:(MP42Track *)track fileHandle:(MP4FileHandle)fileHandle
{
return YES;
}
- (void)setActiveTrack:(MP42Track *)track { - (void)setActiveTrack:(MP42Track *)track {
if (!_inputTracks) { if (!_inputTracks) {
_inputTracks = [[NSMutableArray alloc] init]; _inputTracks = [[NSMutableArray alloc] init];
@@ -275,4 +228,56 @@ static NSArray<NSString *> *_supportedFileFormats;
return _cancelled; return _cancelled;
} }
#pragma mark - Override
- (NSUInteger)timescaleForTrack:(MP42Track *)track
{
@throw [NSException exceptionWithName:NSInternalInconsistencyException
reason:[NSString stringWithFormat:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)]
userInfo:nil];
}
- (NSSize)sizeForTrack:(MP42VideoTrack *)track
{
@throw [NSException exceptionWithName:NSInternalInconsistencyException
reason:[NSString stringWithFormat:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)]
userInfo:nil];
}
- (nullable NSData *)magicCookieForTrack:(MP42Track *)track
{
@throw [NSException exceptionWithName:NSInternalInconsistencyException
reason:[NSString stringWithFormat:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)]
userInfo:nil];
}
- (AudioStreamBasicDescription)audioDescriptionForTrack:(MP42AudioTrack *)track
{
@throw [NSException exceptionWithName:NSInternalInconsistencyException
reason:[NSString stringWithFormat:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)]
userInfo:nil];
}
- (void)demux
{
@throw [NSException exceptionWithName:NSInternalInconsistencyException
reason:[NSString stringWithFormat:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)]
userInfo:nil];
}
- (BOOL)audioTrackUsesExplicitEncoderDelay:(MP42Track *)track;
{
return NO;
}
- (BOOL)supportsPreciseTimestamps
{
return NO;
}
- (BOOL)cleanUp:(MP42Track *)track fileHandle:(MP4FileHandle)fileHandle
{
return YES;
}
@end @end
+1
View File
@@ -1370,6 +1370,7 @@ NSData* H264Info(const char *filePath, uint32_t *pic_width, uint32_t *pic_height
return avcCData; return avcCData;
} }
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42H264Importer { @implementation MP42H264Importer {
FILE *inFile; FILE *inFile;
int64_t _size; int64_t _size;
+2
View File
@@ -7,6 +7,7 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "MP42Utilities.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@@ -14,6 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
* A simple heap/priority queue implementations with a static size. * A simple heap/priority queue implementations with a static size.
* It takes a NSComparator in input. * It takes a NSComparator in input.
*/ */
MP42_OBJC_DIRECT_MEMBERS
@interface MP42Heap<ObjectType> : NSObject @interface MP42Heap<ObjectType> : NSObject
- (instancetype)initWithCapacity:(NSUInteger)numItems comparator:(NSComparator)cmptr; - (instancetype)initWithCapacity:(NSUInteger)numItems comparator:(NSComparator)cmptr;
+1
View File
@@ -26,6 +26,7 @@ uint64 right(uint64 i) {
return i * 2 + 2; return i * 2 + 2;
} }
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42Heap { @implementation MP42Heap {
@private @private
id *_array; id *_array;
+4 -1
View File
@@ -7,6 +7,7 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "MP42Utilities.h"
#define kStyleBold 1 #define kStyleBold 1
#define kStyleItalic 2 #define kStyleItalic 2
@@ -26,7 +27,8 @@ typedef struct rgba_color {
rgba_color make_color(u_int8_t r, u_int8_t g, u_int8_t b, u_int8_t a); rgba_color make_color(u_int8_t r, u_int8_t g, u_int8_t b, u_int8_t a);
int compare_color(rgba_color c1, rgba_color c2); int compare_color(rgba_color c1, rgba_color c2);
@interface MP42Style : NSObject MP42_OBJC_DIRECT_MEMBERS
@interface MP42Style : NSObject<NSCopying>
- (instancetype)initWithStyle:(NSInteger)style type:(NSInteger)type location:(NSUInteger) location color:(rgba_color) color; - (instancetype)initWithStyle:(NSInteger)style type:(NSInteger)type location:(NSUInteger) location color:(rgba_color) color;
@@ -38,6 +40,7 @@ int compare_color(rgba_color c1, rgba_color c2);
@end @end
MP42_OBJC_DIRECT_MEMBERS
@interface MP42HtmlParser : NSObject @interface MP42HtmlParser : NSObject
@property (nonatomic, readonly) NSString *text; @property (nonatomic, readonly) NSString *text;
+3
View File
@@ -26,6 +26,8 @@ int compare_color(rgba_color c1, rgba_color c2) {
else else
return 1; return 1;
} }
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42Style @implementation MP42Style
{ {
NSInteger _style; NSInteger _style;
@@ -81,6 +83,7 @@ int compare_color(rgba_color c1, rgba_color c2) {
@end @end
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42HtmlParser @implementation MP42HtmlParser
{ {
NSUInteger _location; NSUInteger _location;
+2
View File
@@ -8,6 +8,7 @@
#import "MP42Image.h" #import "MP42Image.h"
#import <Quartz/Quartz.h> #import <Quartz/Quartz.h>
#import "MP42Utilities.h"
@interface MP42Image () @interface MP42Image ()
@@ -15,6 +16,7 @@
@end @end
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42Image { @implementation MP42Image {
NSImage *_image; NSImage *_image;
} }
+2
View File
@@ -7,6 +7,7 @@
// //
#import "MP42Languages.h" #import "MP42Languages.h"
#import "MP42Utilities.h"
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
@@ -632,6 +633,7 @@ iso639_lang_t * lang_for_english( const char * english )
return (iso639_lang_t *)languages; return (iso639_lang_t *)languages;
} }
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42Languages @implementation MP42Languages
{ {
NSArray<NSString *> *_iso6391languagesArray; NSArray<NSString *> *_iso6391languagesArray;
+1 -1
View File
@@ -7,7 +7,7 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "MP42MetadataItem.h" #import <MP42Foundation/MP42MetadataItem.h>
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
+12 -11
View File
@@ -16,8 +16,8 @@
@interface MP42Metadata () @interface MP42Metadata ()
@property (nonatomic, readonly) NSMutableArray<MP42MetadataItem *> *itemsArray; @property (nonatomic, readonly MP42_DIRECT) NSMutableArray<MP42MetadataItem *> *itemsArray;
@property (nonatomic, readonly) NSMutableDictionary<NSString *, MP42MetadataItem *> *itemsMap; @property (nonatomic, readonly MP42_DIRECT) NSMutableDictionary<NSString *, MP42MetadataItem *> *itemsMap;
@property (nonatomic, readwrite, getter=isArtworkEdited) BOOL artworkEdited; @property (nonatomic, readwrite, getter=isArtworkEdited) BOOL artworkEdited;
@property (nonatomic, readwrite, getter=isEdited) BOOL edited; @property (nonatomic, readwrite, getter=isEdited) BOOL edited;
@@ -423,7 +423,7 @@
#pragma mark - MP42Foundation/mp4v2 read/write mapping #pragma mark - MP42Foundation/mp4v2 read/write mapping
- (void)addMetadataItemWithUTF8String:(const char *)value identifier:(NSString *)idenfitier - (void)addMetadataItemWithUTF8String:(const char *)value identifier:(NSString *)idenfitier MP42_OBJC_DIRECT
{ {
NSString *string = [NSString stringWithCString:value encoding:NSUTF8StringEncoding]; NSString *string = [NSString stringWithCString:value encoding:NSUTF8StringEncoding];
@@ -440,7 +440,7 @@
[self addMetadataItemWithString:string identifier:idenfitier]; [self addMetadataItemWithString:string identifier:idenfitier];
} }
- (void)addMetadataItemWithDateString:(const char *)value identifier:(NSString *)idenfitier - (void)addMetadataItemWithDateString:(const char *)value identifier:(NSString *)idenfitier MP42_OBJC_DIRECT
{ {
NSString *string = [NSString stringWithCString:value encoding:NSUTF8StringEncoding]; NSString *string = [NSString stringWithCString:value encoding:NSUTF8StringEncoding];
@@ -452,7 +452,7 @@
[self.itemsMap setObject:item forKey:idenfitier]; [self.itemsMap setObject:item forKey:idenfitier];
} }
- (void)addMetadataItemWithString:(NSString *)value identifier:(NSString *)idenfitier - (void)addMetadataItemWithString:(NSString *)value identifier:(NSString *)idenfitier MP42_OBJC_DIRECT
{ {
MP42MetadataItem *item = [MP42MetadataItem metadataItemWithIdentifier:idenfitier MP42MetadataItem *item = [MP42MetadataItem metadataItemWithIdentifier:idenfitier
value:value value:value
@@ -462,7 +462,7 @@
[self.itemsMap setObject:item forKey:idenfitier]; [self.itemsMap setObject:item forKey:idenfitier];
} }
- (void)addMetadataItemWithStringArray:(NSArray<NSString *> *)value identifier:(NSString *)idenfitier - (void)addMetadataItemWithStringArray:(NSArray<NSString *> *)value identifier:(NSString *)idenfitier MP42_OBJC_DIRECT
{ {
MP42MetadataItem *item = [MP42MetadataItem metadataItemWithIdentifier:idenfitier MP42MetadataItem *item = [MP42MetadataItem metadataItemWithIdentifier:idenfitier
value:value value:value
@@ -472,7 +472,7 @@
[self.itemsMap setObject:item forKey:idenfitier]; [self.itemsMap setObject:item forKey:idenfitier];
} }
- (void)addMetadataItemWithBool:(BOOL)value identifier:(NSString *)idenfitier - (void)addMetadataItemWithBool:(BOOL)value identifier:(NSString *)idenfitier MP42_OBJC_DIRECT
{ {
MP42MetadataItem *item = [MP42MetadataItem metadataItemWithIdentifier:idenfitier MP42MetadataItem *item = [MP42MetadataItem metadataItemWithIdentifier:idenfitier
value:@(value) value:@(value)
@@ -482,7 +482,7 @@
[self.itemsMap setObject:item forKey:idenfitier]; [self.itemsMap setObject:item forKey:idenfitier];
} }
- (void)addMetadataItemWithInteger:(NSInteger)value identifier:(NSString *)idenfitier - (void)addMetadataItemWithInteger:(NSInteger)value identifier:(NSString *)idenfitier MP42_OBJC_DIRECT
{ {
MP42MetadataItem *item = [MP42MetadataItem metadataItemWithIdentifier:idenfitier MP42MetadataItem *item = [MP42MetadataItem metadataItemWithIdentifier:idenfitier
value:@(value) value:@(value)
@@ -491,7 +491,7 @@
[self.itemsArray addObject:item]; [self.itemsArray addObject:item];
[self.itemsMap setObject:item forKey:idenfitier]; [self.itemsMap setObject:item forKey:idenfitier];
} }
- (void)addMetadataItemWithIntegerArray:(NSArray<NSNumber *> *)value identifier:(NSString *)idenfitier - (void)addMetadataItemWithIntegerArray:(NSArray<NSNumber *> *)value identifier:(NSString *)idenfitier MP42_OBJC_DIRECT
{ {
MP42MetadataItem *item = [MP42MetadataItem metadataItemWithIdentifier:idenfitier MP42MetadataItem *item = [MP42MetadataItem metadataItemWithIdentifier:idenfitier
value:value value:value
@@ -501,7 +501,7 @@
[self.itemsMap setObject:item forKey:idenfitier]; [self.itemsMap setObject:item forKey:idenfitier];
} }
- (void)addMetadataItemWithImage:(MP42Image *)value identifier:(NSString *)idenfitier - (void)addMetadataItemWithImage:(MP42Image *)value identifier:(NSString *)idenfitier MP42_OBJC_DIRECT
{ {
MP42MetadataItem *item = [MP42MetadataItem metadataItemWithIdentifier:idenfitier MP42MetadataItem *item = [MP42MetadataItem metadataItemWithIdentifier:idenfitier
value:value value:value
@@ -510,7 +510,8 @@
[self.itemsArray addObject:item]; [self.itemsArray addObject:item];
} }
- (void)readMetaDataFromFileHandle:(MP4FileHandle)sourceHandle { - (void)readMetaDataFromFileHandle:(MP4FileHandle)sourceHandle MP42_OBJC_DIRECT
{
const MP4Tags *tags = MP4TagsAlloc(); const MP4Tags *tags = MP4TagsAlloc();
MP4TagsFetch (tags, sourceHandle); MP4TagsFetch (tags, sourceHandle);
+1 -1
View File
@@ -7,7 +7,7 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "MP42MetadataFormat.h" #import <MP42Foundation/MP42MetadataFormat.h>
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
+3 -1
View File
@@ -11,7 +11,9 @@
#import "MP42Image.h" #import "MP42Image.h"
#import "NSString+MP42Additions.h" #import "NSString+MP42Additions.h"
#import "MP42MetadataUtilities.h" #import "MP42MetadataUtilities.h"
#import "MP42Utilities.h"
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42MetadataItem @implementation MP42MetadataItem
static NSDictionary<NSString *, NSNumber *> *_defaultTypes; static NSDictionary<NSString *, NSNumber *> *_defaultTypes;
@@ -97,7 +99,7 @@ static NSCalendar *_calendar;
dataType:(MP42MetadataItemDataType)dataType dataType:(MP42MetadataItemDataType)dataType
extendedLanguageTag:(NSString *)extendedLanguageTag extendedLanguageTag:(NSString *)extendedLanguageTag
{ {
return [[self alloc] initWithIdentifier:identifier value:value dataType:dataType extendedLanguageTag:extendedLanguageTag]; return [[MP42MetadataItem alloc] initWithIdentifier:identifier value:value dataType:dataType extendedLanguageTag:extendedLanguageTag];
} }
+ (MP42MetadataItemDataType)defaultDataTypeForIdentifier:(NSString *)identifier + (MP42MetadataItemDataType)defaultDataTypeForIdentifier:(NSString *)identifier
+4 -1
View File
@@ -23,6 +23,7 @@
#define SCALE_FACTOR 1000000.f #define SCALE_FACTOR 1000000.f
MP42_OBJC_DIRECT_MEMBERS
@interface MatroskaSample : NSObject { @interface MatroskaSample : NSObject {
@public @public
unsigned long long startTime; unsigned long long startTime;
@@ -36,6 +37,7 @@
@implementation MatroskaSample @implementation MatroskaSample
@end @end
MP42_OBJC_DIRECT_MEMBERS
@interface MatroskaDemuxHelper : NSObject { @interface MatroskaDemuxHelper : NSObject {
@public @public
MP42TrackId sourceID; MP42TrackId sourceID;
@@ -182,6 +184,7 @@ static int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, ui
return 1; return 1;
} }
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42MkvImporter @implementation MP42MkvImporter
{ {
struct MatroskaFile *_matroskaFile; struct MatroskaFile *_matroskaFile;
@@ -382,7 +385,7 @@ static int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, ui
[self addTrack:newTrack]; [self addTrack:newTrack];
} }
self.metadata = [self readMatroskaMetadata]; [self.metadata mergeMetadata: [self readMatroskaMetadata]];
} }
return self; return self;
+1 -1
View File
@@ -46,7 +46,7 @@ typedef struct MP4DemuxHelper {
} }
[self addTracks:sourceFile.tracks]; [self addTracks:sourceFile.tracks];
self.metadata = sourceFile.metadata; [self.metadata mergeMetadata:sourceFile.metadata];
} }
return self; return self;
+2
View File
@@ -9,6 +9,7 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "mp4v2.h" #import "mp4v2.h"
#import "MP42Logging.h" #import "MP42Logging.h"
#import "MP42Utilities.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@@ -18,6 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)progressStatus:(double)progress; - (void)progressStatus:(double)progress;
@end @end
MP42_OBJC_DIRECT_MEMBERS
@interface MP42Muxer : NSObject @interface MP42Muxer : NSObject
- (instancetype)initWithFileHandle:(MP4FileHandle)fileHandle delegate:(id <MP42MuxerDelegate>)del logger:(id <MP42Logging>)logger options:(nullable NSDictionary<NSString *, id> *)options; - (instancetype)initWithFileHandle:(MP4FileHandle)fileHandle delegate:(id <MP42MuxerDelegate>)del logger:(id <MP42Logging>)logger options:(nullable NSDictionary<NSString *, id> *)options;
+1
View File
@@ -24,6 +24,7 @@
#include <stdatomic.h> #include <stdatomic.h>
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42Muxer @implementation MP42Muxer
{ {
MP4FileHandle _fileHandle; MP4FileHandle _fileHandle;
+2
View File
@@ -7,9 +7,11 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "MP42Utilities.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
MP42_OBJC_DIRECT_MEMBERS
@interface MP42OCRWrapper : NSObject @interface MP42OCRWrapper : NSObject
- (instancetype)initWithLanguage:(NSString *)language; - (instancetype)initWithLanguage:(NSString *)language;
+1
View File
@@ -46,6 +46,7 @@ protected:
TessBaseAPI tess_base_api; TessBaseAPI tess_base_api;
}; };
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42OCRWrapper { @implementation MP42OCRWrapper {
OCRWrapper *tess_base; OCRWrapper *tess_base;
} }
+2
View File
@@ -7,9 +7,11 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <MP42Foundation/MP42Utilities.h>
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
MP42_OBJC_DIRECT_MEMBERS
@interface MP42RelatedItem : NSObject<NSFilePresenter> @interface MP42RelatedItem : NSObject<NSFilePresenter>
@property (nonatomic, readonly) NSURL *URL; @property (nonatomic, readonly) NSURL *URL;
+2
View File
@@ -7,12 +7,14 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "MP42Utilities.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@class MP42SSAParser; @class MP42SSAParser;
@class MP42SSALine; @class MP42SSALine;
MP42_OBJC_DIRECT_MEMBERS
@interface MP42SSAConverter : NSObject @interface MP42SSAConverter : NSObject
- (instancetype)initWithParser:(MP42SSAParser *)parser; - (instancetype)initWithParser:(MP42SSAParser *)parser;
+1
View File
@@ -27,6 +27,7 @@
@end @end
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42SSAImporter @implementation MP42SSAImporter
+ (NSArray<NSString *> *)supportedFileFormats { + (NSArray<NSString *> *)supportedFileFormats {
+4
View File
@@ -7,9 +7,11 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "MP42Utilities.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
MP42_OBJC_DIRECT_MEMBERS
@interface MP42SSAStyle : NSObject @interface MP42SSAStyle : NSObject
@property (nonatomic, readonly) NSString *name; @property (nonatomic, readonly) NSString *name;
@@ -39,6 +41,7 @@ NS_ASSUME_NONNULL_BEGIN
@end @end
MP42_OBJC_DIRECT_MEMBERS
@interface MP42SSALine : NSObject @interface MP42SSALine : NSObject
@property (nonatomic, readonly) int layer; @property (nonatomic, readonly) int layer;
@@ -54,6 +57,7 @@ NS_ASSUME_NONNULL_BEGIN
@end @end
MP42_OBJC_DIRECT_MEMBERS
@interface MP42SSAParser : NSObject @interface MP42SSAParser : NSObject
- (instancetype)initWithString:(NSString *)string; - (instancetype)initWithString:(NSString *)string;
+2
View File
@@ -7,6 +7,7 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <MP42Foundation/MP42Utilities.h>
typedef NS_OPTIONS(uint16_t, MP42SampleBufferFlag) { typedef NS_OPTIONS(uint16_t, MP42SampleBufferFlag) {
MP42SampleBufferFlagEndOfFile = 1 << 0, MP42SampleBufferFlagEndOfFile = 1 << 0,
@@ -27,6 +28,7 @@ typedef NS_OPTIONS(uint32_t, MP42SampleDepType) {
MP42SampleDepTypeReserved = 0x80 /**< reserved */ MP42SampleDepTypeReserved = 0x80 /**< reserved */
}; };
MP42_OBJC_DIRECT_MEMBERS
@interface MP42SampleBuffer : NSObject { @interface MP42SampleBuffer : NSObject {
@public @public
void *data; void *data;
+1
View File
@@ -8,6 +8,7 @@
#import "MP42SampleBuffer.h" #import "MP42SampleBuffer.h"
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42SampleBuffer @implementation MP42SampleBuffer
- (void)dealloc { - (void)dealloc {
+4 -1
View File
@@ -7,12 +7,15 @@
// //
#import "MP42SecurityAccessToken.h" #import "MP42SecurityAccessToken.h"
#import <MP42Foundation/MP42Utilities.h>
MP42_OBJC_DIRECT_MEMBERS
@interface MP42SecurityAccessToken () @interface MP42SecurityAccessToken ()
@property (nonatomic, readonly) id<MP42SecurityScope> object; @property (nonatomic, readonly) id<MP42SecurityScope> object;
@property (nonatomic, readonly) BOOL accessed; @property (nonatomic, readonly) BOOL accessed;
@end @end
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42SecurityAccessToken @implementation MP42SecurityAccessToken
- (instancetype)initWithObject:(id<MP42SecurityScope>)object; - (instancetype)initWithObject:(id<MP42SecurityScope>)object;
@@ -27,7 +30,7 @@
+ (instancetype)tokenWithObject:(id<MP42SecurityScope>)object + (instancetype)tokenWithObject:(id<MP42SecurityScope>)object
{ {
return [[self alloc] initWithObject:object]; return [[MP42SecurityAccessToken alloc] initWithObject:object];
} }
- (void)dealloc - (void)dealloc
+1
View File
@@ -17,6 +17,7 @@
#import "MP42PrivateUtilities.h" #import "MP42PrivateUtilities.h"
#import "MP42Track+Private.h" #import "MP42Track+Private.h"
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42SrtImporter { @implementation MP42SrtImporter {
@private @private
MP42SubSerializer *_ss; MP42SubSerializer *_ss;
+3
View File
@@ -8,10 +8,12 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "MP42TextSample.h" #import "MP42TextSample.h"
#import "MP42Utilities.h"
#import "mp4v2.h" #import "mp4v2.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
MP42_OBJC_DIRECT_MEMBERS
@interface MP42SubLine : NSObject @interface MP42SubLine : NSObject
{ {
@public @public
@@ -25,6 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)initWithLine:(NSString *)l start:(unsigned)s end:(unsigned)e top_pos:(unsigned)p forced:(unsigned)f; - (instancetype)initWithLine:(NSString *)l start:(unsigned)s end:(unsigned)e top_pos:(unsigned)p forced:(unsigned)f;
@end @end
MP42_OBJC_DIRECT_MEMBERS
@interface MP42SubSerializer : NSObject @interface MP42SubSerializer : NSObject
- (void)addLine:(MP42SubLine *)sline; - (void)addLine:(MP42SubLine *)sline;
+2
View File
@@ -10,6 +10,7 @@
#import "MP42SampleBuffer.h" #import "MP42SampleBuffer.h"
#import "MP42HtmlParser.h" #import "MP42HtmlParser.h"
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42SubSerializer @implementation MP42SubSerializer
{ {
// input lines, sorted by 1. beginning time 2. original insertion order // input lines, sorted by 1. beginning time 2. original insertion order
@@ -165,6 +166,7 @@ canOutput:
@end @end
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42SubLine @implementation MP42SubLine
-(instancetype)initWithLine:(NSString *)l start:(unsigned)s end:(unsigned)e -(instancetype)initWithLine:(NSString *)l start:(unsigned)s end:(unsigned)e
+1 -1
View File
@@ -7,7 +7,7 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "MP42VideoTrack.h" #import <MP42Foundation/MP42VideoTrack.h>
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
+1
View File
@@ -14,6 +14,7 @@
#import <MP42Foundation/MP42Foundation-Swift.h> #import <MP42Foundation/MP42Foundation-Swift.h>
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42SubtitleTrack @implementation MP42SubtitleTrack
- (instancetype)initWithSourceURL:(NSURL *)URL trackID:(NSInteger)trackID fileHandle:(MP4FileHandle)fileHandle - (instancetype)initWithSourceURL:(NSURL *)URL trackID:(NSInteger)trackID fileHandle:(MP4FileHandle)fileHandle
+2 -2
View File
@@ -7,8 +7,8 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "MP42MediaFormat.h" #import <MP42Foundation/MP42MediaFormat.h>
#import "MP42Image.h" #import <MP42Foundation/MP42Image.h>
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
+2
View File
@@ -7,7 +7,9 @@
// //
#import "MP42TextSample.h" #import "MP42TextSample.h"
#import "MP42Utilities.h"
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42TextSample @implementation MP42TextSample
- (NSComparisonResult)compare:(MP42TextSample *)otherObject - (NSComparisonResult)compare:(MP42TextSample *)otherObject
+1
View File
@@ -22,6 +22,7 @@
#import "MP42SSAParser.h" #import "MP42SSAParser.h"
#import "MP42SSAConverter.h" #import "MP42SSAConverter.h"
MP42_OBJC_DIRECT_MEMBERS
@interface MP42TextSubConverter () @interface MP42TextSubConverter ()
@property (nonatomic, readonly) NSThread *decoderThread; @property (nonatomic, readonly) NSThread *decoderThread;
-3
View File
@@ -40,9 +40,6 @@ NS_ASSUME_NONNULL_BEGIN
- (void)startReading; - (void)startReading;
- (void)enqueue:(MP42SampleBuffer *)sample;
- (nullable MP42SampleBuffer *)copyNextSample;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
+10 -3
View File
@@ -7,9 +7,11 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "MP42MediaFormat.h" #import <MP42Foundation/MP42Utilities.h>
#import "MP42ConversionSettings.h" #import <MP42Foundation/MP42ConversionSettings.h>
#import "MP42SecurityAccessToken.h" #import <MP42Foundation/MP42SecurityAccessToken.h>
@class MP42SampleBuffer;
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@@ -49,6 +51,11 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, readonly) BOOL canExport; @property (nonatomic, readonly) BOOL canExport;
- (BOOL)exportToURL:(NSURL *)url error:(NSError * __autoreleasing *)error; - (BOOL)exportToURL:(NSURL *)url error:(NSError * __autoreleasing *)error;
#pragma mark - Private
- (void)enqueue:(MP42SampleBuffer *)sample MP42_OBJC_DIRECT;
- (nullable MP42SampleBuffer *)copyNextSample MP42_OBJC_DIRECT;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
+12 -1
View File
@@ -6,7 +6,18 @@
// Copyright (c) 2013 Damiano Galassi. All rights reserved. // Copyright (c) 2013 Damiano Galassi. All rights reserved.
// //
#import "MP42MediaFormat.h" #import <MP42Foundation/MP42MediaFormat.h>
// Direct method and property calls increases performance and reduces binary size.
#if defined(__IPHONE_14_0) || defined(__MAC_10_16) || defined(__TVOS_14_0) || defined(__WATCHOS_7_0)
#define MP42_OBJC_DIRECT_MEMBERS __attribute__((objc_direct_members))
#define MP42_OBJC_DIRECT __attribute__((objc_direct))
#define MP42_DIRECT ,direct
#else
#define MP42_OBJC_DIRECT_MEMBERS
#define MP42_OBJC_DIRECT
#define MP42_DIRECT
#endif
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
+1 -1
View File
@@ -7,7 +7,7 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "MP42Track.h" #import <MP42Foundation/MP42Track.h>
@interface MP42VideoTrack : MP42Track <NSSecureCoding, NSCopying> @interface MP42VideoTrack : MP42Track <NSSecureCoding, NSCopying>
+1
View File
@@ -12,6 +12,7 @@
#import "MP42PrivateUtilities.h" #import "MP42PrivateUtilities.h"
#import <mp4v2.h> #import <mp4v2.h>
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42VideoTrack @implementation MP42VideoTrack
- (instancetype)initWithSourceURL:(NSURL *)URL trackID:(NSInteger)trackID fileHandle:(MP42FileHandle)fileHandle - (instancetype)initWithSourceURL:(NSURL *)URL trackID:(NSInteger)trackID fileHandle:(MP42FileHandle)fileHandle
+5
View File
@@ -18,6 +18,7 @@
#import "MP42Track+Private.h" #import "MP42Track+Private.h"
#import "MP42SampleBuffer.h" #import "MP42SampleBuffer.h"
MP42_OBJC_DIRECT_MEMBERS
@interface SBVobSubSample : NSObject @interface SBVobSubSample : NSObject
{ {
@public @public
@@ -28,6 +29,7 @@
- (id)initWithTime:(long)time offset:(long)offset; - (id)initWithTime:(long)time offset:(long)offset;
@end @end
MP42_OBJC_DIRECT_MEMBERS
@interface SBVobSubTrack : NSObject @interface SBVobSubTrack : NSObject
{ {
@public @public
@@ -44,6 +46,7 @@
@end @end
MP42_OBJC_DIRECT_MEMBERS
@implementation SBVobSubSample @implementation SBVobSubSample
- (id)initWithTime:(long)time offset:(long)offset - (id)initWithTime:(long)time offset:(long)offset
@@ -60,6 +63,7 @@
@end @end
MP42_OBJC_DIRECT_MEMBERS
@implementation SBVobSubTrack @implementation SBVobSubTrack
- (id)initWithPrivateData:(NSArray *)idxPrivateData language:(NSString *)lang andIndex:(int)trackIndex - (id)initWithPrivateData:(NSArray *)idxPrivateData language:(NSString *)lang andIndex:(int)trackIndex
@@ -209,6 +213,7 @@ static NSArray<SBVobSubTrack *> * LoadVobSubSubtitles(NSURL *theDirectory, NSStr
} }
} }
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42VobSubImporter { @implementation MP42VobSubImporter {
@private @private
NSArray *_VobSubTracks; NSArray *_VobSubTracks;
+2
View File
@@ -8,7 +8,9 @@
#import "MP42XMLReader.h" #import "MP42XMLReader.h"
#import "MP42Metadata.h" #import "MP42Metadata.h"
#import "MP42Utilities.h"
MP42_OBJC_DIRECT_MEMBERS
@implementation MP42XMLReader @implementation MP42XMLReader
- (nullable instancetype)initWithURL:(NSURL *)url error:(NSError * __autoreleasing *)error - (nullable instancetype)initWithURL:(NSURL *)url error:(NSError * __autoreleasing *)error
+3 -1
View File
@@ -876,7 +876,7 @@
A9B9C1E4182391DF00416A4E /* Project object */ = { A9B9C1E4182391DF00416A4E /* Project object */ = {
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastUpgradeCheck = 1140; LastUpgradeCheck = 1200;
ORGANIZATIONNAME = "Damiano Galassi"; ORGANIZATIONNAME = "Damiano Galassi";
TargetAttributes = { TargetAttributes = {
A910B5A218394E900064028F = { A910B5A218394E900064028F = {
@@ -1184,6 +1184,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -1252,6 +1253,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "1140" LastUpgradeVersion = "1200"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"
@@ -27,15 +27,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"> shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A9B9C1EC182391DF00416A4E"
BuildableName = "MP42Foundation.framework"
BlueprintName = "MP42Foundation"
ReferencedContainer = "container:MP42Foundation.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables> <Testables>
<TestableReference <TestableReference
skipped = "NO"> skipped = "NO">
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "1140" LastUpgradeVersion = "1200"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"