Added MPV support
Fixed the class renaming
This commit is contained in:
parent
08628f34ca
commit
5474442fa8
4 changed files with 74 additions and 15 deletions
|
|
@ -22,7 +22,6 @@ import os
|
||||||
import devede.configuration_data
|
import devede.configuration_data
|
||||||
import devede.executor
|
import devede.executor
|
||||||
import devede.mux_dvd_menu
|
import devede.mux_dvd_menu
|
||||||
import devede.avconv_converter
|
|
||||||
|
|
||||||
class avconv(devede.executor.executor):
|
class avconv(devede.executor.executor):
|
||||||
|
|
||||||
|
|
@ -83,16 +82,16 @@ class avconv(devede.executor.executor):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if (mpeg1 and mp2):
|
if (mpeg1 and mp2):
|
||||||
devede.avconv_converter.avconv_converter.disc_types.append("vcd")
|
devede.avconv.avconv.disc_types.append("vcd")
|
||||||
if (mpeg2 and mp2):
|
if (mpeg2 and mp2):
|
||||||
devede.avconv_converter.avconv_converter.disc_types.append("svcd")
|
devede.avconv.avconv.disc_types.append("svcd")
|
||||||
devede.avconv_converter.avconv_converter.disc_types.append("cvd")
|
devede.avconv.avconv.disc_types.append("cvd")
|
||||||
if (mpeg2 and mp2 and ac3):
|
if (mpeg2 and mp2 and ac3):
|
||||||
devede.avconv_converter.avconv_converter.disc_types.append("dvd")
|
devede.avconv.avconv.disc_types.append("dvd")
|
||||||
if (divx and mp3):
|
if (divx and mp3):
|
||||||
devede.avconv_converter.avconv_converter.disc_types.append("divx")
|
devede.avconv.avconv.disc_types.append("divx")
|
||||||
if (h264 and mp3):
|
if (h264 and mp3):
|
||||||
devede.avconv_converter.avconv_converter.disc_types.append("mkv")
|
devede.avconv.avconv.disc_types.append("mkv")
|
||||||
|
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ import devede.brasero
|
||||||
import devede.k3b
|
import devede.k3b
|
||||||
import devede.mkisofs
|
import devede.mkisofs
|
||||||
import devede.genisoimage
|
import devede.genisoimage
|
||||||
|
import devede.mpv
|
||||||
|
|
||||||
class converter:
|
class converter:
|
||||||
|
|
||||||
|
|
@ -40,7 +41,7 @@ class converter:
|
||||||
|
|
||||||
self.config = devede.configuration_data.configuration.get_config()
|
self.config = devede.configuration_data.configuration.get_config()
|
||||||
# List of classes with conversion capabilities, in order of preference
|
# List of classes with conversion capabilities, in order of preference
|
||||||
self.c = [devede.vlc.vlc, devede.ffmpeg.ffmpeg, devede.avconv.avconv,
|
self.c = [devede.vlc.vlc, devede.mpv.mpv, devede.ffmpeg.ffmpeg, devede.avconv.avconv,
|
||||||
devede.brasero.brasero, devede.k3b.k3b, devede.mkisofs.mkisofs, devede.genisoimage.genisoimage, devede.mplayer.mplayer]
|
devede.brasero.brasero, devede.k3b.k3b, devede.mkisofs.mkisofs, devede.genisoimage.genisoimage, devede.mplayer.mplayer]
|
||||||
|
|
||||||
self.analizers = {}
|
self.analizers = {}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ import os
|
||||||
import devede.configuration_data
|
import devede.configuration_data
|
||||||
import devede.executor
|
import devede.executor
|
||||||
import devede.mux_dvd_menu
|
import devede.mux_dvd_menu
|
||||||
import devede.ffmpeg_converter
|
|
||||||
|
|
||||||
class ffmpeg(devede.executor.executor):
|
class ffmpeg(devede.executor.executor):
|
||||||
|
|
||||||
|
|
@ -83,16 +82,16 @@ class ffmpeg(devede.executor.executor):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if (mpeg1 and mp2):
|
if (mpeg1 and mp2):
|
||||||
devede.ffmpeg_converter.ffmpeg_converter.disc_types.append("vcd")
|
devede.ffmpeg.ffmpeg.disc_types.append("vcd")
|
||||||
if (mpeg2 and mp2):
|
if (mpeg2 and mp2):
|
||||||
devede.ffmpeg_converter.ffmpeg_converter.disc_types.append("svcd")
|
devede.ffmpeg.ffmpeg.disc_types.append("svcd")
|
||||||
devede.ffmpeg_converter.ffmpeg_converter.disc_types.append("cvd")
|
devede.ffmpeg.ffmpeg.disc_types.append("cvd")
|
||||||
if (mpeg2 and mp2 and ac3):
|
if (mpeg2 and mp2 and ac3):
|
||||||
devede.ffmpeg_converter.ffmpeg_converter.disc_types.append("dvd")
|
devede.ffmpeg.ffmpeg.disc_types.append("dvd")
|
||||||
if (divx and mp3):
|
if (divx and mp3):
|
||||||
devede.ffmpeg_converter.ffmpeg_converter.disc_types.append("divx")
|
devede.ffmpeg.ffmpeg.disc_types.append("divx")
|
||||||
if (h264 and mp3):
|
if (h264 and mp3):
|
||||||
devede.ffmpeg_converter.ffmpeg_converter.disc_types.append("mkv")
|
devede.ffmpeg.ffmpeg.disc_types.append("mkv")
|
||||||
|
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
60
src/devede/mpv.py
Normal file
60
src/devede/mpv.py
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
# Copyright 2014 (C) Raster Software Vigo (Sergio Costas)
|
||||||
|
#
|
||||||
|
# This file is part of DeVeDe-NG
|
||||||
|
#
|
||||||
|
# DeVeDe-NG is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# DeVeDe-NG is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
|
||||||
|
import subprocess
|
||||||
|
import devede.configuration_data
|
||||||
|
import devede.executor
|
||||||
|
|
||||||
|
class mpv(devede.executor.executor):
|
||||||
|
|
||||||
|
supports_analize = False
|
||||||
|
supports_play = True
|
||||||
|
supports_convert = False
|
||||||
|
supports_menu = False
|
||||||
|
supports_mkiso = False
|
||||||
|
supports_burn = False
|
||||||
|
display_name = "MPV"
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def check_is_installed():
|
||||||
|
try:
|
||||||
|
handle = subprocess.Popen(["mpv","-v"], stdout = subprocess.PIPE, stderr = subprocess.PIPE)
|
||||||
|
(stdout, stderr) = handle.communicate()
|
||||||
|
if 0==handle.wait():
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
except:
|
||||||
|
return False
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
|
||||||
|
devede.executor.executor.__init__(self)
|
||||||
|
self.config = devede.configuration_data.configuration.get_config()
|
||||||
|
|
||||||
|
def play_film(self,file_name):
|
||||||
|
|
||||||
|
command_line = ["mpv", file_name]
|
||||||
|
self.launch_process(command_line)
|
||||||
|
|
||||||
|
def process_stdout(self,data):
|
||||||
|
return
|
||||||
|
|
||||||
|
def process_stderr(self,data):
|
||||||
|
return
|
||||||
Loading…
Add table
Add a link
Reference in a new issue