Exemple #1
0
 /// <summary>
 /// Opens a media file from the specified path.
 /// </summary>
 /// <param name="path">A path to the media file.</param>
 /// <param name="options">The decoder settings.</param>
 /// <returns>The opened <see cref="MediaFile"/>.</returns>
 public static MediaFile Open(string path, MediaOptions options)
 {
     try
     {
         var container = InputContainer.LoadFile(path, options);
         return(new MediaFile(container, options));
     }
     catch (DirectoryNotFoundException)
     {
         throw;
     }
     catch (Exception ex)
     {
         throw new Exception("Failed to open the media file", ex);
     }
 }