英文:
How to list all files in network share (not just images and videos) with libVLC
问题
I want to use libVLC (C#) to browse network shares.
This works for me, but only for media files (images, videos, etc.)
Media media = new Media(new Uri(networkPath));
var parseTask = media.ParseAsync(_libVLC, MediaParseOptions.FetchNetwork);
Debug.WriteLine($"media.ParseAsync result: {parseTask.GetAwaiter().GetResult()}");
Debug.WriteLine($"media.SubItems.Count result: {media.SubItems.Count}");
Is there a flag or an alternative to Media
class that scans for ALL files in the network share (e.g. txt, docx, pdf, odf files)?
I only need the file content as raw bytes, it is not necessary that libVLC understands the file format.
英文:
I want to use libVLC (C#) to browse network shares.
This works for me, but only for media files (images, videos, etc.)
Media media = new Media(new Uri(networkPath));
var parseTask = media.ParseAsync(_libVLC, MediaParseOptions.FetchNetwork);
Debug.WriteLine($"media.ParseAsync result: {parseTask.GetAwaiter().GetResult()}");
Debug.WriteLine($"media.SubItems.Count result: {media.SubItems.Count}");
Is there a flag or an alternative to Media
class that scans for ALL files in the network share (e.g. txt, docx, pdf, odf files)?
I only need the file content as raw bytes, it is not necessary that libVLC understands the file format.
答案1
得分: 2
VLC是用于播放媒体的,而不是用于浏览Samba共享的。
我建议您尝试查看它们正在使用的库:https://github.com/sahlberg/libsmb2
也许您可以通过P/Invoke来使用它?
英文:
VLC is made to play media, not to be a samba share browser.
I'd recommend that you try to look into the library they're using : https://github.com/sahlberg/libsmb2
Maybe you'll be able to use it through P/Invoke ?
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论