C# Class MediaPortal.Plugins.MovingPictures.LocalMediaManagement.VideoUtility

Utility class for video related methods
Mostra file Open project: damienhaynes/moving-pictures Class Usage Examples

Public Methods

Method Description
FindFeatureFilm ( List files ) : string

Finds the most optimal file in a collection of files. Uses the aspect ratio, resolution, audio channel count, and duration to find the file

GetMediaInfo ( string videoPath ) : MediaInfoWrapper

Returns a MediaInfoWrapper for the given video path

GetVideoFileCount ( DirectoryInfo folder ) : int

Get the number of video files (excluding sample files) that are in a folder

GetVideoFilesRecursive ( DirectoryInfo directory ) : List

Get all video files from directory and it's subdirectories.

GetVideoFormat ( string path ) : VideoFormat

Returns the videoformat that matches the given path

GetVideoPath ( string driveletter ) : string

Returns the video path (in case of a known video disc format) or just the driveletter

IsVideoDisc ( string path ) : bool

Gets a value indicating wether the supplied path validates as a video DISC format (DVD, Bluray, HDDVD or SVCD)

IsVideoFile ( FileInfo fileInfo ) : bool
IsVideoFile ( string path ) : bool

Gets a value indicating whether the supplied path validates as a video file

isSampleFile ( FileInfo file ) : bool

Check if the file is classified as a video sample file

Method Details

FindFeatureFilm() public static method

Finds the most optimal file in a collection of files. Uses the aspect ratio, resolution, audio channel count, and duration to find the file
public static FindFeatureFilm ( List files ) : string
files List
return string

GetMediaInfo() public static method

Returns a MediaInfoWrapper for the given video path
public static GetMediaInfo ( string videoPath ) : MediaInfoWrapper
videoPath string path to the video
return MediaInfoWrapper

GetVideoFileCount() public static method

Get the number of video files (excluding sample files) that are in a folder
public static GetVideoFileCount ( DirectoryInfo folder ) : int
folder System.IO.DirectoryInfo the directory to count video files in
return int

GetVideoFilesRecursive() public static method

Get all video files from directory and it's subdirectories.
public static GetVideoFilesRecursive ( DirectoryInfo directory ) : List
directory System.IO.DirectoryInfo
return List

GetVideoFormat() public static method

Returns the videoformat that matches the given path
public static GetVideoFormat ( string path ) : VideoFormat
path string
return VideoFormat

GetVideoPath() public static method

Returns the video path (in case of a known video disc format) or just the driveletter
public static GetVideoPath ( string driveletter ) : string
driveletter string drive that will be checked
return string

IsVideoDisc() public static method

Gets a value indicating wether the supplied path validates as a video DISC format (DVD, Bluray, HDDVD or SVCD)
public static IsVideoDisc ( string path ) : bool
path string filepath to validate
return bool

IsVideoFile() public static method

public static IsVideoFile ( FileInfo fileInfo ) : bool
fileInfo System.IO.FileInfo
return bool

IsVideoFile() public static method

Gets a value indicating whether the supplied path validates as a video file
public static IsVideoFile ( string path ) : bool
path string filepath to validate
return bool

isSampleFile() public static method

Check if the file is classified as a video sample file
public static isSampleFile ( FileInfo file ) : bool
file System.IO.FileInfo file to check
return bool