From fadebd39ea19c544a2c214873340d17e7c50480b Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Tue, 5 Jul 2022 14:25:49 -0700 Subject: [PATCH] [FFmpeg Decoder] Enable Metroska and WebM videos Enable playback of video file extensions. Like other video formats handled by the FFmpeg decoder, video streams are dropped in decode and only the first audio stream is played. Signed-off-by: Christopher Snowhill --- Info.plist.template | 36 ++++++++++++++++++++++++++++++++++ Plugins/FFMPEG/FFMPEGDecoder.m | 4 +++- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/Info.plist.template b/Info.plist.template index 977efd9e8..356744342 100644 --- a/Info.plist.template +++ b/Info.plist.template @@ -969,6 +969,24 @@ LSTypeIsPackage + + CFBundleTypeExtensions + + mkv + + CFBundleTypeIconFile + song.icns + CFBundleTypeIconSystemGenerated + 1 + CFBundleTypeName + Matroska Video File + CFBundleTypeRole + Viewer + LSHandlerRank + Default + LSTypeIsPackage + + CFBundleTypeExtensions @@ -987,6 +1005,24 @@ LSTypeIsPackage + + CFBundleTypeExtensions + + webm + + CFBundleTypeIconFile + song.icns + CFBundleTypeIconSystemGenerated + 1 + CFBundleTypeName + WebM Media File + CFBundleTypeRole + Viewer + LSHandlerRank + Default + LSTypeIsPackage + + CFBundleTypeExtensions diff --git a/Plugins/FFMPEG/FFMPEGDecoder.m b/Plugins/FFMPEG/FFMPEGDecoder.m index f00bf2169..e077ac493 100644 --- a/Plugins/FFMPEG/FFMPEGDecoder.m +++ b/Plugins/FFMPEG/FFMPEGDecoder.m @@ -998,7 +998,7 @@ static uint8_t reverse_bits[0x100]; } + (NSArray *)fileTypes { - return @[@"wma", @"asf", @"tak", @"mp4", @"m4a", @"m4b", @"m4r", @"aac", @"mp3", @"mp2", @"m2a", @"mpa", @"ape", @"ac3", @"dts", @"dtshd", @"wav", @"tta", @"vqf", @"vqe", @"vql", @"ra", @"rm", @"rmj", @"mka", @"weba", @"dsf", @"dff", @"iff", @"dsdiff", @"wsd", @"aiff", @"aif"]; + return @[@"wma", @"asf", @"tak", @"mp4", @"m4a", @"m4b", @"m4r", @"aac", @"mp3", @"mp2", @"m2a", @"mpa", @"ape", @"ac3", @"dts", @"dtshd", @"wav", @"tta", @"vqf", @"vqe", @"vql", @"ra", @"rm", @"rmj", @"mka", @"mkv", @"weba", @"webm", @"dsf", @"dff", @"iff", @"dsdiff", @"wsd", @"aiff", @"aif"]; } + (NSArray *)mimeTypes { @@ -1020,7 +1020,9 @@ static uint8_t reverse_bits[0x100]; @[@"TrueVQ Audio File", @"song.icns", @"vqf", @"vqe", @"vql"], @[@"Real Audio File", @"song.icns", @"ra", @"rm", @"rmj"], @[@"Matroska Audio File", @"song.icns", @"mka"], + @[@"Matroska Video File", @"song.icns", @"mkv"], @[@"WebM Audio File", @"song.icns", @"weba"], + @[@"WebM Media File", @"song.icns", @"webm"], @[@"DSD Stream File", @"song.icns", @"dsf"], @[@"Interchange File Format", @"song.icns", @"iff", @"dsdiff"], @[@"Wideband Single-bit Data", @"song.icns", @"wsd"],