# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'untitled.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
import vlc
class Ui_Form(object):
def __init__(self):
self.Instance = vlc.Instance(['--no-xlib'])
self.player = self.Instance.media_player_new()
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(400, 300)
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "Form"))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
Form = QtWidgets.QWidget()
ui = Ui_Form()
ui.setupUi(Form)
Form.show()
sys.exit(app.exec_())
The above code was generated using pyuic5 statement. The only lines i have added are:
import vlc
The def init method.
When i run the program it output: [000001e1917c4fa0] mmdevice audio output error: cannot initialize COM (error 0x80010106)
two times
With this program:
import vlc
Instance = vlc.Instance(['--no-xlib'])
player = Instance.media_player_new()
Doesn't output anything.
What's wrong with the first code?
User contributions licensed under CC BY-SA 3.0