diff options
Diffstat (limited to 'macosx/HandBrake Tests/HBMockTitle.m')
-rw-r--r-- | macosx/HandBrake Tests/HBMockTitle.m | 62 |
1 files changed, 24 insertions, 38 deletions
diff --git a/macosx/HandBrake Tests/HBMockTitle.m b/macosx/HandBrake Tests/HBMockTitle.m index 9cfd374a3..217f56bfc 100644 --- a/macosx/HandBrake Tests/HBMockTitle.m +++ b/macosx/HandBrake Tests/HBMockTitle.m @@ -1,10 +1,8 @@ -// -// HBMockTitle.m -// HandBrake -// -// Created by Damiano Galassi on 30/05/15. -// -// +/* HBMockTitle + + This file is part of the HandBrake source code. + Homepage: <http://handbrake.fr/>. + It may be used under the terms of the GNU General Public License. */ #import "HBMockTitle.h" #import "HBChapter.h" @@ -119,48 +117,36 @@ extern NSString *keySubTrackType; { NSMutableArray *tracks = [NSMutableArray array]; [tracks addObject: @{keyAudioTrackIndex: @1, - keyAudioTrackName: [NSString stringWithFormat: @"%d: %s", 1, "English"], + keyAudioTrackName: [NSString stringWithFormat: @"%d: %s", 0, "English"], keyAudioInputBitrate: @104, keyAudioInputSampleRate: @48000, keyAudioInputCodec: @65536, keyAudioInputCodecParam: @86018, keyAudioInputChannelLayout: @3, keyAudioTrackLanguageIsoCode: @"eng"}]; + + [tracks addObject: @{keyAudioTrackIndex: @2, + keyAudioTrackName: [NSString stringWithFormat: @"%d: %s", 1, "Italian"], + keyAudioInputBitrate: @104, + keyAudioInputSampleRate: @48000, + keyAudioInputCodec: @65536, + keyAudioInputCodecParam: @86018, + keyAudioInputChannelLayout: @3, + keyAudioTrackLanguageIsoCode: @"ita"}]; return [tracks copy]; } - (NSArray *)subtitlesTracks { - /*if (!_subtitlesTracks) - { - NSMutableArray *tracks = [NSMutableArray array]; - hb_subtitle_t *subtitle; - hb_list_t *list = self.hb_title->list_subtitle; - int count = hb_list_count(list); - - for (int i = 0; i < count; i++) - { - subtitle = (hb_subtitle_t *) hb_list_item(self.hb_title->list_subtitle, i); - - // Human-readable representation of subtitle->source - NSString *bitmapOrText = subtitle->format == PICTURESUB ? @"Bitmap" : @"Text"; - NSString *subSourceName = @(hb_subsource_name(subtitle->source)); - - // Use the native language name if available - iso639_lang_t *language = lang_for_code2(subtitle->iso639_2); - NSString *nativeLanguage = strlen(language->native_name) ? @(language->native_name) : @(language->eng_name); - - // create a dictionary of source subtitle information to store in our array - [tracks addObject:@{keySubTrackName: [NSString stringWithFormat:@"%d: %@ (%@) (%@)", i, nativeLanguage, bitmapOrText, subSourceName], - keySubTrackType: @(subtitle->source), - keySubTrackLanguage: nativeLanguage, - keySubTrackLanguageIsoCode: @(subtitle->iso639_2)}]; - } - - _subtitlesTracks = [tracks copy]; - }*/ - - return nil; + NSMutableArray *tracks = [NSMutableArray array]; + NSString *nativeLanguage = @"English"; + + // create a dictionary of source subtitle information to store in our array + [tracks addObject:@{keySubTrackName: [NSString stringWithFormat:@"%d: %@ (%@) (%@)", 0, nativeLanguage, @"Bitmap", @"VobSub"], + keySubTrackType: @0, + keySubTrackLanguageIsoCode: @"eng"}]; + + return [tracks copy]; } - (NSArray<HBChapter *> *)chapters |