amymcgovern / pyparrot

Python interface for Parrot Drones
MIT License
274 stars 129 forks source link

VLC Camera Flicker and small fixes #206

Open ItzTheDodo opened 4 years ago

ItzTheDodo commented 4 years ago

I have been trying out this library for a while now and on Windows, I've noticed that in the latest python and VLC updates, a few small errors have occurred.

1) vlc.py: line 173 - change to: dll = ctypes.CDLL(".\\" + libname) (fixes FileNotFoundError: 'libvlc.dll') 2) DroneVisionGUI: in Player class - add: (fixes closing errors and crashes)

def closeEvent(self, event):
        event.accept()
        self.close_video()
        self.vlc_gui.close()
        self.vlc_gui.destroy()

        if (self.user_window_draw_thread is not None):
            self.user_window_draw_thread.quit()
            self.user_vision_thread.quit()
            self.user_thread.quit()

        sys.exit()

3) DroneVisionGUI: at the end of _start_videobuffering (line 390) add: `sys.exit(app.exec())` (helps close the window cleanly)

The only thing I cannot find the solution to is a flicker on the video feed where it displays the file path and a smaller version of the frame in between frames? I don't know whether it's a problem with PyQT5 or this library? thx