Removed a duplicated list of supported formats.
This commit is contained in:
1 parent
5d9890e5f4
commit
45fc71d337
2 files changed
+8
-16
No files matched your search
+1
-4
@@ -41,10 +41,7 @@
|
|||||||
|
|
||||||
- (BOOL)canAddTrack:(MP42Track *)track
|
- (BOOL)canAddTrack:(MP42Track *)track
|
||||||
{
|
{
|
||||||
NSArray *supportedFormats = @[MP42VideoFormatH264, MP42VideoFormatMPEG4Visual, MP42VideoFormatJPEG,
|
if (isTrackMuxable(track.format)) {
|
||||||
MP42AudioFormatAAC, MP42AudioFormatAC3, MP42AudioFormatALAC, MP42AudioFormatDTS,
|
|
||||||
MP42SubtitleFormatTx3g, MP42SubtitleFormatVobSub, MP42ClosedCaptionFormatCEA608];
|
|
||||||
if ([supportedFormats containsObject:track.format]) {
|
|
||||||
return YES;
|
return YES;
|
||||||
if ([track isMemberOfClass:[MP42AudioTrack class]]) {
|
if ([track isMemberOfClass:[MP42AudioTrack class]]) {
|
||||||
// TO-DO Check if we can initialize the audio converter
|
// TO-DO Check if we can initialize the audio converter
|
||||||
|
|||||||
+7
-12
@@ -61,23 +61,18 @@ BOOL isFileFormatSupported(NSString * fileExt) {
|
|||||||
|
|
||||||
BOOL isTrackMuxable(NSString *formatName)
|
BOOL isTrackMuxable(NSString *formatName)
|
||||||
{
|
{
|
||||||
NSArray* supportedFormats = [NSArray arrayWithObjects:MP42VideoFormatH264, MP42VideoFormatMPEG4Visual, MP42AudioFormatAAC, MP42AudioFormatALAC, MP42AudioFormatAC3, MP42AudioFormatDTS, MP42SubtitleFormatTx3g, MP42SubtitleFormatText, MP42ClosedCaptionFormatCEA608, MP42VideoFormatJPEG, MP42SubtitleFormatVobSub, nil];
|
NSArray *supportedFormats = @[MP42VideoFormatH264, MP42VideoFormatMPEG4Visual, MP42AudioFormatAAC, MP42AudioFormatALAC,
|
||||||
|
MP42AudioFormatAC3, MP42AudioFormatDTS, MP42SubtitleFormatTx3g, MP42SubtitleFormatText,
|
||||||
|
MP42ClosedCaptionFormatCEA608, MP42VideoFormatJPEG, MP42SubtitleFormatVobSub];
|
||||||
|
|
||||||
for (NSString* type in supportedFormats)
|
return [supportedFormats containsObject:formatName];
|
||||||
if ([formatName isEqualToString:type])
|
|
||||||
return YES;
|
|
||||||
|
|
||||||
return NO;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL trackNeedConversion(NSString *formatName) {
|
BOOL trackNeedConversion(NSString *formatName) {
|
||||||
NSArray* supportedConversionFormats = [NSArray arrayWithObjects:MP42AudioFormatVorbis, MP42AudioFormatFLAC, MP42AudioFormatMP3, MP42AudioFormatTrueHD, MP42SubtitleFormatSSA, MP42SubtitleFormatText, MP42SubtitleFormatPGS, nil];
|
NSArray *supportedConversionFormats = @[MP42AudioFormatVorbis, MP42AudioFormatFLAC, MP42AudioFormatMP3,
|
||||||
|
MP42AudioFormatTrueHD, MP42SubtitleFormatSSA, MP42SubtitleFormatText, MP42SubtitleFormatPGS];
|
||||||
|
|
||||||
for (NSString* type in supportedConversionFormats)
|
return [supportedConversionFormats containsObject:formatName];
|
||||||
if ([formatName isEqualToString:type])
|
|
||||||
return YES;
|
|
||||||
|
|
||||||
return NO;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int isHdVideo(uint64_t width, uint64_t height)
|
int isHdVideo(uint64_t width, uint64_t height)
|
||||||
|
|||||||
Reference in new issue
Block a user