Migrate to pyproject.toml
18
README.md
|
|
@ -6,11 +6,23 @@ Devede NG is a rewrite of the Devede DVD disc authoring program. This new
|
||||||
code has been written from scratch, and uses Python3 and Gtk3. It is also
|
code has been written from scratch, and uses Python3 and Gtk3. It is also
|
||||||
cleaner, which will allow to add new features in the future.
|
cleaner, which will allow to add new features in the future.
|
||||||
|
|
||||||
## INSTALLING DEVEDE NG ##
|
## INSTALLING DEVEDE NG FROM SOURCES ##
|
||||||
|
|
||||||
Just type:
|
First, be sure that you have uninstalling any package with devede. Then, Just type:
|
||||||
|
|
||||||
sudo ./setup.py install
|
sudo python3 -m pip uninstall -y devedeng
|
||||||
|
sudo python3 -m pip install .
|
||||||
|
sudo update-icon-caches /usr/share/icons/hicolor
|
||||||
|
|
||||||
|
If you receive a notification 'error: externally-managed-environment', you can override
|
||||||
|
it by using
|
||||||
|
|
||||||
|
sudo python3 -m pip uninstall --break-system-packages -y devedeng
|
||||||
|
sudo python3 -m pip install --break-system-packages .
|
||||||
|
sudo update-icon-caches /usr/share/icons/hicolor
|
||||||
|
|
||||||
|
Also, remember that you need the `setuptools` and `setuptools-gettext` modules
|
||||||
|
installed in your system.
|
||||||
|
|
||||||
## USING DEVEDE NG ##
|
## USING DEVEDE NG ##
|
||||||
|
|
||||||
|
|
|
||||||
49
pyproject.toml
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
[build-system]
|
||||||
|
requires = ["setuptools>=61.0", "setuptools-gettext"]
|
||||||
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "devedeng"
|
||||||
|
version = "4.19.0"
|
||||||
|
authors = [
|
||||||
|
{ name="Raster Software Vigo (Sergio Costas)", email="rastersoft@gmail.com" },
|
||||||
|
]
|
||||||
|
description = "A video DVD creator"
|
||||||
|
readme = "README.md"
|
||||||
|
requires-python = ">=3.12"
|
||||||
|
classifiers = [
|
||||||
|
"Development Status :: 5 - Production/Stable",
|
||||||
|
"Environment :: X11 Applications :: GTK",
|
||||||
|
"Intended Audience :: End Users/Desktop",
|
||||||
|
"Topic :: Multimedia :: Video :: Conversion",
|
||||||
|
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
||||||
|
"Operating System :: POSIX :: Linux",
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"Topic :: Multimedia :: Video :: Conversion",
|
||||||
|
]
|
||||||
|
license = {text = "GPLv3"}
|
||||||
|
|
||||||
|
keywords = ["dvd", "video"]
|
||||||
|
|
||||||
|
[tool.setuptools.package-data]
|
||||||
|
"devedeng.data.interface" = ["*.ui", "*.png", "*.svg"]
|
||||||
|
"devedeng.data.pixmaps" = ["*.png", "*.mpg", "*.ogg"]
|
||||||
|
"devedeng.data.pixmaps.backgrounds" = ["*.png"]
|
||||||
|
"devedeng.data.locale" = ["**/*.mo"]
|
||||||
|
"devedeng.data.doc" = ["*.html", "*.css", "*.png"]
|
||||||
|
"devedeng.data" = ["*.mpg", "*.lst"]
|
||||||
|
|
||||||
|
[tool.setuptools.data-files]
|
||||||
|
"share/applications" = ["src/devedeng/data/devede_ng.desktop"]
|
||||||
|
"share/icons/hicolor/scalable/apps" = ["src/devedeng/data/interface/devedeng_icon.svg"]
|
||||||
|
|
||||||
|
[tool.setuptools-gettext]
|
||||||
|
source_dir = "po"
|
||||||
|
build_dir = "src/devedeng/data/locale"
|
||||||
|
|
||||||
|
[project.scripts]
|
||||||
|
devede_ng = "devedeng:devedeng.py"
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
Homepage = "https://www.rastersoft.com/programas/devede.html"
|
||||||
|
Issues = "https://gitlab.com/rastersoft/devedeng"
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
[bdist_rpm]
|
|
||||||
release: 1
|
|
||||||
Requires: gettext python3 python3-urllib3 python3-gobject gtk3 dvdauthor vcdimager python3-setuptools python3-cairo
|
|
||||||
135
setup.py
|
|
@ -1,136 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import os
|
import setuptools
|
||||||
import sys
|
|
||||||
from glob import glob
|
|
||||||
from distutils.core import setup
|
|
||||||
|
|
||||||
try:
|
setuptools.setup()
|
||||||
from distutils import dep_util
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def get_data_files():
|
|
||||||
data_files = [
|
|
||||||
(os.path.join('share', 'applications'), ['data/devede_ng.py.desktop']),
|
|
||||||
(os.path.join('share', 'metainfo'), ['data/com.rastersoft.devedeng.appdata.xml']),
|
|
||||||
(os.path.join('share', 'pixmaps'), ['data/devedeng.svg']),
|
|
||||||
(os.path.join('share', 'icons', 'hicolor',
|
|
||||||
'scalable', 'apps'), ['data/devedeng_icon.svg']),
|
|
||||||
(os.path.join('share', 'devedeng'), glob("data/interface/*")),
|
|
||||||
(os.path.join('share', 'devedeng'), glob('data/pixmaps/*g')),
|
|
||||||
(os.path.join('share', 'devedeng'), ['data/devedeng.svg']),
|
|
||||||
(os.path.join('share', 'devedeng'), ['data/devedeng_icon.svg']),
|
|
||||||
(os.path.join('share', 'devedeng'), ['data/codepages.lst']),
|
|
||||||
(os.path.join('share', 'devedeng'), ['data/languages.lst']),
|
|
||||||
(os.path.join('share', 'devedeng', 'backgrounds'),
|
|
||||||
glob('data/pixmaps/backgrounds/*')),
|
|
||||||
(os.path.join('share', 'doc', 'devedeng', 'html'), glob('doc/*')),
|
|
||||||
(os.path.join('share', 'man', 'man1'), ['data/devede.1.gz'])
|
|
||||||
]
|
|
||||||
|
|
||||||
for lang_name in [f for f in os.listdir('locale')]:
|
|
||||||
mofile = os.path.join('locale', lang_name,
|
|
||||||
'LC_MESSAGES', 'devedeng.mo')
|
|
||||||
# translations must be always in /usr/share because Gtk.builder only
|
|
||||||
# search there. If someone knows how to fix this...
|
|
||||||
# share/locale/fr/LC_MESSAGES/
|
|
||||||
target = os.path.join('/usr', 'share', 'locale',
|
|
||||||
lang_name, 'LC_MESSAGES')
|
|
||||||
data_files.append((target, [mofile]))
|
|
||||||
|
|
||||||
return data_files
|
|
||||||
|
|
||||||
|
|
||||||
def compile_translations():
|
|
||||||
|
|
||||||
if (os.system("msgfmt -V > /dev/null") != 0):
|
|
||||||
print('You need the binary "msgfmt" (from "gettext") to compile the translations. Aborting')
|
|
||||||
sys.exit(-1)
|
|
||||||
|
|
||||||
try:
|
|
||||||
for pofile in [f for f in os.listdir('po') if f.endswith('.po')]:
|
|
||||||
pofile = os.path.join('po', pofile)
|
|
||||||
|
|
||||||
lang = os.path.basename(pofile)[:-3] # len('.po') == 3
|
|
||||||
# e.g. locale/fr/LC_MESSAGES/
|
|
||||||
modir = os.path.join('locale', lang, 'LC_MESSAGES')
|
|
||||||
# e.g. locale/fr/LC_MESSAGES/devedeng.mo
|
|
||||||
mofile = os.path.join(modir, 'devedeng.mo')
|
|
||||||
|
|
||||||
# create an architecture for these locales
|
|
||||||
if not os.path.isdir(modir):
|
|
||||||
os.makedirs(modir)
|
|
||||||
|
|
||||||
if not os.path.isfile(mofile) or dep_util.newer(pofile, mofile):
|
|
||||||
# msgfmt.make(pofile, mofile)
|
|
||||||
os.system("msgfmt \"" + pofile + "\" -o \"" + mofile + "\"")
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
try:
|
|
||||||
compile_translations()
|
|
||||||
except:
|
|
||||||
print("Failed to generate the translations")
|
|
||||||
|
|
||||||
try:
|
|
||||||
if os.path.isfile('data/devede.1'):
|
|
||||||
os.system("gzip -c data/devede.1 > data/devede.1.gz")
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
#here = os.path.abspath(os.path.dirname(__file__))
|
|
||||||
|
|
||||||
setup(
|
|
||||||
name='devedeng',
|
|
||||||
|
|
||||||
version='4.19.0',
|
|
||||||
|
|
||||||
description='A video DVD creator',
|
|
||||||
long_description="A program that allows to create video DVDs",
|
|
||||||
|
|
||||||
url='http://www.rastersoft.com',
|
|
||||||
|
|
||||||
author='Raster Software Vigo (Sergio Costas)',
|
|
||||||
author_email='raster@rastersoft.com',
|
|
||||||
|
|
||||||
license='GPLv3',
|
|
||||||
|
|
||||||
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
|
|
||||||
classifiers=[
|
|
||||||
# How mature is this project? Common values are
|
|
||||||
# 1 - Planning
|
|
||||||
# 2 - Pre-Alpha
|
|
||||||
# 3 - Alpha
|
|
||||||
# 4 - Beta
|
|
||||||
# 5 - Production/Stable
|
|
||||||
'Development Status :: 5 - Production/Stable',
|
|
||||||
'Environment :: X11 Applications :: GTK',
|
|
||||||
'Intended Audience :: End Users/Desktop',
|
|
||||||
'Topic :: Multimedia :: Video :: Conversion',
|
|
||||||
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
|
|
||||||
'Operating System :: POSIX :: Linux',
|
|
||||||
'Programming Language :: Python :: 3',
|
|
||||||
'Topic :: Multimedia :: Video :: Conversion'
|
|
||||||
],
|
|
||||||
|
|
||||||
keywords='dvd video',
|
|
||||||
|
|
||||||
packages=['devedeng'],
|
|
||||||
|
|
||||||
package_dir={"devedeng": "src/devedeng"},
|
|
||||||
|
|
||||||
#package_data={'devede': ['data/*.ui']},
|
|
||||||
|
|
||||||
# Although 'package_data' is the preferred approach, in some case you may
|
|
||||||
# need to place data files outside of your packages.
|
|
||||||
# see http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files
|
|
||||||
# In this case, 'data_file' will be installed into '<sys.prefix>/my_data'
|
|
||||||
#data_files=[('share/devedeng/ui', ['ui/test.ui'])],
|
|
||||||
data_files=get_data_files(),
|
|
||||||
scripts=['src/devede_ng.py', 'src/copy_files_verbose.py'],
|
|
||||||
)
|
|
||||||
|
|
||||||
if (len(sys.argv) == 2) and (sys.argv[1] == "install"):
|
|
||||||
os.system("gtk-update-icon-cache")
|
|
||||||
|
|
|
||||||
|
|
@ -15,3 +15,5 @@
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
import devedeng.devedeng as devedeng
|
||||||
|
|
@ -18,7 +18,6 @@ from gi.repository import Gtk
|
||||||
import os
|
import os
|
||||||
import devedeng.configuration_data
|
import devedeng.configuration_data
|
||||||
|
|
||||||
|
|
||||||
class add_files:
|
class add_files:
|
||||||
|
|
||||||
last_path = None
|
last_path = None
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ import os
|
||||||
import devedeng.configuration_data
|
import devedeng.configuration_data
|
||||||
import devedeng.add_files
|
import devedeng.add_files
|
||||||
|
|
||||||
|
|
||||||
class ask_subtitles:
|
class ask_subtitles:
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
@ -31,8 +30,7 @@ class ask_subtitles:
|
||||||
builder = Gtk.Builder()
|
builder = Gtk.Builder()
|
||||||
builder.set_translation_domain(self.config.gettext_domain)
|
builder.set_translation_domain(self.config.gettext_domain)
|
||||||
|
|
||||||
builder.add_from_file(os.path.join(
|
builder.add_from_file(os.path.join(self.config.glade, "wask_subtitles.ui"))
|
||||||
self.config.glade, "wask_subtitles.ui"))
|
|
||||||
builder.connect_signals(self)
|
builder.connect_signals(self)
|
||||||
wask_window = builder.get_object("ask_subtitles")
|
wask_window = builder.get_object("ask_subtitles")
|
||||||
self.wfilename = builder.get_object("subtitle_file")
|
self.wfilename = builder.get_object("subtitle_file")
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ import devedeng.avbase
|
||||||
import devedeng.mux_dvd_menu
|
import devedeng.mux_dvd_menu
|
||||||
import devedeng.project
|
import devedeng.project
|
||||||
|
|
||||||
|
|
||||||
class avconv(devedeng.avbase.avbase):
|
class avconv(devedeng.avbase.avbase):
|
||||||
|
|
||||||
supports_analize = False
|
supports_analize = False
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ import subprocess
|
||||||
|
|
||||||
import devedeng.configuration_data
|
import devedeng.configuration_data
|
||||||
|
|
||||||
|
|
||||||
class choose_disc_type(GObject.GObject):
|
class choose_disc_type(GObject.GObject):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
|
||||||
|
|
@ -56,43 +56,47 @@ class configuration(GObject.GObject):
|
||||||
if platform.system() == 'FreeBSD':
|
if platform.system() == 'FreeBSD':
|
||||||
self.cores = int(os.popen("sysctl -n kern.smp.cores").read().split('\n')[0])
|
self.cores = int(os.popen("sysctl -n kern.smp.cores").read().split('\n')[0])
|
||||||
|
|
||||||
is_local = None
|
|
||||||
self.log = ""
|
self.log = ""
|
||||||
self.static_log = ""
|
self.static_log = ""
|
||||||
self.disc_type = None
|
self.disc_type = None
|
||||||
|
|
||||||
try:
|
# try:
|
||||||
os.stat("/usr/share/devedeng/wselect_disk.ui")
|
# os.stat("/usr/share/devedeng/wselect_disk.ui")
|
||||||
is_local = False
|
# is_local = False
|
||||||
except:
|
# except:
|
||||||
pass
|
# pass
|
||||||
|
|
||||||
if is_local is None:
|
# if is_local is None:
|
||||||
try:
|
# try:
|
||||||
os.stat("/usr/local/share/devedeng/wselect_disk.ui")
|
# os.stat("/usr/local/share/devedeng/wselect_disk.ui")
|
||||||
is_local = True
|
# is_local = True
|
||||||
except:
|
# except:
|
||||||
pass
|
# pass
|
||||||
|
|
||||||
if is_local is None:
|
# if is_local is None:
|
||||||
return True
|
# return True
|
||||||
else:
|
# else:
|
||||||
if (is_local):
|
# if (is_local):
|
||||||
# locales must be always at /usr/share/locale because
|
# # locales must be always at /usr/share/locale because
|
||||||
# Gtk.Builder always search there
|
# # Gtk.Builder always search there
|
||||||
self.share_locale = "/usr/share/locale"
|
# self.share_locale = "/usr/share/locale"
|
||||||
self.glade = "/usr/local/share/devedeng"
|
# self.glade = "/usr/local/share/devedeng"
|
||||||
self.font_path = "/usr/local/share/devedeng"
|
# self.pic_path = "/usr/local/share/devedeng"
|
||||||
self.pic_path = "/usr/local/share/devedeng"
|
# self.other_path = "/usr/local/share/devedeng"
|
||||||
self.other_path = "/usr/local/share/devedeng"
|
# self.help_path = "/usr/local/share/doc/devedeng"
|
||||||
self.help_path = "/usr/local/share/doc/devedeng"
|
# else:
|
||||||
else:
|
# self.share_locale = "/usr/share/locale"
|
||||||
self.share_locale = "/usr/share/locale"
|
# self.glade = "/usr/share/devedeng"
|
||||||
self.glade = "/usr/share/devedeng"
|
# self.pic_path = "/usr/share/devedeng"
|
||||||
self.font_path = "/usr/share/devedeng"
|
# self.other_path = "/usr/share/devedeng"
|
||||||
self.pic_path = "/usr/share/devedeng"
|
# self.help_path = "/usr/share/doc/devedeng"
|
||||||
self.other_path = "/usr/share/devedeng"
|
|
||||||
self.help_path = "/usr/share/doc/devedeng"
|
data_dir = os.path.join(os.path.dirname(__file__), 'data')
|
||||||
|
self.share_locale = os.path.join(data_dir, "locale")
|
||||||
|
self.glade = os.path.join(data_dir, "interface")
|
||||||
|
self.pic_path = os.path.join(data_dir, "pixmaps")
|
||||||
|
self.other_path = data_dir
|
||||||
|
self.help_path = os.path.join(data_dir, "doc")
|
||||||
|
|
||||||
self.gettext_domain = "devedeng"
|
self.gettext_domain = "devedeng"
|
||||||
|
|
||||||
|
|
|
||||||
BIN
src/devedeng/data/devede.1.gz
Normal file
|
|
@ -16,6 +16,6 @@ Comment[gl]=Permite crear video CDs e DVDs, que poden reproducirse en reproducto
|
||||||
Comment[pl]=Pozwala stworzyć wideo na płytach CD lub DVD, do otwarzania w domowych odtwarzaczach DVD
|
Comment[pl]=Pozwala stworzyć wideo na płytach CD lub DVD, do otwarzania w domowych odtwarzaczach DVD
|
||||||
Comment[it]=Permette di creare video CD e DVD che possono essere riprodotti con lettori DVD
|
Comment[it]=Permette di creare video CD e DVD che possono essere riprodotti con lettori DVD
|
||||||
Icon=devedeng_icon.svg
|
Icon=devedeng_icon.svg
|
||||||
TryExec=devede_ng.py
|
TryExec=devede_ng
|
||||||
Exec=devede_ng.py
|
Exec=devede_ng
|
||||||
Categories=AudioVideo;
|
Categories=AudioVideo;
|
||||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.16.1 -->
|
<!-- Generated with glade 3.16.1 -->
|
||||||
<interface>
|
<interface domain="devedeng">
|
||||||
<requires lib="gtk+" version="3.10"/>
|
<requires lib="gtk+" version="3.10"/>
|
||||||
<object class="GtkAboutDialog" id="about_devedeng">
|
<object class="GtkAboutDialog" id="about_devedeng">
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.16.1 -->
|
<!-- Generated with glade 3.16.1 -->
|
||||||
<interface>
|
<interface domain="devedeng">
|
||||||
<requires lib="gtk+" version="3.10"/>
|
<requires lib="gtk+" version="3.10"/>
|
||||||
<object class="GtkDialog" id="add_files">
|
<object class="GtkDialog" id="add_files">
|
||||||
<property name="width_request">740</property>
|
<property name="width_request">740</property>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.16.1 -->
|
<!-- Generated with glade 3.16.1 -->
|
||||||
<interface>
|
<interface domain="devedeng">
|
||||||
<requires lib="gtk+" version="3.10"/>
|
<requires lib="gtk+" version="3.10"/>
|
||||||
<object class="GtkDialog" id="dialog_ask">
|
<object class="GtkDialog" id="dialog_ask">
|
||||||
<property name="width_request">320</property>
|
<property name="width_request">320</property>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.16.1 -->
|
<!-- Generated with glade 3.16.1 -->
|
||||||
<interface>
|
<interface domain="devedeng">
|
||||||
<requires lib="gtk+" version="3.10"/>
|
<requires lib="gtk+" version="3.10"/>
|
||||||
<object class="GtkListStore" id="list_encodings">
|
<object class="GtkListStore" id="list_encodings">
|
||||||
<columns>
|
<columns>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.20.0 -->
|
<!-- Generated with glade 3.20.0 -->
|
||||||
<interface>
|
<interface domain="devedeng">
|
||||||
<requires lib="gtk+" version="3.10"/>
|
<requires lib="gtk+" version="3.10"/>
|
||||||
<object class="GtkDialog" id="dialog_create">
|
<object class="GtkDialog" id="dialog_create">
|
||||||
<property name="width_request">380</property>
|
<property name="width_request">380</property>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.20.0 -->
|
<!-- Generated with glade 3.20.0 -->
|
||||||
<interface>
|
<interface domain="devedeng">
|
||||||
<requires lib="gtk+" version="3.10"/>
|
<requires lib="gtk+" version="3.10"/>
|
||||||
<object class="GtkTextBuffer" id="debug_buffer"/>
|
<object class="GtkTextBuffer" id="debug_buffer"/>
|
||||||
<object class="GtkDialog" id="done">
|
<object class="GtkDialog" id="done">
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.20.0 -->
|
<!-- Generated with glade 3.20.0 -->
|
||||||
<interface>
|
<interface domain="devedeng">
|
||||||
<requires lib="gtk+" version="3.10"/>
|
<requires lib="gtk+" version="3.10"/>
|
||||||
<object class="GtkTextBuffer" id="debug_buffer"/>
|
<object class="GtkTextBuffer" id="debug_buffer"/>
|
||||||
<object class="GtkDialog" id="dialog_error">
|
<object class="GtkDialog" id="dialog_error">
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.22.1 -->
|
<!-- Generated with glade 3.22.1 -->
|
||||||
<interface>
|
<interface domain="devedeng">
|
||||||
<requires lib="gtk+" version="3.10"/>
|
<requires lib="gtk+" version="3.10"/>
|
||||||
<object class="GtkAdjustment" id="audio_delay">
|
<object class="GtkAdjustment" id="audio_delay">
|
||||||
<property name="lower">-30</property>
|
<property name="lower">-30</property>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.22.1 -->
|
<!-- Generated with glade 3.22.1 -->
|
||||||
<interface>
|
<interface domain="devedeng">
|
||||||
<requires lib="gtk+" version="3.10"/>
|
<requires lib="gtk+" version="3.10"/>
|
||||||
<object class="GtkListStore" id="disc_size_list">
|
<object class="GtkListStore" id="disc_size_list">
|
||||||
<columns>
|
<columns>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.22.1 -->
|
<!-- Generated with glade 3.22.1 -->
|
||||||
<interface>
|
<interface domain="devedeng">
|
||||||
<requires lib="gtk+" version="3.10"/>
|
<requires lib="gtk+" version="3.10"/>
|
||||||
<object class="GtkAdjustment" id="margin_bottom">
|
<object class="GtkAdjustment" id="margin_bottom">
|
||||||
<property name="upper">100</property>
|
<property name="upper">100</property>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.20.0 -->
|
<!-- Generated with glade 3.20.0 -->
|
||||||
<interface>
|
<interface domain="devedeng">
|
||||||
<requires lib="gtk+" version="3.10"/>
|
<requires lib="gtk+" version="3.10"/>
|
||||||
<object class="GtkListStore" id="liststore_elements">
|
<object class="GtkListStore" id="liststore_elements">
|
||||||
<columns>
|
<columns>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.16.1 -->
|
<!-- Generated with glade 3.16.1 -->
|
||||||
<interface>
|
<interface domain="devedeng">
|
||||||
<requires lib="gtk+" version="3.10"/>
|
<requires lib="gtk+" version="3.10"/>
|
||||||
<object class="GtkTextBuffer" id="textbuffer"/>
|
<object class="GtkTextBuffer" id="textbuffer"/>
|
||||||
<object class="GtkDialog" id="needed">
|
<object class="GtkDialog" id="needed">
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.16.1 -->
|
<!-- Generated with glade 3.16.1 -->
|
||||||
<interface>
|
<interface domain="devedeng">
|
||||||
<requires lib="gtk+" version="3.10"/>
|
<requires lib="gtk+" version="3.10"/>
|
||||||
<object class="GtkFileChooserDialog" id="data_project">
|
<object class="GtkFileChooserDialog" id="data_project">
|
||||||
<property name="width_request">680</property>
|
<property name="width_request">680</property>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.16.1 -->
|
<!-- Generated with glade 3.16.1 -->
|
||||||
<interface>
|
<interface domain="devedeng">
|
||||||
<requires lib="gtk+" version="3.10"/>
|
<requires lib="gtk+" version="3.10"/>
|
||||||
<object class="GtkAdjustment" id="length">
|
<object class="GtkAdjustment" id="length">
|
||||||
<property name="lower">10</property>
|
<property name="lower">10</property>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.16.1 -->
|
<!-- Generated with glade 3.16.1 -->
|
||||||
<interface>
|
<interface domain="devedeng">
|
||||||
<requires lib="gtk+" version="3.10"/>
|
<requires lib="gtk+" version="3.10"/>
|
||||||
<object class="GtkWindow" id="progress">
|
<object class="GtkWindow" id="progress">
|
||||||
<property name="width_request">640</property>
|
<property name="width_request">640</property>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.16.1 -->
|
<!-- Generated with glade 3.16.1 -->
|
||||||
<interface>
|
<interface domain="devedeng">
|
||||||
<requires lib="gtk+" version="3.10"/>
|
<requires lib="gtk+" version="3.10"/>
|
||||||
<object class="GtkFileChooserDialog" id="data_project">
|
<object class="GtkFileChooserDialog" id="data_project">
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.22.1 -->
|
<!-- Generated with glade 3.22.1 -->
|
||||||
<interface>
|
<interface domain="devedeng">
|
||||||
<requires lib="gtk+" version="3.10"/>
|
<requires lib="gtk+" version="3.10"/>
|
||||||
<object class="GtkWindow" id="wselect_disk">
|
<object class="GtkWindow" id="wselect_disk">
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.16.1 -->
|
<!-- Generated with glade 3.16.1 -->
|
||||||
<interface>
|
<interface domain="devedeng">
|
||||||
<requires lib="gtk+" version="3.10"/>
|
<requires lib="gtk+" version="3.10"/>
|
||||||
<object class="GtkListStore" id="analizer_store">
|
<object class="GtkListStore" id="analizer_store">
|
||||||
<columns>
|
<columns>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.16.1 -->
|
<!-- Generated with glade 3.16.1 -->
|
||||||
<interface>
|
<interface domain="devedeng">
|
||||||
<requires lib="gtk+" version="3.10"/>
|
<requires lib="gtk+" version="3.10"/>
|
||||||
<object class="GtkDialog" id="title_properties">
|
<object class="GtkDialog" id="title_properties">
|
||||||
<property name="width_request">380</property>
|
<property name="width_request">380</property>
|
||||||
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 348 KiB After Width: | Height: | Size: 348 KiB |
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 144 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
18
src/devede_ng.py → src/devedeng/devedeng.py
Executable file → Normal file
|
|
@ -16,6 +16,7 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>
|
# along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
|
||||||
|
|
||||||
import gi
|
import gi
|
||||||
gi.require_version('Gtk', '3.0')
|
gi.require_version('Gtk', '3.0')
|
||||||
import sys
|
import sys
|
||||||
|
|
@ -27,26 +28,31 @@ import devedeng.project
|
||||||
import devedeng.configuration_data
|
import devedeng.configuration_data
|
||||||
import devedeng.choose_disc_type
|
import devedeng.choose_disc_type
|
||||||
|
|
||||||
|
_ = gettext.gettext
|
||||||
|
|
||||||
config_data = devedeng.configuration_data.configuration.get_config()
|
config_data = devedeng.configuration_data.configuration.get_config()
|
||||||
|
|
||||||
if config_data is None:
|
if config_data is None:
|
||||||
print("Can't locate extra files. Aborting.")
|
print("Can't locate extra files. Aborting.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
Gtk.init(sys.argv)
|
||||||
|
|
||||||
gettext.bindtextdomain(config_data.gettext_domain, config_data.share_locale)
|
gettext.bindtextdomain(config_data.gettext_domain, config_data.share_locale)
|
||||||
try:
|
try:
|
||||||
locale.setlocale(locale.LC_ALL, "")
|
locale.setlocale(locale.LC_ALL, "")
|
||||||
except locale.Error:
|
except locale.Error:
|
||||||
pass
|
pass
|
||||||
|
locale.bindtextdomain(config_data.gettext_domain, config_data.share_locale)
|
||||||
gettext.textdomain(config_data.gettext_domain)
|
gettext.textdomain(config_data.gettext_domain)
|
||||||
gettext.install(config_data.gettext_domain, localedir=config_data.share_locale)
|
gettext.install(config_data.gettext_domain, localedir=config_data.share_locale)
|
||||||
|
|
||||||
_ = gettext.gettext
|
|
||||||
|
|
||||||
Gtk.init(sys.argv)
|
def py():
|
||||||
|
global config_data
|
||||||
|
|
||||||
mwindow = devedeng.project.devede_project()
|
mwindow = devedeng.project.devede_project()
|
||||||
ask_type = devedeng.choose_disc_type.choose_disc_type()
|
ask_type = devedeng.choose_disc_type.choose_disc_type()
|
||||||
|
|
||||||
Gtk.main()
|
Gtk.main()
|
||||||
config_data.save_config()
|
config_data.save_config()
|
||||||
|
|
@ -31,24 +31,25 @@ class file_copy(devedeng.executor.executor):
|
||||||
self.text = _("Copying file %(X)s") % {
|
self.text = _("Copying file %(X)s") % {
|
||||||
"X": os.path.basename(input_path)}
|
"X": os.path.basename(input_path)}
|
||||||
|
|
||||||
self.command_var = []
|
self.command_var = ["dd", f"if={input_path}", f"of=output_path", "status=progress", "bs=1048576"]
|
||||||
self.command_var.append("copy_files_verbose.py")
|
self.file_size = float(os.stat(input_path).st_size)
|
||||||
self.command_var.append(input_path)
|
print("Paso 1")
|
||||||
self.command_var.append(output_path)
|
|
||||||
|
|
||||||
def process_stdout(self, data):
|
def process_stdout(self, data):
|
||||||
|
|
||||||
if (data is None) or (len(data) == 0):
|
|
||||||
return
|
|
||||||
if (data[0].startswith("Copied ")):
|
|
||||||
pos = data[0].find("%")
|
|
||||||
if (pos == -1):
|
|
||||||
return
|
|
||||||
p = float(data[0][7:pos])
|
|
||||||
self.progress_bar[1].set_fraction(p / 100.0)
|
|
||||||
self.progress_bar[1].set_text("%.1f%%" % (p))
|
|
||||||
return
|
return
|
||||||
|
|
||||||
def process_stderr(self, data):
|
def process_stderr(self, data):
|
||||||
|
if (data is None) or (len(data) == 0):
|
||||||
return
|
return
|
||||||
|
parts = data[0].split(" ")
|
||||||
|
if (len(parts) < 2) or (parts[1] != "bytes"):
|
||||||
|
return
|
||||||
|
|
||||||
|
try:
|
||||||
|
copied = float(parts[0])
|
||||||
|
except:
|
||||||
|
return
|
||||||
|
|
||||||
|
p = copied / self.file_size
|
||||||
|
self.progress_bar[1].set_fraction(p)
|
||||||
|
self.progress_bar[1].set_text("%.1f%%" % (p * 100))
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ class help:
|
||||||
self.config = devedeng.configuration_data.configuration.get_config()
|
self.config = devedeng.configuration_data.configuration.get_config()
|
||||||
|
|
||||||
file = "file://" + \
|
file = "file://" + \
|
||||||
os.path.join(self.config.help_path, "html", help_page)
|
os.path.join(self.config.help_path, help_page)
|
||||||
|
|
||||||
retval = Gtk.show_uri(None, file, Gdk.CURRENT_TIME)
|
retval = Gtk.show_uri(None, file, Gdk.CURRENT_TIME)
|
||||||
if retval == False:
|
if retval == False:
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@ import devedeng.opensave
|
||||||
import devedeng.help
|
import devedeng.help
|
||||||
import devedeng.separator
|
import devedeng.separator
|
||||||
|
|
||||||
|
|
||||||
class devede_project:
|
class devede_project:
|
||||||
|
|
||||||
dvd_max_bps_base = {0: 9000}
|
dvd_max_bps_base = {0: 9000}
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ import devedeng.interface_manager
|
||||||
import gettext
|
import gettext
|
||||||
import devedeng.converter
|
import devedeng.converter
|
||||||
|
|
||||||
|
|
||||||
class settings_window(devedeng.interface_manager.interface_manager):
|
class settings_window(devedeng.interface_manager.interface_manager):
|
||||||
|
|
||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ import subprocess
|
||||||
import devedeng.configuration_data
|
import devedeng.configuration_data
|
||||||
import devedeng.executor
|
import devedeng.executor
|
||||||
|
|
||||||
|
|
||||||
class subtitles_mux(devedeng.executor.executor):
|
class subtitles_mux(devedeng.executor.executor):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
|
||||||
|
|
@ -1,179 +0,0 @@
|
||||||
import unittest
|
|
||||||
import devedeng.avbase
|
|
||||||
import devedeng.avprobe
|
|
||||||
|
|
||||||
|
|
||||||
class TestAVConv(unittest.TestCase):
|
|
||||||
|
|
||||||
def test_ubuntu_14_04(self):
|
|
||||||
c = devedeng.avbase.avbase()
|
|
||||||
text = """avconv version 9.18-6:9.18-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers
|
|
||||||
built on Mar 16 2015 13:19:10 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
|
|
||||||
avconv 9.18-6:9.18-0ubuntu0.14.04.1
|
|
||||||
libavutil 52. 3. 0 / 52. 3. 0
|
|
||||||
libavcodec 54. 35. 0 / 54. 35. 0
|
|
||||||
libavformat 54. 20. 4 / 54. 20. 4
|
|
||||||
libavdevice 53. 2. 0 / 53. 2. 0
|
|
||||||
libavfilter 3. 3. 0 / 3. 3. 0
|
|
||||||
libavresample 1. 0. 1 / 1. 0. 1
|
|
||||||
libswscale 2. 1. 1 / 2. 1. 1""".split("\n")
|
|
||||||
text.append(9)
|
|
||||||
c.check_version_txt(text)
|
|
||||||
|
|
||||||
self.assertEqual(
|
|
||||||
c.major_version, 9, "Detecting major version for Ubuntu 14.04's AVConv version")
|
|
||||||
self.assertEqual(
|
|
||||||
c.minor_version, 18, "Detecting minor version for Ubuntu 14.04's AVConv version")
|
|
||||||
|
|
||||||
def test_ubuntu_14_10(self):
|
|
||||||
c = devedeng.avbase.avbase()
|
|
||||||
text = """avconv version 11-6:11-1, Copyright (c) 2000-2014 the Libav developers
|
|
||||||
built on Sep 26 2014 14:36:31 with gcc 4.9.1 (Ubuntu 4.9.1-15ubuntu1)
|
|
||||||
avconv 11-6:11-1
|
|
||||||
libavutil 54. 3. 0 / 54. 3. 0
|
|
||||||
libavcodec 56. 1. 0 / 56. 1. 0
|
|
||||||
libavformat 56. 1. 0 / 56. 1. 0
|
|
||||||
libavdevice 55. 0. 0 / 55. 0. 0
|
|
||||||
libavfilter 5. 0. 0 / 5. 0. 0
|
|
||||||
libavresample 2. 1. 0 / 2. 1. 0
|
|
||||||
libswscale 3. 0. 0 / 3. 0. 0""".split("\n")
|
|
||||||
text.append(9)
|
|
||||||
c.check_version_txt(text)
|
|
||||||
|
|
||||||
self.assertEqual(
|
|
||||||
c.major_version, 11, "Detecting major version for Ubuntu 14.10's AVConv version")
|
|
||||||
self.assertEqual(
|
|
||||||
c.minor_version, 0, "Detecting minor version for Ubuntu 14.10's AVConv version")
|
|
||||||
|
|
||||||
def test_ubuntu_15_04(self):
|
|
||||||
c = devedeng.avbase.avbase()
|
|
||||||
text = """avconv version 11.2-6:11.2-1, Copyright (c) 2000-2014 the Libav developers
|
|
||||||
built on Jan 18 2015 05:12:33 with gcc 4.9.2 (Ubuntu 4.9.2-10ubuntu2)
|
|
||||||
avconv 11.2-6:11.2-1
|
|
||||||
libavutil 54. 3. 0 / 54. 3. 0
|
|
||||||
libavcodec 56. 1. 0 / 56. 1. 0
|
|
||||||
libavformat 56. 1. 0 / 56. 1. 0
|
|
||||||
libavdevice 55. 0. 0 / 55. 0. 0
|
|
||||||
libavfilter 5. 0. 0 / 5. 0. 0
|
|
||||||
libavresample 2. 1. 0 / 2. 1. 0
|
|
||||||
libswscale 3. 0. 0 / 3. 0. 0""".split("\n")
|
|
||||||
text.append(9)
|
|
||||||
c.check_version_txt(text)
|
|
||||||
|
|
||||||
self.assertEqual(
|
|
||||||
c.major_version, 11, "Detecting major version for Ubuntu 15.04's AVConv version")
|
|
||||||
self.assertEqual(
|
|
||||||
c.minor_version, 2, "Detecting minor version for Ubuntu 15.04's AVConv version")
|
|
||||||
|
|
||||||
def test_mkv1(self):
|
|
||||||
|
|
||||||
c = devedeng.avprobe.avprobe()
|
|
||||||
json_test = """{
|
|
||||||
"streams": [
|
|
||||||
{
|
|
||||||
"index": 0,
|
|
||||||
"codec_name": "aac",
|
|
||||||
"codec_long_name": "AAC (Advanced Audio Coding)",
|
|
||||||
"profile": "LC",
|
|
||||||
"codec_type": "audio",
|
|
||||||
"codec_time_base": "1/44100",
|
|
||||||
"codec_tag_string": "mp4a",
|
|
||||||
"codec_tag": "0x6134706d",
|
|
||||||
"sample_fmt": "fltp",
|
|
||||||
"sample_rate": "44100",
|
|
||||||
"channels": 2,
|
|
||||||
"channel_layout": "stereo",
|
|
||||||
"bits_per_sample": 0,
|
|
||||||
"r_frame_rate": "0/0",
|
|
||||||
"avg_frame_rate": "0/0",
|
|
||||||
"time_base": "1/44100",
|
|
||||||
"start_pts": 0,
|
|
||||||
"start_time": "0.000000",
|
|
||||||
"duration_ts": 3771392,
|
|
||||||
"duration": "85.519093",
|
|
||||||
"bit_rate": "115596",
|
|
||||||
"nb_frames": "3683",
|
|
||||||
"disposition": {
|
|
||||||
"default": 1,
|
|
||||||
"dub": 0,
|
|
||||||
"original": 0,
|
|
||||||
"comment": 0,
|
|
||||||
"lyrics": 0,
|
|
||||||
"karaoke": 0,
|
|
||||||
"forced": 0,
|
|
||||||
"hearing_impaired": 0,
|
|
||||||
"visual_impaired": 0,
|
|
||||||
"clean_effects": 0,
|
|
||||||
"attached_pic": 0
|
|
||||||
},
|
|
||||||
"tags": {
|
|
||||||
"creation_time": "2005-12-20 20:20:15",
|
|
||||||
"language": "eng",
|
|
||||||
"handler_name": "Apple Sound Media Handler"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"index": 1,
|
|
||||||
"codec_name": "h264",
|
|
||||||
"codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
|
|
||||||
"profile": "Constrained Baseline",
|
|
||||||
"codec_type": "video",
|
|
||||||
"codec_time_base": "1/2000",
|
|
||||||
"codec_tag_string": "avc1",
|
|
||||||
"codec_tag": "0x31637661",
|
|
||||||
"width": 320,
|
|
||||||
"height": 240,
|
|
||||||
"has_b_frames": 0,
|
|
||||||
"sample_aspect_ratio": "0:1",
|
|
||||||
"display_aspect_ratio": "0:1",
|
|
||||||
"pix_fmt": "yuv420p",
|
|
||||||
"level": 13,
|
|
||||||
"color_range": "tv",
|
|
||||||
"color_space": "smpte170m",
|
|
||||||
"color_transfer": "bt709",
|
|
||||||
"color_primaries": "smpte170m",
|
|
||||||
"chroma_location": "topleft",
|
|
||||||
"is_avc": "1",
|
|
||||||
"nal_length_size": "4",
|
|
||||||
"r_frame_rate": "10/1",
|
|
||||||
"avg_frame_rate": "10/1",
|
|
||||||
"time_base": "1/1000",
|
|
||||||
"start_pts": 0,
|
|
||||||
"start_time": "0.000000",
|
|
||||||
"duration_ts": 85500,
|
|
||||||
"duration": "85.500000",
|
|
||||||
"bit_rate": "90795",
|
|
||||||
"bits_per_raw_sample": "8",
|
|
||||||
"nb_frames": "855",
|
|
||||||
"disposition": {
|
|
||||||
"default": 1,
|
|
||||||
"dub": 0,
|
|
||||||
"original": 0,
|
|
||||||
"comment": 0,
|
|
||||||
"lyrics": 0,
|
|
||||||
"karaoke": 0,
|
|
||||||
"forced": 0,
|
|
||||||
"hearing_impaired": 0,
|
|
||||||
"visual_impaired": 0,
|
|
||||||
"clean_effects": 0,
|
|
||||||
"attached_pic": 0
|
|
||||||
},
|
|
||||||
"tags": {
|
|
||||||
"creation_time": "2005-12-20 20:20:15",
|
|
||||||
"language": "eng",
|
|
||||||
"handler_name": "Apple Video Media Handler"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}"""
|
|
||||||
retval = c.process_json(json_test, "filename.mkv")
|
|
||||||
self.assertFalse(retval)
|
|
||||||
self.assertEqual(c.audio_streams, 1,
|
|
||||||
"Checking number of audio streams")
|
|
||||||
self.assertEqual(c.audio_list[0], 0, "Checking audio stream 1")
|
|
||||||
self.assertEqual(c.video_streams, 1,
|
|
||||||
"Checking number of video streams")
|
|
||||||
self.assertEqual(c.video_list[0], 1, "Checking video stream 1")
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
unittest.main()
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
Depends3 = dh-python, python3, python3-urllib3, python3-gi, python3-cairo, python3-gi-cairo, libgtk-3-0, ffmpeg (>= 7:1.2.6) | libav-tools(>= 6:9.16), mplayer, mpv | vlc, dvdauthor, genisoimage, vcdimager, libvorbis0a, libvorbisfile3, python3-pkg-resources
|
Depends3 = dh-python, python3, python3-urllib3, python3-gi, python3-cairo, python3-gi-cairo, libgtk-3-0, gir1.2-gtk-3.0, ffmpeg (>= 7:1.2.6) | libav-tools(>= 6:9.16), mplayer | mpv | vlc, dvdauthor, genisoimage, vcdimager, libvorbis0a, libvorbisfile3, python3-pkg-resources
|
||||||
|
|
|
||||||