[coil-video] Support MediaDataSource
implementations
#1790
Labels
enhancement
New feature or request
MediaDataSource
implementations
#1790
Is your feature request related to a problem? Please describe.
Currently Coil-Video only supports a small range of inputs (see
MediaMetadataRetriever.setDataSource(...)
and if I understand it correctly with a fallback that writes a whole file to disk that is way to slow for large files like videos. In my case the files are encrypted, therefor they cannot directly be used by coil.Describe the solution you'd like
I have a
MediaDataSource
implementation that handles the decryption on the fly. However, I haven’t found a way to pass it down to coil without extending Coil's image pipeline by adding a class that is similar toVideoFrameDecoder
but forwards theMediaDataSource
to theMediaMetadataRetriever
.I just barely checked the code base, so there could be better solutions. The
VideoFrameDecoder
would need to recognizeMediaDataSource
to apply them directly. I think this could be done by adding anImageSource
that acceptsMediaDataSource
as parameter.I have seen issue #25 so this new API would only be available on > API 23.
Additional context
While I was able to implement this myself by mostly copying
VideoFrameDecoder
, I think it would be nice to see support upstream.The text was updated successfully, but these errors were encountered: