Made some more header files public to let Subler compiles.

This commit is contained in:
Damiano Galassi committed 2013-11-16 12:57:17 +01:00
1 parent 541f4a6513
commit 30564b6469
19 files changed
+117 -46

No files matched your search

+4
View File
@@ -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>
+1 -6
View File
@@ -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
+4
View File
@@ -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
View File
@@ -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
{
+1 -5
View File
@@ -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;
+5 -3
View File
@@ -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
+4
View File
@@ -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 -2
View File
@@ -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;
+7 -1
View File
@@ -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";
+4
View File
@@ -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 {
+4
View File
@@ -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;
+4
View File
@@ -13,6 +13,10 @@
#import "MP42AudioConverter.h"
#import "MP42BitmapSubConverter.h"
#import "mp4v2.h"
#import "MP42Utilities.h"
#import "MP42Track+Muxer.h"
@implementation MP42Muxer
- (instancetype)init
+4
View File
@@ -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.
+2
View File
@@ -40,6 +40,8 @@
MP42Duration _duration;
NSMutableDictionary *_updatedProperty;
void *_helper;
}
- (instancetype)initWithSourceURL:(NSURL *)URL trackID:(NSInteger)trackID fileHandle:(MP42FileHandle)fileHandle;
+14 -20
View File
@@ -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;
+3
View File
@@ -11,6 +11,9 @@
#import "MP42Languages.h"
#import "MP42File.h"
#import "mp4v2.h"
#import "MP42Utilities.h"
#import "MP42Track+Muxer.h"
@interface SBVobSubSample : NSObject
{