Add MXF to VideoViewer

This commit is contained in:
Paddy Xu
2020-08-16 12:22:38 +02:00
parent 41b42d81e9
commit eae1caa875
2 changed files with 19 additions and 21 deletions

View File

@@ -27,19 +27,18 @@ namespace QuickLook.Plugin.ImageViewer
{ {
public class Plugin : IViewer public class Plugin : IViewer
{ {
private static readonly HashSet<string> Formats = new HashSet<string>( private static readonly HashSet<string> Formats = new HashSet<string>(new[]
new[] {
{ // camera raw
// camera raw ".ari", ".arw", ".bay", ".crw", ".cr2", ".cap", ".dcs", ".dcr", ".dng", ".drf", ".eip", ".erf", ".fff",
".ari", ".arw", ".bay", ".crw", ".cr2", ".cap", ".dcs", ".dcr", ".dng", ".drf", ".eip", ".erf", ".exr", ".iiq", ".k25", ".kdc", ".mdc", ".mef", ".mos", ".mrw", ".nef", ".nrw", ".obm", ".orf", ".pef", ".ptx",
".fff", ".iiq", ".k25", ".kdc", ".mdc", ".mef", ".mos", ".mrw", ".nef", ".nrw", ".obm", ".orf", ".pef", ".pxn", ".r3d", ".raf", ".raw", ".rwl", ".rw2", ".rwz", ".sr2", ".srf", ".srw", ".x3f",
".ptx", ".pxn", ".r3d", ".raf", ".raw", ".rwl", ".rw2", ".rwz", ".sr2", ".srf", ".srw", ".x3f", // normal
// normal ".bmp", ".hdr", ".heic", ".heif", ".ico", ".icon", ".jpg", ".jpeg", ".psd", ".wdp", ".tif", ".tiff",
".bmp", ".hdr", ".heic", ".heif", ".ico", ".icon", ".jpg", ".jpeg", ".psd", ".wdp", ".tif", ".tiff", ".tga", ".webp", ".pbm", ".pgm", ".ppm", ".pnm", ".svg", ".emf", ".wmf", ".exr",
".tga", ".webp", ".pbm", ".pgm", ".ppm", ".pnm", ".svg", ".emf", ".wmf", // animated
// animated ".png", ".apng", ".gif"
".png", ".apng", ".gif" });
});
private ImagePanel _ip; private ImagePanel _ip;
private MetaProvider _meta; private MetaProvider _meta;

View File

@@ -16,8 +16,8 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq;
using System.Reflection; using System.Reflection;
using System.Windows; using System.Windows;
using MediaInfo; using MediaInfo;
@@ -27,16 +27,16 @@ namespace QuickLook.Plugin.VideoViewer
{ {
public class Plugin : IViewer public class Plugin : IViewer
{ {
private static readonly string[] Formats = private static readonly HashSet<string> Formats = new HashSet<string>(new[]
{ {
// video // video
".3g2", ".3gp", ".3gp2", ".3gpp", ".amv", ".asf", ".asf", ".avi", ".flv", ".mts", ".m2ts", ".m4v", ".mkv", ".3g2", ".3gp", ".3gp2", ".3gpp", ".amv", ".asf", ".asf", ".avi", ".flv", ".mts", ".m2ts", ".m4v", ".mkv",
".mov", ".mp4", ".mp4v", ".mpeg", ".mpg", ".ogv", ".qt", ".tp", ".ts", ".vob", ".webm", ".wmv", ".mov", ".mp4", ".mp4v", ".mpeg", ".mpg", ".ogv", ".qt", ".tp", ".ts", ".vob", ".webm", ".wmv", ".mxf",
// audio // audio
".3gp", ".aa", ".aac", ".aax", ".act", ".aif", ".aiff", ".amr", ".ape", ".au", ".awb", ".dct", ".dss", ".dvf", ".3gp", ".aa", ".aac", ".aax", ".act", ".aif", ".aiff", ".amr", ".ape", ".au", ".awb", ".dct", ".dss",
".flac", ".gsm", ".iklax", ".ivs", ".m4a", ".m4b", ".m4p", ".m4r", ".mmf", ".mp3", ".mpc", ".msv", ".ogg", ".dvf", ".flac", ".gsm", ".iklax", ".ivs", ".m4a", ".m4b", ".m4p", ".m4r", ".mmf", ".mp3", ".mpc", ".msv",
".oga", ".mogg", ".opus", ".ra", ".rm", ".raw", ".tta", ".vox", ".wav", ".wma", ".wv", ".webm" ".ogg", ".oga", ".mogg", ".opus", ".ra", ".rm", ".raw", ".tta", ".vox", ".wav", ".wma", ".wv", ".webm"
}; });
private ContextObject _context; private ContextObject _context;
private MediaInfo.MediaInfo _mediaInfo; private MediaInfo.MediaInfo _mediaInfo;
@@ -67,7 +67,6 @@ namespace QuickLook.Plugin.VideoViewer
_mediaInfo.Option("Cover_Data", "base64"); _mediaInfo.Option("Cover_Data", "base64");
_mediaInfo.Open(path); _mediaInfo.Open(path);
} }
catch (Exception) catch (Exception)
{ {