Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The video server should be rewritten so it's using Twisted #2391

Closed
devos50 opened this issue Jun 30, 2016 · 7 comments
Closed

The video server should be rewritten so it's using Twisted #2391

devos50 opened this issue Jun 30, 2016 · 7 comments

Comments

@devos50
Copy link
Contributor

devos50 commented Jun 30, 2016

Our current video server is dependent on VideoPlayer which in turn is dependent on the wx GUI. Moreover, the video server contains a lot of blocking code (time.sleep and threading.event occurrences), making the reactor and Tribler block when the user watches a video.

This video server should be rewritten in Twisted, making use of a static File object. The following should happen when a request to this video server is made:

  • we should intercept the range in the request. This range should be converted to the offset of the requested file in bytes. If these bytes are available, just return the File object immediately. If they are not available, set the download priority of these bytes to the maximum and return a deferred that fires when these bytes are available.
  • also, when a request comes in, we should check which file is requested and set the priority of other files on this download to zero.
@brussee
Copy link
Member

brussee commented Jul 16, 2016

@synctext So until this complete rewrite is done, we don't have a video server that will work on Android.

@synctext
Copy link
Member

ai, bummer. @brussee
have you browsed the previously running code of various other projects? Three groups got it working.

One I could find quickly:
https://github.com/synctext/bsc-project/blob/master/Work/vlc-android/src/com/tudelft/triblersvod/example/TorrentVideoPlayerActivity.java

Seek is more complex then linear download. better then download full and play. But first document existing code...

@synctext
Copy link
Member

@synctext
Copy link
Member

tsap codebase with rpc calls for streaming:
https://github.com/wtud/tsap/blob/master/tsap/src/org/videolan/libvlc/LibVLC.java

btw refreshing to see all this old code..

@devos50
Copy link
Contributor Author

devos50 commented Jul 17, 2016

@brussee I'm pretty sure that the video player works with the Twistd plugin (recently checked). I was probably confused about the 'VideoPlayer' class being dependent on the GUI but iirc, it works without. Can you try it? Just use curl or wget to test it.

@devos50 devos50 modified the milestones: Backlog, New GUI Nov 19, 2016
@ichorid
Copy link
Contributor

ichorid commented Jun 12, 2020

Probably fixed in #5301

@ichorid ichorid closed this as completed Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants