Python VLC警告信息

问题描述

# -*- 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_())

以上代码是使用pyuic5语句生成的。 我添加的仅有的几行是:

  1. 导入vlc

  2. def init 方法。

当我运行程序时,它输出:[000001e1917c4fa0] mmdevice audio output error: cannot initialize COM (error 0x80010106)两次

使用此程序:

import vlc

Instance = vlc.Instance(['--no-xlib'])
player = Instance.media_player_new()

什么都不输出。

第一个代码有什么问题?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)