diff options
| author | Stanislav Ionascu <stanislav.ionascu@gmail.com> | 2019-10-13 11:21:20 +0200 |
|---|---|---|
| committer | Stanislav Ionascu <stanislav.ionascu@gmail.com> | 2019-11-17 20:56:13 +0100 |
| commit | 9989b7b68fb6d87d3a2bf7f271e8fe0c8c3e41ab (patch) | |
| tree | 7471662374b6bd34b6417a969da9f20f8b425ae3 /MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs | |
| parent | c87f459ec2f0882483716363b35c8a371c00d55a (diff) | |
Replace BDInfo plugin with nupkg and 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 000000000..de9d7cb78 --- /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()); + } + } +} |
