Updated the list of extensions supported by VLC.

This commit is contained in:
Tomas Groth 2015-03-18 20:44:35 +00:00
parent 27332f87e1
commit b3fd23da59
1 changed files with 16 additions and 30 deletions

View File

@ -62,43 +62,29 @@ if VLC_AVAILABLE:
if LooseVersion(VERSION.split()[0]) < LooseVersion('1.1.0'):
VLC_AVAILABLE = False
log.debug('VLC could not be loaded, because the vlc version is too old: %s' % VERSION)
if is_linux():
if VLC_AVAILABLE and is_linux():
import ctypes
try:
x11 = ctypes.cdll.LoadLibrary('libX11.so')
x11.XInitThreads()
except:
log.exception('Failed to XInitThreads(), VLC might not work properly!')
log.exception('Failed to run XInitThreads(), VLC might not work properly!')
AUDIO_EXT = ['*.mp3', '*.wav', '*.wma', '*.ogg']
# Audio and video extensions copied from 'include/vlc_interface.h' from vlc 2.2.0 source
AUDIO_EXT = ['*.3ga', '*.669', '*.a52', '*.aac', '*.ac3', '*.adt', '*.adts', '*.aif', '*.aifc', '*.aiff', '*.amr',
'*.aob', '*.ape', '*.awb', '*.caf', '*.dts', '*.flac', '*.it', '*.kar', '*.m4a', '*.m4b', '*.m4p', '*.m5p',
'*.mid', '*.mka', '*.mlp', '*.mod', '*.mpa', '*.mp1', '*.mp2', '*.mp3', '*.mpc', '*.mpga', '*.mus',
'*.oga', '*.ogg', '*.oma', '*.opus', '*.qcp', '*.ra', '*.rmi', '*.s3m', '*.sid', '*.spx', '*.thd', '*.tta',
'*.voc', '*.vqf', '*.w64', '*.wav', '*.wma', '*.wv', '*.xa', '*.xm']
VIDEO_EXT = [
'*.3gp',
'*.asf', '*.wmv',
'*.au',
'*.avi',
'*.divx',
'*.flv',
'*.mov',
'*.mp4', '*.m4v',
'*.ogm', '*.ogv',
'*.mkv', '*.mka',
'*.ts', '*.mpg',
'*.mpg', '*.mp2',
'*.nsc',
'*.nsv',
'*.nut',
'*.ra', '*.ram', '*.rm', '*.rv', '*.rmbv',
'*.a52', '*.dts', '*.aac', '*.flac', '*.dv', '*.vid',
'*.tta', '*.tac',
'*.ty',
'*.dts',
'*.xa',
'*.iso',
'*.vob',
'*.webm',
'*.xvid'
]
VIDEO_EXT = ['*.3g2', '*.3gp', '*.3gp2', '*.3gpp', '*.amv', '*.asf', '*.avi', '*.bik', '*.divx', '*.drc', '*.dv',
'*.f4v', '*.flv', '*.gvi', '*.gxf', '*.iso', '*.m1v', '*.m2v', '*.m2t', '*.m2ts', '*.m4v', '*.mkv',
'*.mov', '*.mp2', '*.mp2v', '*.mp4', '*.mp4v', '*.mpe', '*.mpeg', '*.mpeg1', '*.mpeg2', '*.mpeg4', '*.mpg',
'*.mpv2', '*.mts', '*.mtv', '*.mxf', '*.mxg', '*.nsv', '*.nuv', '*.ogg', '*.ogm', '*.ogv', '*.ogx', '*.ps',
'*.rec', '*.rm', '*.rmvb', '*.rpl', '*.thp', '*.tod', '*.ts', '*.tts', '*.txd', '*.vob', '*.vro', '*.webm',
'*.wm', '*.wmv', '*.wtv', '*.xesc',
# These extensions was not in the official list, added manually.
'*.nut', '*.rv', '*.xvid']
class VlcPlayer(MediaPlayer):