-
Notifications
You must be signed in to change notification settings - Fork 215
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
Use Twisted for VLC communication #353
Conversation
Rationale: asyncore/asynchat are deprecated since Python 3.6 and are going to be removed from the standard library from Python 3.10. It is unclear if these libraries will be picked up by maintainers and independently published on PyPI. At the moment, we are working on replacing them, in this commit with Twisted LineReceiver. Known issues: does not work with GUI. There is a conflict with qt5reactor -> "QSocketNotifier: Can only be used with threads started with QThread".
Sending the call to transport.write wrapped in a self.reactor.callFromThread instead of directly does the trick. Include also fixes to allow correct quit of VLC and Syncplay when either one is closed. Known issues: there is a noticeable lag (~ 1 second) between the start of Syncplay MainWindow and the start of VLC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember writing this a year ago... I if I recall this correctly, preliminary tests on macOS worked fine, but this MR should be extensively tested on all the other platforms.
Also, there is this note in one of the commit messages that probably deserves an investigation:
Known issues: there is a noticeable lag (~ 1 second) between the start of Syncplay MainWindow and the start of VLC.
It's slightly faster than that for me on Windows - there is only usually a notable delay if I'm running VLC for the first time. |
Thanks for your work on this Alberto. |
* Port VLCPlayer from asyncore/asynchat to Twisted Rationale: asyncore/asynchat are deprecated since Python 3.6 and are going to be removed from the standard library from Python 3.10. It is unclear if these libraries will be picked up by maintainers and independently published on PyPI. At the moment, we are working on replacing them, in this commit with Twisted LineReceiver. Known issues: does not work with GUI. There is a conflict with qt5reactor -> "QSocketNotifier: Can only be used with threads started with QThread". * Fix QSocketNotifier issue with qt5reactor Sending the call to transport.write wrapped in a self.reactor.callFromThread instead of directly does the trick. Include also fixes to allow correct quit of VLC and Syncplay when either one is closed. Known issues: there is a noticeable lag (~ 1 second) between the start of Syncplay MainWindow and the start of VLC. * Re-add try/except to VLC * Bring back missing try Co-authored-by: Alberto Sottile <alby128@gmail.com>
* Port VLCPlayer from asyncore/asynchat to Twisted Rationale: asyncore/asynchat are deprecated since Python 3.6 and are going to be removed from the standard library from Python 3.10. It is unclear if these libraries will be picked up by maintainers and independently published on PyPI. At the moment, we are working on replacing them, in this commit with Twisted LineReceiver. Known issues: does not work with GUI. There is a conflict with qt5reactor -> "QSocketNotifier: Can only be used with threads started with QThread". * Fix QSocketNotifier issue with qt5reactor Sending the call to transport.write wrapped in a self.reactor.callFromThread instead of directly does the trick. Include also fixes to allow correct quit of VLC and Syncplay when either one is closed. Known issues: there is a noticeable lag (~ 1 second) between the start of Syncplay MainWindow and the start of VLC. * Re-add try/except to VLC * Bring back missing try Co-authored-by: Alberto Sottile <alby128@gmail.com>
This may have broken VLC support for some, my friend coudn't use VLC with Syncplay v1.6.6 anymore. Syncplay would just simply not find the running VLC instance and it behaved as nothing was connected. Downgrading to v1.6.5 fixed it. Let me know if you would rather have me make a issue about it |
@smiba Thanks for bringing this to our attention. It would be helpful if you could create a new issue about this which includes the following information:
|
No description provided.