Made some more header files public to let Subler compiles.
This commit is contained in:
1 parent
541f4a6513
commit
30564b6469
19 files changed
+117
-46
No files matched your search
@@ -13,6 +13,10 @@
|
||||
#import "MP42File.h"
|
||||
#import "MP42Image.h"
|
||||
|
||||
#import "mp4v2.h"
|
||||
#import "MP42Utilities.h"
|
||||
#import "MP42Track+Muxer.h"
|
||||
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
|
||||
|
||||
@@ -14,15 +14,10 @@
|
||||
#import "MP42Fifo.h"
|
||||
#import "MP42Utilities.h"
|
||||
|
||||
#import "MP42Track_Muxer.h"
|
||||
#import "MP42Track+Muxer.h"
|
||||
|
||||
#define FIFO_DURATION (0.5f)
|
||||
|
||||
NSString * const SBMonoMixdown = @"SBMonoMixdown";
|
||||
NSString * const SBStereoMixdown = @"SBStereoMixdown";
|
||||
NSString * const SBDolbyMixdown = @"SBDolbyMixdown";
|
||||
NSString * const SBDolbyPlIIMixdown = @"SBDolbyPlIIMixdown";
|
||||
|
||||
@interface NSString (VersionStringCompare)
|
||||
- (BOOL)isVersionStringOlderThan:(NSString *)older;
|
||||
@end
|
||||
|
||||
@@ -14,6 +14,10 @@
|
||||
#import "MP42OCRWrapper.h"
|
||||
#import "MP42SubUtilities.h"
|
||||
|
||||
#import "mp4v2.h"
|
||||
#import "MP42Utilities.h"
|
||||
#import "MP42Track+Muxer.h"
|
||||
|
||||
#define REGISTER_DECODER(x) { \
|
||||
extern AVCodec ff_##x##_decoder; \
|
||||
avcodec_register(&ff_##x##_decoder); }
|
||||
|
||||
+42
-3
@@ -12,6 +12,7 @@
|
||||
#import "MP42SubUtilities.h"
|
||||
#import "MP42Utilities.h"
|
||||
#import "MP42Languages.h"
|
||||
#import "MP42Track+Muxer.h"
|
||||
|
||||
#import <QTKit/QTKit.h>
|
||||
|
||||
@@ -27,6 +28,46 @@ NSString * const MP42GenerateChaptersPreviewTrack = @"MP42ChaptersPreview";
|
||||
NSString * const MP42CustomChaptersPreviewTrack = @"MP42CustomChaptersPreview";
|
||||
NSString * const MP42OrganizeAlternateGroups = @"MP42AlternateGroups";
|
||||
|
||||
static void logCallback(MP4LogLevel loglevel, const char* fmt, va_list ap)
|
||||
{
|
||||
const char* level;
|
||||
|
||||
if ([[NSUserDefaults standardUserDefaults] valueForKey:@"Debug"]) {
|
||||
switch (loglevel) {
|
||||
case 0:
|
||||
level = "None";
|
||||
break;
|
||||
case 1:
|
||||
level = "Error";
|
||||
break;
|
||||
case 2:
|
||||
level = "Warning";
|
||||
break;
|
||||
case 3:
|
||||
level = "Info";
|
||||
break;
|
||||
case 4:
|
||||
level = "Verbose1";
|
||||
break;
|
||||
case 5:
|
||||
level = "Verbose2";
|
||||
break;
|
||||
case 6:
|
||||
level = "Verbose3";
|
||||
break;
|
||||
case 7:
|
||||
level = "Verbose4";
|
||||
break;
|
||||
default:
|
||||
level = "Unknown";
|
||||
break;
|
||||
}
|
||||
printf("%s: ", level);
|
||||
vprintf(fmt, ap);
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
@interface MP42File () <MP42MuxerDelegate> {
|
||||
MP4FileHandle _fileHandle;
|
||||
NSURL *_fileURL;
|
||||
@@ -55,9 +96,7 @@ NSString * const MP42OrganizeAlternateGroups = @"MP42AlternateGroups";
|
||||
|
||||
@end
|
||||
|
||||
@implementation MP42File {
|
||||
|
||||
}
|
||||
@implementation MP42File
|
||||
|
||||
- (id)init
|
||||
{
|
||||
|
||||
@@ -9,12 +9,8 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
|
||||
#import "MP42MediaFormat.h"
|
||||
#import "MP42Sample.h"
|
||||
#import "MP42Utilities.h"
|
||||
|
||||
#import "mp4v2.h"
|
||||
|
||||
#import "MP42Track_Muxer.h"
|
||||
|
||||
@class MP42Sample;
|
||||
@class MP42Metadata;
|
||||
|
||||
@@ -18,15 +18,17 @@
|
||||
#import "MP42Track.h"
|
||||
#import "MP42Fifo.h"
|
||||
|
||||
#import "MP42Track_Muxer.h"
|
||||
|
||||
#if !__LP64__
|
||||
#import "MP42QTImporter.h"
|
||||
#endif
|
||||
|
||||
#import "MP42AVFImporter.h"
|
||||
|
||||
#include "MP42AudioConverter.h"
|
||||
#import "MP42AudioConverter.h"
|
||||
|
||||
#import "mp4v2.h"
|
||||
#import "MP42Utilities.h"
|
||||
#import "MP42Track+Muxer.h"
|
||||
|
||||
@implementation MP42FileImporter
|
||||
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "MP42FileImporter.h"
|
||||
|
||||
#import "mp4v2.h"
|
||||
#import "MP42Utilities.h"
|
||||
#import "MP42Track+Muxer.h"
|
||||
|
||||
typedef struct framerate_t {
|
||||
uint32_t code;
|
||||
uint32_t timescale;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/* MP4 API types */
|
||||
/* MP4 primitive types */
|
||||
typedef void* MP42FileHandle;
|
||||
typedef uint32_t MP42TrackId;
|
||||
typedef uint64_t MP42Duration;
|
||||
@@ -75,4 +75,10 @@ extern NSString *const MP42ClosedCaptionFormatCEA708;
|
||||
|
||||
|
||||
// TimeCode Format
|
||||
extern NSString *const MP42TimeCodeFormat;
|
||||
extern NSString *const MP42TimeCodeFormat;
|
||||
|
||||
// Audio downmixes
|
||||
extern NSString * const SBMonoMixdown;
|
||||
extern NSString * const SBStereoMixdown;
|
||||
extern NSString * const SBDolbyMixdown;
|
||||
extern NSString * const SBDolbyPlIIMixdown;
|
||||
@@ -69,4 +69,10 @@ NSString *const MP42ClosedCaptionFormatCEA708 = @"CEA-708";
|
||||
|
||||
|
||||
// TimeCode Format
|
||||
NSString *const MP42TimeCodeFormat = @"TimeCode";
|
||||
NSString *const MP42TimeCodeFormat = @"TimeCode";
|
||||
|
||||
// Audio Downmixes
|
||||
NSString * const SBMonoMixdown = @"SBMonoMixdown";
|
||||
NSString * const SBStereoMixdown = @"SBStereoMixdown";
|
||||
NSString * const SBDolbyMixdown = @"SBDolbyMixdown";
|
||||
NSString * const SBDolbyPlIIMixdown = @"SBDolbyPlIIMixdown";
|
||||
@@ -16,6 +16,10 @@
|
||||
#import "MatroskaFile.h"
|
||||
#include "avutil.h"
|
||||
|
||||
#import "mp4v2.h"
|
||||
#import "MP42Utilities.h"
|
||||
#import "MP42Track+Muxer.h"
|
||||
|
||||
u_int32_t MP4AV_Ac3GetSamplingRate(u_int8_t* pHdr);
|
||||
|
||||
@interface MatroskaSample : NSObject {
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
#import "MP42Languages.h"
|
||||
#import "MP42Sample.h"
|
||||
|
||||
#import "mp4v2.h"
|
||||
#import "MP42Utilities.h"
|
||||
#import "MP42Track+Muxer.h"
|
||||
|
||||
@interface MP4DemuxkHelper : NSObject {
|
||||
@public
|
||||
MP4SampleId currentSampleId;
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
#import "MP42AudioConverter.h"
|
||||
#import "MP42BitmapSubConverter.h"
|
||||
|
||||
#import "mp4v2.h"
|
||||
#import "MP42Utilities.h"
|
||||
#import "MP42Track+Muxer.h"
|
||||
|
||||
@implementation MP42Muxer
|
||||
|
||||
- (instancetype)init
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
#import "MP42SubUtilities.h"
|
||||
#import "MP42Languages.h"
|
||||
|
||||
#import "mp4v2.h"
|
||||
#import "MP42Utilities.h"
|
||||
#import "MP42Track+Muxer.h"
|
||||
|
||||
@implementation MP42SrtImporter
|
||||
|
||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError
|
||||
|
||||
File renamed without changes.
@@ -40,6 +40,8 @@
|
||||
MP42Duration _duration;
|
||||
|
||||
NSMutableDictionary *_updatedProperty;
|
||||
|
||||
void *_helper;
|
||||
}
|
||||
|
||||
- (instancetype)initWithSourceURL:(NSURL *)URL trackID:(NSInteger)trackID fileHandle:(MP42FileHandle)fileHandle;
|
||||
|
||||
+14
-20
@@ -13,14 +13,7 @@
|
||||
#import "MP42Fifo.h"
|
||||
#import "MP42Languages.h"
|
||||
|
||||
#import "MP42Track_Muxer.h"
|
||||
|
||||
@interface MP42Track () {
|
||||
|
||||
muxer_helper *_helper;
|
||||
}
|
||||
|
||||
@end
|
||||
#import "MP42Track+Muxer.h"
|
||||
|
||||
@implementation MP42Track
|
||||
|
||||
@@ -93,10 +86,10 @@
|
||||
[copy->_updatedProperty release];
|
||||
copy->_updatedProperty = [_updatedProperty mutableCopy];
|
||||
|
||||
if (_helper) {
|
||||
/*if (_helper) {
|
||||
copy->_helper = calloc(1, sizeof(muxer_helper));
|
||||
copy->_helper->importer = _helper->importer;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
return copy;
|
||||
@@ -352,21 +345,22 @@
|
||||
|
||||
- (MP42SampleBuffer *)copyNextSample {
|
||||
MP42SampleBuffer *sample = nil;
|
||||
muxer_helper * helper = (muxer_helper *)_helper;
|
||||
|
||||
if (_helper->converter) {
|
||||
if ([_helper->importer done])
|
||||
[_helper->converter setInputDone];
|
||||
if (helper->converter) {
|
||||
if ([helper->importer done])
|
||||
[helper->converter setInputDone];
|
||||
|
||||
if ([_helper->converter encoderDone])
|
||||
_helper->done = YES;
|
||||
if ([helper->converter encoderDone])
|
||||
helper->done = YES;
|
||||
|
||||
sample = [_helper->converter copyEncodedSample];
|
||||
sample = [helper->converter copyEncodedSample];
|
||||
} else {
|
||||
if ([_helper->fifo isEmpty] && [_helper->importer done])
|
||||
_helper->done = YES;
|
||||
if ([helper->fifo isEmpty] && [helper->importer done])
|
||||
helper->done = YES;
|
||||
|
||||
if ([_helper->fifo count])
|
||||
sample = [_helper->fifo deque];
|
||||
if ([helper->fifo count])
|
||||
sample = [helper->fifo deque];
|
||||
}
|
||||
|
||||
return sample;
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
#import "MP42Languages.h"
|
||||
#import "MP42File.h"
|
||||
|
||||
#import "mp4v2.h"
|
||||
#import "MP42Utilities.h"
|
||||
#import "MP42Track+Muxer.h"
|
||||
|
||||
@interface SBVobSubSample : NSObject
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
A947BA9B1824F0B3004C734B /* Ratings.json in Resources */ = {isa = PBXBuildFile; fileRef = A947BA9A1824F0B3004C734B /* Ratings.json */; };
|
||||
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, ); }; };
|
||||
A989F1101823B3B40070AD8C /* MP42TextSample.m in Sources */ = {isa = PBXBuildFile; fileRef = A989F10E1823B3B40070AD8C /* MP42TextSample.m */; };
|
||||
A9B9C1F1182391DF00416A4E /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9B9C1F0182391DF00416A4E /* Cocoa.framework */; };
|
||||
@@ -41,7 +41,7 @@
|
||||
A9B9C27A1823923200416A4E /* MP42Fifo.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C22F1823923100416A4E /* MP42Fifo.m */; };
|
||||
A9B9C27B1823923200416A4E /* MP42File.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2301823923100416A4E /* MP42File.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
A9B9C27C1823923200416A4E /* MP42File.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2311823923100416A4E /* MP42File.m */; };
|
||||
A9B9C27D1823923200416A4E /* MP42FileImporter.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2321823923100416A4E /* MP42FileImporter.h */; };
|
||||
A9B9C27D1823923200416A4E /* MP42FileImporter.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2321823923100416A4E /* MP42FileImporter.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
A9B9C27E1823923200416A4E /* MP42FileImporter.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2331823923100416A4E /* MP42FileImporter.m */; };
|
||||
A9B9C27F1823923200416A4E /* MP42H264Importer.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2341823923100416A4E /* MP42H264Importer.h */; };
|
||||
A9B9C2801823923200416A4E /* MP42H264Importer.mm in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2351823923100416A4E /* MP42H264Importer.mm */; };
|
||||
@@ -161,7 +161,7 @@
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
A947BA9A1824F0B3004C734B /* Ratings.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Ratings.json; sourceTree = "<group>"; };
|
||||
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>"; };
|
||||
A989F10E1823B3B40070AD8C /* MP42TextSample.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MP42TextSample.m; sourceTree = "<group>"; };
|
||||
A9B9C1ED182391DF00416A4E /* MP42Foundation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MP42Foundation.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -464,7 +464,7 @@
|
||||
children = (
|
||||
A9B9C2421823923100416A4E /* MP42Muxer.h */,
|
||||
A9B9C2431823923100416A4E /* MP42Muxer.m */,
|
||||
A989F0FF1823AB2E0070AD8C /* MP42Track_Muxer.h */,
|
||||
A989F0FF1823AB2E0070AD8C /* MP42Track+Muxer.h */,
|
||||
A9B9C2481823923100416A4E /* MP42Sample.h */,
|
||||
A9B9C2491823923100416A4E /* MP42Sample.m */,
|
||||
A9B9C22D1823923100416A4E /* MP42ConverterProtocol.h */,
|
||||
@@ -571,12 +571,12 @@
|
||||
A989F10F1823B3B40070AD8C /* MP42TextSample.h in Headers */,
|
||||
A9B9C2831823923200416A4E /* MP42Image.h in Headers */,
|
||||
A9B9C2C41823957800416A4E /* MP42Languages.h in Headers */,
|
||||
A9B9C27D1823923200416A4E /* MP42FileImporter.h in Headers */,
|
||||
A9B9C2911823923200416A4E /* MP42QTImporter.h in Headers */,
|
||||
A9B9C28F1823923200416A4E /* MP42OCRWrapper.h in Headers */,
|
||||
A9B9C2811823923200416A4E /* MP42HtmlParser.h in Headers */,
|
||||
A9B9C2A61823923200416A4E /* downmix.h in Headers */,
|
||||
A9B9C2AA1823923200416A4E /* MatroskaParser.h in Headers */,
|
||||
A9B9C27D1823923200416A4E /* MP42FileImporter.h in Headers */,
|
||||
A9B9C26E1823923200416A4E /* MP42AVFImporter.h in Headers */,
|
||||
A9B9C2791823923200416A4E /* MP42Fifo.h in Headers */,
|
||||
A9B9C2CF182396A100416A4E /* MP42Ratings.h in Headers */,
|
||||
@@ -598,7 +598,7 @@
|
||||
A9B9C29D1823923200416A4E /* MP42Utilities.h in Headers */,
|
||||
A9B9C2661823923200416A4E /* MP42AACImporter.h in Headers */,
|
||||
A9B9C2681823923200416A4E /* MP42AC3Importer.h in Headers */,
|
||||
A989F1001823AB2E0070AD8C /* MP42Track_Muxer.h in Headers */,
|
||||
A989F1001823AB2E0070AD8C /* MP42Track+Muxer.h in Headers */,
|
||||
A9B9C26A1823923200416A4E /* MP42AudioConverter.h in Headers */,
|
||||
A9B9C2A11823923200416A4E /* MP42VobSubImporter.h in Headers */,
|
||||
A9B9C2AC1823923200416A4E /* mbs.h in Headers */,
|
||||
|
||||
BIN
Binary file not shown.
Reference in new issue
Block a user