se-bastiaan / TorrentStream-Android

A torrent streamer library for Android based on libtorrent4j
Other
343 stars 108 forks source link

Add a blocking InputStream for videos #25

Closed Plunderbund closed 7 years ago

Plunderbund commented 7 years ago

I've added an InputStream filter via Torrent.getVideoStream() which blocks reading the video file until the requested pieces are downloaded.

I've used this to stream the video from an HTTP range request, this prevents sending data which hasn't yet been downloaded to the video player (VLC doesn't like that).