Merged galad87/mp42foundation into master
This commit is contained in:
commit
a8890639f9
5 files changed
+36
-16
No files matched your search
@@ -52,7 +52,7 @@ typedef struct AudioFileIO
|
|||||||
|
|
||||||
@property (nonatomic, readonly) NSUInteger bitrate;
|
@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 *> *inputSamplesBuffer;
|
||||||
@property (nonatomic, readonly) MP42Fifo<MP42SampleBuffer *> *outputSamplesBuffer;
|
@property (nonatomic, readonly) MP42Fifo<MP42SampleBuffer *> *outputSamplesBuffer;
|
||||||
|
|
||||||
@@ -257,9 +257,9 @@ typedef struct AudioFileIO
|
|||||||
|
|
||||||
- (void)start
|
- (void)start
|
||||||
{
|
{
|
||||||
_decoderThread = [[NSThread alloc] initWithTarget:self selector:@selector(threadMainRoutine) object:nil];
|
_thread = [[NSThread alloc] initWithTarget:self selector:@selector(threadMainRoutine) object:nil];
|
||||||
[_decoderThread setName:@"AudioToolbox Audio Encoder"];
|
[_thread setName:@"FFmpeg Audio Encoder"];
|
||||||
[_decoderThread start];
|
[_thread start];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - Public methods
|
#pragma mark - Public methods
|
||||||
|
|||||||
+17
-5
@@ -384,13 +384,25 @@
|
|||||||
- (NSString *)stringFromArray:(NSArray<NSDictionary *> *)array key:(id)key {
|
- (NSString *)stringFromArray:(NSArray<NSDictionary *> *)array key:(id)key {
|
||||||
NSMutableString *result = [NSMutableString string];
|
NSMutableString *result = [NSMutableString string];
|
||||||
|
|
||||||
for (NSDictionary *name in array) {
|
if ([array isKindOfClass:[NSArray class]]) {
|
||||||
|
|
||||||
if (result.length) {
|
for (id name in array) {
|
||||||
[result appendString:@", "];
|
|
||||||
|
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];
|
return [[result copy] autorelease];
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ typedef struct AudioFileIO
|
|||||||
@property (nonatomic, readonly) AudioConverterRef encoder;
|
@property (nonatomic, readonly) AudioConverterRef encoder;
|
||||||
@property (nonatomic, readonly) NSUInteger bitrate;
|
@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 *> *inputSamplesBuffer;
|
||||||
@property (nonatomic, readonly) MP42Fifo<MP42SampleBuffer *> *outputSamplesBuffer;
|
@property (nonatomic, readonly) MP42Fifo<MP42SampleBuffer *> *outputSamplesBuffer;
|
||||||
|
|
||||||
@@ -291,9 +291,9 @@ typedef struct AudioFileIO
|
|||||||
|
|
||||||
- (void)start
|
- (void)start
|
||||||
{
|
{
|
||||||
_decoderThread = [[NSThread alloc] initWithTarget:self selector:@selector(threadMainRoutine) object:nil];
|
_thread = [[NSThread alloc] initWithTarget:self selector:@selector(threadMainRoutine) object:nil];
|
||||||
[_decoderThread setName:@"AudioToolbox Audio Encoder"];
|
[_thread setName:@"AudioToolbox Audio Encoder"];
|
||||||
[_decoderThread start];
|
[_thread start];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - Public methods
|
#pragma mark - Public methods
|
||||||
|
|||||||
+10
-2
@@ -324,8 +324,16 @@
|
|||||||
- (NSMutableArray<NSString *> *)stringArrayFromDictionaryArray:(NSArray<NSDictionary *> *)array key:(id)key {
|
- (NSMutableArray<NSString *> *)stringArrayFromDictionaryArray:(NSArray<NSDictionary *> *)array key:(id)key {
|
||||||
NSMutableArray *result = [NSMutableArray array];
|
NSMutableArray *result = [NSMutableArray array];
|
||||||
|
|
||||||
for (NSDictionary *name in array) {
|
if ([array isKindOfClass:[NSArray class]]) {
|
||||||
[result addObject:name[key]];
|
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];
|
return [result copy];
|
||||||
|
|||||||
+1
-1
Submodule contrib updated: e9270b2f75...b6bb6e02ca.
Reference in new issue
Block a user