Merged galad87/mp42foundation into master

This commit is contained in:
Brian Gerfort committed 2017-05-10 11:21:56 +02:00
commit a8890639f9
5 files changed
+36 -16

No files matched your search

+4 -4
View File
@@ -52,7 +52,7 @@ typedef struct AudioFileIO
@property (nonatomic, readonly) NSUInteger bitrate;
@property (nonatomic, readonly) NSThread *decoderThread;
@property (nonatomic, readonly) NSThread *thread;
@property (nonatomic, readonly) MP42Fifo<MP42SampleBuffer *> *inputSamplesBuffer;
@property (nonatomic, readonly) MP42Fifo<MP42SampleBuffer *> *outputSamplesBuffer;
@@ -257,9 +257,9 @@ typedef struct AudioFileIO
- (void)start
{
_decoderThread = [[NSThread alloc] initWithTarget:self selector:@selector(threadMainRoutine) object:nil];
[_decoderThread setName:@"AudioToolbox Audio Encoder"];
[_decoderThread start];
_thread = [[NSThread alloc] initWithTarget:self selector:@selector(threadMainRoutine) object:nil];
[_thread setName:@"FFmpeg Audio Encoder"];
[_thread start];
}
#pragma mark - Public methods
+17 -5
View File
@@ -384,13 +384,25 @@
- (NSString *)stringFromArray:(NSArray<NSDictionary *> *)array key:(id)key {
NSMutableString *result = [NSMutableString string];
for (NSDictionary *name in array) {
if ([array isKindOfClass:[NSArray class]]) {
if (result.length) {
[result appendString:@", "];
for (id name in array) {
if (result.length) {
[result appendString:@", "];
}
if ([name isKindOfClass:[NSDictionary class]]) {
[result appendString:name[key]];
}
else if ([name isKindOfClass:[NSString class]]) {
[result appendString:name];
}
}
[result appendString:name[key]];
}
else if ([array isKindOfClass:[NSString class]]) {
NSString *name = (NSString *)array;
[result appendString:name];
}
return [[result copy] autorelease];
+4 -4
View File
@@ -48,7 +48,7 @@ typedef struct AudioFileIO
@property (nonatomic, readonly) AudioConverterRef encoder;
@property (nonatomic, readonly) NSUInteger bitrate;
@property (nonatomic, readonly) NSThread *decoderThread;
@property (nonatomic, readonly) NSThread *thread;
@property (nonatomic, readonly) MP42Fifo<MP42SampleBuffer *> *inputSamplesBuffer;
@property (nonatomic, readonly) MP42Fifo<MP42SampleBuffer *> *outputSamplesBuffer;
@@ -291,9 +291,9 @@ typedef struct AudioFileIO
- (void)start
{
_decoderThread = [[NSThread alloc] initWithTarget:self selector:@selector(threadMainRoutine) object:nil];
[_decoderThread setName:@"AudioToolbox Audio Encoder"];
[_decoderThread start];
_thread = [[NSThread alloc] initWithTarget:self selector:@selector(threadMainRoutine) object:nil];
[_thread setName:@"AudioToolbox Audio Encoder"];
[_thread start];
}
#pragma mark - Public methods
+10 -2
View File
@@ -324,8 +324,16 @@
- (NSMutableArray<NSString *> *)stringArrayFromDictionaryArray:(NSArray<NSDictionary *> *)array key:(id)key {
NSMutableArray *result = [NSMutableArray array];
for (NSDictionary *name in array) {
[result addObject:name[key]];
if ([array isKindOfClass:[NSArray class]]) {
for (NSDictionary *dict in array) {
if ([dict isKindOfClass:[NSDictionary class]]) {
[result addObject:dict[key]];
}
}
}
else if ([array isKindOfClass:[NSString class]]) {
NSString *name = (NSString *)array;
[result addObject:name];
}
return [result copy];
+1 -1
Submodule contrib updated: e9270b2f75...b6bb6e02ca.