将libvlc.dll和libvlccore.dll放在sdk文件夹中,plugins文件夹也放在sdk文件夹中,sdk文件夹放在程序目录下。
我弄这个,实际上是为了推广,我在北京。有意者请加我微信,我的微商微信:xi9902
myvlc.py文件:
import ctypes
import os
class myvlc():
def __init__(self):
plugin_arg = r"--plugin-path=" + os.path.join(os.getcwd(), r'sdk\plugins')
arguments = ["-I", "dummy", "--no-ignore-config", plugin_arg]
arguments = [bytes(a,"utf-8") for a in arguments]
p = os.getcwd()
os.chdir(os.path.join(p, 'sdk'))
dll = ctypes.CDLL("libvlc.dll")
os.chdir(p)
self.dll = dll
self.libvlc_instance_ = self.dll.libvlc_new(len(arguments),(ctypes.c_char_p * len(arguments))(*arguments))
我弄这个,实际上是为了推广,我在北京。有意者请加我微信,我的微商微信:xi9902
myvlc.py文件:
import ctypes
import os
class myvlc():
def __init__(self):
plugin_arg = r"--plugin-path=" + os.path.join(os.getcwd(), r'sdk\plugins')
arguments = ["-I", "dummy", "--no-ignore-config", plugin_arg]
arguments = [bytes(a,"utf-8") for a in arguments]
p = os.getcwd()
os.chdir(os.path.join(p, 'sdk'))
dll = ctypes.CDLL("libvlc.dll")
os.chdir(p)
self.dll = dll
self.libvlc_instance_ = self.dll.libvlc_new(len(arguments),(ctypes.c_char_p * len(arguments))(*arguments))