Hide a private MP42Track method. Plus added @private in some classes.
This commit is contained in:
1 parent
3ac8115de8
commit
52a5117483
16 files changed
+70
-44
No files matched your search
@@ -10,6 +10,7 @@
|
|||||||
#import "MP42Track.h"
|
#import "MP42Track.h"
|
||||||
|
|
||||||
@interface MP42AudioTrack : MP42Track <NSCoding, NSCopying> {
|
@interface MP42AudioTrack : MP42Track <NSCoding, NSCopying> {
|
||||||
|
@private
|
||||||
float _volume;
|
float _volume;
|
||||||
UInt32 _channels;
|
UInt32 _channels;
|
||||||
UInt32 _sourceChannels;
|
UInt32 _sourceChannels;
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#import "MP42TextSample.h"
|
#import "MP42TextSample.h"
|
||||||
|
|
||||||
@interface MP42ChapterTrack : MP42Track <NSCoding> {
|
@interface MP42ChapterTrack : MP42Track <NSCoding> {
|
||||||
|
@private
|
||||||
NSMutableArray *chapters;
|
NSMutableArray *chapters;
|
||||||
BOOL _areChaptersEdited;
|
BOOL _areChaptersEdited;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,5 +10,4 @@
|
|||||||
#import "MP42VideoTrack.h"
|
#import "MP42VideoTrack.h"
|
||||||
|
|
||||||
@interface MP42ClosedCaptionTrack : MP42VideoTrack
|
@interface MP42ClosedCaptionTrack : MP42VideoTrack
|
||||||
|
|
||||||
@end
|
@end
|
||||||
@@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
#import "MP42ClosedCaptionTrack.h"
|
#import "MP42ClosedCaptionTrack.h"
|
||||||
#import "MP42MediaFormat.h"
|
#import "MP42MediaFormat.h"
|
||||||
#import "MP42Languages.h"
|
|
||||||
|
|
||||||
@implementation MP42ClosedCaptionTrack
|
@implementation MP42ClosedCaptionTrack
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
@interface MP42Fifo : NSObject {
|
@interface MP42Fifo : NSObject {
|
||||||
|
@private
|
||||||
id *_array;
|
id *_array;
|
||||||
|
|
||||||
int32_t _head;
|
int32_t _head;
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
@class MP42Track;
|
@class MP42Track;
|
||||||
|
|
||||||
@interface MP42FileImporter : NSObject {
|
@interface MP42FileImporter : NSObject {
|
||||||
|
@protected
|
||||||
NSURL *_fileURL;
|
NSURL *_fileURL;
|
||||||
|
|
||||||
NSInteger _chapterId;
|
NSInteger _chapterId;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#import "MP42MediaFormat.h"
|
#import "MP42MediaFormat.h"
|
||||||
|
|
||||||
@interface MP42Metadata : NSObject <NSCoding, NSCopying> {
|
@interface MP42Metadata : NSObject <NSCoding, NSCopying> {
|
||||||
|
@private
|
||||||
NSString *presetName;
|
NSString *presetName;
|
||||||
NSURL *sourceURL;
|
NSURL *sourceURL;
|
||||||
NSMutableDictionary *tagsDict;
|
NSMutableDictionary *tagsDict;
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
@end
|
@end
|
||||||
|
|
||||||
@interface MP42Muxer : NSObject {
|
@interface MP42Muxer : NSObject {
|
||||||
|
@private
|
||||||
MP4FileHandle _fileHandle;
|
MP4FileHandle _fileHandle;
|
||||||
id _delegate;
|
id _delegate;
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#import "MP42VideoTrack.h"
|
#import "MP42VideoTrack.h"
|
||||||
|
|
||||||
@interface MP42SubtitleTrack : MP42VideoTrack <NSCoding> {
|
@interface MP42SubtitleTrack : MP42VideoTrack <NSCoding> {
|
||||||
|
@private
|
||||||
BOOL _verticalPlacement;
|
BOOL _verticalPlacement;
|
||||||
BOOL _someSamplesAreForced;
|
BOOL _someSamplesAreForced;
|
||||||
BOOL _allSamplesAreForced;
|
BOOL _allSamplesAreForced;
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
#import "MP42PrivateUtilities.h"
|
#import "MP42PrivateUtilities.h"
|
||||||
#import "MP42MediaFormat.h"
|
#import "MP42MediaFormat.h"
|
||||||
#import "MP42HtmlParser.h"
|
#import "MP42HtmlParser.h"
|
||||||
#import "MP42Languages.h"
|
|
||||||
|
|
||||||
@implementation MP42SubtitleTrack
|
@implementation MP42SubtitleTrack
|
||||||
|
|
||||||
|
|||||||
@@ -27,4 +27,6 @@ typedef struct muxer_helper {
|
|||||||
|
|
||||||
@property(nonatomic, readonly) muxer_helper *muxer_helper;
|
@property(nonatomic, readonly) muxer_helper *muxer_helper;
|
||||||
|
|
||||||
|
- (MP42SampleBuffer *)copyNextSample;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
//
|
||||||
|
// MP42Track_MP42Track_Muxer.h
|
||||||
|
// MP42
|
||||||
|
//
|
||||||
|
// Created by Damiano Galassi on 01/11/13.
|
||||||
|
// Copyright (c) 2013 Damiano Galassi. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "MP42Track+Muxer.h"
|
||||||
|
|
||||||
|
@implementation MP42Track (MP42TrackMuxerExtentions)
|
||||||
|
|
||||||
|
- (muxer_helper *)muxer_helper
|
||||||
|
{
|
||||||
|
if (_helper == NULL)
|
||||||
|
_helper = calloc(1, sizeof(muxer_helper));
|
||||||
|
|
||||||
|
return _helper;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (MP42SampleBuffer *)copyNextSample {
|
||||||
|
MP42SampleBuffer *sample = nil;
|
||||||
|
muxer_helper *helper = (muxer_helper *)_helper;
|
||||||
|
|
||||||
|
if (helper->converter) {
|
||||||
|
if ([helper->importer done])
|
||||||
|
[helper->converter setInputDone];
|
||||||
|
|
||||||
|
if ([helper->converter encoderDone])
|
||||||
|
helper->done = YES;
|
||||||
|
|
||||||
|
sample = [helper->converter copyEncodedSample];
|
||||||
|
} else {
|
||||||
|
if ([helper->fifo isEmpty] && [helper->importer done])
|
||||||
|
helper->done = YES;
|
||||||
|
|
||||||
|
if ([helper->fifo count])
|
||||||
|
sample = [helper->fifo deque];
|
||||||
|
}
|
||||||
|
|
||||||
|
return sample;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
+4
-6
@@ -7,14 +7,13 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
#import "MP42ConverterProtocol.h"
|
|
||||||
#import "MP42MediaFormat.h"
|
#import "MP42MediaFormat.h"
|
||||||
|
|
||||||
@class MP42FileImporter;
|
/**
|
||||||
@class MP42SampleBuffer;
|
* MP42Track
|
||||||
@class MP42Fifo;
|
*/
|
||||||
|
|
||||||
@interface MP42Track : NSObject <NSCoding, NSCopying> {
|
@interface MP42Track : NSObject <NSCoding, NSCopying> {
|
||||||
|
@protected
|
||||||
MP42TrackId _Id;
|
MP42TrackId _Id;
|
||||||
MP42TrackId _sourceId;
|
MP42TrackId _sourceId;
|
||||||
|
|
||||||
@@ -47,7 +46,6 @@
|
|||||||
- (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 **)outError;
|
||||||
- (MP42SampleBuffer *)copyNextSample;
|
|
||||||
|
|
||||||
- (NSString *)timeString;
|
- (NSString *)timeString;
|
||||||
- (NSString *)formatSummary;
|
- (NSString *)formatSummary;
|
||||||
|
|||||||
+1
-33
@@ -336,39 +336,7 @@
|
|||||||
@synthesize dataLength = _size;
|
@synthesize dataLength = _size;
|
||||||
@synthesize mediaType = _mediaType;
|
@synthesize mediaType = _mediaType;
|
||||||
|
|
||||||
- (muxer_helper *)muxer_helper
|
- (void)dealloc {
|
||||||
{
|
|
||||||
if (_helper == NULL)
|
|
||||||
_helper = calloc(1, sizeof(muxer_helper));
|
|
||||||
|
|
||||||
return _helper;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (MP42SampleBuffer *)copyNextSample {
|
|
||||||
MP42SampleBuffer *sample = nil;
|
|
||||||
muxer_helper *helper = (muxer_helper *)_helper;
|
|
||||||
|
|
||||||
if (helper->converter) {
|
|
||||||
if ([helper->importer done])
|
|
||||||
[helper->converter setInputDone];
|
|
||||||
|
|
||||||
if ([helper->converter encoderDone])
|
|
||||||
helper->done = YES;
|
|
||||||
|
|
||||||
sample = [helper->converter copyEncodedSample];
|
|
||||||
} else {
|
|
||||||
if ([helper->fifo isEmpty] && [helper->importer done])
|
|
||||||
helper->done = YES;
|
|
||||||
|
|
||||||
if ([helper->fifo count])
|
|
||||||
sample = [helper->fifo deque];
|
|
||||||
}
|
|
||||||
|
|
||||||
return sample;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)dealloc
|
|
||||||
{
|
|
||||||
free(_helper);
|
free(_helper);
|
||||||
|
|
||||||
[_updatedProperty release];
|
[_updatedProperty release];
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#import "MP42Track.h"
|
#import "MP42Track.h"
|
||||||
|
|
||||||
@interface MP42VideoTrack : MP42Track <NSCoding> {
|
@interface MP42VideoTrack : MP42Track <NSCoding> {
|
||||||
|
@protected
|
||||||
uint64_t width, height;
|
uint64_t width, height;
|
||||||
float trackWidth, trackHeight;
|
float trackWidth, trackHeight;
|
||||||
|
|
||||||
|
|||||||
@@ -81,6 +81,9 @@
|
|||||||
A989F1001823AB2E0070AD8C /* MP42Track+Muxer.h in Headers */ = {isa = PBXBuildFile; fileRef = A989F0FF1823AB2E0070AD8C /* MP42Track+Muxer.h */; };
|
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, ); }; };
|
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 */; };
|
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 */; };
|
||||||
A9B9C1F1182391DF00416A4E /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9B9C1F0182391DF00416A4E /* Cocoa.framework */; };
|
A9B9C1F1182391DF00416A4E /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9B9C1F0182391DF00416A4E /* Cocoa.framework */; };
|
||||||
A9B9C1FB182391DF00416A4E /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = A9B9C1F9182391DF00416A4E /* InfoPlist.strings */; };
|
A9B9C1FB182391DF00416A4E /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = A9B9C1F9182391DF00416A4E /* InfoPlist.strings */; };
|
||||||
A9B9C206182391DF00416A4E /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9B9C205182391DF00416A4E /* XCTest.framework */; };
|
A9B9C206182391DF00416A4E /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9B9C205182391DF00416A4E /* XCTest.framework */; };
|
||||||
@@ -262,6 +265,7 @@
|
|||||||
A989F0FF1823AB2E0070AD8C /* MP42Track+Muxer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MP42Track+Muxer.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>"; };
|
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>"; };
|
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>"; };
|
||||||
A9B9C1ED182391DF00416A4E /* MP42Foundation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MP42Foundation.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
A9B9C1ED182391DF00416A4E /* MP42Foundation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MP42Foundation.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
A9B9C1F0182391DF00416A4E /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
A9B9C1F0182391DF00416A4E /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
||||||
A9B9C1F3182391DF00416A4E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
A9B9C1F3182391DF00416A4E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||||
@@ -593,6 +597,7 @@
|
|||||||
A9B9C2421823923100416A4E /* MP42Muxer.h */,
|
A9B9C2421823923100416A4E /* MP42Muxer.h */,
|
||||||
A9B9C2431823923100416A4E /* MP42Muxer.m */,
|
A9B9C2431823923100416A4E /* MP42Muxer.m */,
|
||||||
A989F0FF1823AB2E0070AD8C /* MP42Track+Muxer.h */,
|
A989F0FF1823AB2E0070AD8C /* MP42Track+Muxer.h */,
|
||||||
|
A991714B195AAAEF005AD68E /* MP42Track+Muxer.m */,
|
||||||
A9B9C2481823923100416A4E /* MP42Sample.h */,
|
A9B9C2481823923100416A4E /* MP42Sample.h */,
|
||||||
A9B9C2491823923100416A4E /* MP42Sample.m */,
|
A9B9C2491823923100416A4E /* MP42Sample.m */,
|
||||||
A9B9C22D1823923100416A4E /* MP42ConverterProtocol.h */,
|
A9B9C22D1823923100416A4E /* MP42ConverterProtocol.h */,
|
||||||
@@ -911,6 +916,7 @@
|
|||||||
A910B5D618394EB20064028F /* MP42MediaFormat.m in Sources */,
|
A910B5D618394EB20064028F /* MP42MediaFormat.m in Sources */,
|
||||||
A910B5D818394EB20064028F /* MP42TextSample.m in Sources */,
|
A910B5D818394EB20064028F /* MP42TextSample.m in Sources */,
|
||||||
A910B5DA18394EB20064028F /* MP42Image.m in Sources */,
|
A910B5DA18394EB20064028F /* MP42Image.m in Sources */,
|
||||||
|
A991714E195AAAEF005AD68E /* MP42Track+Muxer.m in Sources */,
|
||||||
A910B5DC18394EB20064028F /* MP42Languages.m in Sources */,
|
A910B5DC18394EB20064028F /* MP42Languages.m in Sources */,
|
||||||
A910B5DE18394EB20064028F /* MP42Ratings.m in Sources */,
|
A910B5DE18394EB20064028F /* MP42Ratings.m in Sources */,
|
||||||
A910B5E018394EB20064028F /* MP42PrivateUtilities.m in Sources */,
|
A910B5E018394EB20064028F /* MP42PrivateUtilities.m in Sources */,
|
||||||
@@ -961,6 +967,7 @@
|
|||||||
A9B9C2921823923200416A4E /* MP42QTImporter.m in Sources */,
|
A9B9C2921823923200416A4E /* MP42QTImporter.m in Sources */,
|
||||||
A9B9C2A21823923200416A4E /* MP42VobSubImporter.m in Sources */,
|
A9B9C2A21823923200416A4E /* MP42VobSubImporter.m in Sources */,
|
||||||
A9B9C28E1823923200416A4E /* MP42Muxer.m in Sources */,
|
A9B9C28E1823923200416A4E /* MP42Muxer.m in Sources */,
|
||||||
|
A991714C195AAAEF005AD68E /* MP42Track+Muxer.m in Sources */,
|
||||||
A9B9C2D0182396A100416A4E /* MP42Ratings.m in Sources */,
|
A9B9C2D0182396A100416A4E /* MP42Ratings.m in Sources */,
|
||||||
A9B9C2691823923200416A4E /* MP42AC3Importer.m in Sources */,
|
A9B9C2691823923200416A4E /* MP42AC3Importer.m in Sources */,
|
||||||
A9B9C26F1823923200416A4E /* MP42AVFImporter.m in Sources */,
|
A9B9C26F1823923200416A4E /* MP42AVFImporter.m in Sources */,
|
||||||
@@ -999,6 +1006,7 @@
|
|||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
A991714D195AAAEF005AD68E /* MP42Track+Muxer.m in Sources */,
|
||||||
A9B9C212182391DF00416A4E /* MP42Tests.m in Sources */,
|
A9B9C212182391DF00416A4E /* MP42Tests.m in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
@@ -1136,7 +1144,7 @@
|
|||||||
"-read_only_relocs",
|
"-read_only_relocs",
|
||||||
suppress,
|
suppress,
|
||||||
);
|
);
|
||||||
SDKROOT = macosx10.8;
|
SDKROOT = macosx10.9;
|
||||||
USER_HEADER_SEARCH_PATHS = "";
|
USER_HEADER_SEARCH_PATHS = "";
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
@@ -1181,7 +1189,7 @@
|
|||||||
"-read_only_relocs",
|
"-read_only_relocs",
|
||||||
suppress,
|
suppress,
|
||||||
);
|
);
|
||||||
SDKROOT = macosx10.8;
|
SDKROOT = macosx10.9;
|
||||||
USER_HEADER_SEARCH_PATHS = "";
|
USER_HEADER_SEARCH_PATHS = "";
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
|
|||||||
Reference in new issue
Block a user