diff --git a/MP42/MP42AACImporter.mm b/MP42/MP42AACImporter.mm index e6cb426..a8ac9f4 100644 --- a/MP42/MP42AACImporter.mm +++ b/MP42/MP42AACImporter.mm @@ -732,11 +732,11 @@ static bool GetFirstHeader(FILE* inFile) newTrack.sourceURL = self.fileURL; if (!inFile) { - inFile = fopen(self.fileURL.path.fileSystemRepresentation, "rb"); + inFile = fopen(self.fileURL.fileSystemRepresentation, "rb"); } struct stat st; - stat(self.fileURL.path.fileSystemRepresentation, &st); + stat(self.fileURL.fileSystemRepresentation, &st); size = st.st_size * 8; // collect all the necessary meta information @@ -842,7 +842,7 @@ static bool GetFirstHeader(FILE* inFile) { @autoreleasepool { if (!inFile) { - inFile = fopen(self.fileURL.path.fileSystemRepresentation, "rb"); + inFile = fopen(self.fileURL.fileSystemRepresentation, "rb"); } MP4TrackId trackId = self.inputTracks.lastObject.sourceId; diff --git a/MP42/MP42AC3Importer.m b/MP42/MP42AC3Importer.m index a94e633..b3d6e32 100644 --- a/MP42/MP42AC3Importer.m +++ b/MP42/MP42AC3Importer.m @@ -281,11 +281,11 @@ static bool GetFirstHeader(FILE* inFile) newTrack.sourceURL = self.fileURL; if (!inFile) { - inFile = fopen(self.fileURL.path.fileSystemRepresentation, "rb"); + inFile = fopen(self.fileURL.fileSystemRepresentation, "rb"); } struct stat st; - stat(self.fileURL.path.fileSystemRepresentation, &st); + stat(self.fileURL.fileSystemRepresentation, &st); size = st.st_size * 8; // collect all the necessary meta information @@ -356,7 +356,7 @@ static bool GetFirstHeader(FILE* inFile) { @autoreleasepool { if (!inFile) { - inFile = fopen(self.fileURL.path.fileSystemRepresentation, "rb"); + inFile = fopen(self.fileURL.fileSystemRepresentation, "rb"); } MP4TrackId trackId = self.inputTracks.lastObject.sourceId; diff --git a/MP42/MP42File.m b/MP42/MP42File.m index de83e40..1e7e042 100644 --- a/MP42/MP42File.m +++ b/MP42/MP42File.m @@ -128,7 +128,7 @@ static void logCallback(MP4LogLevel loglevel, const char *fmt, va_list ap) { - (BOOL)startReading { NSAssert(self.fileHandle == MP4_INVALID_FILE_HANDLE, @"File Handle already open"); - _fileHandle = MP4Read(self.URL.path.fileSystemRepresentation); + _fileHandle = MP4Read(self.URL.fileSystemRepresentation); if (self.fileHandle != MP4_INVALID_FILE_HANDLE) { self.status = MP42StatusReading; @@ -147,7 +147,7 @@ static void logCallback(MP4LogLevel loglevel, const char *fmt, va_list ap) { - (BOOL)startWriting { NSAssert(self.fileHandle == MP4_INVALID_FILE_HANDLE, @"File Handle already open"); - _fileHandle = MP4Modify(self.URL.path.fileSystemRepresentation, 0); + _fileHandle = MP4Modify(self.URL.fileSystemRepresentation, 0); if (self.fileHandle != MP4_INVALID_FILE_HANDLE) { self.status = MP42StatusWriting; @@ -602,7 +602,7 @@ static void logCallback(MP4LogLevel loglevel, const char *fmt, va_list ap) { unsigned long long originalFileSize = [[[fileManager attributesOfItemAtPath:self.URL.path error:nil] valueForKey:NSFileSize] unsignedLongLongValue]; dispatch_async(dispatch_get_global_queue(0, 0), ^{ - noErr = MP4Optimize(self.URL.path.fileSystemRepresentation, tempURL.path.fileSystemRepresentation); + noErr = MP4Optimize(self.URL.fileSystemRepresentation, tempURL.fileSystemRepresentation); OSAtomicIncrement32Barrier(&done); dispatch_semaphore_signal(sem); }); @@ -745,7 +745,7 @@ static void logCallback(MP4LogLevel loglevel, const char *fmt, va_list ap) { supportedBrandsCount = 2; } - self.fileHandle = MP4CreateEx(self.URL.path.fileSystemRepresentation, + self.fileHandle = MP4CreateEx(self.URL.fileSystemRepresentation, flags, 1, 1, majorBrand, 0, supportedBrands, supportedBrandsCount); diff --git a/MP42/MP42H264Importer.mm b/MP42/MP42H264Importer.mm index 5b31914..a09435c 100644 --- a/MP42/MP42H264Importer.mm +++ b/MP42/MP42H264Importer.mm @@ -1368,11 +1368,11 @@ NSData* H264Info(const char *filePath, uint32_t *pic_width, uint32_t *pic_height newTrack.sourceURL = self.fileURL; if (!inFile) { - inFile = fopen(self.fileURL.path.fileSystemRepresentation, "rb"); + inFile = fopen(self.fileURL.fileSystemRepresentation, "rb"); } struct stat st; - stat(self.fileURL.path.fileSystemRepresentation, &st); + stat(self.fileURL.fileSystemRepresentation, &st); _size = st.st_size; uint32_t tw, th; @@ -1422,7 +1422,7 @@ NSData* H264Info(const char *filePath, uint32_t *pic_width, uint32_t *pic_height { @autoreleasepool { if (!inFile) { - inFile = fopen(self.fileURL.path.fileSystemRepresentation, "rb"); + inFile = fopen(self.fileURL.fileSystemRepresentation, "rb"); } MP42Track *track = self.inputTracks.lastObject; diff --git a/MP42/MP42MkvImporter.m b/MP42/MP42MkvImporter.m index ec5bdfd..ce2466a 100644 --- a/MP42/MP42MkvImporter.m +++ b/MP42/MP42MkvImporter.m @@ -165,7 +165,7 @@ static int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, ui { if ((self = [super initWithURL:fileURL])) { _ioStream = calloc(1, sizeof(StdIoStream)); - _matroskaFile = openMatroskaFile(self.fileURL.path.fileSystemRepresentation, _ioStream); + _matroskaFile = openMatroskaFile(self.fileURL.fileSystemRepresentation, _ioStream); if (!_matroskaFile) { if (outError) { diff --git a/MP42/MP42Mp4Importer.m b/MP42/MP42Mp4Importer.m index 63ba45d..dc24d4d 100644 --- a/MP42/MP42Mp4Importer.m +++ b/MP42/MP42Mp4Importer.m @@ -74,7 +74,7 @@ - (NSData *)magicCookieForTrack:(MP42Track *)track { if (!_fileHandle) { - _fileHandle = MP4Read(self.fileURL.path.fileSystemRepresentation); + _fileHandle = MP4Read(self.fileURL.fileSystemRepresentation); } NSData *magicCookie = nil; diff --git a/MP42/MP42SubtitleTrack.m b/MP42/MP42SubtitleTrack.m index d658cf2..48b67bb 100644 --- a/MP42/MP42SubtitleTrack.m +++ b/MP42/MP42SubtitleTrack.m @@ -250,7 +250,7 @@ static void insertTagsFromStyleRecord(style_record record, NSMutableString *samp - (BOOL)exportToURL:(NSURL *)url error:(NSError **)error { - MP4FileHandle fileHandle = MP4Read(_sourceURL.path.fileSystemRepresentation); + MP4FileHandle fileHandle = MP4Read(_sourceURL.fileSystemRepresentation); if (!fileHandle) return NO;