[Android] question about code structure to make modifications to vlc to support asset loading

Kevin Whitaker kevin at lisnr.com
Thu Dec 17 16:54:15 CET 2015


I've been recently trying to solve to problem of how to get vlc to play
files included in the assets folder of an android application. Some things
I've found out are that assets never leave the apk file after install and
that any android api will only give you an inputstream or file descriptor
for an asset. I thought having a fd would be great since it seems vlc
supports loading from those, but the trick is the fd the android api gives
is the fd for the whole apk, not the individual asset file. The expectation
is you take the offset and length they give you to grab the right bytes. So
the problem now is that I don't see a way to feed vlc a fd plus a offset
and length to pull from. I'm trying to see what kind of changes I'd need to
make to vlc code to make this happen and was hoping someone here could help
point me to the right spot. I thought posix/filesystem.c would be the right
spot, but none of the methods looked like the ones related to reading from
a fd. Thanks to anyone willing to help me.

-- 


*Kevin Whitaker*
Application Engineer |
*LISNR*
kevin at lisnr.com

  website <http://www.lisnr.com/> | twitter <http://twitter.com/lisnr> |
facebook <http://facebook.com/getlisnr>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/android/attachments/20151217/c0ab6230/attachment.html>


More information about the Android mailing list