diff options
| author | dkanada <dkanada@users.noreply.github.com> | 2019-12-28 04:16:45 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-28 04:16:45 +0900 |
| commit | b3963058dbb324d8c7527573da24251a16deedbc (patch) | |
| tree | e665a1f31353b515d546bcb2ce65c8ffc61cf3e9 /MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs | |
| parent | 5bf0eb2b0ef29a9398d638a910e2cd3945331252 (diff) | |
| parent | 9989b7b68fb6d87d3a2bf7f271e8fe0c8c3e41ab (diff) | |
Merge pull request #1891 from stanionascu/bdinfo-uhd
Upgrade BDInfo plugin to UHD/Atmos/DTS:X support
Diffstat (limited to 'MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs')
| -rw-r--r-- | MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs b/MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs new file mode 100644 index 0000000000..de9d7cb784 --- /dev/null +++ b/MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs @@ -0,0 +1,40 @@ +using MediaBrowser.Model.IO; + +namespace MediaBrowser.MediaEncoding.BdInfo +{ + class BdInfoFileInfo : BDInfo.IO.IFileInfo + { + IFileSystem _fileSystem = null; + + FileSystemMetadata _impl = null; + + public string Name => _impl.Name; + + public string FullName => _impl.FullName; + + public string Extension => _impl.Extension; + + public long Length => _impl.Length; + + public bool IsDir => _impl.IsDirectory; + + public BdInfoFileInfo(IFileSystem fileSystem, FileSystemMetadata impl) + { + _fileSystem = fileSystem; + _impl = impl; + } + + public System.IO.Stream OpenRead() + { + return _fileSystem.GetFileStream(FullName, + FileOpenMode.Open, + FileAccessMode.Read, + FileShareMode.Read); + } + + public System.IO.StreamReader OpenText() + { + return new System.IO.StreamReader(OpenRead()); + } + } +} |
