[Android] Using libvlc to resolve NetBIOS names

Tommy Tran tommy at tranfamily.me
Sun Nov 19 04:06:05 CET 2017


I’m using libvlc’s MediaDiscover to discover SMB shares on the LAN. The Media instance I got back through onMediaAdded has the uri of the form smb://servername/ <smb://servername/>. Unfortunately, on some Android device, the netbios names can’t be resolved. I know libVLC itself can resolve the netbios name internally somehow since if I pass smb://servername/file <smb://servername/file> to vlc’s MediaPlayer instance, it can play the file fine. I need to resolve the netbios names outside of libvlc since I’m using JCIFS and it throws UnknownHostException when servername is a netbios name and it works fine when servername is an actual IP address.

Is there any way to have libvlc resolve the netbios name for me so that I don’t have to pull in another dependency just to resolve the netbios host names?  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/android/attachments/20171118/ec0784a6/attachment.html>


More information about the Android mailing list