Add __autoreleasing to NSError
This commit is contained in:
39 files changed
+44
-44
No files matched your search
@@ -723,7 +723,7 @@ static bool GetFirstHeader(FILE* inFile)
|
|||||||
return @[@"aac"];
|
return @[@"aac"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError
|
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError * __autoreleasing *)outError
|
||||||
{
|
{
|
||||||
if ((self = [super initWithURL:fileURL])) {
|
if ((self = [super initWithURL:fileURL])) {
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
@interface MP42AC3AudioEncoder : NSObject<MP42AudioUnit>
|
@interface MP42AC3AudioEncoder : NSObject<MP42AudioUnit>
|
||||||
|
|
||||||
- (instancetype)initWithInputUnit:(id<MP42AudioUnit>)unit bitRate:(NSUInteger)bitRate error:(NSError **)error;
|
- (instancetype)initWithInputUnit:(id<MP42AudioUnit>)unit bitRate:(NSUInteger)bitRate error:(NSError * __autoreleasing *)error;
|
||||||
|
|
||||||
@property (nonatomic, readonly, nullable) AudioChannelLayout *inputLayout;
|
@property (nonatomic, readonly, nullable) AudioChannelLayout *inputLayout;
|
||||||
@property (nonatomic, readonly) UInt32 inputLayoutSize;
|
@property (nonatomic, readonly) UInt32 inputLayoutSize;
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ typedef struct AudioFileIO
|
|||||||
|
|
||||||
@synthesize magicCookie = _magicCookie;
|
@synthesize magicCookie = _magicCookie;
|
||||||
|
|
||||||
- (instancetype)initWithInputUnit:(id<MP42AudioUnit>)unit bitRate:(NSUInteger)bitRate error:(NSError **)error
|
- (instancetype)initWithInputUnit:(id<MP42AudioUnit>)unit bitRate:(NSUInteger)bitRate error:(NSError * __autoreleasing *)error
|
||||||
{
|
{
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (self) {
|
if (self) {
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ static bool GetFirstHeader(FILE* inFile)
|
|||||||
return @[@"ac3"];
|
return @[@"ac3"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError
|
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError * __autoreleasing *)outError
|
||||||
{
|
{
|
||||||
if ((self = [super initWithURL:fileURL])) {
|
if ((self = [super initWithURL:fileURL])) {
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError {
|
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError * __autoreleasing *)outError {
|
||||||
if ((self = [super initWithURL:fileURL])) {
|
if ((self = [super initWithURL:fileURL])) {
|
||||||
_localAsset = [AVAsset assetWithURL:self.fileURL];
|
_localAsset = [AVAsset assetWithURL:self.fileURL];
|
||||||
_helpers = [NSMutableArray array];
|
_helpers = [NSMutableArray array];
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
@interface MP42AudioConverter : NSObject <MP42ConverterProtocol>
|
@interface MP42AudioConverter : NSObject <MP42ConverterProtocol>
|
||||||
|
|
||||||
- (instancetype)initWithTrack:(MP42AudioTrack *)track settings:(MP42AudioConversionSettings *)settings error:(NSError **)error;
|
- (instancetype)initWithTrack:(MP42AudioTrack *)track settings:(MP42AudioConversionSettings *)settings error:(NSError * __autoreleasing *)error;
|
||||||
|
|
||||||
- (void)addSample:(MP42SampleBuffer *)sample;
|
- (void)addSample:(MP42SampleBuffer *)sample;
|
||||||
- (nullable MP42SampleBuffer *)copyEncodedSample;
|
- (nullable MP42SampleBuffer *)copyEncodedSample;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#pragma mark - Init
|
#pragma mark - Init
|
||||||
|
|
||||||
- (instancetype)initWithTrack:(MP42AudioTrack *)track settings:(MP42AudioConversionSettings *)settings error:(NSError **)error
|
- (instancetype)initWithTrack:(MP42AudioTrack *)track settings:(MP42AudioConversionSettings *)settings error:(NSError * __autoreleasing *)error
|
||||||
{
|
{
|
||||||
self = [super init];
|
self = [super init];
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
drc:(float)drc
|
drc:(float)drc
|
||||||
initialPadding:(UInt32)initialPadding
|
initialPadding:(UInt32)initialPadding
|
||||||
magicCookie:(NSData *)magicCookie
|
magicCookie:(NSData *)magicCookie
|
||||||
error:(NSError **)error;
|
error:(NSError * __autoreleasing *)error;
|
||||||
|
|
||||||
@property (nonatomic, readonly, nullable) AudioChannelLayout *inputLayout;
|
@property (nonatomic, readonly, nullable) AudioChannelLayout *inputLayout;
|
||||||
@property (nonatomic, readonly) UInt32 inputLayoutSize;
|
@property (nonatomic, readonly) UInt32 inputLayoutSize;
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ typedef struct MP42DecodeContext MP42DecodeContext;
|
|||||||
drc:(float)drc
|
drc:(float)drc
|
||||||
initialPadding:(UInt32)initialPadding
|
initialPadding:(UInt32)initialPadding
|
||||||
magicCookie:(NSData *)magicCookie
|
magicCookie:(NSData *)magicCookie
|
||||||
error:(NSError **)error
|
error:(NSError * __autoreleasing *)error
|
||||||
{
|
{
|
||||||
self = [super init];
|
self = [super init];
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
@interface MP42AudioEncoder : NSObject<MP42AudioUnit>
|
@interface MP42AudioEncoder : NSObject<MP42AudioUnit>
|
||||||
|
|
||||||
- (instancetype)initWithInputUnit:(id<MP42AudioUnit>)unit bitRate:(NSUInteger)bitRate error:(NSError **)error;
|
- (instancetype)initWithInputUnit:(id<MP42AudioUnit>)unit bitRate:(NSUInteger)bitRate error:(NSError * __autoreleasing *)error;
|
||||||
|
|
||||||
@property (nonatomic, readonly, nullable) AudioChannelLayout *inputLayout;
|
@property (nonatomic, readonly, nullable) AudioChannelLayout *inputLayout;
|
||||||
@property (nonatomic, readonly) UInt32 inputLayoutSize;
|
@property (nonatomic, readonly) UInt32 inputLayoutSize;
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ typedef struct AudioFileIO
|
|||||||
|
|
||||||
@synthesize magicCookie = _magicCookie;
|
@synthesize magicCookie = _magicCookie;
|
||||||
|
|
||||||
- (instancetype)initWithInputUnit:(id<MP42AudioUnit>)unit bitRate:(NSUInteger)bitRate error:(NSError **)error
|
- (instancetype)initWithInputUnit:(id<MP42AudioUnit>)unit bitRate:(NSUInteger)bitRate error:(NSError * __autoreleasing *)error
|
||||||
{
|
{
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (self) {
|
if (self) {
|
||||||
|
|||||||
@@ -135,7 +135,7 @@
|
|||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)writeToFile:(MP4FileHandle)fileHandle error:(NSError **)outError
|
- (BOOL)writeToFile:(MP4FileHandle)fileHandle error:(NSError * __autoreleasing *)outError
|
||||||
{
|
{
|
||||||
if (!fileHandle || !self.trackId || ![super writeToFile:fileHandle error:outError]) {
|
if (!fileHandle || !self.trackId || ![super writeToFile:fileHandle error:outError]) {
|
||||||
if (outError != NULL) {
|
if (outError != NULL) {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
@interface MP42BitmapSubConverter : NSObject <MP42ConverterProtocol>
|
@interface MP42BitmapSubConverter : NSObject <MP42ConverterProtocol>
|
||||||
|
|
||||||
- (instancetype)initWithTrack:(MP42SubtitleTrack *)track error:(NSError **)outError;
|
- (instancetype)initWithTrack:(MP42SubtitleTrack *)track error:(NSError * __autoreleasing *)outError;
|
||||||
|
|
||||||
- (void)addSample:(MP42SampleBuffer *)sample;
|
- (void)addSample:(MP42SampleBuffer *)sample;
|
||||||
- (nullable MP42SampleBuffer *)copyEncodedSample;
|
- (nullable MP42SampleBuffer *)copyEncodedSample;
|
||||||
|
|||||||
@@ -372,7 +372,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype)initWithTrack:(MP42SubtitleTrack *)track error:(NSError **)outError
|
- (instancetype)initWithTrack:(MP42SubtitleTrack *)track error:(NSError * __autoreleasing *)outError
|
||||||
{
|
{
|
||||||
if ((self = [super init])) {
|
if ((self = [super init])) {
|
||||||
FFInitFFmpeg();
|
FFInitFFmpeg();
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
return @[@"scc"];
|
return @[@"scc"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError
|
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError * __autoreleasing *)outError
|
||||||
{
|
{
|
||||||
if ((self = [super initWithURL:fileURL])) {
|
if ((self = [super initWithURL:fileURL])) {
|
||||||
MP42Track *newTrack = [[MP42ClosedCaptionTrack alloc] init];
|
MP42Track *newTrack = [[MP42ClosedCaptionTrack alloc] init];
|
||||||
|
|||||||
@@ -33,9 +33,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
- (NSUInteger)chapterCount;
|
- (NSUInteger)chapterCount;
|
||||||
|
|
||||||
- (BOOL)updateFromCSVFile:(NSURL *)URL error:(NSError **)outError;
|
- (BOOL)updateFromCSVFile:(NSURL *)URL error:(NSError * __autoreleasing *)outError;
|
||||||
|
|
||||||
- (BOOL)exportToURL:(NSURL *)url error:(NSError **)error;
|
- (BOOL)exportToURL:(NSURL *)url error:(NSError * __autoreleasing *)error;
|
||||||
|
|
||||||
@property(nonatomic, readonly, retain) NSArray<MP42TextSample *> *chapters;
|
@property(nonatomic, readonly, retain) NSArray<MP42TextSample *> *chapters;
|
||||||
|
|
||||||
|
|||||||
@@ -175,7 +175,7 @@
|
|||||||
return [_chapters objectAtIndex:index];
|
return [_chapters objectAtIndex:index];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)writeToFile:(MP4FileHandle)fileHandle error:(NSError **)outError
|
- (BOOL)writeToFile:(MP4FileHandle)fileHandle error:(NSError * __autoreleasing *)outError
|
||||||
{
|
{
|
||||||
BOOL success = YES;
|
BOOL success = YES;
|
||||||
|
|
||||||
@@ -274,7 +274,7 @@
|
|||||||
return _chapters.count;
|
return _chapters.count;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)exportToURL:(NSURL *)url error:(NSError **)error
|
- (BOOL)exportToURL:(NSURL *)url error:(NSError * __autoreleasing *)error
|
||||||
{
|
{
|
||||||
NSMutableString* file = [[NSMutableString alloc] init];
|
NSMutableString* file = [[NSMutableString alloc] init];
|
||||||
NSUInteger x = 0;
|
NSUInteger x = 0;
|
||||||
@@ -287,7 +287,7 @@
|
|||||||
return [file writeToURL:url atomically:YES encoding:NSUTF8StringEncoding error:error];
|
return [file writeToURL:url atomically:YES encoding:NSUTF8StringEncoding error:error];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)updateFromCSVFile:(NSURL *)URL error:(NSError **)outError {
|
- (BOOL)updateFromCSVFile:(NSURL *)URL error:(NSError * __autoreleasing *)outError {
|
||||||
NSArray *csvData = [NSArray arrayWithContentsOfCSVURL:URL];
|
NSArray *csvData = [NSArray arrayWithContentsOfCSVURL:URL];
|
||||||
if (csvData.count == self.chapterCount) {
|
if (csvData.count == self.chapterCount) {
|
||||||
for (NSUInteger i = 0; i < csvData.count; ++i) {
|
for (NSUInteger i = 0; i < csvData.count; ++i) {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)writeToFile:(MP42FileHandle)fileHandle error:(NSError **)outError
|
- (BOOL)writeToFile:(MP42FileHandle)fileHandle error:(NSError * __autoreleasing *)outError
|
||||||
{
|
{
|
||||||
return [super writeToFile:fileHandle error:outError];
|
return [super writeToFile:fileHandle error:outError];
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -183,7 +183,7 @@ typedef void (^MP42FileProgressHandler)(double progress);
|
|||||||
*
|
*
|
||||||
* @return YES if the movie file was successfully created, NO otherwise.
|
* @return YES if the movie file was successfully created, NO otherwise.
|
||||||
*/
|
*/
|
||||||
- (BOOL)writeToUrl:(NSURL *)url options:(nullable NSDictionary<NSString *, id> *)options error:(NSError **)outError;
|
- (BOOL)writeToUrl:(NSURL *)url options:(nullable NSDictionary<NSString *, id> *)options error:(NSError * __autoreleasing *)outError;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates a MP42File object.
|
* Updates a MP42File object.
|
||||||
@@ -193,7 +193,7 @@ typedef void (^MP42FileProgressHandler)(double progress);
|
|||||||
*
|
*
|
||||||
* @return YES if the movie file was successfully created, NO otherwise.
|
* @return YES if the movie file was successfully created, NO otherwise.
|
||||||
*/
|
*/
|
||||||
- (BOOL)updateMP4FileWithOptions:(nullable NSDictionary<NSString *, id> *)options error:(NSError **)outError;
|
- (BOOL)updateMP4FileWithOptions:(nullable NSDictionary<NSString *, id> *)options error:(NSError * __autoreleasing *)outError;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cancels a write/update operation.
|
* Cancels a write/update operation.
|
||||||
|
|||||||
+1
-1
@@ -912,7 +912,7 @@ static void logCallback(MP4LogLevel loglevel, const char *fmt, va_list ap) {
|
|||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)updateMP4FileWithOptions:(nullable NSDictionary<NSString *, id> *)options error:(NSError **)outError {
|
- (BOOL)updateMP4FileWithOptions:(nullable NSDictionary<NSString *, id> *)options error:(NSError * __autoreleasing *)outError {
|
||||||
|
|
||||||
// Open the mp4 file
|
// Open the mp4 file
|
||||||
if (![self startWriting]) {
|
if (![self startWriting]) {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
+ (NSArray<NSString *> *)supportedFileFormats;
|
+ (NSArray<NSString *> *)supportedFileFormats;
|
||||||
+ (BOOL)canInitWithFileType:(NSString *)fileType;
|
+ (BOOL)canInitWithFileType:(NSString *)fileType;
|
||||||
|
|
||||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)error;
|
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError * __autoreleasing *)error;
|
||||||
|
|
||||||
@property (nonatomic, readonly) NSURL *fileURL;
|
@property (nonatomic, readonly) NSURL *fileURL;
|
||||||
@property (nonatomic, readonly) MP42Metadata *metadata;
|
@property (nonatomic, readonly) MP42Metadata *metadata;
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ static NSArray<NSString *> *_supportedFileFormats;
|
|||||||
return [[self supportedFileFormats] containsObject:fileType.lowercaseString];
|
return [[self supportedFileFormats] containsObject:fileType.lowercaseString];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)error;
|
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError * __autoreleasing *)error;
|
||||||
{
|
{
|
||||||
self = nil;
|
self = nil;
|
||||||
|
|
||||||
|
|||||||
@@ -1387,7 +1387,7 @@ NSData* H264Info(const char *filePath, uint32_t *pic_width, uint32_t *pic_height
|
|||||||
return @[@"264", @"h264"];
|
return @[@"264", @"h264"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError
|
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError * __autoreleasing *)outError
|
||||||
{
|
{
|
||||||
if ((self = [super initWithURL:fileURL])) {
|
if ((self = [super initWithURL:fileURL])) {
|
||||||
|
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ static int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, ui
|
|||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError
|
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError * __autoreleasing *)outError
|
||||||
{
|
{
|
||||||
if ((self = [super initWithURL:fileURL])) {
|
if ((self = [super initWithURL:fileURL])) {
|
||||||
_ioStream = calloc(1, sizeof(StdIoStream));
|
_ioStream = calloc(1, sizeof(StdIoStream));
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ typedef struct MP4DemuxHelper {
|
|||||||
return @[@"mp4", @"m4v", @"m4a", @"m4r"];
|
return @[@"mp4", @"m4v", @"m4a", @"m4r"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError;
|
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError * __autoreleasing *)outError;
|
||||||
{
|
{
|
||||||
if ((self = [super initWithURL:fileURL])) {
|
if ((self = [super initWithURL:fileURL])) {
|
||||||
MP42File *sourceFile = [[MP42File alloc] initWithURL:self.fileURL error:outError];
|
MP42File *sourceFile = [[MP42File alloc] initWithURL:self.fileURL error:outError];
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
- (BOOL)canAddTrack:(MP42Track *)track;
|
- (BOOL)canAddTrack:(MP42Track *)track;
|
||||||
- (void)addTrack:(MP42Track *)track;
|
- (void)addTrack:(MP42Track *)track;
|
||||||
|
|
||||||
- (BOOL)setup:(NSError **)outError;
|
- (BOOL)setup:(NSError * __autoreleasing *)outError;
|
||||||
- (void)work;
|
- (void)work;
|
||||||
- (void)cancel;
|
- (void)cancel;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -73,7 +73,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)setup:(NSError **)outError
|
- (BOOL)setup:(NSError * __autoreleasing *)outError
|
||||||
{
|
{
|
||||||
NSMutableArray<MP42Track *> *unsupportedTracks = [[NSMutableArray alloc] init];;
|
NSMutableArray<MP42Track *> *unsupportedTracks = [[NSMutableArray alloc] init];;
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
return @[@"ssa", @"ass"];
|
return @[@"ssa", @"ass"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError
|
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError * __autoreleasing *)outError
|
||||||
{
|
{
|
||||||
if ((self = [super initWithURL:fileURL])) {
|
if ((self = [super initWithURL:fileURL])) {
|
||||||
MP42SubtitleTrack *track = [[MP42SubtitleTrack alloc] init];
|
MP42SubtitleTrack *track = [[MP42SubtitleTrack alloc] init];
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
return @[@"srt", @"smi"];
|
return @[@"srt", @"smi"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError
|
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError * __autoreleasing *)outError
|
||||||
{
|
{
|
||||||
if ((self = [super initWithURL:fileURL])) {
|
if ((self = [super initWithURL:fileURL])) {
|
||||||
MP42SubtitleTrack *track = [[MP42SubtitleTrack alloc] init];
|
MP42SubtitleTrack *track = [[MP42SubtitleTrack alloc] init];
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
@interface MP42SubtitleTrack : MP42VideoTrack <NSSecureCoding>
|
@interface MP42SubtitleTrack : MP42VideoTrack <NSSecureCoding>
|
||||||
|
|
||||||
- (BOOL)exportToURL:(NSURL *)url error:(NSError **)error;
|
- (BOOL)exportToURL:(NSURL *)url error:(NSError * __autoreleasing *)error;
|
||||||
|
|
||||||
@property(nonatomic, readwrite) BOOL verticalPlacement;
|
@property(nonatomic, readwrite) BOOL verticalPlacement;
|
||||||
@property(nonatomic, readwrite) BOOL someSamplesAreForced;
|
@property(nonatomic, readwrite) BOOL someSamplesAreForced;
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)writeToFile:(MP4FileHandle)fileHandle error:(NSError **)outError
|
- (BOOL)writeToFile:(MP4FileHandle)fileHandle error:(NSError * __autoreleasing *)outError
|
||||||
{
|
{
|
||||||
if (!fileHandle || !self.trackId || ![super writeToFile:fileHandle error:outError]) {
|
if (!fileHandle || !self.trackId || ![super writeToFile:fileHandle error:outError]) {
|
||||||
if (outError != NULL) {
|
if (outError != NULL) {
|
||||||
@@ -200,7 +200,7 @@ static void insertTagsFromStyleRecord(style_record record, NSMutableString *samp
|
|||||||
*numberOfInsertedChars += index - record.startChar - *numberOfInsertedChars;
|
*numberOfInsertedChars += index - record.startChar - *numberOfInsertedChars;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)exportToURL:(NSURL *)url error:(NSError **)error
|
- (BOOL)exportToURL:(NSURL *)url error:(NSError * __autoreleasing *)error
|
||||||
{
|
{
|
||||||
MP4FileHandle fileHandle = MP4Read(self.URL.fileSystemRepresentation);
|
MP4FileHandle fileHandle = MP4Read(self.URL.fileSystemRepresentation);
|
||||||
if (!fileHandle)
|
if (!fileHandle)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
*/
|
*/
|
||||||
@interface MP42TextSubConverter : NSObject <MP42ConverterProtocol>
|
@interface MP42TextSubConverter : NSObject <MP42ConverterProtocol>
|
||||||
|
|
||||||
- (instancetype)initWithTrack:(MP42SubtitleTrack *)track error:(NSError **)outError;
|
- (instancetype)initWithTrack:(MP42SubtitleTrack *)track error:(NSError * __autoreleasing *)outError;
|
||||||
|
|
||||||
- (void)addSample:(MP42SampleBuffer *)sample;
|
- (void)addSample:(MP42SampleBuffer *)sample;
|
||||||
- (nullable MP42SampleBuffer *)copyEncodedSample;
|
- (nullable MP42SampleBuffer *)copyEncodedSample;
|
||||||
|
|||||||
@@ -86,7 +86,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype)initWithTrack:(MP42SubtitleTrack *)track error:(NSError **)outError
|
- (instancetype)initWithTrack:(MP42SubtitleTrack *)track error:(NSError * __autoreleasing *)outError
|
||||||
{
|
{
|
||||||
if ((self = [super init])) {
|
if ((self = [super init])) {
|
||||||
MP42SubtitleCodecType format = track.format;
|
MP42SubtitleCodecType format = track.format;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
@interface MP42Track (Private)
|
@interface MP42Track (Private)
|
||||||
|
|
||||||
- (instancetype)initWithSourceURL:(NSURL *)URL trackID:(NSInteger)trackID fileHandle:(MP42FileHandle)fileHandle;
|
- (instancetype)initWithSourceURL:(NSURL *)URL trackID:(NSInteger)trackID fileHandle:(MP42FileHandle)fileHandle;
|
||||||
- (BOOL)writeToFile:(MP42FileHandle)fileHandle error:(NSError **)outError;
|
- (BOOL)writeToFile:(MP42FileHandle)fileHandle error:(NSError * __autoreleasing *)outError;
|
||||||
|
|
||||||
@property(nonatomic, readwrite) MP42TrackId trackId;
|
@property(nonatomic, readwrite) MP42TrackId trackId;
|
||||||
@property(nonatomic, readwrite) MP42TrackId sourceId;
|
@property(nonatomic, readwrite) MP42TrackId sourceId;
|
||||||
|
|||||||
+1
-1
@@ -181,7 +181,7 @@
|
|||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)writeToFile:(MP4FileHandle)fileHandle error:(NSError **)outError
|
- (BOOL)writeToFile:(MP4FileHandle)fileHandle error:(NSError * __autoreleasing *)outError
|
||||||
{
|
{
|
||||||
if (!fileHandle || !_trackId) {
|
if (!fileHandle || !_trackId) {
|
||||||
if ( outError != NULL) {
|
if ( outError != NULL) {
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)writeToFile:(MP4FileHandle)fileHandle error:(NSError **)outError __attribute__((no_sanitize("float-cast-overflow")))
|
- (BOOL)writeToFile:(MP4FileHandle)fileHandle error:(NSError * __autoreleasing *)outError __attribute__((no_sanitize("float-cast-overflow")))
|
||||||
{
|
{
|
||||||
if (!fileHandle || !self.trackId || ![super writeToFile:fileHandle error:outError]) {
|
if (!fileHandle || !self.trackId || ![super writeToFile:fileHandle error:outError]) {
|
||||||
if (outError != NULL) {
|
if (outError != NULL) {
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ static NSArray<SBVobSubTrack *> * LoadVobSubSubtitles(NSURL *theDirectory, NSStr
|
|||||||
return @[@"idx"];
|
return @[@"idx"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError
|
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError * __autoreleasing *)outError
|
||||||
{
|
{
|
||||||
if ((self = [super initWithURL:fileURL])) {
|
if ((self = [super initWithURL:fileURL])) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
@interface MP42XMLReader : NSObject
|
@interface MP42XMLReader : NSObject
|
||||||
|
|
||||||
- (instancetype)initWithURL:(NSURL *)url error:(NSError **)error;
|
- (instancetype)initWithURL:(NSURL *)url error:(NSError * __autoreleasing *)error;
|
||||||
|
|
||||||
@property (nonatomic, readonly) MP42Metadata *mMetadata;
|
@property (nonatomic, readonly) MP42Metadata *mMetadata;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
@implementation MP42XMLReader
|
@implementation MP42XMLReader
|
||||||
|
|
||||||
- (instancetype)initWithURL:(NSURL *)url error:(NSError **)error
|
- (instancetype)initWithURL:(NSURL *)url error:(NSError * __autoreleasing *)error
|
||||||
{
|
{
|
||||||
if (self = [super init]) {
|
if (self = [super init]) {
|
||||||
NSXMLDocument *xml = [[NSXMLDocument alloc] initWithContentsOfURL:url options:0 error:NULL];
|
NSXMLDocument *xml = [[NSXMLDocument alloc] initWithContentsOfURL:url options:0 error:NULL];
|
||||||
|
|||||||
Reference in new issue
Block a user