Created
July 14, 2018 05:13
-
-
Save robozman/5e7d31a3583a2870f2c35a8d49cf4fa8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Python script to test libvisplaygui | |
# Compile libvisplaygui first | |
# Then run this script in the visplay directory with 'python -i qt_test.py' | |
# You can then make use of other library functions | |
# ex: libvisplaygui.open_media(file_path) | |
import libvisplaygui | |
import threading | |
#from time import sleep | |
barrier = threading.Barrier(2) | |
def callback(): | |
print("HELLO FROM C++") | |
barrier.wait() | |
new_thread = threading.Thread(target=libvisplaygui.init_gui, args=[callback]) | |
new_thread.setDaemon(True) | |
new_thread.start() | |
barrier.wait() | |
print("BARRER BROKEN BABY!!!") | |
# sleep(5) | |
# libvisplaygui.wait_until_ready() | |
libvisplaygui.open_media("https://www.youtube.com/watch?v=NgmHghSOwHA") | |
libvisplaygui.wait_for_playback() | |
# libvisplaygui.open_media("https://www.youtube.com/watch?v=NgmHghSOwHA") | |
# libvisplaygui.wait_for_playback() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment