diff -Nru arista-0.9.3+repack/arista/discoverer.py arista-0.9.5/arista/discoverer.py --- arista-0.9.3+repack/arista/discoverer.py 2009-04-28 20:44:35.000000000 +0100 +++ arista-0.9.5/arista/discoverer.py 2010-06-13 11:38:18.000000000 +0100 @@ -25,6 +25,8 @@ Modified to support dvd://device@title style URIs using dvdreadsrc. Modified to support v4l://device style URIs using v4lsrc. Modified to support v4l2://device style URIs using v4l2src. + +Modified to use uridecodebin instead of decodebin """ import gettext @@ -128,39 +130,63 @@ self._timeoutid = 0 self._max_interleave = max_interleave + self.dbin = None if filename.startswith("dvd://"): - parts = filename[6:].split("@") - self.src = gst.element_factory_make("dvdreadsrc") - self.src.set_property("device", parts[0]) + parts = filename.split("@") if len(parts) > 1: + # Specific chapter was requested, so we need to use a different + # source to manually specify the title to decode. + self.src = gst.element_factory_make("dvdreadsrc") + self.src.set_property("device", parts[0][6:]) self.src.set_property("title", int(parts[1])) + self.dbin = gst.element_factory_make("decodebin2") + + self.add(self.src, self.dbin) + self.src.link(self.dbin) + + self.typefind = self.dbin.get_by_name("typefind") + self.typefind.connect("have-type", self._have_type_cb) + + self.dbin.connect("new-decoded-pad", self._new_decoded_pad_cb) + self.dbin.connect("no-more-pads", self._no_more_pads_cb) elif filename.startswith("v4l://"): - self.src = gst.element_factory_make("v4lsrc") - self.src.set_property("device", filename[6:]) + pass elif filename.startswith("v4l2://"): - self.src = gst.element_factory_make("v4l2src") - self.src.set_property("device", filename[7:]) + pass + elif filename.startswith("file://"): + pass else: - if not os.path.isfile(filename): - self.debug("File '%s' does not exist, finished" % filename) - self.finished = True - return - - # the initial elements of the pipeline - self.src = gst.element_factory_make("filesrc") - self.src.set_property("location", filename) - self.src.set_property("blocksize", 1000000) + filename = "file://" + filename - self.dbin = gst.element_factory_make("decodebin") - self.add(self.src, self.dbin) - self.src.link(self.dbin) - self.typefind = self.dbin.get_by_name("typefind") - - # callbacks - self.typefind.connect("have-type", self._have_type_cb) - self.dbin.connect("new-decoded-pad", self._new_decoded_pad_cb) - self.dbin.connect("no-more-pads", self._no_more_pads_cb) - self.dbin.connect("unknown-type", self._unknown_type_cb) + if not self.dbin: + # No custom source was setup, so let's use the uridecodebin! + self.dbin = gst.element_factory_make("uridecodebin") + self.dbin.set_property("uri", filename) + self.add(self.dbin) + + self.dbin.connect("element-added", self._element_added_cb) + self.dbin.connect("pad-added", self._new_decoded_pad_cb) + self.dbin.connect("no-more-pads", self._no_more_pads_cb) + + @property + def length(self): + return max(self.videolength, self.audiolength) + + def _element_added_cb(self, bin, element): + try: + typefind = element.get_by_name("typefind") + if typefind: + self.typefind = typefind + self.typefind.connect("have-type", self._have_type_cb) + + try: + element.connect("unknown-type", self._unknown_type_cb) + except TypeError: + # Element doesn't support unknown-type signal? + pass + except AttributeError: + # Probably not the decodebin, just ignore + pass def _timed_out_or_eos(self): if (not self.is_audio and not self.is_video) or \ @@ -232,10 +258,7 @@ def print_info(self): """prints out the information on the given file""" - if not self.finished: - return - if not self.mimetype: - print _("Unknown media type") + if not self.finished or not (self.is_audio or self.is_video): return print _("Mime Type :\t"), self.mimetype if not self.is_video and not self.is_audio: @@ -331,7 +354,7 @@ if self._nomorepads and ((not self.is_audio) or self.audiocaps): self._finished(True) - def _new_decoded_pad_cb(self, dbin, pad, is_last): + def _new_decoded_pad_cb(self, dbin, pad, extra=None): # Does the file contain got audio or video ? caps = pad.get_caps() gst.info("caps:%s" % caps.to_string()) @@ -342,10 +365,10 @@ else: self.warning("got a different caps.. %s" % caps.to_string()) return - if is_last and not self.is_video and not self.is_audio: - self.debug("is last, not video or audio") - self._finished(False) - return + #if is_last and not self.is_video and not self.is_audio: + # self.debug("is last, not video or audio") + # self._finished(False) + # return # we connect a fakesink to the new pad... pad.info("adding queue->fakesink") fakesink = gst.element_factory_make("fakesink", "fakesink%d-%s" % diff -Nru arista-0.9.3+repack/arista/__init__.py arista-0.9.5/arista/__init__.py --- arista-0.9.3+repack/arista/__init__.py 2009-06-28 21:06:35.000000000 +0100 +++ arista-0.9.5/arista/__init__.py 2010-06-13 11:38:18.000000000 +0100 @@ -16,7 +16,7 @@ License ------- - Copyright 2008 - 2009 Daniel G. Taylor + Copyright 2008 - 2010 Daniel G. Taylor This file is part of Arista. @@ -25,7 +25,7 @@ published by the Free Software Foundation, either version 2.1 of the License, or (at your option) any later version. - Foobar is distributed in the hope that it will be useful, + Arista 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 Lesser General Public License for more details. @@ -51,6 +51,6 @@ import transcoder import utils -__version__ = _("0.9.3") +__version__ = _("0.9.5") __author__ = _("Daniel G. Taylor ") diff -Nru arista-0.9.3+repack/arista/inputs/haldisco.py arista-0.9.5/arista/inputs/haldisco.py --- arista-0.9.3+repack/arista/inputs/haldisco.py 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/arista/inputs/haldisco.py 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,293 @@ +#!/usr/bin/env python + +""" + Arista Input Device Discovery + ============================= + A set of tools to discover DVD-capable devices and Video4Linux devices that + emit signals when disks that contain video are inserted or webcames / tuner + cards are plugged in using DBus+HAL. + + License + ------- + Copyright 2008 - 2010 Daniel G. Taylor + + This file is part of Arista. + + Arista is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 2.1 of + the License, or (at your option) any later version. + + Arista 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with Arista. If not, see + . +""" + +import gettext + +import gobject +import dbus + +from dbus.mainloop.glib import DBusGMainLoop +DBusGMainLoop(set_as_default=True) + +_ = gettext.gettext + +class InputSource(object): + """ + A simple object representing an input source. + """ + def __init__(self, udi, interface): + """ + Create a new input device. + + @type udi: string + @param udi: The HAL device identifier for this device. + @type interface: dbus.Interface + @param interface: The Hal.Device DBus interface for this device. + """ + self.udi = udi + self.interface = interface + self.product = self.interface.GetProperty("info.product") + + @property + def nice_label(self): + """ + Get a nice label for this device. + + @rtype: str + @return: The label, in this case the product name + """ + return self.product + +class DVDDevice(InputSource): + """ + A simple object representing a DVD-capable device. + """ + def __init__(self, udi, interface): + """ + Create a new DVD device. + + @type udi: string + @param udi: The HAL device identifier for this device. + @type interface: dbus.Interface + @param interface: The Hal.Device DBus interface for this device. + """ + super(DVDDevice, self).__init__(udi, interface) + + self.video = False + self.video_udi = "" + self.label = "" + + @property + def path(self): + """ + Get the path to this device in the filesystem. + + @rtype: str + @return: Path to device + """ + return self.interface.GetProperty("block.device") + + @property + def media(self): + """ + Check whether media is in the device. + + @rtype: bool + @return: True if media is present in the device. + """ + return self.interface.GetProperty("storage.removable.media_available") + + @property + def nice_label(self, label=None): + """ + Get a nice label that looks like "The Big Lebowski" if a video + disk is found, otherwise the model name. + + @type label: string + @param label: Use this label instead of the disk label. + @rtype: string + @return: The nicely formatted label. + """ + if not label: + label = self.label + + if label: + words = [word.capitalize() for word in label.split("_")] + return " ".join(words) + else: + return self.product + +class V4LDevice(InputSource): + """ + A simple object representing a Video 4 Linux device. + """ + @property + def path(self): + """ + Get the path to this device in the filesystem. + + @rtype: str + @return: Path to device + """ + return self.interface.GetProperty("video4linux.device") + + @property + def version(self): + """ + Get the Video 4 Linux version of this device. + + @rtype: str + @return: The version, either '1' or '2' + """ + return self.interface.GetProperty("video4linux.version") + +class InputFinder(gobject.GObject): + """ + An object that will find and monitor DVD-capable devices on your + machine and emit signals when video disks are inserted / removed. + + Signals: + + - disc-found(InputFinder, DVDDevice, label) + - disc-lost(InputFinder, DVDDevice, label) + - v4l-capture-found(InputFinder, V4LDevice) + - v4l-capture-lost(InputFinder, V4LDevice) + """ + + __gsignals__ = { + "disc-found": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, + (gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT)), + "disc-lost": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, + (gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT)), + "v4l-capture-found": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, + (gobject.TYPE_PYOBJECT,)), + "v4l-capture-lost": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, + (gobject.TYPE_PYOBJECT,)), + + } + + def __init__(self): + """ + Create a new DVDFinder and attach to the DBus system bus to find + device information through HAL. + """ + self.__gobject_init__() + self.bus = dbus.SystemBus() + self.hal_obj = self.bus.get_object("org.freedesktop.Hal", + "/org/freedesktop/Hal/Manager") + self.hal = dbus.Interface(self.hal_obj, "org.freedesktop.Hal.Manager") + + self.drives = {} + self.capture_devices = {} + + udis = self.hal.FindDeviceByCapability("storage.cdrom") + for udi in udis: + dev_obj = self.bus.get_object("org.freedesktop.Hal", udi) + dev = dbus.Interface(dev_obj, "org.freedesktop.Hal.Device") + if dev.GetProperty("storage.cdrom.dvd"): + #print "Found DVD drive!" + block = dev.GetProperty("block.device") + self.drives[block] = DVDDevice(udi, dev) + + udis = self.hal.FindDeviceByCapability("volume.disc") + for udi in udis: + dev_obj = self.bus.get_object("org.freedesktop.Hal", udi) + dev = dbus.Interface(dev_obj, "org.freedesktop.Hal.Device") + if dev.PropertyExists("volume.disc.is_videodvd"): + if dev.GetProperty("volume.disc.is_videodvd"): + block = dev.GetProperty("block.device") + label = dev.GetProperty("volume.label") + if self.drives.has_key(block): + self.drives[block].video = True + self.drives[block].video_udi = udi + self.drives[block].label = label + + udis = self.hal.FindDeviceByCapability("video4linux") + for udi in udis: + dev_obj = self.bus.get_object("org.freedesktop.Hal", udi) + dev = dbus.Interface(dev_obj, "org.freedesktop.Hal.Device") + if dev.QueryCapability("video4linux.video_capture"): + device = dev.GetProperty("video4linux.device") + self.capture_devices[device] = V4LDevice(udi, dev) + + self.hal.connect_to_signal("DeviceAdded", self.device_added) + self.hal.connect_to_signal("DeviceRemoved", self.device_removed) + + def device_added(self, udi): + """ + Called when a device has been added to the system. If the device + is a volume with a video DVD the "video-found" signal is emitted. + """ + dev_obj = self.bus.get_object("org.freedesktop.Hal", udi) + dev = dbus.Interface(dev_obj, "org.freedesktop.Hal.Device") + if dev.PropertyExists("block.device"): + block = dev.GetProperty("block.device") + if self.drives.has_key(block): + if dev.PropertyExists("volume.disc.is_videodvd"): + if dev.GetProperty("volume.disc.is_videodvd"): + label = dev.GetProperty("volume.label") + self.drives[block].video = True + self.drives[block].video_udi = udi + self.drives[block].label = label + self.emit("disc-found", self.drives[block], label) + elif dev.PropertyExists("video4linux.device"): + device = dev.GetProperty("video4linux.device") + capture_device = V4LDevice(udi, dev) + self.capture_devices[device] = capture_device + self.emit("v4l-capture-found", capture_device) + + def device_removed(self, udi): + """ + Called when a device has been removed from the signal. If the + device is a volume with a video DVD the "video-lost" signal is + emitted. + """ + for block, drive in self.drives.items(): + if drive.video_udi == udi: + drive.video = False + drive.udi = "" + label = drive.label + drive.label = "" + self.emit("disc-lost", drive, label) + break + + for device, capture in self.capture_devices.items(): + if capture.udi == udi: + self.emit("v4l-capture-lost", self.capture_devices[device]) + del self.capture_devices[device] + break + +gobject.type_register(InputFinder) + +if __name__ == "__main__": + # Run a test to print out DVD-capable devices and whether or not they + # have video disks in them at the moment. + import gobject + gobject.threads_init() + + def found(finder, device, label): + print device.path + ": " + label + + def lost(finder, device, label): + print device.path + ": " + _("Not mounted.") + + finder = InputFinder() + finder.connect("disc-found", found) + finder.connect("disc-lost", lost) + + for device, drive in finder.drives.items(): + print drive.nice_label + ": " + device + + for device, capture in finder.capture_devices.items(): + print capture.nice_label + ": " + device + + loop = gobject.MainLoop() + loop.run() + diff -Nru arista-0.9.3+repack/arista/inputs/__init__.py arista-0.9.5/arista/inputs/__init__.py --- arista-0.9.3+repack/arista/inputs/__init__.py 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/arista/inputs/__init__.py 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,46 @@ +#!/usr/bin/env python + +""" + Arista Input Device Discovery + ============================= + This module provides methods to discover video-capable devices and disks + using various backends. + + License + ------- + Copyright 2008 - 2010 Daniel G. Taylor + + This file is part of Arista. + + Arista is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 2.1 of + the License, or (at your option) any later version. + + Arista 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with Arista. If not, see + . +""" + +import gettext +import logging + +_ = gettext.gettext + +log = logging.getLogger("inputs") + +try: + from udevdisco import * +except ImportError: + log.debug(_("Falling back to HAL device discovery")) + try: + from haldisco import * + except: + log.exception(_("Couldn't import udev- or HAL-based device discovery!")) + raise + diff -Nru arista-0.9.3+repack/arista/inputs/udevdisco.py arista-0.9.5/arista/inputs/udevdisco.py --- arista-0.9.3+repack/arista/inputs/udevdisco.py 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/arista/inputs/udevdisco.py 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,232 @@ +#!/usr/bin/env python + +""" + Arista Input Device Discovery + ============================= + A set of tools to discover DVD-capable devices and Video4Linux devices that + emit signals when disks that contain video are inserted or webcames / tuner + cards are plugged in using udev. + + http://github.com/nzjrs/python-gudev/blob/master/test.py + http://www.kernel.org/pub/linux/utils/kernel/hotplug/gudev/GUdevDevice.html + + License + ------- + Copyright 2008 - 2010 Daniel G. Taylor + + This file is part of Arista. + + Arista is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 2.1 of + the License, or (at your option) any later version. + + Arista 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with Arista. If not, see + . +""" + +import gettext + +import gobject +import gudev + +_ = gettext.gettext + +class InputSource(object): + """ + A simple object representing an input source. + """ + def __init__(self, device): + """ + Create a new input device. + + @type device: gudev.Device + @param device: The device that we are using as an input source + """ + self.device = device + + @property + def nice_label(self): + """ + Get a nice label for this device. + + @rtype: str + @return: The label, in this case the product name + """ + return self.path + + @property + def path(self): + """ + Get the device block in the filesystem for this device. + + @rtype: string + @return: The device block, such as "/dev/cdrom". + """ + return self.device.get_device_file() + +class DVDDevice(InputSource): + """ + A simple object representing a DVD-capable device. + """ + @property + def media(self): + """ + Check whether media is in the device. + + @rtype: bool + @return: True if media is present in the device. + """ + return self.device.has_property("ID_FS_TYPE") + + @property + def nice_label(self): + if self.device.has_property("ID_FS_LABEL"): + label = self.device.get_property("ID_FS_LABEL") + return " ".join([word.capitalize() for word in label.split("_")]) + else: + return self.device.get_property("ID_MODEL") + +class V4LDevice(InputSource): + """ + A simple object representing a Video 4 Linux device. + """ + @property + def nice_label(self): + return self.device.get_sysfs_attr("name") + + @property + def version(self): + """ + Get the video4linux version of this device. + """ + if self.device.has_property("ID_V4L_VERSION"): + return self.device.get_property("ID_V4L_VERSION") + else: + # Default to version 2 + return "2" + +class InputFinder(gobject.GObject): + """ + An object that will find and monitor DVD-capable devices on your + machine and emit signals when video disks are inserted / removed. + + Signals: + + - disc-found(InputFinder, DVDDevice, label) + - disc-lost(InputFinder, DVDDevice, label) + - v4l-capture-found(InputFinder, V4LDevice) + - v4l-capture-lost(InputFinder, V4LDevice) + """ + + __gsignals__ = { + "disc-found": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, + (gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT)), + "disc-lost": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, + (gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT)), + "v4l-capture-found": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, + (gobject.TYPE_PYOBJECT,)), + "v4l-capture-lost": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, + (gobject.TYPE_PYOBJECT,)), + + } + + def __init__(self): + """ + Create a new DVDFinder and attach to the udev system to listen for + events. + """ + self.__gobject_init__() + + self.client = gudev.Client(["video4linux", "block"]) + + self.drives = {} + self.capture_devices = {} + + for device in self.client.query_by_subsystem("video4linux"): + block = device.get_device_file() + self.capture_devices[block] = V4LDevice(device) + + for device in self.client.query_by_subsystem("block"): + if device.has_property("ID_CDROM"): + block = device.get_device_file() + self.drives[block] = DVDDevice(device) + + self.client.connect("uevent", self.event) + + def event(self, client, action, device): + """ + Handle a udev event. + """ + return { + "add": self.device_added, + "change": self.device_changed, + "remove": self.device_removed, + }.get(action, lambda x,y: None)(device, device.get_subsystem()) + + def device_added(self, device, subsystem): + """ + Called when a device has been added to the system. + """ + print device, subsystem + if subsystem == "video4linux": + block = device.get_device_file() + self.capture_devices[block] = V4LDevice(device) + self.emit("v4l-capture-found", self.capture_devices[block]) + + def device_changed(self, device, subsystem): + """ + Called when a device has changed. If the change represents a disc + being inserted or removed, fire the disc-found or disc-lost signals + respectively. + """ + if subsystem == "block" and device.has_property("ID_CDROM"): + block = device.get_device_file() + dvd_device = self.drives[block] + media_changed = dvd_device.media != device.has_property("ID_FS_TYPE") + dvd_device.device = device + if media_changed: + if dvd_device.media: + self.emit("disc-found", dvd_device, dvd_device.nice_label) + else: + self.emit("disc-lost", dvd_device, dvd_device.nice_label) + + def device_removed(self, device, subsystem): + """ + Called when a device has been removed from the system. + """ + pass + +gobject.type_register(InputFinder) + +if __name__ == "__main__": + # Run a test to print out DVD-capable devices and whether or not they + # have video disks in them at the moment. + import gobject + gobject.threads_init() + + def found(finder, device, label): + print device.path + ": " + label + + def lost(finder, device, label): + print device.path + ": " + _("Not mounted.") + + finder = InputFinder() + finder.connect("disc-found", found) + finder.connect("disc-lost", lost) + + for device, drive in finder.drives.items(): + print drive.nice_label + ": " + device + + for device, capture in finder.capture_devices.items(): + print capture.nice_label + " V4Lv" + str(capture.version) + ": " + device + + loop = gobject.MainLoop() + loop.run() + diff -Nru arista-0.9.3+repack/arista/inputs.py arista-0.9.5/arista/inputs.py --- arista-0.9.3+repack/arista/inputs.py 2009-04-28 20:56:29.000000000 +0100 +++ arista-0.9.5/arista/inputs.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,300 +0,0 @@ -#!/usr/bin/env python - -""" - Arista Input Device Discovery - ============================= - A set of tools to discover DVD-capable devices and Video4Linux devices that - emit signals when disks that contain video are inserted or webcames / tuner - cards are plugged in using HAL through DBus. - - License - ------- - Copyright 2008 - 2009 Daniel G. Taylor - - This file is part of Arista. - - Arista is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 2.1 of - the License, or (at your option) any later version. - - Foobar 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with Arista. If not, see - . -""" - -import gettext - -import gobject -import dbus - -from dbus.mainloop.glib import DBusGMainLoop -DBusGMainLoop(set_as_default=True) - -_ = gettext.gettext - -class InputSource(object): - """ - A simple object representing an input source. - """ - def __init__(self, udi, interface): - """ - Create a new input device. - - @type udi: string - @param udi: The HAL device identifier for this device. - @type interface: dbus.Interface - @param interface: The Hal.Device DBus interface for this device. - """ - self.udi = udi - self.interface = interface - self.product = self.interface.GetProperty("info.product") - - def _get_nice_label(self): - """ - Get a nice label for this device. - - @rtype: str - @return: The label, in this case the product name - """ - return self.product - - nice_label = property(_get_nice_label) - -class DVDDevice(InputSource): - """ - A simple object representing a DVD-capable device. - """ - def __init__(self, udi, interface): - """ - Create a new DVD device. - - @type udi: string - @param udi: The HAL device identifier for this device. - @type interface: dbus.Interface - @param interface: The Hal.Device DBus interface for this device. - """ - super(DVDDevice, self).__init__(udi, interface) - - self.video = False - self.video_udi = "" - self.label = "" - - def _get_media(self): - """ - Check whether media is in the device. - - @rtype: bool - @return: True if media is present in the device. - """ - return self.interface.GetProperty("storage.removable.media_available") - - media = property(_get_media) - - def _get_block(self): - """ - Get the device block in the filesystem for this device. - - @rtype: string - @return: The device block, such as "/dev/cdrom". - """ - return self.interface.GetProperty("block.device") - - block = property(_get_block) - - def get_nice_label(self, label=None): - """ - Get a nice label that looks like "The Big Lebowski" if a video - disk is found, otherwise the model name. - - @type label: string - @param label: Use this label instead of the disk label. - @rtype: string - @return: The nicely formatted label. - """ - if not label: - label = self.label - - if label: - words = [word.capitalize() for word in label.split("_")] - return " ".join(words) - else: - return self.product - - nice_label = property(get_nice_label) - -class V4LDevice(InputSource): - """ - A simple object representing a Video 4 Linux device. - """ - def _get_device(self): - """ - Get the device block in the filesystem for this device. - - @rtype: string - @return: The device block, such as "/dev/cdrom". - """ - return self.interface.GetProperty("video4linux.device") - - device = property(_get_device) - - def _get_version(self): - """ - Get the Video 4 Linux version of this device. - - @rtype: str - @return: The version, either '1' or '2' - """ - return self.interface.GetProperty("video4linux.version") - - version = property(_get_version) - -class InputFinder(gobject.GObject): - """ - An object that will find and monitor DVD-capable devices on your - machine and emit signals when video disks are inserted / removed. - - Signals: - - - disc-found(InputFinder, DVDDevice, label) - - disc-lost(InputFinder, DVDDevice, label) - - v4l-capture-found(InputFinder, V4LDevice) - - v4l-capture-lost(InputFinder, V4LDevice) - """ - - __gsignals__ = { - "disc-found": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, - (gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT)), - "disc-lost": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, - (gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT)), - "v4l-capture-found": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, - (gobject.TYPE_PYOBJECT,)), - "v4l-capture-lost": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, - (gobject.TYPE_PYOBJECT,)), - - } - - def __init__(self): - """ - Create a new DVDFinder and attach to the DBus system bus to find - device information through HAL. - """ - self.__gobject_init__() - self.bus = dbus.SystemBus() - self.hal_obj = self.bus.get_object("org.freedesktop.Hal", - "/org/freedesktop/Hal/Manager") - self.hal = dbus.Interface(self.hal_obj, "org.freedesktop.Hal.Manager") - - self.drives = {} - self.capture_devices = {} - - udis = self.hal.FindDeviceByCapability("storage.cdrom") - for udi in udis: - dev_obj = self.bus.get_object("org.freedesktop.Hal", udi) - dev = dbus.Interface(dev_obj, "org.freedesktop.Hal.Device") - if dev.GetProperty("storage.cdrom.dvd"): - #print "Found DVD drive!" - block = dev.GetProperty("block.device") - self.drives[block] = DVDDevice(udi, dev) - - udis = self.hal.FindDeviceByCapability("volume.disc") - for udi in udis: - dev_obj = self.bus.get_object("org.freedesktop.Hal", udi) - dev = dbus.Interface(dev_obj, "org.freedesktop.Hal.Device") - if dev.PropertyExists("volume.disc.is_videodvd"): - if dev.GetProperty("volume.disc.is_videodvd"): - block = dev.GetProperty("block.device") - label = dev.GetProperty("volume.label") - if self.drives.has_key(block): - self.drives[block].video = True - self.drives[block].video_udi = udi - self.drives[block].label = label - - udis = self.hal.FindDeviceByCapability("video4linux") - for udi in udis: - dev_obj = self.bus.get_object("org.freedesktop.Hal", udi) - dev = dbus.Interface(dev_obj, "org.freedesktop.Hal.Device") - if dev.QueryCapability("video4linux.video_capture"): - device = dev.GetProperty("video4linux.device") - self.capture_devices[device] = V4LDevice(udi, dev) - - self.hal.connect_to_signal("DeviceAdded", self.device_added) - self.hal.connect_to_signal("DeviceRemoved", self.device_removed) - - def device_added(self, udi): - """ - Called when a device has been added to the system. If the device - is a volume with a video DVD the "video-found" signal is emitted. - """ - dev_obj = self.bus.get_object("org.freedesktop.Hal", udi) - dev = dbus.Interface(dev_obj, "org.freedesktop.Hal.Device") - if dev.PropertyExists("block.device"): - block = dev.GetProperty("block.device") - if self.drives.has_key(block): - if dev.PropertyExists("volume.disc.is_videodvd"): - if dev.GetProperty("volume.disc.is_videodvd"): - label = dev.GetProperty("volume.label") - self.drives[block].video = True - self.drives[block].video_udi = udi - self.drives[block].label = label - self.emit("disc-found", self.drives[block], label) - elif dev.PropertyExists("video4linux.device"): - device = dev.GetProperty("video4linux.device") - capture_device = V4LDevice(udi, dev) - self.capture_devices[device] = capture_device - self.emit("v4l-capture-found", capture_device) - - def device_removed(self, udi): - """ - Called when a device has been removed from the signal. If the - device is a volume with a video DVD the "video-lost" signal is - emitted. - """ - for block, drive in self.drives.items(): - if drive.video_udi == udi: - drive.video = False - drive.udi = "" - label = drive.label - drive.label = "" - self.emit("disc-lost", drive, label) - break - - for device, capture in self.capture_devices.items(): - if capture.udi == udi: - self.emit("v4l-capture-lost", self.capture_devices[device]) - del self.capture_devices[device] - break - -gobject.type_register(InputFinder) - -if __name__ == "__main__": - # Run a test to print out DVD-capable devices and whether or not they - # have video disks in them at the moment. - import gobject - gobject.threads_init() - - def found(finder, device, label): - print device.product + ": " + label - - def lost(finder, device, label): - print device.product + ": " + _("Not mounted.") - - finder = InputFinder() - finder.connect("disc-found", found) - finder.connect("disc-lost", lost) - - for block, drive in finder.drives.items(): - print drive.product + ": " + (drive.video and drive.label or \ - _("Not mounted.")) - - for device, capture in finder.capture_devices.items(): - print capture.product + ": " + device - - loop = gobject.MainLoop() - loop.run() - diff -Nru arista-0.9.3+repack/arista/presets.py arista-0.9.5/arista/presets.py --- arista-0.9.3+repack/arista/presets.py 2009-06-16 23:01:29.000000000 +0100 +++ arista-0.9.5/arista/presets.py 2010-06-13 11:38:18.000000000 +0100 @@ -20,7 +20,7 @@ License ------- - Copyright 2008 - 2009 Daniel G. Taylor + Copyright 2008 - 2010 Daniel G. Taylor This file is part of Arista. @@ -29,7 +29,7 @@ published by the Free Software Foundation, either version 2.1 of the License, or (at your option) any later version. - Foobar is distributed in the hope that it will be useful, + Arista 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 Lesser General Public License for more details. @@ -39,12 +39,17 @@ . """ +try: + import json +except ImportError: + import simplejson as json + import gettext import logging import os import sys +import tarfile import urllib2 -import xml.etree.ElementTree import gobject import gst @@ -56,8 +61,7 @@ _presets = {} _log = logging.getLogger("arista.presets") -UPDATE_LOCATION = "http://programmer-art.org" + \ - "/media/releases/arista-transcoder/presets/" +UPDATE_LOCATION = "http://www.transcoder.org/media/presets/" class Fraction(gst.Fraction): """ @@ -71,7 +75,7 @@ @param value: Either a single number or two numbers separated by a '/' that represent a fraction """ - parts = value.split("/") + parts = str(value).split("/") if len(parts) == 1: gst.Fraction.__init__(self, int(value), 1) @@ -160,6 +164,126 @@ return self.model else: return "%s %s" % (self.make, self.model) + + @property + def default_preset(self): + """ + Get the default preset for this device. If no default has been + defined, the first preset that was loaded is returned. If no + presets have been defined an exception is raised. + + @rtype: Preset + @return: The default preset for this device + @raise ValueError: No presets have been defined for this device + """ + if self.default: + preset = self.presets[self.default] + elif len(self.presets): + preset = self.presets[0] + else: + raise ValueError(_("No presets have been defined for " \ + "%(name)s") % { "name": self.name }) + + return preset + + @property + def json(self): + data = { + "make": self.make, + "model": self.model, + "description": self.description, + "author": { + "name": self.author.name, + "email": self.author.email, + }, + "version": self.version, + "icon": self.icon, + "default": self.default, + "presets": [], + } + + for name, preset in self.presets.items(): + rates = [] + for x in preset.acodec.rate[0], preset.acodec.rate[1], preset.vcodec.rate[0], preset.vcodec.rate[1]: + if isinstance(x, gst.Fraction): + if x.num == x.denom: + rates.append("%s" % x.num) + else: + rates.append("%s/%s" % (x.num, x.denom)) + else: + rates.append("%s" % x) + + data["presets"].append({ + "name": preset.name, + "container": preset.container, + "extension": preset.extension, + "acodec": { + "name": preset.acodec.name, + "container": preset.acodec.container, + "rate": [rates[0], rates[1]], + "passes": preset.acodec.passes, + "width": preset.acodec.width, + "depth": preset.acodec.depth, + "channels": preset.acodec.channels, + }, + "vcodec": { + "name": preset.vcodec.name, + "container": preset.vcodec.container, + "rate": [rates[2], rates[3]], + "passes": preset.vcodec.passes, + "width": preset.vcodec.width, + "height": preset.vcodec.height, + }, + }) + + return json.dumps(data, indent=4) + + @staticmethod + def from_json(data): + parsed = json.loads(data) + + device = Device(**{ + "make": parsed.get("make", "Generic"), + "model": parsed.get("model", ""), + "description": parsed.get("description", ""), + "author": Author( + name = parsed.get("author", {}).get("name", ""), + email = parsed.get("author", {}).get("email", ""), + ), + "version": parsed.get("version", ""), + "icon": parsed.get("icon", ""), + "default": parsed.get("default", ""), + }) + + for preset in parsed.get("presets", []): + acodec = preset.get("acodec", {}) + vcodec = preset.get("vcodec", {}) + device.presets[preset.get("name", "")] = Preset(**{ + "name": preset.get("name", ""), + "container": preset.get("container", ""), + "extension": preset.get("extension", ""), + "icon": preset.get("icon", ""), + "acodec": AudioCodec(**{ + "name": acodec.get("name", ""), + "container": acodec.get("container", ""), + "rate": acodec.get("rate", []), + "passes": acodec.get("passes", []), + "width": acodec.get("width", []), + "depth": acodec.get("depth", []), + "channels": acodec.get("channels", []), + }), + "vcodec": VideoCodec(**{ + "name": vcodec.get("name", ""), + "container": vcodec.get("container", ""), + "rate": [Fraction(x) for x in vcodec.get("rate", [])], + "passes": vcodec.get("passes", []), + "width": vcodec.get("width", []), + "height": vcodec.get("height", []), + }), + "device": device, + }) + + return device class Preset(object): """ @@ -167,7 +291,7 @@ device. """ def __init__(self, name = "", container = "", extension = "", - acodec = None, vcodec = None): + acodec = None, vcodec = None, device = None, icon = None): """ @type name: str @param name: The name of the preset, e.g. "High Quality" @@ -179,12 +303,16 @@ @param acodec: The audio encoding settings @type vcodec: VideoCodec @param vcodec: The video encoding settings + @type device: Device + @param device: A link back to the device this preset belongs to """ self.name = name self.container = container self.extension = extension self.acodec = acodec self.vcodec = vcodec + self.device = device + self.icon = icon def __repr__(self): return "%s %s" % (self.name, self.container) @@ -228,13 +356,18 @@ ] missing = [] + missingdesc = "" for element in elements: if not gst.element_factory_find(element): missing.append(gst.pbutils.missing_element_installer_detail_new(element)) + if missingdesc: + missingdesc += ", %s" % element + else: + missingdesc += element if missing: + _log.info("Attempting to install elements: %s" % missingdesc) if gst.pbutils.install_plugins_supported(): - def install_done(result, null): if result == gst.pbutils.INSTALL_PLUGINS_INSTALL_IN_PROGRESS: # Ignore start of installer message @@ -242,12 +375,14 @@ elif result == gst.pbutils.INSTALL_PLUGINS_SUCCESS: callback(self, True, *args) else: + _log.error("Unable to install required elements!") callback(self, False, *args) context = gst.pbutils.InstallPluginsContext() gst.pbutils.install_plugins_async(missing, context, install_done, "") else: + _log.error("Installing elements not supported!") gobject.idle_add(callback, self, False, *args) else: gobject.idle_add(callback, self, True, *args) @@ -257,7 +392,7 @@ Settings for encoding audio or video. This object defines options common to both audio and video encoding. """ - def __init__(self, name = "", container = ""): + def __init__(self, name=None, container=None, passes=None): """ @type name: str @param name: The name of the encoding GStreamer element, e.g. faac @@ -267,10 +402,11 @@ may not want to wrap it in an avi or mp4; if not set it defaults to the preset container """ - self.name = name - self.container = container + self.name = name and name or "" + self.container = container and container or "" + self.passes = passes and passes or [] + self.rate = (Fraction(), Fraction()) - self.passes = [] def __repr__(self): return "%s %s" % (self.name, self.container) @@ -279,157 +415,22 @@ """ Settings for encoding audio. """ - def __init__(self, *args): - Codec.__init__(self, *args) - self.rate = (8000, 96000) - self.width = (8, 24) - self.depth = (8, 24) - self.channels = (1, 6) + def __init__(self, name=None, container=None, rate=None, passes=None, width=None, depth=None, channels=None): + Codec.__init__(self, name=name, container=container, passes=passes) + self.rate = rate and rate or (8000, 96000) + self.width = width and width or (8, 24) + self.depth = depth and depth or (8, 24) + self.channels = channels and channels or (1, 6) class VideoCodec(Codec): """ Settings for encoding video. """ - def __init__(self, *args): - Codec.__init__(self, *args) - self.rate = (Fraction("1"), Fraction("60")) - self.width = (2, 1920) - self.height = (2, 1080) - -def _parse_range(value, type = int): - """ - Parse a string into a range. - - >>> _parse_range("1") - (1, 1) - >>> _parse_range("2, 5") - (2, 5) - >>> _parse_range("1.0, 6", type = float) - (1.0, 6.0) - - @type value: str - @param value: A string value to be parsed - @type type: type - @param type: The type to coerce value into - """ - parts = value.split(",") - - if len(parts) == 1: - return (type(parts[0]), type(parts[0])) - elif len(parts) == 2: - return (type(parts[0]), type(parts[1])) - else: - raise ValueError(_("Value may only contain one comma; got %(value)s") % { - "value": value - }) - -def _load_author(root): - """ - Load an author from a given xml element. - - @type root: xml.etree.Element - @param root: An author element with name and email children - @rtype: Author - @return: A new Author instance - """ - author = Author() - - for child in root.getchildren(): - if child.tag == "name": - author.name = child.text.strip() - elif child.tag == "email": - author.email = child.text.strip() - - return author - -def _load_audio_codec(root): - """ - Load an audio codec from a given xml element. - - @type root: xml.etree.Element - @param root: An audio codec element - @rtype: AudioCodec - @return: A new AudioCodec instance - """ - codec = AudioCodec() - - for child in root.getchildren(): - if child.tag == "name": - codec.name = child.text.strip() - elif child.tag == "container": - codec.container = child.text.strip() - elif child.tag == "width": - codec.width = _parse_range(child.text.strip()) - elif child.tag == "depth": - codec.depth = _parse_range(child.text.strip()) - elif child.tag == "channels": - codec.channels = _parse_range(child.text.strip()) - elif child.tag == "rate": - codec.rate = _parse_range(child.text.strip()) - elif child.tag == "passes": - for command in child.getchildren(): - codec.passes.append(command.text.strip()) - - return codec - -def _load_video_codec(root): - """ - Load a video codec from a given xml element. - - @type root: xml.etree.Element - @param root: An video codec element - @rtype: VideoCodec - @return: A new VideoCodec instance - """ - codec = VideoCodec() - - for child in root.getchildren(): - if child.tag == "name": - codec.name = child.text.strip() - elif child.tag == "container": - codec.container = child.text.strip() - elif child.tag == "width": - codec.width = _parse_range(child.text.strip()) - elif child.tag == "height": - codec.height = _parse_range(child.text.strip()) - elif child.tag == "rate": - codec.rate = _parse_range(child.text.strip(), Fraction) - elif child.tag == "passes": - for command in child.getchildren(): - codec.passes.append(command.text.strip()) - - return codec - -def _load_preset(root): - """ - Load a preset from a given xml element. - - @type root: xml.etree.Element - @param root: An preset element - @rtype: Preset - @return: A new preset instance - """ - preset = Preset() - - for child in root.getchildren(): - if child.tag == "name": - preset.name = child.text.strip() - elif child.tag == "container": - preset.container = child.text.strip() - elif child.tag == "extension": - preset.extension = child.text.strip() - elif child.tag == "audio": - preset.acodec = _load_audio_codec(child) - elif child.tag == "video": - preset.vcodec = _load_video_codec(child) - - if preset.acodec and not preset.acodec.container: - preset.acodec.container = preset.container - - if preset.vcodec and not preset.vcodec.container: - preset.vcodec.container = preset.container - - return preset + def __init__(self, name=None, container=None, rate=None, passes=None, width=None, height=None): + Codec.__init__(self, name=name, container=container, passes=passes) + self.rate = rate and rate or (Fraction("1"), Fraction("60")) + self.width = width and width or (2, 1920) + self.height = height and height or (2, 1080) def load(filename): """ @@ -440,34 +441,13 @@ @rtype: Device @return: A new device instance loaded from the file """ - tree = xml.etree.ElementTree.parse(filename) - - device = Device() + device = Device.from_json(open(filename).read()) device.filename = filename - for child in tree.getroot().getchildren(): - if child.tag == "make": - device.make = child.text.strip() - elif child.tag == "model": - device.model = child.text.strip() - elif child.tag == "description": - device.description = child.text.strip() - elif child.tag == "author": - device.author = _load_author(child) - elif child.tag == "version": - device.version = child.text.strip() - elif child.tag == "preset": - preset = (_load_preset(child)) - device.presets[preset.name] = preset - elif child.tag == "icon": - device.icon = child.text.strip() - elif child.tag == "default": - device.default = child.text.strip() - _log.debug(_("Loaded device %(device)s (%(presets)d presets)") % { "device": device.name, - "presets": len(device.presets) + "presets": len(device.presets), }) return device @@ -483,8 +463,11 @@ """ global _presets for filename in os.listdir(directory): - if filename.endswith("xml"): - _presets[filename[:-4]] = load(os.path.join(directory, filename)) + if filename.endswith("json"): + try: + _presets[filename[:-5]] = load(os.path.join(directory, filename)) + except: + _log.warning("Problem loading %s!" % filename) return _presets def get(): @@ -512,7 +495,29 @@ return info -def install_preset(location, name): +def extract(stream): + """ + Extract a preset file into the user's local presets directory. + + @type stream: a file-like object + @param stream: The opened bzip2-compressed tar file of the preset + @rtype: list + @return: The installed device preset shortnames ["name1", "name2", ...] + """ + local_path = os.path.expanduser(os.path.join("~", ".arista", "presets")) + + if not os.path.exists(local_path): + os.makedirs(local_path) + + tar = tarfile.open(mode="r|bz2", fileobj=stream) + _log.debug(_("Extracting %(filename)s") % { + "filename": hasattr(stream, "name") and stream.name or "data stream", + }) + tar.extractall(path=local_path) + + return [x[:-5] for x in tar.getnames() if x.endswith(".json")] + +def fetch(location, name): """ Attempt to fetch and install a preset. Presets are always installed to ~/.arista/presets/. @@ -521,41 +526,37 @@ @param location: The location of the preset @type name: str @param name: The name of the preset to fetch, without any extension + @rtype: list + @return: The installed device preset shortnames ["name1", "name2", ...] """ - local_path = os.path.expanduser(os.path.join("~", ".arista", "presets")) - - if not os.path.exists(local_path): - os.makedirs(local_path) - if not location.endswith("/"): location = location + "/" - for ext in ["xml", "svg"]: - path = ".".join([location + name, ext]) - _log.debug(_("Fetching %(location)s") % { + path = location + name + ".tar.bz2" + _log.debug(_("Fetching %(location)s") % { + "location": path, + }) + + updated = [] + + try: + f = urllib2.urlopen(path) + updated += extract(f) + except Exception, e: + _log.warning(_("There was an error fetching and installing " \ + "%(location)s: %(error)s") % { "location": path, + "error": str(e), }) - - try: - f = urllib2.urlopen(path) - local_file = os.path.join(local_path, ".".join([name, ext])) - _log.debug(_("Writing to %(file)s") % { - "file": local_file, - }) - open(local_file, "w").write(f.read()) - except Exception, e: - _log.error(_("There was an error fetching and installing " \ - "%(location)s: %(error)s") % { - "location": path, - "error": str(e), - }) + + return updated def check_for_updates(location = UPDATE_LOCATION): """ Check for updated presets from a central server. @type location: str - @param location: The directory where presets.txt and all preset files + @param location: The directory where latest.txt and all preset files can be found on the server @rtype: list @return: A list of [(location, name), (location, name), ...] for each @@ -569,7 +570,7 @@ location = location + "/" try: - f = urllib2.urlopen(location + "presets.txt") + f = urllib2.urlopen(location + "latest.txt") except urllib2.URLError: return updates @@ -600,25 +601,12 @@ "location": location, "error": str(e), }) - else: - _log.debug(_("Found new device preset %(name)s") % { - "name": name, - }) - try: - updates.append((location, name)) - except Exception, e: - _log.error(_("Error installing preset %(name)s " \ - "from %(location)s: %(error)s") % { - "name": name, - "location": location, - "error": str(e), - }) else: _log.warning(_("Malformed plugin version line %(line)s") % { "line": line, }) except: - _log.warning(_("There was a problem accessing %(location)spresets.txt!") % { + _log.warning(_("There was a problem accessing %(location)slatest.txt!") % { "location": location, }) @@ -638,13 +626,20 @@ if updates: for loc, name in updates: - install_preset(loc, name) + fetch(loc, name) else: _log.debug(_("All device presets are up to date!")) -# Automatically load presets - system, home, current path -for path in reversed(utils.get_search_paths()): - full = os.path.join(path, "presets") - if os.path.exists(full): - load_directory(full) +def reset(): + # Automatically load presets - system, home, current path + global _presets + + _presets = {} + + for path in reversed(utils.get_search_paths()): + full = os.path.join(path, "presets") + if os.path.exists(full): + load_directory(full) + +reset() diff -Nru arista-0.9.3+repack/arista/queue.py arista-0.9.5/arista/queue.py --- arista-0.9.3+repack/arista/queue.py 2009-06-16 21:47:00.000000000 +0100 +++ arista-0.9.5/arista/queue.py 2010-06-13 11:38:18.000000000 +0100 @@ -8,7 +8,7 @@ License ------- - Copyright 2008 - 2009 Daniel G. Taylor + Copyright 2008 - 2010 Daniel G. Taylor This file is part of Arista. @@ -17,7 +17,7 @@ published by the Free Software Foundation, either version 2.1 of the License, or (at your option) any later version. - Foobar is distributed in the hope that it will be useful, + Arista 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 Lesser General Public License for more details. @@ -44,26 +44,32 @@ """ An entry in the queue. """ - def __init__(self, input_options, outfile, preset): + def __init__(self, options): """ - @type input_options: arista.transcoder.InputOptions - @param input_options: The input options (uri, subs) to process - @type outfile: str - @param outfile: The output path to save to - @type preset: Preset - @param preset: The preset instance to use for the conversion - """ - self.input_options = input_options - self.outfile = outfile - self.preset = preset - self.transcoder = None + @type options: arista.transcoder.TranscoderOptions + @param options: The input options (uri, subs) to process + """ + self.options = options + + # Set when QueueEntry.stop() was called so you can react accordingly + self.force_stopped = False def __repr__(self): return _("Queue entry %(infile)s -> %(preset)s -> %(outfile)s" % { - "infile": self.input_options.uri, - "preset": self.preset, - "outfile": self.outfile, + "infile": self.options.uri, + "preset": self.options.preset, + "outfile": self.options.output_uri, }) + + def stop(self): + """ + Stop this queue entry from processing. + """ + if hasattr(self, "transcoder") and self.transcoder.pipe: + self.transcoder.pipe.send_event(gst.event_new_eos()) + self.transcoder.start() + + self.force_stopped = True class TranscodeQueue(gobject.GObject): """ @@ -77,9 +83,16 @@ "entry-added": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT,)), # QueueEntry "entry-discovered": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, + (gobject.TYPE_PYOBJECT, # QueueEntry + gobject.TYPE_PYOBJECT, # info + gobject.TYPE_PYOBJECT)), # is_media + "entry-pass-setup": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT,)), # QueueEntry "entry-start": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT,)), # QueueEntry + "entry-error": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, + (gobject.TYPE_PYOBJECT, # QueueEntry + gobject.TYPE_PYOBJECT,)), # errorstr "entry-complete": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT,)), # QueueEntry } @@ -139,11 +152,15 @@ """ self._queue.insert(pos, entry) - def append(self, input_options, outfile, preset): + def append(self, options): """ Append a QueueEntry to the queue. """ - self._queue.append(QueueEntry(input_options, outfile, preset)) + # Sanity check of input options + if not options.uri or not options.preset or not options.output_uri: + raise ValueError("Invalid input options %s" % str(options)) + + self._queue.append(QueueEntry(options)) self.emit("entry-added", self._queue[-1]) def remove(self, entry): @@ -167,22 +184,27 @@ _log.debug(_("Found item in queue! Queue is %(queue)s" % { "queue": str(self) })) - item.transcoder = Transcoder(item.input_options, item.outfile, - item.preset) + item.transcoder = Transcoder(item.options) item.transcoder.connect("complete", self._on_complete) def discovered(transcoder, info, is_media): - self.emit("entry-discovered", item) + self.emit("entry-discovered", item, info, is_media) if not is_media: + self.emit("entry-error", item, _("Not a recognized media file!")) self._queue.pop(0) self.pipe_running = False def pass_setup(transcoder): + self.emit("entry-pass-setup", item) if transcoder.enc_pass == 0: self.emit("entry-start", item) + def error(transcoder, errorstr): + self.emit("entry-error", item, errorstr) + item.transcoder.connect("discovered", discovered) item.transcoder.connect("pass-setup", pass_setup) + item.transcoder.connect("error", error) self.pipe_running = True return True diff -Nru arista-0.9.3+repack/arista/transcoder.py arista-0.9.5/arista/transcoder.py --- arista-0.9.3+repack/arista/transcoder.py 2009-06-16 22:52:07.000000000 +0100 +++ arista-0.9.5/arista/transcoder.py 2010-06-13 11:38:18.000000000 +0100 @@ -7,7 +7,7 @@ License ------- - Copyright 2009 Daniel G. Taylor + Copyright 2009 - 2010 Daniel G. Taylor This file is part of Arista. @@ -16,7 +16,7 @@ published by the Free Software Foundation, either version 2.1 of the License, or (at your option) any later version. - Foobar is distributed in the hope that it will be useful, + Arista 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 Lesser General Public License for more details. @@ -33,6 +33,17 @@ import sys import time +# Default to 2 CPUs as most seem to be dual-core these days +CPU_COUNT = 2 +try: + import multiprocessing + try: + CPU_COUNT = multiprocessing.cpu_count() + except NotImplementedError: + pass +except ImportError: + pass + import gobject import gst @@ -69,15 +80,20 @@ # Transcoder Options # ============================================================================= -class InputOptions(object): +class TranscoderOptions(object): """ - Options pertaining to the input location, subtitles, etc. + Options pertaining to the input/output location, presets, + subtitles, etc. """ - def __init__(self, uri, subfile = None, font = "Sans Bold 16", - deinterlace = None): + def __init__(self, uri = None, preset = None, output_uri = None, + subfile = None, font = "Sans Bold 16", deinterlace = None): """ @type uri: str @param uri: The URI to the input file, device, or stream + @type preset: Preset + @param preset: The preset to convert to + @type output_uri: str + @param output_uri: The URI to the output file, device, or stream @type subfile: str @param subfile: The location of the subtitle file @type font: str @@ -85,14 +101,16 @@ @type deinterlace: bool @param deinterlace: Force deinterlacing of the input data """ - self.reset(uri, subfile, font, deinterlace) + self.reset(uri, preset, output_uri, subfile, font, deinterlace) - def reset(self, uri = None, subfile = None, font = "Sans Bold 16", - deinterlace = None): + def reset(self, uri = None, preset = None, output_uri = None, + subfile = None, font = "Sans Bold 16", deinterlace = None): """ Reset the input options to nothing. """ self.uri = uri + self.preset = preset + self.output_uri = output_uri self.subfile = subfile self.font = font self.deinterlace = deinterlace @@ -103,7 +121,7 @@ class Transcoder(gobject.GObject): """ - + The transcoder - converts media between formats. """ __gsignals__ = { "discovered": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, @@ -115,49 +133,119 @@ (gobject.TYPE_PYOBJECT, # bus gobject.TYPE_PYOBJECT)), # message "complete": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, tuple()), + "error": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, + (gobject.TYPE_PYOBJECT,)), # error } - def __init__(self, input_options, outfile, preset): + def __init__(self, options): """ - @type infile: InputOptions - @param infile: The input options to process (uri, subtitles, etc) - @type outfile: str - @param outfile: The output path to save to - @type preset: Preset - @param preset: The preset instance to use for the conversion + @type options: TranscoderOptions + @param options: The options, like input uri, subtitles, preset, + output uri, etc. """ self.__gobject_init__() - self.input_options = input_options - self.outfile = outfile - self.preset = preset + self.options = options self.pipe = None self.enc_pass = 0 - def _got_info(info, is_media): - self.info = info - self.emit("discovered", info, is_media) - - if info.is_video or info.is_audio: - self._setup_pass() - self.start() + self._percent_cached = 0 + self._percent_cached_time = 0 - self.info = None - self.discoverer = discoverer.Discoverer(input_options.uri) - self.discoverer.connect("discovered", _got_info) - self.discoverer.discover() + if options.uri.startswith("dvd://") and len(options.uri.split("@")) < 2: + # This is a DVD and no title is yet selected... find the best + # candidate by searching for the longest title! + self.options.uri += "@1" + self.dvd_infos = [] + + def _got_info(info, is_media): + self.dvd_infos.append([discoverer, info]) + parts = self.options.uri.split("@") + fname = parts[0] + title = int(parts[1]) + if title >= 8: + # We've checked 8 titles, let's give up and pick the + # most likely to be the main feature. + longest = 0 + self.info = None + for disco, info in self.dvd_infos: + if info.length > longest: + self.discoverer = disco + self.info = info + longest = info.length + + if not self.info: + self.emit("error", _("No valid DVD title found!")) + return + + self.options.uri = self.info.filename + + _log.debug(_("Longest title found is %(filename)s") % { + "filename": self.options.uri, + }) + + self.emit("discovered", self.info, self.info.is_video or self.info.is_audio) + + if self.info.is_video or self.info.is_audio: + try: + self._setup_pass() + except PipelineException, e: + self.emit("error", str(e)) + return + + self.start() + return + + self.options.uri = fname + "@" + str(title + 1) + self.discoverer = discoverer.Discoverer(options.uri) + self.discoverer.connect("discovered", _got_info) + self.discoverer.discover() + + self.discoverer = discoverer.Discoverer(options.uri) + self.discoverer.connect("discovered", _got_info) + self.discoverer.discover() + + else: + def _got_info(info, is_media): + self.info = info + self.emit("discovered", info, is_media) + + if info.is_video or info.is_audio: + try: + self._setup_pass() + except PipelineException, e: + self.emit("error", str(e)) + return + + self.start() + + self.info = None + self.discoverer = discoverer.Discoverer(options.uri) + self.discoverer.connect("discovered", _got_info) + self.discoverer.discover() @property def infile(self): """ Provide access to the input uri for backwards compatibility after - moving to InputOptions for uri, subtitles, etc. + moving to TranscoderOptions for uri, subtitles, etc. @rtype: str @return: The input uri to process """ - return self.input_options.uri + return self.options.uri + + @property + def preset(self): + """ + Provide access to the output preset for backwards compatibility + after moving to TranscoderOptions. + + @rtype: Preset + @return: The output preset + """ + return self.options.preset def _get_source(self): """ @@ -169,22 +257,28 @@ @return: Source to prepend to gst-launch style strings. """ if self.infile.startswith("dvd://"): - if self.input_options.deinterlace is None: - self.input_options.deinterlace = True - parts = self.infile[6:].split("@") + parts = self.infile.split("@") + device = parts[0][6:] + + title = 1 if len(parts) > 1: - title = parts[1] - src = "dvdreadsrc device=\"%s\" title=\"%s\"" % (parts[0], parts[1]) - else: - src = "dvdreadsrc device=\"%s\"" % parts[0] - elif self.infile.startswith("v4l://"): - src = "v4lsrc device=\"%s\"" % self.infile[6:] - elif self.infile.startswith("v4l2://"): - src = "v4l2src device=\"%s\"" % self.infile[7:] + try: + title = int(parts[1]) + except: + title = 1 + + if self.options.deinterlace is None: + self.options.deinterlace = True + + return "dvdreadsrc device=\"%s\" title=%d ! decodebin2 name=dmux" % (device, title) + elif self.infile.startswith("v4l://") or self.infile.startswith("v4l2://"): + filename = self.infile + elif self.infile.startswith("file://"): + filename = self.infile else: - src = "filesrc location=\"%s\"" % self.infile - - return src + " name=source" + filename = "file://" + self.infile + + return "uridecodebin uri=\"%s\" name=dmux" % filename def _setup_pass(self): """ @@ -230,8 +324,8 @@ src = self._get_source() - cmd = "%s ! decodebin2 name=dmux %s filesink name=sink " \ - "location=\"%s\"" % (src, mux_str, self.outfile) + cmd = "%s %s filesink name=sink " \ + "location=\"%s\"" % (src, mux_str, self.options.output_uri) if self.info.is_video and self.preset.vcodec: # ================================================================= @@ -290,8 +384,12 @@ px = (hmin - height) / 2 vbox = "videobox top=%i bottom=%i ! " % (-px, -px) - if self.info.videocaps[0].has_key("pixel-aspect-ratio"): - width = int(width * float(self.info.videocaps[0]["pixel-aspect-ratio"])) + try: + if self.info.videocaps[0].has_key("pixel-aspect-ratio"): + width = int(width * float(self.info.videocaps[0]["pixel-aspect-ratio"])) + except KeyError: + # The videocaps we are looking for may not even exist, just ignore + pass # FIXME Odd widths / heights seem to freeze gstreamer if width % 2: @@ -353,26 +451,33 @@ # Setup the video encoder and options # ================================================================= vencoder = "%s %s" % (self.preset.vcodec.name, - self.preset.vcodec.passes[self.enc_pass]) + self.preset.vcodec.passes[self.enc_pass] % { + "threads": CPU_COUNT, + }) deint = "" - if self.input_options.deinterlace: + if self.options.deinterlace: deint = " ffdeinterlace ! " sub = "" - if self.input_options.subfile: + if self.options.subfile: # Render subtitles onto the video stream sub = "textoverlay font-desc=\"%(font)s\" name=txt ! " % { - "font": self.input_options.font, + "font": self.options.font, } cmd += " filesrc location=\"%(subfile)s\" ! subparse ! txt." % { - "subfile": self.input_options.subfile + "subfile": self.options.subfile } + vmux = premux + if container in ["qtmux", "webmmux", "ffmux_dvd", "matroskamux"]: + if premux.startswith("mux"): + vmux += "video_%d" + cmd += " dmux. ! queue ! ffmpegcolorspace ! videorate !" \ "%s %s videoscale ! %s ! %s%s ! tee " \ - "name=videotee ! queue ! %svideo_00" % \ - (deint, sub, self.vcaps.to_string(), vbox, vencoder, premux) + "name=videotee ! queue ! %s" % \ + (deint, sub, self.vcaps.to_string(), vbox, vencoder, vmux) if self.info.is_audio and self.preset.acodec and \ self.enc_pass == len(self.preset.vcodec.passes) - 1: @@ -382,24 +487,31 @@ element = gst.element_factory_make(self.preset.acodec.name, "aencoder") - # TODO: Add rate limits based on encoder sink below + fields = {} for cap in element.get_pad("sink").get_caps(): - for field in ["width", "depth", "channels"]: + for field in ["width", "depth", "rate", "channels"]: if cap.has_field(field): + if field not in fields: + fields[field] = [0, 0] value = cap[field] if isinstance(value, gst.IntRange): vmin, vmax = value.low, value.high else: vmin, vmax = value, value - cur = getattr(self.preset.acodec, field) - if cur[0] < vmin: - cur = (vmin, cur[1]) - setattr(self.preset.acodec, field, cur) - - if cur[1] > vmax: - cur = (cur[0], vmax) - setattr(self.preset.acodec, field, cur) + if vmin < fields[field][0]: + fields[field][0] = vmin + if vmax > fields[field][1]: + fields[field][1] = vmax + + for name, (amin, amax) in fields.items(): + cur = getattr(self.preset.acodec, field) + if cur[0] < amin: + cur = (amin, cur[1]) + setattr(self.preset.acodec, field, cur) + if cur[1] > amax: + cur = (cur[0], amax) + setattr(self.preset.acodec, field, cur) # ================================================================= # Prepare audio capabilities @@ -408,16 +520,12 @@ current = getattr(self.info, "audio" + attribute) amin, amax = getattr(self.preset.acodec, attribute) - aminvalue = amin - amaxvalue = amax - - if current > amaxvalue: - for acap in self.acaps: - acap[attribute] = amax - elif current < aminvalue: - for acap in self.acaps: + for acap in self.acaps: + if amin < amax: + acap[attribute] = gst.IntRange(amin, amax) + else: acap[attribute] = amin - + # ================================================================= # Add audio transcoding pipeline to command # ================================================================= @@ -425,11 +533,18 @@ self.preset.acodec.passes[ \ len(self.preset.vcodec.passes) - \ self.enc_pass - 1 \ - ] - + ] % { + "threads": CPU_COUNT, + } + + amux = premux + if container in ["qtmux", "webmmux", "ffmux_dvd", "matroskamux"]: + if premux.startswith("mux"): + amux += "audio_%d" + cmd += " dmux. ! queue ! audioconvert ! audiorate ! " \ - "audioresample ! %s ! %s ! %saudio_00" % \ - (self.acaps.to_string(), aencoder, premux) + "audioresample ! %s ! %s ! %s" % \ + (self.acaps.to_string(), aencoder, amux) # ===================================================================== # Build the pipeline and get ready! @@ -543,7 +658,7 @@ """ duration = max(self.info.videolength, self.info.audiolength) - if not duration: + if not duration or duration < 0: return 0.0, _("Unknown") try: @@ -554,9 +669,16 @@ raise TranscoderStatusException(_("No pipeline to query!")) percent = pos / float(duration) - if percent == 0: + if percent <= 0.0: return 0.0, _("Unknown") + if self._percent_cached == percent and time.time() - self._percent_cached_time > 5: + self.pipe.post_message(gst.message_new_eos(self.pipe)) + + if self._percent_cached != percent: + self._percent_cached = percent + self._percent_cached_time = time.time() + total = 1.0 / percent * (time.time() - self.start_time) rem = total - (time.time() - self.start_time) min = rem / 60 diff -Nru arista-0.9.3+repack/arista/utils.py arista-0.9.5/arista/utils.py --- arista-0.9.3+repack/arista/utils.py 2009-04-28 20:56:57.000000000 +0100 +++ arista-0.9.5/arista/utils.py 2010-06-13 11:38:18.000000000 +0100 @@ -7,7 +7,7 @@ License ------- - Copyright 2009 Daniel G. Taylor + Copyright 2009 - 2010 Daniel G. Taylor This file is part of Arista. @@ -16,7 +16,7 @@ published by the Free Software Foundation, either version 2.1 of the License, or (at your option) any later version. - Foobar is distributed in the hope that it will be useful, + Arista 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 Lesser General Public License for more details. @@ -29,10 +29,13 @@ import gettext import logging import os +import re import sys _ = gettext.gettext +RE_ENDS_NUM = re.compile(r'^.*(?P[0-9]+)$') + def get_search_paths(): """ Get a list of paths that are searched for installed resources. @@ -45,9 +48,11 @@ os.path.expanduser(os.path.join("~", ".arista")), os.path.join(sys.prefix, "share", "arista"), os.path.join(sys.prefix, "local", "share", "arista"), + # The following allows stuff like virtualenv to work! + os.path.join(os.path.join(os.path.dirname(os.path.dirname(__file__)), "share", "arista")), ] -def get_path(*parts): +def get_path(*parts, **kwargs): """ Get a path, searching first in the current directory, then the user's home directory, then sys.prefix, then sys.prefix + "local". @@ -60,6 +65,8 @@ @type parts: str @param parts: The parts of the path to get that you would normally send to os.path.join + @type default: bool + @param default: A default value to return rather than raising IOError @rtype: str @return: The full path to the relative path passed in @raise IOError: The path cannot be found in any location @@ -71,7 +78,55 @@ if os.path.exists(full): return full else: + if "default" in kwargs: + return kwargs["default"] + raise IOError(_("Can't find %(path)s in any known prefix!") % { "path": path, }) +def generate_output_path(filename, preset, to_be_created=[], + device_name=""): + """ + Generate a new output filename from an input filename and preset. + + @type filename: str + @param filename: The input file name + @type preset: arista.presets.Preset + @param preset: The preset being encoded + @type to_be_created: list + @param to_be_created: A list of filenames that will be created and + should not be overwritten, useful if you are + processing many items in a queue + @type device_name: str + @param device_name: Device name to appent to output filename, e.g. + myvideo-ipod.m4v + @rtype: str + @return: A new unique generated output path + """ + name, ext = os.path.splitext(filename) + + # Is this a special URI? Let's just use the basename then! + if name.startswith("dvd://") or name.startswith("v4l://") or name.startswith("v4l2://"): + name = os.path.basename(name) + + if device_name: + name += "-" + device_name + default_out = name + "." + preset.extension + + while os.path.exists(default_out) or default_out in to_be_created: + parts = default_out.split(".") + name, ext = ".".join(parts[:-1]), parts[-1] + + result = RE_ENDS_NUM.search(name) + if result: + value = result.group("number") + name = name[:-len(value)] + number = int(value) + 1 + else: + number = 1 + + default_out = "%s%d.%s" % (name, number, ext) + + return default_out + diff -Nru arista-0.9.3+repack/arista-gtk arista-0.9.5/arista-gtk --- arista-0.9.3+repack/arista-gtk 2009-06-16 22:50:49.000000000 +0100 +++ arista-0.9.5/arista-gtk 2010-06-13 11:38:18.000000000 +0100 @@ -8,7 +8,7 @@ License ------- - Copyright 2008 - 2009 Daniel G. Taylor + Copyright 2008 - 2010 Daniel G. Taylor This file is part of Arista. @@ -17,7 +17,7 @@ published by the Free Software Foundation, either version 2.1 of the License, or (at your option) any later version. - Foobar is distributed in the hope that it will be useful, + Arista 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 Lesser General Public License for more details. @@ -35,6 +35,7 @@ import sys import threading import time +import webbrowser from optparse import OptionParser @@ -48,6 +49,12 @@ if __name__ != "__main__": import gst +try: + import pynotify + pynotify.init("icon-summary-body") +except ImportError: + pynotify = None + import arista _ = gettext.gettext @@ -60,8 +67,9 @@ DEFAULT_CHECK_INPUTS = True DEFAULT_SHOW_TOOLBAR = True DEFAULT_SHOW_PREVIEW = True -DEFAULT_PREVIEW_FPS = 2 +DEFAULT_PREVIEW_FPS = 10 DEFAULT_CHECK_UPDATES = True +DEFAULT_OPEN_PATH = os.path.expanduser("~") RE_ENDS_NUM = re.compile(r'^.*(?P[0-9]+)$') @@ -105,11 +113,15 @@ return image if uri.startswith("file://"): - path = arista.utils.get_path("presets", uri[7:]) + try: + path = arista.utils.get_path("presets", uri[7:]) + except IOError: + path = "" + if os.path.exists(path): image = gtk.gdk.pixbuf_new_from_file_at_size(path, width, height) elif uri.startswith("stock://"): - image = theme.load_icon(uri[8:], size, 0) + image = theme.load_icon(uri[8:], gtk.ICON_SIZE_MENU, 0) else: raise ValueError(_("Unknown icon URI %(uri)s") % { "uri": uri @@ -189,22 +201,23 @@ gtk.gdk.threads_leave() if result == gtk.RESPONSE_YES: + devices = [] + for loc, name in updates: - arista.presets.install_preset(loc, name) + devices += arista.presets.fetch(loc, name) + + for device in devices: + icon = arista.utils.get_path("presets/" + arista.presets.get()[device].icon[7:]) + notice = pynotify.Notification(_("Update Successful"), _("Device preset %(name)s successfully updated.") % { + "name": arista.presets.get()[device], + }, icon) + notice.show() gtk.gdk.threads_enter() dialog.destroy() - dialog = gtk.MessageDialog(parent = self.main.window, - type = gtk.MESSAGE_INFO, - buttons = gtk.BUTTONS_OK, - message_format = _("Updates installed. Reloading device " \ - "presets now.")) - dialog.run() - dialog.destroy() - self.main.window.destroy() - del self.main - self.main = MainWindow() + arista.presets.reset() + self.main.setup_devices() gtk.gdk.threads_leave() else: gtk.gdk.threads_enter() @@ -339,7 +352,9 @@ output device, and preset for transcoding as well as managing the transcoding queue. """ - def __init__(self): + def __init__(self, runoptions): + self.runoptions = runoptions + ui_path = arista.utils.get_path("ui", "main.ui") # Load the GUI @@ -379,42 +394,17 @@ self.table.attach(self.devices, 1, 2, 1, 2, yoptions = gtk.FILL) self.table.attach(self.presets, 1, 2, 2, 3, yoptions = gtk.FILL) - self._setup_source() - - # Find plugins and sort them nicely - # Adds output device profiles to the output device combo box - - width, height = gtk.icon_size_lookup(gtk.ICON_SIZE_MENU) - - model = self.devices.get_model() - - selected = 0 - for x, (id, device) in enumerate(sorted(arista.presets.get().items(), - lambda x, y: cmp(x[1].make + x[1].model, - y[1].make + y[1].model))): - iter = model.append() - - image = _get_icon_pixbuf(device.icon, width, height) - - if image: - model.set_value(iter, 0, image) - - model.set_value(iter, 1, device.name) - model.set_value(iter, 2, device) - - if id == "computer": - selected = x - - self.devices.connect("changed", self.on_device_changed) - self.devices.set_active(selected) + self.setup_source() + self.setup_devices() self.fileiter = None self.transcoder = None - self.input_options = arista.transcoder.InputOptions('') + self.options = arista.transcoder.TranscoderOptions() # Setup the transcoding queue and watch for events self.queue = arista.queue.TranscodeQueue() self.queue.connect("entry-discovered", self.on_queue_entry_discovered) + self.queue.connect("entry-error", self.on_queue_entry_error) self.queue.connect("entry-complete", self.on_queue_entry_complete) self.queue_model = gtk.ListStore(gtk.gdk.Pixbuf, # Stock image @@ -457,9 +447,20 @@ self.toolbar.hide() self.menuitem_toolbar.set_active(DEFAULT_SHOW_TOOLBAR) + try: + value = client.get_value(CONFIG_PATH + "/last_open_path") + if value and os.path.exists(value): + self.last_open_path = value + else: + self.last_open_path = DEFAULT_OPEN_PATH + except ValueError: + self.last_open_path = DEFAULT_OPEN_PATH + client.notify_add(CONFIG_PATH + "/show_toolbar", self.on_gconf_show_toolbar) - client.notify_add(CONFIG_PATH + "/check_inputs", self._setup_source) + client.notify_add(CONFIG_PATH + "/check_inputs", self.setup_source) + client.notify_add(CONFIG_PATH + "/last_open_path", + self.on_gconf_last_open_path) # Show the interface! self.source.show() @@ -469,8 +470,36 @@ self.hbox_progress.hide() self.image_preview.show_all() self.window.show() + + # Are we using the simplified interface? Hide stuff! + if self.runoptions.simple: + self.builder.get_object("menubar").hide() + self.toolbar.hide() + self.builder.get_object("vbox3").hide() + self.window.resize(320, 240) + + device = arista.presets.get()[self.runoptions.device] + + if not self.runoptions.preset: + preset = device.presets[device.default] + else: + for (id, preset) in device.presets.items(): + if preset.name == options.preset: + break + + outputs = [] + for fname in self.runoptions.files: + output = arista.utils.generate_output_path(fname, preset, + to_be_created=outputs, + device_name=self.runoptions.device) + + outputs.append(output) + + opts = arista.transcoder.TranscoderOptions(fname, preset, output) + + self.queue.append(opts) - def _setup_source(self, *args): + def setup_source(self, *args): """ Setup the source widget. Creates a combo box or a file input button depending on the settings and available devices. @@ -520,7 +549,7 @@ iter = model.append() model.set_value(iter, 0, theme.load_icon("camera-video", size, 0)) - model.set_value(iter, 1, capture.product) + model.set_value(iter, 1, capture.nice_label) if capture.version == '1': model.set_value(iter, 2, "v4l://" + device) elif capture.version == '2': @@ -536,6 +565,11 @@ model.set_value(iter, 0, theme.load_icon(icon, size, 0)) model.set_value(iter, 1, _("Choose file...")) + iter = model.append() + icon = gtk.stock_lookup(gtk.STOCK_OPEN)[0] + model.set_value(iter, 0, theme.load_icon(icon, size, 0)) + model.set_value(iter, 1, _("Choose directory...")) + self.source.set_active(0) self.source.connect("changed", self.on_source_changed) @@ -567,12 +601,59 @@ # Attach and show the source self.source_hbox.show_all() + def setup_devices(self): + # Find plugins and sort them nicely + # Adds output device profiles to the output device combo box + + width, height = gtk.icon_size_lookup(gtk.ICON_SIZE_MENU) + + model = self.devices.get_model() + + # Disconnect from existing signals + if hasattr(self.devices, "handler_id"): + self.devices.disconnect(self.devices.handler_id) + + # Remove existing items + model.clear() + + self.default_device = 0 + for x, (id, device) in enumerate(sorted(arista.presets.get().items(), + lambda x, y: cmp(x[1].name, y[1].name))): + iter = model.append() + + image = _get_icon_pixbuf(device.icon, width, height) + + if image: + model.set_value(iter, 0, image) + + model.set_value(iter, 1, device.name) + model.set_value(iter, 2, device) + + if id == "computer": + self.default_device = x + + iter = model.append() + icon = _get_icon_pixbuf("stock://gtk-add", width, height) + model.set_value(iter, 0, icon) + model.set_value(iter, 1, "Create new") + model.set_value(iter, 2, "http://www.transcoder.org/presets/create/") + + iter = model.append() + icon = _get_icon_pixbuf("stock://gtk-go-down", width, height) + model.set_value(iter, 0, icon) + model.set_value(iter, 1, "Download more") + model.set_value(iter, 2, "http://www.transcoder.org/presets/") + + self.devices.handler_id = self.devices.connect("changed", + self.on_device_changed) + self.devices.set_active(self.default_device) + def on_source_properties(self, widget): """ Show source properties dialog so user can set things like subtitles, forcing deinterlacing, etc. """ - dialog = PropertiesDialog(self.input_options) + dialog = PropertiesDialog(self.options) dialog.window.run() dialog.window.destroy() @@ -610,8 +691,9 @@ """ model = self.source.get_model() for pos, item in enumerate(model): - if item[1].startswith(device.product): + if item[2] and item[2].endswith(device.path): model[pos] = (item[0], device.nice_label, item[2]) + break def on_disc_lost(self, finder, device, label): """ @@ -619,13 +701,18 @@ """ model = self.source.get_model() for pos, item in enumerate(model): - if item[1].startswith(device.get_nice_label(label)): + if item[2].endswith(device.path): model[pos] = (item[0], device.nice_label, item[2]) + break def on_source_changed(self, widget): """ The source combo box or file chooser button has changed, update! """ + theme = gtk.icon_theme_get_default() + size = gtk.ICON_SIZE_MENU + width, height = gtk.icon_size_lookup(size) + iter = widget.get_active_iter() model = widget.get_model() item = model.get_value(iter, 1) @@ -634,19 +721,25 @@ buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, gtk.STOCK_OPEN, gtk.RESPONSE_ACCEPT)) dialog.set_property("local-only", False) + dialog.set_current_folder(self.last_open_path) response = dialog.run() dialog.hide() if response == gtk.RESPONSE_ACCEPT: if self.fileiter: model.remove(self.fileiter) filename = dialog.get_filename() + client = gconf.client_get_default() + client.set_string(CONFIG_PATH + "/last_open_path", + os.path.dirname(filename)) pos = widget.get_active() newiter = model.insert(pos) - theme = gtk.icon_theme_get_default() icon = _get_filename_icon(filename) if icon: model.set_value(newiter, 0, icon.load_icon()) - model.set_value(newiter, 1, os.path.basename(filename)) + basename = os.path.basename(filename) + if len(basename) > 25: + basename = basename[:22] + "..." + model.set_value(newiter, 1, basename) model.set_value(newiter, 2, filename) self.fileiter = newiter widget.set_active(pos) @@ -656,25 +749,68 @@ widget.set_active(pos - 1) else: widget.set_active(0) - + elif item == _("Choose directory..."): + dialog = gtk.FileChooserDialog(title=_("Choose Source Directory..."), + action=gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, + buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, + gtk.STOCK_OPEN, gtk.RESPONSE_ACCEPT)) + dialog.set_property("local-only", False) + dialog.set_current_folder(self.last_open_path) + response = dialog.run() + dialog.hide() + if response == gtk.RESPONSE_ACCEPT: + if self.fileiter: + model.remove(self.fileiter) + directory = dialog.get_current_folder() + client = gconf.client_get_default() + client.set_string(CONFIG_PATH + "/last_open_path", directory) + pos = widget.get_active() - 1 + newiter = model.insert(pos) + icon = icon = _get_icon_pixbuf("stock://gtk-directory", width, height) + model.set_value(newiter, 0, icon) + model.set_value(newiter, 1, os.path.basename(directory.rstrip("/"))) + model.set_value(newiter, 2, directory) + self.fileiter = newiter + widget.set_active(pos) + else: + if self.fileiter: + pos = widget.get_active() + widget.set_active(pos - 2) + else: + widget.set_active(0) + # Reset the custom input options - self.input_options.reset() + self.options.reset() def on_device_changed(self, widget): """ The device combo was changed - update the presets for the newly selected device. """ + width, height = gtk.icon_size_lookup(gtk.ICON_SIZE_MENU) + iter = self.devices.get_active_iter() device = self.devices.get_model().get_value(iter, 2) + if isinstance(device, str): + webbrowser.open(device) + self.devices.set_active(self.default_device) + return + model = self.presets.get_model() model.clear() selected = 0 for (pos, (name, preset)) in enumerate(device.presets.items()): iter = model.append() + + if preset.icon: + image = _get_icon_pixbuf(preset.icon, width, height) + + if image: + model.set_value(iter, 0, image) + model.set_value(iter, 1, name) model.set_value(iter, 2, preset) if device.default and device.default == preset.name: @@ -715,7 +851,36 @@ self.presets.set_sensitive(False) can_encode = preset.check_elements(self.preset_ready) - + + def get_default_output_name(self, inname, preset): + """ + Get the default recommended output filename given an input path + and a preset. The original extension is removed, then the new + preset extension is added. If such a path already exists then + numbers are added before the extension until a non-existing path + is found to exist. + """ + if "." in inname: + default_out = ".".join(inname.split(".")[:-1]) + "." + preset.extension + else: + default_out = inname + "." + preset.extension + + while os.path.exists(default_out): + parts = default_out.split(".") + name, ext = ".".join(parts[:-1]), parts[-1] + + result = RE_ENDS_NUM.search(name) + if result: + value = result.group("number") + name = name[:-len(value)] + number = int(value) + 1 + else: + number = 1 + + default_out = "%s%d.%s" % (name, number, ext) + + return default_out + def preset_ready(self, preset, can_encode): """ Called when a preset is ready to be encoded after checking for @@ -739,49 +904,60 @@ if isinstance(self.source, gtk.ComboBox): iter = self.source.get_active_iter() model = self.source.get_model() - inname = model.get_value(iter, 1) inpath = model.get_value(iter, 2) + inname = os.path.basename(inpath) else: inpath = self.source.get_filename() inname = os.path.basename(inpath) - iter = self.devices.get_active_iter() device = self.devices.get_model().get_value(iter, 2) - if "." in inname: - default_out = ".".join(inname.split(".")[:-1]) + "." + preset.extension - else: - default_out = inname + "." + preset.extension - - while os.path.exists(default_out): - parts = default_out.split(".") - name, ext = ".".join(parts[:-1]), parts[-1] - - result = RE_ENDS_NUM.search(name) - if result: - value = result.group("number") - name = name[:-len(value)] - number = int(value) + 1 - else: - number = 1 - - default_out = "%s%d.%s" % (name, number, ext) - - dialog = gtk.FileChooserDialog(title = _("Choose Output File..."), + filenames = [] + if not os.path.isdir(inpath): + default_out = self.get_default_output_name(inpath, preset) + dialog = gtk.FileChooserDialog(title = _("Choose Output File..."), action = gtk.FILE_CHOOSER_ACTION_SAVE, buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, gtk.STOCK_SAVE, gtk.RESPONSE_ACCEPT)) - dialog.set_property("local-only", False) - dialog.set_property("do-overwrite-confirmation", True) - dialog.set_current_name(default_out) - response = dialog.run() - dialog.hide() - if response == gtk.RESPONSE_ACCEPT: - filename = dialog.get_filename() - - self.input_options.uri = inpath - - self.queue.append(self.input_options, filename, preset) + dialog.set_property("local-only", False) + dialog.set_property("do-overwrite-confirmation", True) + dialog.set_current_folder(os.path.dirname(inpath)) + dialog.set_current_name(os.path.basename(default_out)) + response = dialog.run() + dialog.hide() + if response == gtk.RESPONSE_ACCEPT: + filenames.append((inpath, dialog.get_filename())) + else: + dialog = gtk.FileChooserDialog(title = _("Choose Output Directory..."), + action = gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, + buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, + gtk.STOCK_SAVE, gtk.RESPONSE_ACCEPT)) + dialog.set_property("local-only", False) + dialog.set_property("do-overwrite-confirmation", True) + dialog.set_current_folder(inpath) + response = dialog.run() + dialog.hide() + if response == gtk.RESPONSE_ACCEPT: + outdir = dialog.get_current_folder() + for root, dirs, files in os.walk(inpath): + for fname in files: + full_path = os.path.join(root, fname) + filenames.append((full_path, os.path.join(outdir, os.path.basename(self.get_default_output_name(full_path, preset))))) + + for inpath, outpath in filenames: + # Setup the transcode job options + self.options.uri = inpath + self.options.preset = preset + self.options.output_uri = outpath + + self.queue.append(self.options) + + # Reset options for next item, but copy relevant data + options = arista.transcoder.TranscoderOptions() + options.subfile = self.options.subfile + options.font = self.options.font + options.deinterlace = self.options.deinterlace + self.options = options iter = self.queue_model.append() width, height = gtk.icon_size_lookup(gtk.ICON_SIZE_MENU) @@ -791,10 +967,14 @@ self.queue_model.set_value(iter, 1, _("%(model)s (%(preset)s): %(filename)s") % { "model": device.model, "preset": preset.name, - "filename": os.path.basename(filename), + "filename": os.path.basename(outpath), }) self.queue_model.set_value(iter, 2, self.queue[-1]) + # Reset the options for the next item so we don't inadvertently + # change the queued option data! + self.options = arista.transcoder.TranscoderOptions() + gtk.gdk.threads_leave() def stop_processing_entry(self, entry): @@ -807,9 +987,13 @@ GStreamer finishes flushing its buffers, then will be removed. If another item is in the queue it will start processing then. """ - source = entry.transcoder.pipe.get_by_name("source") - source.send_event(gst.event_new_eos()) - entry.transcoder.start() + entry.stop() + + if self.runoptions.simple and len(self.queue) == 1: + # This is the last item in the simplified GUI, so we are done and + # should exit as soon as possible! + gobject.idle_add(gtk.main_quit) + return # Hide live preview while we wait for the item to finish self.image_preview.show() @@ -865,13 +1049,23 @@ else: self.toolbar.hide() - def on_queue_entry_discovered(self, queue, entry): + def on_gconf_last_open_path(self, client, connection, entry, args): + """ + Change the default location of the open dialog when choosing a + new file or folder to transcode. + """ + path = entry.get_value().get_string() + if os.path.exists(path): + self.last_open_path = path + else: + self.last_open_path = DEFAULT_OPEN_PATH + + def on_queue_entry_discovered(self, queue, entry, info, is_media): """ The queue entry has been discovered, see if it is a valid input file, if not show an error and remove it from the queue. """ - if not entry.transcoder.info.is_video and \ - not entry.transcoder.info.is_audio: + if not info.is_video and info.is_audio: _log.error(_("Input %(infile)s contains no valid streams!") % { "infile": entry.transcoder.infile, }) @@ -936,10 +1130,32 @@ self.hbox_progress.show() self.update_pause(True) - def on_queue_entry_complete(self, queue, entry): + def on_queue_entry_error(self, queue, entry, error_str): """ - An entry in the queue is finished. Update the queue model. + An entry in the queue has had an error. Update the queue model + and inform the user. """ + entry.transcoder.stop() + + if pynotify and not entry.force_stopped: + icon = arista.utils.get_path("ui/error.svg") + notice = pynotify.Notification(_("Error!"), _("Conversion of %(filename)s to %(device)s %(preset)s failed! Reason: %(reason)s") % { + "filename": os.path.basename(entry.options.output_uri), + "device": entry.options.preset.device, + "preset": entry.options.preset.name, + "reason": error_str, + }, icon) + notice.show() + else: + # TODO: Show a dialog or something for people with no notifications + pass + + if self.runoptions.simple and len(self.queue) == 1: + # This is the last item in the simplified GUI, so we are done and + # should exit as soon as possible! + gobject.idle_add(gtk.main_quit) + return + iter = self.queue_model.get_iter_first() if self.queue_view.get_selection().iter_is_selected(iter): self.update_remove(False) @@ -949,6 +1165,35 @@ self.hbox_progress.hide() self.update_pause(False) + def on_queue_entry_complete(self, queue, entry): + """ + An entry in the queue is finished. Update the queue model. + """ + if pynotify and not entry.force_stopped: + icon = arista.utils.get_path("presets/" + entry.options.preset.device.icon[7:]) + notice = pynotify.Notification(_("Job done"), _("Conversion of %(filename)s to %(device)s %(preset)s finished") % { + "filename": os.path.basename(entry.options.output_uri), + "device": entry.options.preset.device, + "preset": entry.options.preset.name, + }, icon) + notice.show() + + if self.runoptions.simple and len(self.queue) == 1: + # This is the last item in the simplified GUI, so we are done and + # should exit as soon as possible! + gobject.idle_add(gtk.main_quit) + return + + iter = self.queue_model.get_iter_first() + if iter: + if self.queue_view.get_selection().iter_is_selected(iter): + self.update_remove(False) + self.queue_model.remove(iter) + self.image_preview.show() + self.preview.hide() + self.hbox_progress.hide() + self.update_pause(False) + def on_preview_sink_element_added(self, autovideosink, element): """ Since we let Gstreamer decide which video sink to use, whenever it @@ -1069,6 +1314,30 @@ def on_queue_row_deleted(self, model, path): pass + + def on_install_device(self, widget): + dialog = gtk.FileChooserDialog(title=_("Choose Source File..."), + buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, + gtk.STOCK_OPEN, gtk.RESPONSE_ACCEPT)) + dialog.set_property("local-only", False) + dialog.set_current_folder(self.last_open_path) + response = dialog.run() + dialog.hide() + if response == gtk.RESPONSE_ACCEPT: + filename = dialog.get_filename() + client = gconf.client_get_default() + client.set_string(CONFIG_PATH + "/last_open_path", + os.path.dirname(filename)) + devices = arista.presets.extract(open(filename)) + arista.presets.reset() + self.setup_devices() + if pynotify: + for device in devices: + icon = arista.utils.get_path("presets/" + arista.presets.get()[device].icon[7:]) + notice = pynotify.Notification(_("Installation Successful"), _("Device preset %(name)s successfully installed.") % { + "name": arista.presets.get()[device], + }, icon) + notice.show() class PrefsDialog(object): """ @@ -1271,8 +1540,8 @@ A simple dialog to set properties for the input source, such as subtitles and deinterlacing. """ - def __init__(self, input_options): - self.input_options = input_options + def __init__(self, options): + self.options = options ui_path = arista.utils.get_path("ui", "props.ui") @@ -1284,14 +1553,14 @@ self.font = self.builder.get_object("fontbutton") self.deinterlace = self.builder.get_object("checkbutton_deinterlace") - if input_options.subfile: - self.subs.set_filename(input_options.subfile) + if options.subfile: + self.subs.set_filename(options.subfile) - if input_options.font: - self.font.set_font_name(input_options.font) + if options.font: + self.font.set_font_name(options.font) - if input_options.deinterlace: - self.deinterlace.set_active(input_options.deinterlace) + if options.deinterlace: + self.deinterlace.set_active(options.deinterlace) self.builder.connect_signals(self) @@ -1307,19 +1576,19 @@ """ Set subtitle file. """ - self.input_options.subfile = widget.get_filename() + self.options.subfile = widget.get_filename() def on_font_set(self, widget): """ Set subtitle rendering font. """ - self.input_options.font = widget.get_font_name() + self.options.font = widget.get_font_name() def on_deinterlace(self, widget): """ Toggle forced deinterlacing. """ - self.input_options.deinterlace = widget.get_active() + self.options.deinterlace = widget.get_active() class AboutDialog(object): """ @@ -1346,15 +1615,23 @@ self.window.destroy() if __name__ == "__main__": - parser = OptionParser(usage = _("%prog [options]"), + parser = OptionParser(usage = _("%prog [options] [file1 file2 file3 ...]"), version = _("Arista Transcoder GUI " + \ arista.__version__)) parser.add_option("-v", "--verbose", dest = "verbose", action = "store_true", default = False, help = _("Show verbose (debug) output")) + parser.add_option("-p", "--preset", dest = "preset", default = None, + help = _("Preset to encode to [default]")) + parser.add_option("-d", "--device", dest = "device", default = "computer", + help = _("Device to encode to [computer]")) + parser.add_option("-s", "--simple", dest = "simple", action = "store_true", + default = False, help = _("Simple UI")) options, args = parser.parse_args() + options.files = args + logging.basicConfig(level = options.verbose and logging.DEBUG \ or logging.INFO, format = "%(name)s [%(lineno)d]: " \ "%(levelname)s %(message)s") @@ -1368,13 +1645,22 @@ arista.init() - gettext.bindtextdomain("arista", - arista.utils.get_path("locale")) - gettext.textdomain("arista") - - locale.bindtextdomain("arista", - arista.utils.get_path("locale")) - locale.textdomain("arista") + lc_path = arista.utils.get_path("locale", default = "") + if lc_path: + if hasattr(gettext, "bindtextdomain"): + gettext.bindtextdomain("arista", lc_path) + if hasattr(locale, "bindtextdomain"): + locale.bindtextdomain("arista", lc_path) + + if hasattr(gettext, "bind_textdomain_codeset"): + gettext.bind_textdomain_codeset("arista", "UTF-8") + if hasattr(locale, "bind_textdomain_codeset"): + locale.bind_textdomain_codeset("arista", "UTF-8") + + if hasattr(gettext, "textdomain"): + gettext.textdomain("arista") + if hasattr(locale, "textdomain"): + locale.textdomain("arista") gtk.gdk.threads_init() @@ -1382,7 +1668,7 @@ icon_path = arista.utils.get_path("ui", "icon.svg") gtk.window_set_default_icon_from_file(icon_path) - main = MainWindow() + main = MainWindow(options) client = gconf.client_get_default() try: diff -Nru arista-0.9.3+repack/arista-nautilus.py arista-0.9.5/arista-nautilus.py --- arista-0.9.3+repack/arista-nautilus.py 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/arista-nautilus.py 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,179 @@ +""" + Arista Transcoder Nautilus Extension + ==================================== + Adds the ability to create conversions of media files directly in your + file browser. + + Installation + ------------ + In order to use this extension, it must be installed either to the global + nautilus extensions directory or ~/.nautilus/python-extensions/ for each + user that wishes to use it. + + Note that this script will not run outside of Nautilus! + + License + ------- + Copyright 2010 Daniel G. Taylor + + This file is part of Arista. + + Arista is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 2.1 of + the License, or (at your option) any later version. + + Arista 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with Arista. If not, see + . +""" + +import arista; arista.init() +import gettext +import nautilus +import os + +_ = gettext.gettext + +SUPPORTED_FORMATS = [ + # Found in /usr/share/mime + "audio/ac3", + "audio/AMR", + "audio/AMR-WB", + "audio/annodex", + "audio/basic", + "audio/midi", + "audio/mp2", + "audio/mp4", + "audio/mpeg", + "audio/ogg", + "audio/prs.sid", + "audio/vnd.rn-realaudio", + "audio/x-adpcm", + "audio/x-aifc", + "audio/x-aiff", + "audio/x-aiffc", + "audio/x-ape", + "audio/x-flac", + "audio/x-flac+ogg", + "audio/x-gsm", + "audio/x-it", + "audio/x-m4b", + "audio/x-matroska", + "audio/x-minipsf", + "audio/x-mod", + "audio/x-mpegurl", + "audio/x-ms-asx", + "audio/x-ms-wma", + "audio/x-musepack", + "audio/x-psf", + "audio/x-psflib", + "audio/x-riff", + "audio/x-s3m", + "audio/x-scpls", + "audio/x-speex", + "audio/x-speex+ogg", + "audio/x-stm", + "audio/x-tta", + "audio/x-voc", + "audio/x-vorbis+ogg", + "audio/x-wav", + "audio/x-wavpack", + "audio/x-wavpack-correction", + "audio/x-xi", + "audio/x-xm", + "audio/x-xmf", + "video/3gpp", + "video/annodex", + "video/dv", + "video/isivideo", + "video/mp2t", + "video/mp4", + "video/mpeg", + "video/ogg", + "video/quicktime", + "video/vivo", + "video/vnd.rn-realvideo", + "video/wavelet", + "video/x-anim", + "video/x-flic", + "video/x-flv", + "video/x-matroska", + "video/x-mng", + "video/x-ms-asf", + "video/x-msvideo", + "video/x-ms-wmv", + "video/x-nsv", + "video/x-ogm+ogg", + "video/x-sgi-movie", + "video/x-theora+ogg", +] + +class MediaConvertExtension(nautilus.MenuProvider): + """ + An extension to provide an extra right-click menu for media files to + convert them to any installed device preset. + """ + def __init__(self): + # Apparently required or some versions of nautilus crash! + pass + + def get_file_items(self, window, files): + """ + This method is called anytime one or more files are selected and + the right-click menu is invoked. If we are looking at a media + file then let's show the new menu item! + """ + # Check if this is actually a media file and it is local + for f in files: + if f.get_mime_type() not in SUPPORTED_FORMATS: + return + + if not f.get_uri().startswith("file://"): + return + + # Create the new menu item, with a submenu of devices each with a + # submenu of presets for that particular device. + menu = nautilus.MenuItem('Nautilus::convert_media', + _('Convert for device'), + _('Convert this media using a device preset')) + + devices = nautilus.Menu() + menu.set_submenu(devices) + + presets = arista.presets.get().items() + for shortname, device in sorted(presets, lambda x,y: cmp(x[1].name, y[1].name)): + item = nautilus.MenuItem("Nautilus::convert_to_%s" % shortname, + device.name, + device.description) + + presets = nautilus.Menu() + item.set_submenu(presets) + + for preset_name, preset in device.presets.items(): + preset_item = nautilus.MenuItem( + "Nautilus::convert_to_%s_%s" % (shortname, preset.name), + preset.name, + "%s: %s" % (device.name, preset.name)) + preset_item.connect("activate", self.callback, + [f.get_uri()[7:] for f in files], + shortname, preset.name) + presets.append_item(preset_item) + + devices.append_item(item) + + return menu, + + def callback(self, menu, files, device_name, preset_name): + """ + Called when a menu item is clicked. Start a transcode job for + the selected device and preset, and show the user the progress. + """ + command = "arista-gtk --simple -d %s -p \"%s\" %s &" % (device_name, preset_name, " ".join(["\"%s\"" % f for f in files])) + os.system(command) + diff -Nru arista-0.9.3+repack/arista-transcode arista-0.9.5/arista-transcode --- arista-0.9.3+repack/arista-transcode 2009-06-16 22:57:42.000000000 +0100 +++ arista-0.9.5/arista-transcode 2010-06-13 11:38:18.000000000 +0100 @@ -8,7 +8,7 @@ License ------- - Copyright 2008 - 2009 Daniel G. Taylor + Copyright 2008 - 2010 Daniel G. Taylor This file is part of Arista. @@ -17,7 +17,7 @@ published by the Free Software Foundation, either version 2.1 of the License, or (at your option) any later version. - Foobar is distributed in the hope that it will be useful, + Arista 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 Lesser General Public License for more details. @@ -56,7 +56,7 @@ loop = None interrupted = False -def print_status(enc): +def print_status(enc, options): """ Print the current status to the terminal with the estimated time remaining. @@ -65,7 +65,7 @@ global interrupted percent = 0.0 - if interrupted: + if interrupted or not enc: return True if enc.state == gst.STATE_NULL and interrupted: @@ -77,40 +77,68 @@ try: percent, time_rem = enc.status - msg = _("Encoding... %(percent)i%% (%(time)s remaining)") % { - "percent": int(percent * 100), - "time": time_rem, - } - sys.stdout.write("\b" * len(status_msg)) - sys.stdout.write(msg) - sys.stdout.flush() - status_msg = msg + if not options.quiet: + msg = _("Encoding... %(percent)i%% (%(time)s remaining)") % { + "percent": int(percent * 100), + "time": time_rem, + } + sys.stdout.write("\b" * len(status_msg)) + sys.stdout.write(msg) + sys.stdout.flush() + status_msg = msg except arista.transcoder.TranscoderStatusException, e: print str(e) return (percent < 100) -def discovered(transcoder, info, is_media, options): - if not is_media: - print _("No audio or video streams found in input!") - raise SystemExit(1) +def entry_start(queue, entry, options): + if not options.quiet: + print _("Encoding %(filename)s for %(device)s (%(preset)s)") % { + "filename": os.path.basename(entry.options.uri), + "device": options.device, + "preset": options.preset or _("default"), + } + + gobject.timeout_add(500, print_status, entry.transcoder, options) -def pass_setup(transcoder, options): +def entry_pass_setup(queue, entry, options): if not options.quiet: - if transcoder.enc_pass > 0: + if entry.transcoder.enc_pass > 0: print # blank line - - print _("Starting pass %(pass)d of %(total)d") % { - "pass": transcoder.enc_pass + 1, - "total": transcoder.preset.pass_count, - } + + info = entry.transcoder.info + preset = entry.transcoder.preset + if (info.is_video and len(preset.vcodec.passes) > 1) or \ + (info.is_audio and len(preset.vcodec.passes) > 1): + print _("Starting pass %(pass)d of %(total)d") % { + "pass": entry.transcoder.enc_pass + 1, + "total": entry.transcoder.preset.pass_count, + } -def complete(transcoder, options): +def entry_complete(queue, entry, options): if not options.quiet: print - transcoder.stop() - gobject.idle_add(loop.quit) + entry.transcoder.stop() + + if len(queue) == 1: + # We are the last item! + gobject.idle_add(loop.quit) + +def entry_error(queue, entry, errorstr, options): + if not options.quiet: + print _("Encoding %(filename)s for %(device)s (%(preset)s) failed!") % { + "filename": os.path.basename(entry.options.uri), + "device": options.device, + "preset": options.preset or _("default"), + } + print errorstr + + entry.transcoder.stop() + + if len(queue) == 1: + # We are the last item! + gobject.idle_add(loop.quit) def check_interrupted(): """ @@ -118,8 +146,13 @@ transcoder. """ if interrupted: - source = transcoder.pipe.get_by_name("source") - source.send_event(gst.event_new_eos()) + try: + source = transcoder.pipe.get_by_name("source") + source.send_event(gst.event_new_eos()) + except: + # Something pretty bad happened... just exit! + gobject.idle_add(loop.quit) + return False return True @@ -134,7 +167,7 @@ signal.signal(signal.SIGINT, signal.SIG_DFL) if __name__ == "__main__": - parser = OptionParser(usage = _("%prog [options] infile outfile"), + parser = OptionParser(usage = _("%prog [options] infile [infile infile ...]"), version = _("Arista Transcoder " + arista.__version__)) parser.add_option("-i", "--info", dest = "info", action = "store_true", default = False, @@ -148,6 +181,8 @@ help = _("Preset to encode to [default]")) parser.add_option("-d", "--device", dest = "device", default = "computer", help = _("Device to encode to [computer]")) + parser.add_option("-o", "--output", dest = "output", default = None, + help = _("Output file name [auto]"), metavar = "FILENAME") parser.add_option("-s", "--source-info", dest = "source_info", action = "store_true", default = False, help = _("Show information about input file and exit")) @@ -161,6 +196,9 @@ action = "store_true", default = False, help = _("Check for and download updated device " \ "presets if they are available")) + parser.add_option("--install-preset", dest = "install", + action = "store_true", default=False, + help = _("Install a downloaded device preset file")) options, args = parser.parse_args() @@ -176,34 +214,68 @@ arista.init() - gettext.bindtextdomain("arista", arista.utils.get_path("locale")) - gettext.textdomain("arista") + from arista.transcoder import TranscoderOptions - locale.bindtextdomain("arista", arista.utils.get_path("locale")) - locale.textdomain("arista") + lc_path = arista.utils.get_path("locale", default = "") + if lc_path: + if hasattr(gettext, "bindtextdomain"): + gettext.bindtextdomain("arista", lc_path) + if hasattr(locale, "bindtextdomain"): + locale.bindtextdomain("arista", lc_path) + + if hasattr(gettext, "bind_textdomain_codeset"): + gettext.bind_textdomain_codeset("arista", "UTF-8") + if hasattr(locale, "bind_textdomain_codeset"): + locale.bind_textdomain_codeset("arista", "UTF-8") + + if hasattr(gettext, "textdomain"): + gettext.textdomain("arista") + if hasattr(locale, "textdomain"): + locale.textdomain("arista") devices = arista.presets.get() if options.info and not args: print _("Available devices:") - for (name, device) in devices.items(): + print + + longest = 0 + for name in devices: + longest = max(longest, len(name)) + + for name in sorted(devices.keys()): print _("%(name)s: %(description)s") % { - "name": name, - "description": device.description, + "name": name.rjust(longest + 1), + "description": devices[name].description, } print print _("Use --info device_name for more information on a device.") raise SystemExit() elif options.info: print _("Preset info:") + print + device = devices[args[0]] - print "\t" + _("ID:") + " " + args[0] - print "\t" + _("Make:") + " " + device.make - print "\t" + _("Model:") + " " + device.model - print "\t" + _("Description:") + " " + device.description - print "\t" + _("Author:") + " " + str(device.author) - print "\t" + _("Version:") + " " + device.version - print "\t" + _("Presets:") + " " + ", ".join([(p.name == device.default and "*" + p.name or p.name) for (id, p) in device.presets.items()]) + info = [ + (_("ID:"), args[0]), + (_("Make:"), device.make), + (_("Model:"), device.model), + (_("Description:"), device.description), + (_("Author:"), unicode(device.author)), + (_("Version:"), device.version), + (_("Presets:"), ", ".join([(p.name == device.default and "*" + p.name or p.name) for (id, p) in device.presets.items()])), + ] + + longest = 0 + for (attr, value) in info: + longest = max(longest, len(attr)) + + for (attr, value) in info: + print "%(attr)s %(value)s" % { + "attr": attr.rjust(longest + 1), + "value": value, + } + print raise SystemExit() elif options.source_info: if len(args) != 1: @@ -226,17 +298,14 @@ elif options.update: # Update the local presets to the latest versions arista.presets.check_and_install_updates() + elif options.install: + for arg in args: + arista.presets.extract(open(arg)) else: - if len(args) != 2: + if len(args) < 1: parser.print_help() raise SystemExit(1) - print _("Encoding %(filename)s for %(device)s (%(preset)s)") % { - "filename": os.path.basename(args[0]), - "device": options.device, - "preset": options.preset or _("default"), - } - device = devices[options.device] if not options.preset: @@ -246,17 +315,32 @@ if preset.name == options.preset: break - opts = arista.transcoder.InputOptions(args[0], - subfile = options.subtitle, - font = options.font) - - transcoder = arista.transcoder.Transcoder(opts, args[1], preset) - transcoder.connect("discovered", discovered, options) - transcoder.connect("pass-setup", pass_setup, options) - transcoder.connect("complete", complete, options) + outputs = [] + queue = arista.queue.TranscodeQueue() + for arg in args: + if len(args) == 1 and options.output: + output = options.output + else: + output = arista.utils.generate_output_path(arg, preset, + to_be_created=outputs, device_name=options.device) + + outputs.append(output) - if not options.quiet: - gobject.timeout_add(500, print_status, transcoder) + opts = TranscoderOptions(arg, preset, output, + subfile = options.subtitle, + font = options.font) + + queue.append(opts) + + queue.connect("entry-start", entry_start, options) + queue.connect("entry-pass-setup", entry_pass_setup, options) + queue.connect("entry-error", entry_error, options) + queue.connect("entry-complete", entry_complete, options) + + if len(queue) > 1: + print _("Processing %(job_count)d jobs...") % { + "job_count": len(queue), + } signal.signal(signal.SIGINT, signal_handler) gobject.timeout_add(50, check_interrupted) diff -Nru arista-0.9.3+repack/debian/arista.docs arista-0.9.5/debian/arista.docs --- arista-0.9.3+repack/debian/arista.docs 2010-07-25 17:48:14.000000000 +0100 +++ arista-0.9.5/debian/arista.docs 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -README -AUTHORS diff -Nru arista-0.9.3+repack/debian/arista.install arista-0.9.5/debian/arista.install --- arista-0.9.3+repack/debian/arista.install 2010-07-25 17:48:14.000000000 +0100 +++ arista-0.9.5/debian/arista.install 2010-06-13 18:25:03.000000000 +0100 @@ -1 +1,3 @@ +usr/share +usr/lib/python*/*-packages debian/arista.xpm usr/share/pixmaps diff -Nru arista-0.9.3+repack/debian/changelog arista-0.9.5/debian/changelog --- arista-0.9.3+repack/debian/changelog 2010-07-25 17:48:14.000000000 +0100 +++ arista-0.9.5/debian/changelog 2010-07-15 03:48:27.000000000 +0100 @@ -1,55 +1,133 @@ -arista (0.9.3+repack-0ubuntu5) lucid; urgency=low +arista (0.9.5-0.10.04.md1) lucid; urgency=low - * Depends on hal (LP: #533896). + * backport to Lucid - -- Alessio Treglia Mon, 08 Mar 2010 15:27:05 +0100 + -- Marc Deslauriers Wed, 14 Jul 2010 22:47:30 -0400 -arista (0.9.3+repack-0ubuntu4) lucid; urgency=low +arista (0.9.5-1ubuntu1) maverick; urgency=low + + * Merge with Debian unstable, Ubuntu remaining changes: + - Recommends on gstreamer0.10-plugins-{bad,ugly}-multiverse. + + -- Alessio Treglia Tue, 15 Jun 2010 10:18:45 +0200 + +arista (0.9.5-1) unstable; urgency=low + + * New upstream release: + - Fix webcam and DVD issues (Closes: #555106). + - Add Nautilus extension for right-click file conversion. + * Split arista and nautilus-arista packages: + - arista provides conversion tools and Python modules, which are public + now. + - nautilus-arista installs the extension of Nautilus and recommend users + to restart the Nautilus file manager to apply changes. + * debian/patches/01-bytecompile_nautilus_extension.patch: + - Byte-compile arista-nautilus.py before installing it. + * debian/patches/02-shebangs.patch: + - Fix scripts' shebang lines. + * Update descriptions. + * Merge Ubuntu changelog entries. + * Drop patches applied upstream. + + -- Alessio Treglia Sun, 13 Jun 2010 16:55:38 +0200 + +arista (0.9.4.1-2ubuntu1) maverick; urgency=low + + * Merge from debian unstable, Ubuntu remaining changes: + - Suggest gstreamer0.10-plugins-{bad,ugly}-multiverse. + + -- Alessio Treglia Thu, 03 Jun 2010 09:58:39 +0200 + +arista (0.9.4.1-2) unstable; urgency=low + + * Suggest python-notify. + * debian/patches/01-simplejson_for_python25.patch: + - Update imports to allow simplejson if using a python version < 2.6 + * Depends on python-simplejson (Closes: #584103). + * Update Homepage field. + + -- Alessio Treglia Thu, 03 Jun 2010 01:30:29 +0200 + +arista (0.9.4.1-1) unstable; urgency=low + + * New upstream release. + * Depends on python-{cairo,gudev},gstreamer0.10-ffmpeg (Closes: #583880). + * Bump dependency on python-gtk2. + * Change my email address. + + -- Alessio Treglia Tue, 01 Jun 2010 00:30:19 +0200 + +arista (0.9.4-1ubuntu1) maverick; urgency=low + + * Re-sync with Debian, Ubuntu-specific changes: + - Add gstreamer0.10-plugins-{bad,ugly}-multiverse to Suggests field. + + -- Alessio Treglia Mon, 31 May 2010 07:15:39 +0200 + +arista (0.9.4-1) unstable; urgency=low + + * New upstream release: + - Don't depend on HAL anymore (Closes: #578557, LP: #581586). + - Catch a rare case where GStreamer didn't set videocaps for a video + file properly (LP: #441069). + - Don't show negative time remaining. + - Crash with high dimension video (LP: #399725). + - Remember last directory (LP: #407146). + - Ellipsize long names (LP: #407149). + - Add android preset (LP: #407159). + - Fix UI issues with non-UTF locale (LP: #410266). + * debian/control: + - Add Vcs-* tags. + - Bump Standards-Version. + - Set DMUA to yes. + - Move python from Build-Depends-Indep to Build-Depends field (since + it's needed to run debian/rules clean). + * Drop get-orig-source from debian/rules, upstream does not provide + the debian directory anymore. + * Switch to debian 3.0 (quilt) format. + * Remove debian/README.source, no longer needed. + * Drop all patches, applied upstream. + * Update copyright information. + * Remove debian/arista.docs, it does not contain any useful file. + * Don't install stuff in /usr/share/locale/templates. + * Fix file mode of files in /usr/share/arista/presets. + + -- Alessio Treglia Sun, 30 May 2010 21:11:40 +0200 + +arista (0.9.3-3) unstable; urgency=low * debian/patches/02-log_extra_info_on_missing_plugins.patch: - - arista/presets.py: Log some extra information while attempting to - automagically install missing plugins. + - Log some extra information while attempting to automagically install + missing plugins. * debian/patches/03-crash_with_high_dimension_video.patch: - - presets/dvd.xml: Constrain DVD MPEG2 sizes as GStreamer DVD stuff - doesn't seem to be totally spec compliant (LP: #399725). + - Constrain DVD MPEG2 sizes as GStreamer DVD stuff doesn't seem to be + totally spec compliant. * debian/patches/04-remember_last_opened_location.patch: - - arista-gtk: Remember last opened location for file chooser dialog as - a gconf setting (LP: #407146). + - Remember last opened location for file chooser dialog as a gconf setting. * debian/patches/05-ellipsize_filename.patch: - - arista-gtk: Ellipsize long filenames so the window doesn't grow to a - ridiculous size (LP: #407149). + - Ellipsize long filenames so the window doesn't grow to a ridiculous size. * debian/patches/06-non_utf8_locales.patch: - - arista-gtk: Fix translation for non-UTF8 locale (LP: #410266). + - Fix translation for non-UTF8 locale. * debian/patches/07-gstreamer_videocaps.patch: - - arista/transcoder.py: Catch a rare case where GStreamer didn't set - videocaps for a video file properly (LP: #441069). + - Catch a rare case where GStreamer didn't set videocaps for a video file + properly. * debian/patches/08-negative_remaining_time.patch: - - arista/transcoder.py: Don't display strange negative status information, - instead fall back to saying an unknown amount of time remains with no - current status. + - Don't display strange negative status information, instead fall back to + saying an unknown amount of time remains with no current status. - -- Alessio Treglia Sun, 06 Dec 2009 19:06:55 +0100 + -- Alessio Treglia Sun, 06 Dec 2009 20:14:49 +0100 -arista (0.9.3+repack-0ubuntu3) karmic; urgency=low +arista (0.9.3-2) unstable; urgency=low - * Add dependency on gstreamer0.10-plugins-base (LP: #452012). + * Depends on gstreamer0.10-plugins-base. - -- Alessio Treglia Thu, 15 Oct 2009 11:13:39 +0200 + -- Alessio Treglia Tue, 03 Nov 2009 12:03:47 +0100 -arista (0.9.3+repack-0ubuntu2) karmic; urgency=low +arista (0.9.3-1) unstable; urgency=low - * Add quilt support. + * Initial release (Closes: #543316). * debian/patches/01-patent_free_presets.diff: Add patent free profiles to - presets/computer.xml (LP: #443099) and set one of them as default choice. - * debian/control: - - Build-Depends on quilt. - - Bump Standards. - - Bump debhelper build-dependency to >= 7.0.50. - - -- Alessio Treglia Wed, 07 Oct 2009 13:13:52 +0200 - -arista (0.9.3+repack-0ubuntu1) karmic; urgency=low - - * Initial release (LP: #397648). + presets/computer.xml and set one of them as default choice; + already forwarded to upstream. - -- Alessio Treglia Wed, 15 Jul 2009 15:33:02 +0200 + -- Alessio Treglia Mon, 24 Aug 2009 09:27:30 +0200 diff -Nru arista-0.9.3+repack/debian/control arista-0.9.5/debian/control --- arista-0.9.3+repack/debian/control 2010-07-25 17:48:14.000000000 +0100 +++ arista-0.9.5/debian/control 2010-06-15 09:20:09.000000000 +0100 @@ -2,24 +2,35 @@ Section: video Priority: optional Maintainer: Alessio Treglia -Build-Depends: debhelper (>= 7.0.50), quilt (>= 0.46-7) -Build-Depends-Indep: python (>= 2.5.3-0ubuntu1), python-support (>= 0.5.3) -Standards-Version: 3.8.3 -Homepage: http://programmer-art.org/projects/arista-transcoder +Build-Depends: debhelper (>= 7.0.50~), + python (>= 2.5) +Build-Depends-Indep: python-support (>= 0.5.3) +DM-Upload-Allowed: yes +Standards-Version: 3.8.4 +Homepage: http://www.transcoder.org +Vcs-Git: git://git.debian.org/collab-maint/arista.git +Vcs-Browser: http://git.debian.org/?p=collab-maint/arista.git Package: arista Architecture: all -Depends: python-gtk2 (>= 2.14), python-gobject, python-gconf, python-dbus, +Depends: python-gtk2 (>= 2.16), + python-gobject, + python-cairo, + python-gudev, + python-simplejson, + python-gconf, + python-dbus, python-gst0.10 (>= 0.10.14), - hal, + gstreamer0.10-ffmpeg, gstreamer0.10-plugins-base, gstreamer0.10-plugins-good, gstreamer0.10-plugins-bad, gstreamer0.10-plugins-ugly, ${python:Depends}, ${misc:Depends} -Suggests: gstreamer0.10-plugins-bad-multiverse, +Recommends: gstreamer0.10-plugins-bad-multiverse, gstreamer0.10-plugins-ugly-multiverse +Suggests: python-notify Description: multimedia transcoder for the GNOME Desktop Arista is a simple multimedia transcoder, it focuses on being easy to use by making complex task of encoding for various devices simple. @@ -35,3 +46,17 @@ * Rip straight from v4l devices. * Simple terminal client for scripting. * Automatic preset updating. + +Package: nautilus-arista +Architecture: all +Depends: arista (>= ${source:Version}), + python-nautilus, + nautilus, + ${python:Depends}, + ${misc:Depends} +Description: Arista Transcoder Nautilus extension + Arista is a simple multimedia transcoder, it focuses on being easy to use + by making complex task of encoding for various devices simple. + . + This package adds the ability to transcode media files directly in the + Nautilus file browser. diff -Nru arista-0.9.3+repack/debian/copyright arista-0.9.5/debian/copyright --- arista-0.9.3+repack/debian/copyright 2010-07-25 17:48:14.000000000 +0100 +++ arista-0.9.5/debian/copyright 2010-06-13 16:47:23.000000000 +0100 @@ -1,19 +1,16 @@ -Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=59 +Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135 Name: Arista Transcoder Maintainer: Daniel G. Taylor Source: http://programmer-art.org/projects/arista-transcoder -X-Comment: The original tarball has been repacked to remove the debian/ - directory provided by upstream. -Files: * -Copyright: 2008-2009, Daniel G. Taylor -License: LGPL-2.1 +Copyright: 2008-2010, Daniel G. Taylor +License: LGPL-2.1+ -Files: arista/discoverer.py +Files: ./arista/discoverer.py Copyright: 2005, Edward Hervey -License: LGPL-2.1 +License: LGPL-2.1+ -License: LGPL-2.1 +License: LGPL-2.1+ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -27,13 +24,12 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - X-Comment: On Debian systems the full text of the GNU Lesser General Public License can be found in the `/usr/share/common-licenses/LGPL-2.1' file. -Files: debian/* -Copyright: 2009, Alessio Treglia -License: GPL-2 +Files: ./debian/* +Copyright: 2009-2010, Alessio Treglia +License: GPL-2+ This program 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 2 of the License, or @@ -47,6 +43,5 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - X-Comment: On Debian systems the full text of the GNU General Public License can be found in the `/usr/share/common-licenses/GPL-2' file. diff -Nru arista-0.9.3+repack/debian/nautilus-arista.install arista-0.9.5/debian/nautilus-arista.install --- arista-0.9.3+repack/debian/nautilus-arista.install 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/debian/nautilus-arista.install 2010-06-13 18:31:57.000000000 +0100 @@ -0,0 +1 @@ +debian/nautilus-arista-notification usr/share/nautilus-arista diff -Nru arista-0.9.3+repack/debian/nautilus-arista.links arista-0.9.5/debian/nautilus-arista.links --- arista-0.9.3+repack/debian/nautilus-arista.links 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/debian/nautilus-arista.links 2010-06-13 18:36:28.000000000 +0100 @@ -0,0 +1 @@ +usr/share/nautilus-arista/arista-nautilus.py usr/lib/nautilus/extensions-2.0/python/arista-nautilus.py diff -Nru arista-0.9.3+repack/debian/nautilus-arista-notification arista-0.9.5/debian/nautilus-arista-notification --- arista-0.9.3+repack/debian/nautilus-arista-notification 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/debian/nautilus-arista-notification 2010-06-13 17:44:44.000000000 +0100 @@ -0,0 +1,7 @@ +Name: nautilus-arista-notification +Priority: High +Terminal: False +DontShowAfterReboot: True +DisplayIf: true +Description: The Nautilus extension of Arista Transcoder has been installed. A session restart is needed to make it work properly. Once the session is restarted, a new option will be shown in Nautilus context menu. This option will make you able to convert media files directly in your file browser. +Description-it: L'estensione per Nautilus di Arista Transcoder é stata installata. Per poterla utilizzare é necessario riavviare la sessione. Una volta riavviata la sessione, nel menù contestuale di Nautilus sarà mostrata una nuova opzione, la quale consentirà di convertire file multimediali direttamente dal proprio gestore dei file. diff -Nru arista-0.9.3+repack/debian/nautilus-arista.postinst arista-0.9.5/debian/nautilus-arista.postinst --- arista-0.9.3+repack/debian/nautilus-arista.postinst 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/debian/nautilus-arista.postinst 2010-06-13 17:46:41.000000000 +0100 @@ -0,0 +1,17 @@ +#!/bin/sh +# postinst script for nautilus-arista +# +# see: dh_installdeb(1) + +set -e + +unud=/var/lib/update-notifier/user.d + +if [ -d $unud ]; then + cp /usr/share/nautilus-arista/nautilus-arista-notification \ + /var/lib/update-notifier/user.d/ + touch /var/lib/update-notifier/dpkg-run-stamp +fi + +#DEBHELPER# + diff -Nru arista-0.9.3+repack/debian/nautilus-arista.prerm arista-0.9.5/debian/nautilus-arista.prerm --- arista-0.9.3+repack/debian/nautilus-arista.prerm 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/debian/nautilus-arista.prerm 2010-06-13 17:50:11.000000000 +0100 @@ -0,0 +1,25 @@ +#!/bin/sh +# prerm script for nautilus-arista +# +# see: dh_installdeb(1) + +set -e + +case "$1" in + remove|upgrade|deconfigure) + rm -f /var/lib/update-notifier/user.d/nautilus-arista-notification + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 + diff -Nru arista-0.9.3+repack/debian/patches/01-bytecompile_nautilus_extension.patch arista-0.9.5/debian/patches/01-bytecompile_nautilus_extension.patch --- arista-0.9.3+repack/debian/patches/01-bytecompile_nautilus_extension.patch 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/debian/patches/01-bytecompile_nautilus_extension.patch 2010-06-13 18:34:52.000000000 +0100 @@ -0,0 +1,26 @@ +Author: Alessio Treglia +Description: Don't install arista-nautilus.py as a data file, it must be + byte-compiled first. +Forwarded: no +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- arista.orig/setup.py ++++ arista/setup.py +@@ -18,7 +18,6 @@ data_files = [ + (os.path.join("share", "doc", "arista"), [ + "README.md", "LICENSE", "AUTHORS" + ]), +- (os.path.join("lib", "nautilus", "extensions-2.0", "python"), ["arista-nautilus.py"]), + ] + + for (prefix, path) in [("arista", "presets"), +@@ -83,6 +82,7 @@ Note: WebM support requires at least GSt + scripts = [ + "arista-gtk", + "arista-transcode", ++ "arista-nautilus.py", + ], + data_files = data_files, + requires = [ diff -Nru arista-0.9.3+repack/debian/patches/01-patent_free_presets.diff arista-0.9.5/debian/patches/01-patent_free_presets.diff --- arista-0.9.3+repack/debian/patches/01-patent_free_presets.diff 2010-07-25 17:48:14.000000000 +0100 +++ arista-0.9.5/debian/patches/01-patent_free_presets.diff 1970-01-01 01:00:00.000000000 +0100 @@ -1,113 +0,0 @@ -Author: Alessio Treglia -Description: Add patent-free profiles. -Index: arista-0.9.3+repack/presets/computer.xml -=================================================================== ---- arista-0.9.3+repack.orig/presets/computer.xml 2009-10-07 13:15:58.084684467 +0200 -+++ arista-0.9.3+repack/presets/computer.xml 2009-10-07 13:18:52.872684247 +0200 -@@ -3,14 +3,14 @@ - - Generic - Computer -- H.264/AAC for the computer -+ H.264/AAC or Theora/Vorbis for the computer - - Daniel G. Taylor - dan@programmer-art.org - - 1.0 - file://computer.svg -- Normal -+ Normal (patent-free) - - - Low -@@ -92,5 +92,89 @@ - 1, 60 - - -+ -+ Low (patent-free) -+ matroskamux -+ mkv -+ -+ -+ -+ -+ Normal (patent-free) -+ matroskamux -+ mkv -+ -+ -+ -+ -+ Live Input (patent-free) -+ matroskamux -+ mkv -+ -+ -+ -+ -+ High (patent-free) -+ matroskamux -+ mkv -+ -+ -+ - - diff -Nru arista-0.9.3+repack/debian/patches/02-log_extra_info_on_missing_plugins.patch arista-0.9.5/debian/patches/02-log_extra_info_on_missing_plugins.patch --- arista-0.9.3+repack/debian/patches/02-log_extra_info_on_missing_plugins.patch 2010-07-25 17:48:14.000000000 +0100 +++ arista-0.9.5/debian/patches/02-log_extra_info_on_missing_plugins.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,44 +0,0 @@ -Vendor: http://github.com/danielgtaylor/arista/commit/c997b075480db20bf5fefbca8331b2f20a0c0a7b -Description: Log some extra information while attempting to automagically - install missing plugins. ---- - arista/presets.py | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - ---- arista-0.9.3+repack.orig/arista/presets.py -+++ arista-0.9.3+repack/arista/presets.py -@@ -228,13 +228,18 @@ class Preset(object): - ] - - missing = [] -+ missingdesc = "" - for element in elements: - if not gst.element_factory_find(element): - missing.append(gst.pbutils.missing_element_installer_detail_new(element)) -+ if missingdesc: -+ missingdesc += ", %s" % element -+ else: -+ missingdesc += element - - if missing: -+ _log.info("Attempting to install elements: %s" % missingdesc) - if gst.pbutils.install_plugins_supported(): -- - def install_done(result, null): - if result == gst.pbutils.INSTALL_PLUGINS_INSTALL_IN_PROGRESS: - # Ignore start of installer message -@@ -242,12 +247,14 @@ class Preset(object): - elif result == gst.pbutils.INSTALL_PLUGINS_SUCCESS: - callback(self, True, *args) - else: -+ _log.error("Unable to install required elements!") - callback(self, False, *args) - - context = gst.pbutils.InstallPluginsContext() - gst.pbutils.install_plugins_async(missing, context, - install_done, "") - else: -+ _log.error("Installing elements not supported!") - gobject.idle_add(callback, self, False, *args) - else: - gobject.idle_add(callback, self, True, *args) diff -Nru arista-0.9.3+repack/debian/patches/02-shebangs.patch arista-0.9.5/debian/patches/02-shebangs.patch --- arista-0.9.3+repack/debian/patches/02-shebangs.patch 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/debian/patches/02-shebangs.patch 2010-06-13 18:40:22.000000000 +0100 @@ -0,0 +1,32 @@ +Description: Fix scripts shebang lines. +Author: Alessio Treglia +Forwarded: no +--- + arista-gtk | 2 +- + arista-nautilus.py | 1 + + arista-transcode | 2 +- + 3 files changed, 3 insertions(+), 2 deletions(-) + +--- arista.orig/arista-nautilus.py ++++ arista/arista-nautilus.py +@@ -1,3 +1,4 @@ ++#!/usr/bin/python + """ + Arista Transcoder Nautilus Extension + ==================================== +--- arista.orig/arista-gtk ++++ arista/arista-gtk +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python + + """ + Arista Desktop Transcoder (GTK+ client) +--- arista.orig/arista-transcode ++++ arista/arista-transcode +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python + + """ + Arista Transcoder (command-line client) diff -Nru arista-0.9.3+repack/debian/patches/03-crash_with_high_dimension_video.patch arista-0.9.5/debian/patches/03-crash_with_high_dimension_video.patch --- arista-0.9.3+repack/debian/patches/03-crash_with_high_dimension_video.patch 2010-07-25 17:48:14.000000000 +0100 +++ arista-0.9.5/debian/patches/03-crash_with_high_dimension_video.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,41 +0,0 @@ -Vendor: http://github.com/danielgtaylor/arista/commit/3c95017e9284ffa72249a1674c442ca6c69d0ca2 -Description: Constrain DVD MPEG2 sizes as GStreamer DVD stuff doesn't seem to - be totally spec compliant - this should now work for pretty much any source. -Bug: https://bugs.launchpad.net/bugs/399725 ---- - presets/dvd.xml | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - ---- arista-0.9.3+repack.orig/presets/dvd.xml -+++ arista-0.9.3+repack/presets/dvd.xml -@@ -8,7 +8,7 @@ - Daniel G. Taylor - dan@programmer-art.org - -- 1.0 -+ 1.1 - file://dvd.svg - DivX Home Theater - -@@ -28,8 +28,8 @@ - - format=9 bitrate=4000 - -- 16, 4096 -- 16, 4096 -+ 320, 720 -+ 240, 576 - 25 - - -@@ -49,8 +49,8 @@ - - format=9 bitrate=4000 - -- 16, 4096 -- 16, 4096 -+ 320, 720 -+ 240, 576 - 24 - - diff -Nru arista-0.9.3+repack/debian/patches/04-remember_last_opened_location.patch arista-0.9.5/debian/patches/04-remember_last_opened_location.patch --- arista-0.9.3+repack/debian/patches/04-remember_last_opened_location.patch 2010-07-25 17:48:14.000000000 +0100 +++ arista-0.9.5/debian/patches/04-remember_last_opened_location.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,73 +0,0 @@ -Vendor: http://github.com/danielgtaylor/arista/commit/d674fc0de3f4d6d772039a3cdd74aa82d2779a15 -Description: Remember the last opened location. -Bug: https://bugs.launchpad.net/bugs/407146 ---- - arista-gtk | 27 +++++++++++++++++++++++++++ - 1 file changed, 27 insertions(+) - ---- arista-0.9.3+repack.orig/arista-gtk -+++ arista-0.9.3+repack/arista-gtk -@@ -62,6 +62,7 @@ DEFAULT_SHOW_TOOLBAR = True - DEFAULT_SHOW_PREVIEW = True - DEFAULT_PREVIEW_FPS = 2 - DEFAULT_CHECK_UPDATES = True -+DEFAULT_OPEN_PATH = os.path.expanduser("~") - - RE_ENDS_NUM = re.compile(r'^.*(?P[0-9]+)$') - -@@ -457,9 +458,20 @@ class MainWindow(object): - self.toolbar.hide() - self.menuitem_toolbar.set_active(DEFAULT_SHOW_TOOLBAR) - -+ try: -+ value = client.get_value(CONFIG_PATH + "/last_open_path") -+ if value and os.path.exists(value): -+ self.last_open_path = value -+ else: -+ self.last_open_path = DEFAULT_OPEN_PATH -+ except ValueError: -+ self.last_open_path = DEFAULT_OPEN_PATH -+ - client.notify_add(CONFIG_PATH + "/show_toolbar", - self.on_gconf_show_toolbar) - client.notify_add(CONFIG_PATH + "/check_inputs", self._setup_source) -+ client.notify_add(CONFIG_PATH + "/last_open_path", -+ self.on_gconf_last_open_path) - - # Show the interface! - self.source.show() -@@ -634,12 +646,16 @@ class MainWindow(object): - buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, - gtk.STOCK_OPEN, gtk.RESPONSE_ACCEPT)) - dialog.set_property("local-only", False) -+ dialog.set_current_folder(self.last_open_path) - response = dialog.run() - dialog.hide() - if response == gtk.RESPONSE_ACCEPT: - if self.fileiter: - model.remove(self.fileiter) - filename = dialog.get_filename() -+ client = gconf.client_get_default() -+ client.set_string(CONFIG_PATH + "/last_open_path", -+ os.path.dirname(filename)) - pos = widget.get_active() - newiter = model.insert(pos) - theme = gtk.icon_theme_get_default() -@@ -865,6 +881,17 @@ class MainWindow(object): - else: - self.toolbar.hide() - -+ def on_gconf_last_open_path(self, client, connection, entry, args): -+ """ -+ Change the default location of the open dialog when choosing a -+ new file or folder to transcode. -+ """ -+ path = entry.get_value().get_string() -+ if os.path.exists(path): -+ self.last_open_path = path -+ else: -+ self.last_open_path = DEFAULT_OPEN_PATH -+ - def on_queue_entry_discovered(self, queue, entry): - """ - The queue entry has been discovered, see if it is a valid input diff -Nru arista-0.9.3+repack/debian/patches/05-ellipsize_filename.patch arista-0.9.5/debian/patches/05-ellipsize_filename.patch --- arista-0.9.3+repack/debian/patches/05-ellipsize_filename.patch 2010-07-25 17:48:14.000000000 +0100 +++ arista-0.9.5/debian/patches/05-ellipsize_filename.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,31 +0,0 @@ -Vendor: http://github.com/danielgtaylor/arista/commit/d45a96e264367cd60b690132818795be1a1696dc -Description: The filename should be ellipsized to keep the original window size. -Bug: https://bugs.launchpad.net/bugs/407149 ---- - arista-gtk | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - ---- arista-0.9.3+repack.orig/arista-gtk -+++ arista-0.9.3+repack/arista-gtk -@@ -662,7 +662,10 @@ class MainWindow(object): - icon = _get_filename_icon(filename) - if icon: - model.set_value(newiter, 0, icon.load_icon()) -- model.set_value(newiter, 1, os.path.basename(filename)) -+ basename = os.path.basename(filename) -+ if len(basename) > 25: -+ basename = basename[:22] + "..." -+ model.set_value(newiter, 1, basename) - model.set_value(newiter, 2, filename) - self.fileiter = newiter - widget.set_active(pos) -@@ -755,8 +758,8 @@ class MainWindow(object): - if isinstance(self.source, gtk.ComboBox): - iter = self.source.get_active_iter() - model = self.source.get_model() -- inname = model.get_value(iter, 1) - inpath = model.get_value(iter, 2) -+ inname = os.path.basename(inpath) - else: - inpath = self.source.get_filename() - inname = os.path.basename(inpath) diff -Nru arista-0.9.3+repack/debian/patches/06-non_utf8_locales.patch arista-0.9.5/debian/patches/06-non_utf8_locales.patch --- arista-0.9.3+repack/debian/patches/06-non_utf8_locales.patch 2010-07-25 17:48:14.000000000 +0100 +++ arista-0.9.5/debian/patches/06-non_utf8_locales.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,22 +0,0 @@ -Vendor: http://github.com/danielgtaylor/arista/commit/92516e81b547c5c41b4aca57001ba4efdfc992e2 -Description: Fix translation for non-UTF8 locale -Bug: https://bugs.launchpad.net/bugs/410266 ---- - arista-gtk | 2 ++ - 1 file changed, 2 insertions(+) - ---- arista-0.9.3+repack.orig/arista-gtk -+++ arista-0.9.3+repack/arista-gtk -@@ -1400,10 +1400,12 @@ if __name__ == "__main__": - - gettext.bindtextdomain("arista", - arista.utils.get_path("locale")) -+ gettext.bind_textdomain_codeset("arista", "UTF-8") - gettext.textdomain("arista") - - locale.bindtextdomain("arista", - arista.utils.get_path("locale")) -+ locale.bind_textdomain_codeset("arista", "UTF-8") - locale.textdomain("arista") - - gtk.gdk.threads_init() diff -Nru arista-0.9.3+repack/debian/patches/07-gstreamer_videocaps.patch arista-0.9.5/debian/patches/07-gstreamer_videocaps.patch --- arista-0.9.3+repack/debian/patches/07-gstreamer_videocaps.patch 2010-07-25 17:48:14.000000000 +0100 +++ arista-0.9.5/debian/patches/07-gstreamer_videocaps.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,25 +0,0 @@ -Vendor: http://github.com/danielgtaylor/arista/commit/23fb5c6a4e93a4c59476547d7bd1329daeb8b6f5 -Description: Catch a rare case where GStreamer didn't set videocaps for - a video file properly. -Bug: https://bugs.launchpad.net/bugs/441069 ---- - arista/transcoder.py | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - ---- arista-0.9.3+repack.orig/arista/transcoder.py -+++ arista-0.9.3+repack/arista/transcoder.py -@@ -290,8 +290,12 @@ class Transcoder(gobject.GObject): - px = (hmin - height) / 2 - vbox = "videobox top=%i bottom=%i ! " % (-px, -px) - -- if self.info.videocaps[0].has_key("pixel-aspect-ratio"): -- width = int(width * float(self.info.videocaps[0]["pixel-aspect-ratio"])) -+ try: -+ if self.info.videocaps[0].has_key("pixel-aspect-ratio"): -+ width = int(width * float(self.info.videocaps[0]["pixel-aspect-ratio"])) -+ except KeyError: -+ # The videocaps we are looking for may not even exist, just ignore -+ pass - - # FIXME Odd widths / heights seem to freeze gstreamer - if width % 2: diff -Nru arista-0.9.3+repack/debian/patches/08-negative_remaining_time.patch arista-0.9.5/debian/patches/08-negative_remaining_time.patch --- arista-0.9.3+repack/debian/patches/08-negative_remaining_time.patch 2010-07-25 17:48:14.000000000 +0100 +++ arista-0.9.5/debian/patches/08-negative_remaining_time.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,26 +0,0 @@ -Vendor: http://github.com/danielgtaylor/arista/commit/fe57f57dbdd25b402585d1112e46f61afbf13ec0 -Description: Don't show negative time remaining. ---- - arista/transcoder.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- arista-0.9.3+repack.orig/arista/transcoder.py -+++ arista-0.9.3+repack/arista/transcoder.py -@@ -547,7 +547,7 @@ class Transcoder(gobject.GObject): - """ - duration = max(self.info.videolength, self.info.audiolength) - -- if not duration: -+ if not duration or duration < 0: - return 0.0, _("Unknown") - - try: -@@ -558,7 +558,7 @@ class Transcoder(gobject.GObject): - raise TranscoderStatusException(_("No pipeline to query!")) - - percent = pos / float(duration) -- if percent == 0: -+ if percent <= 0: - return 0.0, _("Unknown") - - total = 1.0 / percent * (time.time() - self.start_time) diff -Nru arista-0.9.3+repack/debian/patches/series arista-0.9.5/debian/patches/series --- arista-0.9.3+repack/debian/patches/series 2010-07-25 17:48:14.000000000 +0100 +++ arista-0.9.5/debian/patches/series 2010-06-13 18:38:40.000000000 +0100 @@ -1,8 +1,2 @@ -01-patent_free_presets.diff -02-log_extra_info_on_missing_plugins.patch -03-crash_with_high_dimension_video.patch -04-remember_last_opened_location.patch -05-ellipsize_filename.patch -06-non_utf8_locales.patch -07-gstreamer_videocaps.patch -08-negative_remaining_time.patch +01-bytecompile_nautilus_extension.patch +02-shebangs.patch diff -Nru arista-0.9.3+repack/debian/README.source arista-0.9.5/debian/README.source --- arista-0.9.3+repack/debian/README.source 2010-07-25 17:48:14.000000000 +0100 +++ arista-0.9.5/debian/README.source 1970-01-01 01:00:00.000000000 +0100 @@ -1,57 +0,0 @@ -This package uses quilt to manage all modifications to the upstream -source. Changes are stored in the source package as diffs in -debian/patches and applied during the build. - -To configure quilt to use debian/patches instead of patches, you want -either to export QUILT_PATCHES=debian/patches in your environment -or use this snippet in your ~/.quiltrc: - - for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do - if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then - export QUILT_PATCHES=debian/patches - fi - done - -To get the fully patched source after unpacking the source package, cd to -the root level of the source package and run: - - quilt push -a - -The last patch listed in debian/patches/series will become the current -patch. - -To add a new set of changes, first run quilt push -a, and then run: - - quilt new - -where is a descriptive name for the patch, used as the filename in -debian/patches. Then, for every file that will be modified by this patch, -run: - - quilt add - -before editing those files. You must tell quilt with quilt add what files -will be part of the patch before making changes or quilt will not work -properly. After editing the files, run: - - quilt refresh - -to save the results as a patch. - -Alternately, if you already have an external patch and you just want to -add it to the build system, run quilt push -a and then: - - quilt import -P /path/to/patch - quilt push -a - -(add -p 0 to quilt import if needed). as above is the filename to -use in debian/patches. The last quilt push -a will apply the patch to -make sure it works properly. - -To remove an existing patch from the list of patches that will be applied, -run: - - quilt delete - -You may need to run quilt pop -a to unapply patches first before running -this command. diff -Nru arista-0.9.3+repack/debian/rules arista-0.9.5/debian/rules --- arista-0.9.3+repack/debian/rules 2010-07-25 17:48:14.000000000 +0100 +++ arista-0.9.5/debian/rules 2010-06-13 18:36:30.000000000 +0100 @@ -1,23 +1,17 @@ #!/usr/bin/make -f -# Path to the debian directory -DEBIAN_DIR := $(shell echo ${MAKEFILE_LIST} | awk '{print $$1}' | xargs dirname ) -UPSTREAM_VERSION ?=$(shell uscan --dehs | sed -n 's/.*\(.*\)<\/upstream-version>.*/\1/p') -PACKAGE = arista - %: - dh --with quilt $@ + dh $@ override_dh_auto_install: - dh_auto_install -- --install-scripts=/usr/share/arista \ - --install-lib=/usr/share/arista + dh_auto_install -- \ + --install-scripts=/usr/share/arista + rm -fr debian/tmp/usr/share/locale/templates + cd debian/tmp/usr/share/arista/presets && \ + find . -type f | xargs chmod 0644 + rm -f debian/tmp/usr/share/doc/arista/LICENSE -get-orig-source: - cd $(DEBIAN_DIR)/.. && uscan --force-download - tar xf ../$(PACKAGE)-$(UPSTREAM_VERSION).tar.gz - rm ../$(PACKAGE)-$(UPSTREAM_VERSION).tar.gz - mv $(PACKAGE)-$(UPSTREAM_VERSION) $(PACKAGE)-$(UPSTREAM_VERSION)+repack - tar cf ../$(PACKAGE)_$(UPSTREAM_VERSION)+repack.orig.tar \ - --exclude=debian $(PACKAGE)-$(UPSTREAM_VERSION)+repack - gzip -9fn ../$(PACKAGE)_$(UPSTREAM_VERSION)+repack.orig.tar - rm -r $(PACKAGE)-$(UPSTREAM_VERSION)+repack +override_dh_install: + dh_install + mv debian/arista/usr/share/arista/arista-nautilus.py \ + debian/nautilus-arista/usr/share/nautilus-arista/ diff -Nru arista-0.9.3+repack/debian/source/format arista-0.9.5/debian/source/format --- arista-0.9.3+repack/debian/source/format 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/debian/source/format 2010-07-25 17:48:14.000000000 +0100 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru arista-0.9.3+repack/.gitignore arista-0.9.5/.gitignore --- arista-0.9.3+repack/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/.gitignore 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,5 @@ +*.pyc +MANIFEST +dist +test +build Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/ar/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/ar/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/ast/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/ast/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/bg/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/bg/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/ca/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/ca/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/cs/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/cs/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/de/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/de/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/en_GB/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/en_GB/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/es/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/es/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/eu/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/eu/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/fi/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/fi/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/fr/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/fr/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/gl/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/gl/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/hu/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/hu/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/it/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/it/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/ja/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/ja/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/kn/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/kn/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/nl/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/nl/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/pl/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/pl/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/pt/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/pt/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/pt_BR/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/pt_BR/LC_MESSAGES/arista.mo differ diff -Nru arista-0.9.3+repack/locale/README arista-0.9.5/locale/README --- arista-0.9.3+repack/locale/README 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/locale/README 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,12 @@ +Arista Translations +=================== +All translated strings for Arista are stored here. The translation template +is stored in the templates directory and is used to synchronize launchpad with +the latest strings. If you would like to contribute to a translation, please do +so via launchpad here: + + https://translations.launchpad.net/arista/trunk + +As translations are completed there they will be merged into trunk, either as +they are completed or just before a new release is made. + Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/ro/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/ro/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/ru/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/ru/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/sl/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/sl/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/sv/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/sv/LC_MESSAGES/arista.mo differ diff -Nru arista-0.9.3+repack/locale/templates/arista.pot arista-0.9.5/locale/templates/arista.pot --- arista-0.9.3+repack/locale/templates/arista.pot 2009-06-18 20:24:09.000000000 +0100 +++ arista-0.9.5/locale/templates/arista.pot 2010-06-13 11:38:18.000000000 +0100 @@ -3,510 +3,673 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-04-27 21:54+0200\n" +"POT-Creation-Date: 2010-06-10 23:27-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2009-06-18 19:24+0000\n" -"X-Generator: Launchpad (build Unknown)\n" -#: arista-transcode:74 -#, python-format -msgid "Encoding... %(percent)i%% (%(time)s remaining)" +#: ui/about.ui:12 +msgid "Copyright 2008 - 2010 Daniel G. Taylor" msgstr "" -#: arista-transcode:89 -msgid "No audio or video streams found in input!" +#: ui/about.ui:13 +msgid "A multimedia transcoder for the GNOME desktop." msgstr "" -#: arista-transcode:93 -#, python-format -msgid "Starting pass %(pass)d of %(total)d" +#: ui/about.ui:15 +msgid "Arista homepage" msgstr "" -#: arista-transcode:121 -msgid "Interrupt caught. Cleaning up... (Ctrl-C to force exit)" +#: ui/about.ui:16 +msgid "" +"Arista is released under the GNU LGPL 2.1.\n" +"Please see:\n" +"\n" +"http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html" msgstr "" -#: arista-transcode:126 -msgid "%prog [options] infile outfile" +#: ui/about.ui:21 +msgid "" +"Arista is translated through launchpad.net. Please see:\n" +"\n" +"https://translations.launchpad.net/arista/trunk/+pots/arista" msgstr "" -#: arista-transcode:127 -msgid "Arista Transcoder " +#: ui/main.ui:7 +msgid "Arista Transcoder" msgstr "" -#: arista-transcode:130 -msgid "Show information about available devices [false]" +#: ui/main.ui:22 +msgid "_File" msgstr "" -#: arista-transcode:133 -msgid "Preset to encode to [default]" +#: ui/main.ui:41 +msgid "_Remove from queue" msgstr "" -#: arista-transcode:135 -msgid "Device to encode to [computer]" +#: ui/main.ui:54 +msgid "_Pause" msgstr "" -#: arista-transcode:138 -msgid "Show information about input file and exit" +#: ui/main.ui:67 +msgid "_Install device preset" msgstr "" -#: arista-transcode:141 -msgid "Don't show status and time remaining" +#: ui/main.ui:100 +msgid "_Edit" msgstr "" -#: arista-transcode:144 arista-gtk:1121 -msgid "Show verbose (debug) output" +#: ui/main.ui:108 +msgid "_Source properties" msgstr "" -#: arista-transcode:147 -msgid "Check for and download updated device presets if they are available" +#: ui/main.ui:134 +msgid "_View" msgstr "" -#: arista-transcode:171 -msgid "Available devices:" +#: ui/main.ui:142 +msgid "Show _toolbar" msgstr "" -#: arista-transcode:173 -#, python-format -msgid "%(name)s: %(description)s" +#: ui/main.ui:156 +msgid "_Help" msgstr "" -#: arista-transcode:178 -msgid "Use --info device_name for more information on a device." +#: ui/main.ui:191 +msgid "Add to Queue" msgstr "" -#: arista-transcode:181 -msgid "Preset info:" +#: ui/main.ui:204 +msgid "Remove" msgstr "" -#: arista-transcode:183 -msgid "ID:" +#: ui/main.ui:219 +msgid "Pause" msgstr "" -#: arista-transcode:184 -msgid "Make:" +#: ui/main.ui:265 +msgid "Idle" msgstr "" -#: arista-transcode:185 -msgid "Model:" +#: ui/main.ui:300 ui/prefs.ui:131 +msgid "Live Preview" msgstr "" -#: arista-transcode:186 -msgid "Description:" +#: ui/main.ui:337 +msgid "Source:" msgstr "" -#: arista-transcode:187 -msgid "Author:" +#: ui/main.ui:349 +msgid "Device:" msgstr "" -#: arista-transcode:188 -msgid "Version:" +#: ui/main.ui:363 +msgid "Preset:" msgstr "" -#: arista-transcode:189 -msgid "Presets:" +#: ui/main.ui:391 +msgid "Settings" msgstr "" -#: arista-transcode:193 -msgid "You may only pass one filename for --source-info!" +#: ui/main.ui:434 +msgid "Queue" msgstr "" -#: arista-transcode:205 -msgid "Discovering file info..." +#: ui/prefs.ui:9 +msgid "Arista Preferences" msgstr "" -#: arista-transcode:222 -#, python-format -msgid "Encoding %(filename)s for %(device)s (%(preset)s)" +#: ui/prefs.ui:40 +msgid "Search for optical media and capture devices" +msgstr "" + +#: ui/prefs.ui:54 +msgid "Sources" +msgstr "" + +#: ui/prefs.ui:79 +msgid "Show live preview during transcoding" +msgstr "" + +#: ui/prefs.ui:99 +msgid "Live preview framerate:" +msgstr "" + +#: ui/prefs.ui:152 +msgid "Check for updates on startup" +msgstr "" + +#: ui/prefs.ui:166 +msgid "Automatic Updates" +msgstr "" + +#: ui/prefs.ui:181 +msgid "General" +msgstr "" + +#: ui/prefs.ui:219 +msgid "Information" +msgstr "" + +#: ui/prefs.ui:261 +msgid "Presets" +msgstr "" + +#: ui/props.ui:8 +msgid "Source Properties" +msgstr "" + +#: ui/props.ui:41 +msgid "Select Subtitles" +msgstr "" + +#: ui/props.ui:53 +msgid "Subtitles to render:" +msgstr "" + +#: ui/props.ui:60 +msgid "Font to render:" +msgstr "" + +#: ui/props.ui:88 +msgid "Subtitles" +msgstr "" + +#: ui/props.ui:109 +msgid "Force deinterlacing of source" msgstr "" -#: arista-gtk:109 +#: ui/props.ui:122 +msgid "Deinterlacing" +msgstr "" + +#: ui/props.ui:149 +msgid "gtk-close" +msgstr "" + +#: arista-gtk:126 #, python-format msgid "Unknown icon URI %(uri)s" msgstr "" -#: arista-gtk:141 +#: arista-gtk:194 #, python-format msgid "" "There are %(count)d new or updated device presets available. Install them " "now?" msgstr "" -#: arista-gtk:159 -msgid "Updates installed. Reloading device presets now." +#: arista-gtk:211 +msgid "Update Successful" msgstr "" -#: arista-gtk:392 +#: arista-gtk:211 +#, python-format +msgid "Device preset %(name)s successfully updated." +msgstr "" + +#: arista-gtk:423 msgid "Description" msgstr "" -#: arista-gtk:484 +#: arista-gtk:558 #, python-format msgid "Unknown V4L version %(version)s!" msgstr "" -#: arista-gtk:490 arista-gtk:501 arista-gtk:503 arista-gtk:561 +#: arista-gtk:566 arista-gtk:582 arista-gtk:584 arista-gtk:719 msgid "Choose file..." msgstr "" -#: arista-gtk:523 +#: arista-gtk:571 arista-gtk:752 +msgid "Choose directory..." +msgstr "" + +#: arista-gtk:675 msgid "Cleaning up and flushing buffers..." msgstr "" -#: arista-gtk:562 +#: arista-gtk:720 arista-gtk:1319 msgid "Choose Source File..." msgstr "" -#: arista-gtk:671 +#: arista-gtk:753 +msgid "Choose Source Directory..." +msgstr "" + +#: arista-gtk:897 +msgid "Cannot add item to queue because of missing elements!" +msgstr "" + +#: arista-gtk:918 msgid "Choose Output File..." msgstr "" -#: arista-gtk:690 +#: arista-gtk:931 +msgid "Choose Output Directory..." +msgstr "" + +#: arista-gtk:967 #, python-format msgid "%(model)s (%(preset)s): %(filename)s" msgstr "" -#: arista-gtk:759 +#: arista-gtk:1069 #, python-format msgid "Input %(infile)s contains no valid streams!" msgstr "" -#: arista-gtk:773 +#: arista-gtk:1083 msgid "Error with input!" msgstr "" -#: arista-gtk:881 +#: arista-gtk:1142 +msgid "Error!" +msgstr "" + +#: arista-gtk:1142 +#, python-format +msgid "" +"Conversion of %(filename)s to %(device)s %(preset)s failed! Reason: %(reason)" +"s" +msgstr "" + +#: arista-gtk:1174 +msgid "Job done" +msgstr "" + +#: arista-gtk:1174 +#, python-format +msgid "Conversion of %(filename)s to %(device)s %(preset)s finished" +msgstr "" + +#: arista-gtk:1246 +#, python-format +msgid "Transcoding... (pass %(pass)d of %(total)d)" +msgstr "" + +#: arista-gtk:1252 msgid "Transcoding..." msgstr "" -#: arista-gtk:884 +#: arista-gtk:1256 +#, python-format +msgid "Transcoding... (pass %(pass)d of %(total)d, %(time)s remaining)" +msgstr "" + +#: arista-gtk:1263 #, python-format msgid "Transcoding... (%(time)s remaining)" msgstr "" -#: arista-gtk:961 +#: arista-gtk:1337 +msgid "Installation Successful" +msgstr "" + +#: arista-gtk:1337 +#, python-format +msgid "Device preset %(name)s successfully installed." +msgstr "" + +#: arista-gtk:1372 msgid "Information" msgstr "" -#: arista-gtk:1116 -msgid "%prog [options]" +#: arista-gtk:1618 +msgid "%prog [options] [file1 file2 file3 ...]" msgstr "" -#: arista-gtk:1117 +#: arista-gtk:1619 msgid "Arista Transcoder GUI " msgstr "" -#: arista/discoverer.py:203 -#, python-format -msgid "Discovering %(filename)s" +#: arista-gtk:1623 arista-transcode:194 +msgid "Show verbose (debug) output" msgstr "" -#: arista/discoverer.py:238 -msgid "Unknown media type" +#: arista-gtk:1625 arista-transcode:181 +msgid "Preset to encode to [default]" msgstr "" -#: arista/discoverer.py:240 -msgid "Mime Type :\t" +#: arista-gtk:1627 arista-transcode:183 +msgid "Device to encode to [computer]" msgstr "" -#: arista/discoverer.py:243 -msgid "Length :\t" +#: arista-gtk:1629 +msgid "Simple UI" msgstr "" -#: arista/discoverer.py:244 -msgid "\tAudio:" +#: arista-transcode:81 +#, python-format +msgid "Encoding... %(percent)i%% (%(time)s remaining)" msgstr "" -#: arista/discoverer.py:244 -msgid "" -"\n" -"\tVideo:" +#: arista-transcode:96 +#, python-format +msgid "Encoding %(filename)s for %(device)s (%(preset)s)" msgstr "" -#: arista/discoverer.py:246 -msgid "Video :" +#: arista-transcode:99 arista-transcode:133 +msgid "default" msgstr "" -#: arista/discoverer.py:247 +#: arista-transcode:113 #, python-format -msgid "\t%(width)d x %(height)d @ %(rate_num)d/%(rate_den)d fps" +msgid "Starting pass %(pass)d of %(total)d" msgstr "" -#: arista/discoverer.py:254 arista/discoverer.py:270 -msgid "\tCodec :" +#: arista-transcode:130 +#, python-format +msgid "Encoding %(filename)s for %(device)s (%(preset)s) failed!" msgstr "" -#: arista/discoverer.py:256 -msgid "Audio :" +#: arista-transcode:165 +msgid "Interrupt caught. Cleaning up... (Ctrl-C to force exit)" msgstr "" -#: arista/discoverer.py:258 -#, python-format -msgid "\t%(channels)d channels(s) : %(rate)dHz @ %(width)dbits (float)" +#: arista-transcode:170 +msgid "%prog [options] infile [infile infile ...]" msgstr "" -#: arista/discoverer.py:264 -#, python-format -msgid "\t%(channels)d channels(s) : %(rate)dHz @ %(depth)dbits (int)" +#: arista-transcode:171 +msgid "Arista Transcoder " msgstr "" -#: arista/discoverer.py:273 -msgid "Other unsuported Multimedia stream :" +#: arista-transcode:174 +msgid "Show information about available devices [false]" msgstr "" -#: arista/discoverer.py:275 -msgid "Additional information :" +#: arista-transcode:177 +msgid "Subtitle file to render" msgstr "" -#: arista/__init__.py:53 -msgid "0.9" +#: arista-transcode:179 +msgid "Font to use when rendering subtitles" msgstr "" -#: arista/__init__.py:54 -msgid "Daniel G. Taylor " +#: arista-transcode:185 +msgid "Output file name [auto]" msgstr "" -#: arista/inputs.py:284 arista/inputs.py:292 -msgid "Not mounted." +#: arista-transcode:188 +msgid "Show information about input file and exit" msgstr "" -#: arista/presets.py:78 -#, python-format -msgid "Not a valid integer or fraction: %(value)s!" +#: arista-transcode:191 +msgid "Don't show status and time remaining" msgstr "" -#: arista/presets.py:256 -#, python-format -msgid "Value may only contain one comma; got %(value)s" +#: arista-transcode:197 +msgid "Check for and download updated device presets if they are available" msgstr "" -#: arista/presets.py:402 -#, python-format -msgid "Loaded device %(device)s (%(presets)d presets)" +#: arista-transcode:201 +msgid "Install a downloaded device preset file" msgstr "" -#: arista/presets.py:469 -#, python-format -msgid "Fetching %(location)s" +#: arista-transcode:239 +msgid "Available devices:" msgstr "" -#: arista/presets.py:476 +#: arista-transcode:247 #, python-format -msgid "Writing to %(file)s" +msgid "%(name)s: %(description)s" msgstr "" -#: arista/presets.py:481 -#, python-format -msgid "There was an error fetching and installing %(location)s: %(error)s" +#: arista-transcode:252 +msgid "Use --info device_name for more information on a device." msgstr "" -#: arista/presets.py:498 -msgid "Checking for device preset updates..." +#: arista-transcode:255 +msgid "Preset info:" msgstr "" -#: arista/presets.py:518 -#, python-format -msgid "Device preset %(name)s is up to date" +#: arista-transcode:260 +msgid "ID:" msgstr "" -#: arista/presets.py:522 -#, python-format -msgid "Found updated device preset %(name)s" +#: arista-transcode:261 +msgid "Make:" msgstr "" -#: arista/presets.py:528 arista/presets.py:541 -#, python-format -msgid "Error installing preset %(name)s from %(location)s: %(error)s" +#: arista-transcode:262 +msgid "Model:" msgstr "" -#: arista/presets.py:535 -#, python-format -msgid "Found new device preset %(name)s" +#: arista-transcode:263 +msgid "Description:" msgstr "" -#: arista/presets.py:548 -#, python-format -msgid "Malformed plugin version line %(line)s" +#: arista-transcode:264 +msgid "Author:" msgstr "" -#: arista/presets.py:552 -#, python-format -msgid "There was a problem accessing %(location)spresets.txt!" +#: arista-transcode:265 +msgid "Version:" msgstr "" -#: arista/presets.py:574 -msgid "All device presets are up to date!" +#: arista-transcode:266 +msgid "Presets:" +msgstr "" + +#: arista-transcode:282 +msgid "You may only pass one filename for --source-info!" msgstr "" -#: arista/queue.py:61 +#: arista-transcode:294 +msgid "Discovering file info..." +msgstr "" + +#: arista-transcode:341 #, python-format -msgid "Queue entry %(infile)s -> %(preset)s -> %(outfile)s" +msgid "Processing %(job_count)d jobs..." msgstr "" -#: arista/queue.py:133 -msgid "Transcode queue: " +#: arista-nautilus.py:143 +msgid "Convert for device" +msgstr "" + +#: arista-nautilus.py:144 +msgid "Convert this media using a device preset" msgstr "" -#: arista/queue.py:160 +#: arista/discoverer.py:229 #, python-format -msgid "Found item in queue! Queue is %(queue)s" +msgid "Discovering %(filename)s" msgstr "" -#: arista/transcoder.py:412 -msgid "Unable to construct pipeline! " +#: arista/discoverer.py:263 +msgid "Mime Type :\t" msgstr "" -#: arista/transcoder.py:504 arista/transcoder.py:515 -msgid "Unknown" +#: arista/discoverer.py:266 +msgid "Length :\t" msgstr "" -#: arista/transcoder.py:509 -msgid "Can't query position!" +#: arista/discoverer.py:267 +msgid "\tAudio:" msgstr "" -#: arista/transcoder.py:511 -msgid "No pipeline to query!" +#: arista/discoverer.py:267 +msgid "" +"\n" +"\tVideo:" +msgstr "" + +#: arista/discoverer.py:269 +msgid "Video :" msgstr "" -#: arista/transcoder.py:523 +#: arista/discoverer.py:270 #, python-format -msgid "%(min)d:%(sec)02d" +msgid "\t%(width)d x %(height)d @ %(rate_num)d/%(rate_den)d fps" msgstr "" -#: arista/transcoder.py:528 -msgid "Problem calculating time remaining!" +#: arista/discoverer.py:277 arista/discoverer.py:293 +msgid "\tCodec :" +msgstr "" + +#: arista/discoverer.py:279 +msgid "Audio :" msgstr "" -#: arista/utils.py:73 +#: arista/discoverer.py:281 #, python-format -msgid "Can't find %(path)s in any known prefix!" +msgid "\t%(channels)d channels(s) : %(rate)dHz @ %(width)dbits (float)" msgstr "" -#: ui/about.ui:12 -msgid "Copyright 2008 - 2009 Daniel G. Taylor" +#: arista/discoverer.py:287 +#, python-format +msgid "\t%(channels)d channels(s) : %(rate)dHz @ %(depth)dbits (int)" msgstr "" -#: ui/about.ui:13 -msgid "A multimedia transcoder for the GNOME desktop." +#: arista/discoverer.py:296 +msgid "Other unsuported Multimedia stream :" msgstr "" -#: ui/about.ui:15 -msgid "Arista homepage" +#: arista/discoverer.py:298 +msgid "Additional information :" msgstr "" -#: ui/main.ui:7 -msgid "Arista Transcoder" +#: arista/__init__.py:54 +msgid "0.9.5" msgstr "" -#: ui/main.ui:22 -msgid "_File" +#: arista/__init__.py:55 +msgid "Daniel G. Taylor " msgstr "" -#: ui/main.ui:41 -msgid "_Remove from queue" +#: arista/presets.py:85 +#, python-format +msgid "Not a valid integer or fraction: %(value)s!" msgstr "" -#: ui/main.ui:60 -msgid "_Pause" +#: arista/presets.py:184 +#, python-format +msgid "No presets have been defined for %(name)s" msgstr "" -#: ui/main.ui:89 -msgid "_Edit" +#: arista/presets.py:448 +#, python-format +msgid "Loaded device %(device)s (%(presets)d presets)" msgstr "" -#: ui/main.ui:113 -msgid "_View" +#: arista/presets.py:513 +#, python-format +msgid "Extracting %(filename)s" msgstr "" -#: ui/main.ui:121 -msgid "Show _toolbar" +#: arista/presets.py:536 +#, python-format +msgid "Fetching %(location)s" msgstr "" -#: ui/main.ui:135 -msgid "_Help" +#: arista/presets.py:546 +#, python-format +msgid "There was an error fetching and installing %(location)s: %(error)s" msgstr "" -#: ui/main.ui:170 -msgid "Add to Queue" +#: arista/presets.py:565 +msgid "Checking for device preset updates..." msgstr "" -#: ui/main.ui:183 -msgid "Remove" +#: arista/presets.py:588 +#, python-format +msgid "Device preset %(name)s is up to date" msgstr "" -#: ui/main.ui:198 -msgid "Pause" +#: arista/presets.py:592 +#, python-format +msgid "Found updated device preset %(name)s" msgstr "" -#: ui/main.ui:242 -msgid "Idle" +#: arista/presets.py:598 +#, python-format +msgid "Error installing preset %(name)s from %(location)s: %(error)s" msgstr "" -#: ui/main.ui:257 ui/prefs.ui:131 -msgid "Live Preview" +#: arista/presets.py:605 +#, python-format +msgid "Malformed plugin version line %(line)s" msgstr "" -#: ui/main.ui:295 -msgid "Source:" +#: arista/presets.py:609 +#, python-format +msgid "There was a problem accessing %(location)slatest.txt!" msgstr "" -#: ui/main.ui:307 -msgid "Device:" +#: arista/presets.py:631 +msgid "All device presets are up to date!" msgstr "" -#: ui/main.ui:321 -msgid "Preset:" +#: arista/queue.py:58 +#, python-format +msgid "Queue entry %(infile)s -> %(preset)s -> %(outfile)s" msgstr "" -#: ui/main.ui:349 -msgid "Settings" +#: arista/queue.py:147 +msgid "Transcode queue: " msgstr "" -#: ui/main.ui:392 -msgid "Queue" +#: arista/queue.py:184 +#, python-format +msgid "Found item in queue! Queue is %(queue)s" msgstr "" -#: ui/prefs.ui:9 -msgid "Arista Preferences" +#: arista/queue.py:193 +msgid "Not a recognized media file!" msgstr "" -#: ui/prefs.ui:40 -msgid "Search for optical media and capture devices" +#: arista/transcoder.py:179 +msgid "No valid DVD title found!" msgstr "" -#: ui/prefs.ui:54 -msgid "Sources" +#: arista/transcoder.py:184 +#, python-format +msgid "Longest title found is %(filename)s" msgstr "" -#: ui/prefs.ui:79 -msgid "Show live preview during transcoding" +#: arista/transcoder.py:570 +msgid "Unable to construct pipeline! " msgstr "" -#: ui/prefs.ui:99 -msgid "Live preview framerate:" +#: arista/transcoder.py:662 arista/transcoder.py:673 +msgid "Unknown" msgstr "" -#: ui/prefs.ui:152 -msgid "Check for updates on startup" +#: arista/transcoder.py:667 +msgid "Can't query position!" msgstr "" -#: ui/prefs.ui:166 -msgid "Automatic Updates" +#: arista/transcoder.py:669 +msgid "No pipeline to query!" msgstr "" -#: ui/prefs.ui:181 -msgid "General" +#: arista/transcoder.py:688 +#, python-format +msgid "%(min)d:%(sec)02d" msgstr "" -#: ui/prefs.ui:217 -msgid "Presets" +#: arista/transcoder.py:693 +msgid "Problem calculating time remaining!" msgstr "" -#: ui/prefs.ui:259 -msgid "gtk-close" +#: arista/utils.py:84 +#, python-format +msgid "Can't find %(path)s in any known prefix!" +msgstr "" + +#: arista/inputs/haldisco.py:279 arista/inputs/udevdisco.py:218 +msgid "Not mounted." +msgstr "" + +#: arista/inputs/__init__.py:40 +msgid "Falling back to HAL device discovery" +msgstr "" + +#: arista/inputs/__init__.py:44 +msgid "Couldn't import udev- or HAL-based device discovery!" msgstr "" Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/tr/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/tr/LC_MESSAGES/arista.mo differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/locale/zh_TW/LC_MESSAGES/arista.mo and /tmp/htoFO0dCFG/arista-0.9.5/locale/zh_TW/LC_MESSAGES/arista.mo differ diff -Nru arista-0.9.3+repack/MANIFEST.in arista-0.9.5/MANIFEST.in --- arista-0.9.3+repack/MANIFEST.in 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/MANIFEST.in 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,5 @@ +recursive-include presets *.json *.svg *.png +recursive-include ui *.ui *.svg +recursive-include locale *.pot *.po *.mo +include . AUTHORS LICENSE TODO README.md arista.desktop arista-nautilus.py + diff -Nru arista-0.9.3+repack/PKG-INFO arista-0.9.5/PKG-INFO --- arista-0.9.3+repack/PKG-INFO 2009-06-28 21:09:28.000000000 +0100 +++ arista-0.9.5/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -1,57 +0,0 @@ -Metadata-Version: 1.1 -Name: arista -Version: 0.9.3 -Summary: An easy multimedia transcoder for GNOME -Home-page: http://programmer-art.org/projects/arista-transcoder -Author: Daniel G. Taylor -Author-email: dan@programmer-art.org -License: UNKNOWN -Download-URL: http://programmer-art.org/media/releases/arista-transcoder/arista-0.9.2.tar.gz -Description: Overview - ======== - An easy to use multimedia transcoder for the GNOME Desktop. Arista focuses on - being easy to - use by making the complex task of encoding for various devices simple. Pick your - input, pick your target device, choose a file to save to and go. - - Arista has been in development since early 2008 as a side project and was just - recently polished to make it release-worthy. The 0.8 release is the first release available to the public. Please see http://www.launchpad.net/arista for information on helping out. - - Features - --------- - - * Presets for iPod, computer, DVD player, PSP, and more - * Live preview to see encoded quality - * Automatically discover available DVD drives and media - * Rip straight from DVD media easily (requires libdvdcss) - * Automatically discover and record from V4L devices - * Simple terminal client for scripting - - Requirements - --------------- - Arista is written in Python and requires the bindings for GTK+ 2.16 or newer, - GStreamer, GConf, GObject, Cairo, and DBus. If you are an Ubuntu user this means - you need to be using at least Ubuntu 9.04 (Jaunty). The GStreamer plugins - required depend on the presets available, but at this time you should have - gst-plugins-good, gst-plugins-bad, gst-plugins-ugly, and gst-ffmpeg. If you are - on Ubuntu don't forget to install the multiverse packages. - -Keywords: gnome gtk gstreamer transcode multimedia -Platform: Platform Independent -Classifier: Development Status :: 4 - Beta -Classifier: Environment :: Console -Classifier: Environment :: X11 Applications :: GTK -Classifier: Environment :: X11 Applications :: Gnome -Classifier: Intended Audience :: End Users/Desktop -Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) -Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python -Classifier: Topic :: Multimedia :: Sound/Audio :: Conversion -Classifier: Topic :: Multimedia :: Video :: Conversion -Classifier: Topic :: Utilities -Requires: gtk(>=2.16) -Requires: gst(>=10.22) -Requires: gconf -Requires: cairo -Requires: dbus -Provides: arista Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/presets/android-droid.png and /tmp/htoFO0dCFG/arista-0.9.5/presets/android-droid.png differ Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/presets/android-g1.png and /tmp/htoFO0dCFG/arista-0.9.5/presets/android-g1.png differ diff -Nru arista-0.9.3+repack/presets/android.json arista-0.9.5/presets/android.json --- arista-0.9.3+repack/presets/android.json 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/presets/android.json 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,158 @@ +{ + "make": "Generic", + "model": "Android Phone", + "description": "Presets for all known Android phones", + "version": "1.1", + "author": { + "name": "Daniel G. Taylor", + "email": "dan@programmer-art.org" + }, + "default": "Nexus One / Desire", + "icon": "file://android.svg", + "presets": [ + { + "name": "Nexus One / Desire", + "container": "qtmux", + "extension": "mp4", + "icon": "file://android-nexus-one.svg", + "vcodec": { + "name": "x264enc", + "container": "qtmux", + "width": [ + 320, + 800 + ], + "height": [ + 240, + 480 + ], + "rate": [ + 1, + 30 + ], + "passes": [ + "pass=qual quantizer=21 me=umh subme=6 ref=3 cabac=0 threads=0" + ] + }, + "acodec": { + "name": "faac", + "container": "qtmux", + "width": [ + 8, + 24 + ], + "depth": [ + 8, + 24 + ], + "rate": [ + 8000, + 96000 + ], + "channels": [ + 1, + 2 + ], + "passes": [ + "bitrate=128000 profile=LC" + ] + } + }, + { + "name": "Droid / Milestone", + "container": "qtmux", + "extension": "mp4", + "icon": "file://android-droid.png", + "vcodec": { + "name": "x264enc", + "container": "qtmux", + "width": [ + 320, + 854 + ], + "height": [ + 240, + 480 + ], + "rate": [ + 1, + 30 + ], + "passes": [ + "pass=qual quantizer=21 me=umh subme=6 ref=3 cabac=0 threads=0" + ] + }, + "acodec": { + "name": "faac", + "container": "qtmux", + "width": [ + 8, + 24 + ], + "depth": [ + 8, + 24 + ], + "rate": [ + 8000, + 96000 + ], + "channels": [ + 1, + 2 + ], + "passes": [ + "bitrate=128000 profile=LC" + ] + } + }, + { + "name": "G1 / Dream", + "container": "qtmux", + "extension": "mp4", + "icon": "file://android-g1.png", + "vcodec": { + "name": "x264enc", + "container": "qtmux", + "width": [ + 320, + 854 + ], + "height": [ + 240, + 480 + ], + "rate": [ + 1, + 30 + ], + "passes": [ + "pass=qual quantizer=21 me=umh subme=6 ref=3 cabac=0 threads=0" + ] + }, + "acodec": { + "name": "faac", + "container": "qtmux", + "width": [ + 8, + 24 + ], + "depth": [ + 8, + 24 + ], + "rate": [ + 8000, + 96000 + ], + "channels": [ + 1, + 2 + ], + "passes": [ + "bitrate=128000 profile=LC" + ] + } + } + ] +} diff -Nru arista-0.9.3+repack/presets/android-nexus-one.svg arista-0.9.5/presets/android-nexus-one.svg --- arista-0.9.3+repack/presets/android-nexus-one.svg 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/presets/android-nexus-one.svg 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,411 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + December 2007 + + + Philipp Zabel + + + + + device + phone + magician + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru arista-0.9.3+repack/presets/android.svg arista-0.9.5/presets/android.svg --- arista-0.9.3+repack/presets/android.svg 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/presets/android.svg 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,72 @@ + + + +image/svg+xml + + + + + + + + + \ No newline at end of file diff -Nru arista-0.9.3+repack/presets/computer.json arista-0.9.5/presets/computer.json --- arista-0.9.3+repack/presets/computer.json 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/presets/computer.json 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,197 @@ +{ + "make": "Generic", + "model": "Computer", + "description": "H.264/AAC or Theora/Vorbis for the computer", + "author": { + "name": "Daniel G. Taylor", + "email": "dan@programmer-art.org" + }, + "version": "1.5", + "icon": "file://computer.svg", + "default": "H.264", + "presets": [ + { + "name": "Live Input", + "container": "qtmux", + "extension": "mp4", + "icon": "file://computer-live.svg", + "vcodec": { + "passes": [ + "pass=cbr bitrate=2048 subme=4 threads=0" + ], + "container": "qtmux", + "name": "x264enc", + "height": [ + 240, + 1080 + ], + "width": [ + 320, + 1920 + ], + "rate": [ + 1, + 30 + ] + }, + "acodec": { + "passes": [ + "bitrate=192000" + ], + "container": "qtmux", + "name": "faac", + "depth": [ + 8, + 24 + ], + "channels": [ + 1, + 6 + ], + "width": [ + 8, + 24 + ], + "rate": [ + 8000, + 96000 + ] + } + }, + { + "name": "H.264", + "container": "qtmux", + "extension": "mp4", + "vcodec": { + "passes": [ + "pass=qual quantizer=21 me=umh subme=6 ref=3 threads=0" + ], + "container": "qtmux", + "name": "x264enc", + "height": [ + 240, + 1080 + ], + "width": [ + 320, + 1920 + ], + "rate": [ + 1, + 30 + ] + }, + "acodec": { + "passes": [ + "bitrate=192000" + ], + "container": "qtmux", + "name": "faac", + "depth": [ + 8, + 24 + ], + "channels": [ + 1, + 6 + ], + "width": [ + 8, + 24 + ], + "rate": [ + 8000, + 96000 + ] + } + }, + { + "vcodec": { + "passes": [ + "border=0 quality=40 keyframe-freq=30" + ], + "container": "matroskamux", + "name": "theoraenc", + "height": [ + 240, + 1080 + ], + "width": [ + 320, + 1920 + ], + "rate": [ + 1, + 30 + ] + }, + "container": "matroskamux", + "name": "Theora", + "extension": "mkv", + "acodec": { + "passes": [ + "quality=0.5" + ], + "container": "matroskamux", + "name": "vorbisenc", + "depth": [ + 8, + 24 + ], + "channels": [ + 1, + 2 + ], + "width": [ + 8, + 32 + ], + "rate": [ + 8000, + 96000 + ] + } + }, + { + "name": "WebM", + "extension": "webm", + "container": "webmmux", + "icon": "file://computer-webm.svg", + "vcodec": { + "name": "vp8enc", + "container": "webmmux", + "width": [ + 120, 1920 + ], + "height": [ + 120, 1080 + ], + "rate": [ + 1, 60 + ], + "passes": [ + "quality=6 threads=%(threads)s speed=2" + ] + }, + "acodec": { + "name": "vorbisenc", + "container": "webmmux", + "width": [ + 8, 32 + ], + "depth": [ + 8, 24 + ], + "rate": [ + 8000, 96000 + ], + "channels": [ + 1, 2 + ], + "passes": [ + "quality=0.4" + ] + } + } + ] +} diff -Nru arista-0.9.3+repack/presets/computer-live.svg arista-0.9.5/presets/computer-live.svg --- arista-0.9.3+repack/presets/computer-live.svg 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/presets/computer-live.svg 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,1257 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Camera / Video + + + Jakub Steiner + + + http://jimmac.musichall.cz/ + + + camera + camcorder + video + cam + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru arista-0.9.3+repack/presets/computer-webm.svg arista-0.9.5/presets/computer-webm.svg --- arista-0.9.3+repack/presets/computer-webm.svg 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/presets/computer-webm.svg 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,259 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff -Nru arista-0.9.3+repack/presets/computer.xml arista-0.9.5/presets/computer.xml --- arista-0.9.3+repack/presets/computer.xml 2009-04-28 18:57:29.000000000 +0100 +++ arista-0.9.5/presets/computer.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,96 +0,0 @@ - - - - Generic - Computer - H.264/AAC for the computer - - Daniel G. Taylor - dan@programmer-art.org - - 1.0 - file://computer.svg - Normal - - - Low - ffmux_mp4 - mp4 - - - - - Normal - ffmux_mp4 - mp4 - - - - - Live Input - ffmux_mp4 - mp4 - - - - - High - ffmux_mp4 - mp4 - - - - - diff -Nru arista-0.9.3+repack/presets/d2.svg arista-0.9.5/presets/d2.svg --- arista-0.9.3+repack/presets/d2.svg 2009-04-28 18:57:29.000000000 +0100 +++ arista-0.9.5/presets/d2.svg 1970-01-01 01:00:00.000000000 +0100 @@ -1,318 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - D2 - - - diff -Nru arista-0.9.3+repack/presets/d2.xml arista-0.9.5/presets/d2.xml --- arista-0.9.3+repack/presets/d2.xml 2009-04-28 18:57:29.000000000 +0100 +++ arista-0.9.5/presets/d2.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,58 +0,0 @@ - - - - Cowon - D2 - MPEG4 for the touchscreen Cowon D2 - - Daniel G. Taylor - dan@programmer-art.org - - 1.0 - file://d2.svg - Normal - - - Low - avimux - avi - - - - - Normal - avimux - avi - - - - - diff -Nru arista-0.9.3+repack/presets/dvd.json arista-0.9.5/presets/dvd.json --- arista-0.9.3+repack/presets/dvd.json 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/presets/dvd.json 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,155 @@ +{ + "version": "1.1", + "description": "DivX or MPEG2 for DVD players", + "author": { + "name": "Daniel G. Taylor", + "email": "dan@programmer-art.org" + }, + "default": "DivX Home Theater", + "make": "Generic", + "presets": [ + { + "vcodec": { + "passes": [ + "format=9 bitrate=4000" + ], + "container": "ffmux_dvd", + "name": "mpeg2enc", + "height": [ + 240, + 576 + ], + "width": [ + 320, + 720 + ], + "rate": [ + 24, + 24 + ] + }, + "container": "ffmux_dvd", + "name": "NTSC DVD", + "extension": "mpg", + "acodec": { + "passes": [ + "bitrate=128" + ], + "container": "ffmux_dvd", + "name": "lame", + "depth": [ + 8, + 24 + ], + "channels": [ + 1, + 2 + ], + "width": [ + 8, + 24 + ], + "rate": [ + 8000, + 96000 + ] + } + }, + { + "vcodec": { + "passes": [ + "pass=quant quantizer=5 max-bframes=0 trellis=true" + ], + "container": "avimux", + "name": "xvidenc", + "height": [ + 240, + 480 + ], + "width": [ + 320, + 720 + ], + "rate": [ + 1, + 30 + ] + }, + "container": "avimux", + "name": "DivX Home Theater", + "extension": "avi", + "acodec": { + "passes": [ + "bitrate=160" + ], + "container": "avimux", + "name": "lame", + "depth": [ + 8, + 24 + ], + "channels": [ + 1, + 2 + ], + "width": [ + 8, + 24 + ], + "rate": [ + 8000, + 96000 + ] + } + }, + { + "vcodec": { + "passes": [ + "format=9 bitrate=4000" + ], + "container": "ffmux_dvd", + "name": "mpeg2enc", + "height": [ + 240, + 576 + ], + "width": [ + 320, + 720 + ], + "rate": [ + 25, + 25 + ] + }, + "container": "ffmux_dvd", + "name": "PAL DVD", + "extension": "mpg", + "acodec": { + "passes": [ + "bitrate=128" + ], + "container": "ffmux_dvd", + "name": "lame", + "depth": [ + 8, + 24 + ], + "channels": [ + 1, + 2 + ], + "width": [ + 8, + 24 + ], + "rate": [ + 8000, + 96000 + ] + } + } + ], + "model": "DVD Player", + "icon": "file://dvd.svg" +} diff -Nru arista-0.9.3+repack/presets/dvd.xml arista-0.9.5/presets/dvd.xml --- arista-0.9.3+repack/presets/dvd.xml 2009-04-28 18:57:29.000000000 +0100 +++ arista-0.9.5/presets/dvd.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,79 +0,0 @@ - - - - Generic - DVD Player - DivX or MPEG2 for DVD players - - Daniel G. Taylor - dan@programmer-art.org - - 1.0 - file://dvd.svg - DivX Home Theater - - - PAL DVD - ffmux_dvd - mpg - - - - - NTSC DVD - ffmux_dvd - mpg - - - - - DivX Home Theater - avimux - avi - - - - - diff -Nru arista-0.9.3+repack/presets/ipad.json arista-0.9.5/presets/ipad.json --- arista-0.9.3+repack/presets/ipad.json 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/presets/ipad.json 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,108 @@ +{ + "version": "1.1", + "description": "H.264/AAC for Apple iPad", + "author": { + "name": "Daniel G. Taylor", + "email": "dan@programmer-art.org" + }, + "default": "Normal", + "make": "Apple", + "presets": [ + { + "vcodec": { + "passes": [ + "pass=qual quantizer=27 subme=4 cabac=0 threads=0" + ], + "container": "qtmux", + "name": "x264enc", + "height": [ + 240, + 480 + ], + "width": [ + 320, + 640 + ], + "rate": [ + 1, + 25 + ] + }, + "container": "qtmux", + "name": "Low", + "extension": "m4v", + "acodec": { + "passes": [ + "bitrate=96000 profile=LC" + ], + "container": "qtmux", + "name": "faac", + "depth": [ + 8, + 24 + ], + "channels": [ + 1, + 2 + ], + "width": [ + 8, + 24 + ], + "rate": [ + 8000, + 96000 + ] + } + }, + { + "vcodec": { + "passes": [ + "pass=qual quantizer=21 me=umh subme=6 ref=3 cabac=0 threads=0" + ], + "container": "qtmux", + "name": "x264enc", + "height": [ + 240, + 720 + ], + "width": [ + 320, + 1280 + ], + "rate": [ + 1, + 30 + ] + }, + "container": "qtmux", + "name": "Normal", + "extension": "m4v", + "acodec": { + "passes": [ + "bitrate=128000 profile=LC" + ], + "container": "qtmux", + "name": "faac", + "depth": [ + 8, + 24 + ], + "channels": [ + 1, + 2 + ], + "width": [ + 8, + 24 + ], + "rate": [ + 8000, + 96000 + ] + } + } + ], + "model": "iPad", + "icon": "file://ipad.svg" +} diff -Nru arista-0.9.3+repack/presets/ipad.svg arista-0.9.5/presets/ipad.svg --- arista-0.9.3+repack/presets/ipad.svg 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/presets/ipad.svg 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,11716 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru arista-0.9.3+repack/presets/ipod-iphone.svg arista-0.9.5/presets/ipod-iphone.svg --- arista-0.9.3+repack/presets/ipod-iphone.svg 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/presets/ipod-iphone.svg 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,867 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + iPhone + February 2007 + + + Jonathan Zuniga + + + + + device + media + iphone + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -Nru arista-0.9.3+repack/presets/ipod.json arista-0.9.5/presets/ipod.json --- arista-0.9.3+repack/presets/ipod.json 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/presets/ipod.json 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,159 @@ +{ + "version": "1.2", + "description": "H.264/AAC for Apple iPod / iPhone", + "author": { + "name": "Daniel G. Taylor", + "email": "dan@programmer-art.org" + }, + "default": "iPhone / iPod Touch", + "make": "Apple", + "presets": [ + { + "vcodec": { + "passes": [ + "pass=qual quantizer=21 me=umh subme=6 ref=3 cabac=0 threads=0" + ], + "container": "qtmux", + "name": "x264enc", + "height": [ + 240, + 480 + ], + "width": [ + 320, + 640 + ], + "rate": [ + 1, + 30 + ] + }, + "container": "qtmux", + "name": "iPod Classic", + "extension": "m4v", + "icon": "file://ipod-video.svg", + "acodec": { + "passes": [ + "bitrate=128000 profile=LC" + ], + "container": "qtmux", + "name": "faac", + "depth": [ + 8, + 24 + ], + "channels": [ + 1, + 2 + ], + "width": [ + 8, + 24 + ], + "rate": [ + 8000, + 96000 + ] + } + }, + { + "vcodec": { + "passes": [ + "pass=qual quantizer=21 me=umh subme=6 ref=3 cabac=0 threads=0" + ], + "container": "qtmux", + "name": "x264enc", + "height": [ + 240, + 480 + ], + "width": [ + 320, + 640 + ], + "rate": [ + 1, + 30 + ] + }, + "container": "qtmux", + "name": "iPhone / iPod Touch", + "extension": "m4v", + "icon": "file://ipod-iphone.svg", + "acodec": { + "passes": [ + "bitrate=128000 profile=LC" + ], + "container": "qtmux", + "name": "faac", + "depth": [ + 8, + 24 + ], + "channels": [ + 1, + 2 + ], + "width": [ + 8, + 24 + ], + "rate": [ + 8000, + 96000 + ] + } + }, + { + "vcodec": { + "passes": [ + "pass=qual quantizer=21 me=umh subme=6 ref=3 cabac=0 threads=0" + ], + "container": "qtmux", + "name": "x264enc", + "height": [ + 240, + 240 + ], + "width": [ + 320, + 376 + ], + "rate": [ + 1, + 30 + ] + }, + "container": "qtmux", + "name": "iPod Nano", + "extension": "m4v", + "icon": "file://ipod-nano.svg", + "acodec": { + "passes": [ + "bitrate=128000 profile=LC" + ], + "container": "qtmux", + "name": "faac", + "depth": [ + 8, + 24 + ], + "channels": [ + 1, + 2 + ], + "width": [ + 8, + 24 + ], + "rate": [ + 8000, + 96000 + ] + } + } + + ], + "model": "iPhone / iPod", + "icon": "file://ipod-touch.svg" +} diff -Nru arista-0.9.3+repack/presets/ipod-nano.svg arista-0.9.5/presets/ipod-nano.svg --- arista-0.9.3+repack/presets/ipod-nano.svg 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/presets/ipod-nano.svg 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,704 @@ + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Portable Media - iPod Nano White + October 2005 + + + Ryan Collier (pseudo) + + + + + http://www.tango-project.org + + + http://www.pseudocode.org + + + media + device + ipod + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MENU + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + R + + + + + + + + + + diff -Nru arista-0.9.3+repack/presets/ipod.svg arista-0.9.5/presets/ipod.svg --- arista-0.9.3+repack/presets/ipod.svg 2009-04-28 18:57:29.000000000 +0100 +++ arista-0.9.5/presets/ipod.svg 1970-01-01 01:00:00.000000000 +0100 @@ -1,694 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Portable Media - iPhone - February 2007 - - - Jonathan Zuniga - - - - - media - device - iphone - phone - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru arista-0.9.3+repack/presets/ipod-touch.svg arista-0.9.5/presets/ipod-touch.svg --- arista-0.9.3+repack/presets/ipod-touch.svg 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/presets/ipod-touch.svg 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,694 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Portable Media - iPhone + February 2007 + + + Jonathan Zuniga + + + + + media + device + iphone + phone + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -Nru arista-0.9.3+repack/presets/ipod-video.svg arista-0.9.5/presets/ipod-video.svg --- arista-0.9.3+repack/presets/ipod-video.svg 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/presets/ipod-video.svg 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,4306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Portable Media - iPod Video Black + December 2005 + + + Ryan Collier (pseudo) + + + + + http://www.tango-project.org + + + http://www.pseudocode.org + + + device + media + ipod + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MENU + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + R + + + + + + + + + + + + + + diff -Nru arista-0.9.3+repack/presets/ipod.xml arista-0.9.5/presets/ipod.xml --- arista-0.9.3+repack/presets/ipod.xml 2009-05-01 22:53:35.000000000 +0100 +++ arista-0.9.5/presets/ipod.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,58 +0,0 @@ - - - - Apple - iPod - H.264/AAC for Apple iPod / iPhone - - Daniel G. Taylor - dan@programmer-art.org - - 1.0 - file://ipod.svg - Normal - - - Low - ffmux_mp4 - m4v - - - - - Normal - ffmux_mp4 - m4v - - - - - diff -Nru arista-0.9.3+repack/presets/nokia-nseries.json arista-0.9.5/presets/nokia-nseries.json --- arista-0.9.3+repack/presets/nokia-nseries.json 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/presets/nokia-nseries.json 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,153 @@ +{ + "version": "1.1", + "description": "Presets for Nokia N Series devices", + "author": { + "name": "Daniel G. Taylor", + "email": "dan@programmer-art.org" + }, + "default": "N900", + "make": "Nokia", + "presets": [ + { + "vcodec": { + "passes": [ + "pass=1 bitrate=300000 ! video/x-xvid, format=(fourcc)DIVX", + "pass=2 bitrate=300000 ! video/x-xvid, format=(fourcc)DIVX" + ], + "container": "avimux", + "name": "xvidenc", + "height": [ + 208, + 208 + ], + "width": [ + 352, + 352 + ], + "rate": [ + 15, + 24 + ] + }, + "container": "avimux", + "name": "N770", + "extension": "avi", + "acodec": { + "passes": [ + "bitrate=96" + ], + "container": "avimux", + "name": "lame", + "depth": [ + 8, + 24 + ], + "channels": [ + 1, + 2 + ], + "width": [ + 8, + 24 + ], + "rate": [ + 8000, + 96000 + ] + } + }, + { + "vcodec": { + "passes": [ + "bitrate=400 me=umh subme=6 cabac=0 threads=0" + ], + "container": "qtmux", + "name": "x264enc", + "height": [ + 224, + 224 + ], + "width": [ + 400, + 400 + ], + "rate": [ + 15, + 24 + ] + }, + "container": "qtmux", + "name": "N800 / N810", + "extension": "m4v", + "acodec": { + "passes": [ + "bitrate=96000 profile=LC" + ], + "container": "qtmux", + "name": "faac", + "depth": [ + 8, + 24 + ], + "channels": [ + 1, + 2 + ], + "width": [ + 8, + 24 + ], + "rate": [ + 8000, + 96000 + ] + } + }, + { + "vcodec": { + "passes": [ + "pass=qual quantizer=23 me=umh subme=6 cabac=0 threads=0" + ], + "container": "qtmux", + "name": "x264enc", + "height": [ + 480, 480 + ], + "width": [ + 800, 800 + ], + "rate": [ + 25, 25 + ] + }, + "container": "qtmux", + "name": "N900", + "extension": "m4v", + "acodec": { + "passes": [ + "bitrate=128000 profile=LC" + ], + "container": "qtmux", + "name": "faac", + "depth": [ + 8, + 24 + ], + "channels": [ + 1, + 2 + ], + "width": [ + 8, + 24 + ], + "rate": [ + 8000, + 96000 + ] + } + } + ], + "model": "N Series", + "icon": "file://nokia-nseries.svg" +} diff -Nru arista-0.9.3+repack/presets/nokia-nseries.xml arista-0.9.5/presets/nokia-nseries.xml --- arista-0.9.3+repack/presets/nokia-nseries.xml 2009-06-18 19:43:18.000000000 +0100 +++ arista-0.9.5/presets/nokia-nseries.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,59 +0,0 @@ - - - - Nokia - N Series - Presets for Nokia N Series devices - - Daniel G. Taylor - dan@programmer-art.org - - 1.0 - file://nokia-nseries.svg - N770 - - - N770 - avimux - avi - - - - - N800 / N810 - ffmux_mp4 - m4v - - - - - diff -Nru arista-0.9.3+repack/presets/nwz-818.svg arista-0.9.5/presets/nwz-818.svg --- arista-0.9.3+repack/presets/nwz-818.svg 2009-03-30 23:54:07.000000000 +0100 +++ arista-0.9.5/presets/nwz-818.svg 1970-01-01 01:00:00.000000000 +0100 @@ -1,693 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - Jakub Steiner - - - http://jimmac.musichall.cz - http://www.tango-project.org - Multimedia PLayer - - - mp3 - player - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru arista-0.9.3+repack/presets/nwz-818.xml arista-0.9.5/presets/nwz-818.xml --- arista-0.9.3+repack/presets/nwz-818.xml 2009-06-15 13:36:03.000000000 +0100 +++ arista-0.9.5/presets/nwz-818.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,58 +0,0 @@ - - - - Sony - NWZ-818 - H.264/AAC for Sony NWZ-818 - - Patrick Ulbrich - zulu99@gmx.net - - 1.0 - file://nwz-818.svg - Normal - - - Low - ffmux_mp4 - mp4 - - - - - Normal - ffmux_mp4 - mp4 - - - - - Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/presets/pda.png and /tmp/htoFO0dCFG/arista-0.9.5/presets/pda.png differ diff -Nru arista-0.9.3+repack/presets/pda.xml arista-0.9.5/presets/pda.xml --- arista-0.9.3+repack/presets/pda.xml 2009-06-18 19:14:23.000000000 +0100 +++ arista-0.9.5/presets/pda.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,58 +0,0 @@ - - - - PDA - Generic - MPEG4 in AVI for your PDA - - LM - LM@lm.com - - 1.0 - file://pda.png - Normal - - - Low - avimux - avi - - - - - Normal - avimux - avi - - - - - diff -Nru arista-0.9.3+repack/presets/ps3.json arista-0.9.5/presets/ps3.json --- arista-0.9.3+repack/presets/ps3.json 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/presets/ps3.json 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,108 @@ +{ + "version": "1.1", + "description": "H.264/AAC for Playstation 3", + "author": { + "name": "Daniel G. Taylor", + "email": "dan@programmer-art.org" + }, + "default": "Normal", + "make": "Sony", + "presets": [ + { + "vcodec": { + "passes": [ + "pass=cbr bitrate=1024 subme=4 threads=0" + ], + "container": "qtmux", + "name": "x264enc", + "height": [ + 240, + 480 + ], + "width": [ + 320, + 720 + ], + "rate": [ + 1, + 30 + ] + }, + "container": "qtmux", + "name": "Low", + "extension": "mp4", + "acodec": { + "passes": [ + "bitrate=128000 profile=LC" + ], + "container": "qtmux", + "name": "faac", + "depth": [ + 8, + 24 + ], + "channels": [ + 1, + 2 + ], + "width": [ + 8, + 24 + ], + "rate": [ + 8000, + 96000 + ] + } + }, + { + "vcodec": { + "passes": [ + "pass=cbr bitrate=1536 me=umh subme=6 ref=2 threads=0" + ], + "container": "qtmux", + "name": "x264enc", + "height": [ + 240, + 1080 + ], + "width": [ + 320, + 1920 + ], + "rate": [ + 1, + 30 + ] + }, + "container": "qtmux", + "name": "Normal", + "extension": "mp4", + "acodec": { + "passes": [ + "bitrate=196000 profile=LC" + ], + "container": "qtmux", + "name": "faac", + "depth": [ + 8, + 24 + ], + "channels": [ + 1, + 2 + ], + "width": [ + 8, + 24 + ], + "rate": [ + 8000, + 96000 + ] + } + } + ], + "model": "Playstation 3", + "icon": "file://ps3.svg" +} diff -Nru arista-0.9.3+repack/presets/ps3.xml arista-0.9.5/presets/ps3.xml --- arista-0.9.3+repack/presets/ps3.xml 2009-04-28 18:57:29.000000000 +0100 +++ arista-0.9.5/presets/ps3.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,58 +0,0 @@ - - - - Sony - Playstation 3 - H.264/AAC for Playstation 3 - - Daniel G. Taylor - dan@programmer-art.org - - 1.0 - file://ps3.svg - Normal - - - Low - ffmux_mp4 - mp4 - - - - - Normal - ffmux_mp4 - mp4 - - - - - diff -Nru arista-0.9.3+repack/presets/psp.json arista-0.9.5/presets/psp.json --- arista-0.9.3+repack/presets/psp.json 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/presets/psp.json 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,108 @@ +{ + "version": "1.1", + "description": "H.264/AAC for Playstation portable", + "author": { + "name": "Daniel G. Taylor", + "email": "dan@programmer-art.org" + }, + "default": "Normal", + "make": "Sony", + "presets": [ + { + "vcodec": { + "passes": [ + "pass=qual quantizer=27 subme=4 threads=0" + ], + "container": "qtmux", + "name": "x264enc", + "height": [ + 272, + 272 + ], + "width": [ + 480, + 480 + ], + "rate": [ + 1, + 25 + ] + }, + "container": "qtmux", + "name": "Low", + "extension": "mp4", + "acodec": { + "passes": [ + "bitrate=96000 profile=LC" + ], + "container": "qtmux", + "name": "faac", + "depth": [ + 8, + 24 + ], + "channels": [ + 1, + 2 + ], + "width": [ + 8, + 24 + ], + "rate": [ + 48000, + 48000 + ] + } + }, + { + "vcodec": { + "passes": [ + "pass=qual quantizer=21 me=umh subme=6 ref=2 threads=0" + ], + "container": "qtmux", + "name": "x264enc", + "height": [ + 272, + 272 + ], + "width": [ + 480, + 480 + ], + "rate": [ + 1, + 30 + ] + }, + "container": "qtmux", + "name": "Normal", + "extension": "mp4", + "acodec": { + "passes": [ + "bitrate=128000 profile=LC" + ], + "container": "qtmux", + "name": "faac", + "depth": [ + 8, + 24 + ], + "channels": [ + 1, + 2 + ], + "width": [ + 8, + 24 + ], + "rate": [ + 48000, + 48000 + ] + } + } + ], + "model": "PSP", + "icon": "file://psp.svg" +} diff -Nru arista-0.9.3+repack/presets/psp.xml arista-0.9.5/presets/psp.xml --- arista-0.9.3+repack/presets/psp.xml 2009-04-28 18:57:29.000000000 +0100 +++ arista-0.9.5/presets/psp.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,60 +0,0 @@ - - - - Sony - PSP - H.264/AAC for Playstation portable - - Daniel G. Taylor - dan@programmer-art.org - - 1.0 - file://psp.svg - Normal - - - Low - ffmux_mp4 - mp4 - - - - - Normal - ffmux_mp4 - mp4 - - - - - Binary files /tmp/1C4JZoekV3/arista-0.9.3+repack/presets/web-flv.png and /tmp/htoFO0dCFG/arista-0.9.5/presets/web-flv.png differ diff -Nru arista-0.9.3+repack/presets/web.json arista-0.9.5/presets/web.json --- arista-0.9.3+repack/presets/web.json 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/presets/web.json 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,136 @@ +{ + "make": "Generic", + "model": "Web Browser", + "description": "Media for World Wide Web", + "version": "1.2", + "author": { + "name": "Ferran Basora Roca", + "email": "fcsonline@gmail.com" + }, + "icon": "file://web.svg", + "default": "WebM", + "presets": [ + { + "name": "Flash Video", + "extension": "flv", + "icon": "file://web-flv.png", + "container": "flvmux", + "vcodec": { + "name": "x264enc", + "container": "flvmux", + "width": [ + 120, 1280 + ], + "height": [ + 120, 720 + ], + "rate": [ + 1, 30 + ], + "passes": [ + "pass=qual quantizer=23 subme=6 cabac=0 threads=0" + ] + }, + "acodec": { + "name": "faac", + "container": "flvmux", + "width": [ + 8, 24 + ], + "depth": [ + 8, 24 + ], + "rate": [ + 8000, 96000 + ], + "channels": [ + 1, 2 + ], + "passes": [ + "bitrate=131072 profile=LC" + ] + } + }, + { + "name": "H.264", + "extension": "mp4", + "container": "qtmux", + "vcodec": { + "name": "x264enc", + "container": "qtmux", + "width": [ + 120, 1280 + ], + "height": [ + 120, 720 + ], + "rate": [ + 1, 30 + ], + "passes": [ + "pass=qual quantizer=23 subme=6 cabac=0 threads=0" + ] + }, + "acodec": { + "name": "faac", + "container": "qtmux", + "width": [ + 8, 24 + ], + "depth": [ + 8, 24 + ], + "rate": [ + 8000, 96000 + ], + "channels": [ + 1, 2 + ], + "passes": [ + "bitrate=131072 profile=LC" + ] + } + }, + { + "name": "WebM", + "extension": "webm", + "container": "webmmux", + "icon": "file://web-webm.svg", + "vcodec": { + "name": "vp8enc", + "container": "webmmux", + "width": [ + 120, 1280 + ], + "height": [ + 120, 720 + ], + "rate": [ + 1, 30 + ], + "passes": [ + "quality=5.75 threads=%(threads)s speed=2" + ] + }, + "acodec": { + "name": "vorbisenc", + "container": "webmmux", + "width": [ + 8, 32 + ], + "depth": [ + 8, 24 + ], + "rate": [ + 8000, 96000 + ], + "channels": [ + 1, 2 + ], + "passes": [ + "quality=0.3" + ] + } + } + ] +} diff -Nru arista-0.9.3+repack/presets/web.svg arista-0.9.5/presets/web.svg --- arista-0.9.3+repack/presets/web.svg 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/presets/web.svg 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,982 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Globe + + + Jakub Steiner + + + + + Tuomas Kuosmanen + + + + http://jimmac.musichall.cz + + + globe + international + web + www + internet + network + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru arista-0.9.3+repack/presets/web-webm.svg arista-0.9.5/presets/web-webm.svg --- arista-0.9.3+repack/presets/web-webm.svg 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/presets/web-webm.svg 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,259 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff -Nru arista-0.9.3+repack/README arista-0.9.5/README --- arista-0.9.3+repack/README 2009-06-28 21:07:04.000000000 +0100 +++ arista-0.9.5/README 1970-01-01 01:00:00.000000000 +0100 @@ -1,88 +0,0 @@ -Arista Transcoder 0.9.3 -======================= -A simple preset-based transcoder for the GNOME Desktop and a small script for -terminal-based transcoding. Settings are chosen based on output device and -quality preset. - - http://programmer-art.org/arista-transcoder - -Dependencies ------------- -python-dbus -python-cairo -python-gobject -python-gtk >=2.16 -python-gconf -python-gstreamer -gstreamer-ffmpeg -gstreamer-plugins-base -gstreamer-plugins-good -gstreamer-plugins-bad -gstreamer-plugins-ugly - -Installation ------------- -Installation uses python distutils. After extracting the archive, run: - - python setup.py install - -If you are using Ubuntu 9.04 (Jaunty) or later, make sure to install with: - - python setup.py install --install-layout=deb - -Don't forget to use sudo if necessary. This will install the arista python -module to your python site-packages or dist-packages path, install the arista -programs into sys.prefix/bin and install all data files into -sys.prefix/share/arista. - -Usage ------ -There are two clients available, a graphical client using GTK+ and a terminal -client. The graphical client is failry self-explanatory and can be launched -with: - - arista-gtk - -To use the terminal client please see: - - arista-transcode --help - -An example of using the terminal client: - - arista-transcode --device=ipod --preset=low test.mp4 test-ipod.m4v - -Other usefule terminal options: - - arista-transcode --info - arista-transcode --info ipod - -Generating a Test File ----------------------- -Sometimes it may be useful to generate a test file: - - gst-launch-0.10 videotestsrc num-buffers=500 ! x264enc ! mp4mux ! filesink location=test.mp4 - -Creating New Device Presets ---------------------------- -New device presets can be created by specifying information about yourself and -the device you wish to support along with presets that describe how to create a -proper gstreamer pipeline to encode for the device in an xml file. Please see -the xml files in the presets directory that ship with Arista for examples. - -Contributing ------------- -All development is managed through Launchpad.net, which provides source -revision control, bug tracking, feature planning, string translation, and a -forum-like question/answer area. Please report all bugs to the bug tracker -there. Add new feature requests as blueprints. The main development site is: - - http://www.launchpad.net/arista - -You may create a local branch of the latest code via: - - bzr branch lp:arista - -To update your local branch to the latest code you can use `bzr merge`. If you -choose to publish your branch you may request a merge to trunk, otherwise -you may just send patches that apply cleanly to the latest trunk. - diff -Nru arista-0.9.3+repack/README.md arista-0.9.5/README.md --- arista-0.9.3+repack/README.md 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/README.md 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,120 @@ +Arista Transcoder 0.9.5 +======================= +A simple preset-based transcoder for the GNOME Desktop and a small script for +terminal-based transcoding. Settings are chosen based on output device and +quality preset. + + * [Official website](http://www.transcoder.org/) + +Features +-------- + * Presets for Android, iPod, computer, DVD player, PSP, and more + * Live preview to see encoded quality + * Automatically discover available DVD drives and media + * Rip straight from DVD media easily + * Automatically discover and record from Video4Linux devices + * Support for H.264, WebM, FLV, Ogg, DivX and more + * Batch processing of entire directories easily + * Simple terminal client for scripting + * Nautilus extension for right-click file conversion + +Dependencies +------------ + * python >=2.4 + * python-cairo + * python-gobject + * python-gtk >=2.16 + * python-gconf + * python-gstreamer + * python-gudev or python-dbus with HAL + * python-nautilus (if using Nautilus extension) + * python-pynotify (optional) + * python-rsvg (if using KDE) + * python-simplejson (if using python 2.5 or older) + * gstreamer-ffmpeg + * gstreamer-plugins-base + * gstreamer-plugins-good + * gstreamer-plugins-bad + * gstreamer-plugins-ugly + +Installation +------------ +Installation uses python distutils. After extracting the archive, run: + + python setup.py install + +If you are using Ubuntu 9.04 (Jaunty) or later, make sure to install with: + + python setup.py install --install-layout=deb + +Don't forget to use sudo if necessary. This will install the arista python +module to your python site-packages or dist-packages path, install the arista +programs into sys.prefix/bin, instal the nautilus extensions into +sys.prefix/lib/nautilus/extensions-2.0/python and install all data files into +sys.prefix/share/arista. + +You can also choose to install the Nautilus extension per-user by placing it +into the user's home directory under ~/.nautilus/python-extensions. Note +that you must restart Nautilus for such changes to take effect! + +Usage +----- +There are two clients available, a graphical client using GTK+ and a terminal +client. The graphical client is failry self-explanatory and can be launched +with: + + arista-gtk + +To use the terminal client please see: + + arista-transcode --help + +An example of using the terminal client: + + arista-transcode --device=ipod --preset=low test.mp4 + +Other useful terminal options: + + arista-transcode --info + arista-transcode --info ipod + +There is also a Nautilus extension installed by default. You can right-click on +any media file and select "Convert for device..." in the menu. This menu +contains all your installed presets and will launch Arista to convert the +selected file or files. + +Generating a Test File +---------------------- +Sometimes it may be useful to generate a test file: + + gst-launch-0.10 videotestsrc num-buffers=500 ! x264enc ! qtmux ! filesink location=test.mp4 + +Creating New Device Presets +--------------------------- +New device presets can be created via the [create preset](http://www.transcoder.org/presets/create/ "Create a new Arista Transcoder preset") +page on the website or by specifying information about yourself and +the device you wish to support along with presets that describe how to create a +proper gstreamer pipeline to encode for the device in a JSON file. + +Contributing +------------ +All active development has moved to GitHub.com. Code is managed through git and +new bugs should be opened in the GitHub tracker. Translations are still managed +on Launchpad using a bazaar tracking branch of this git repository. The +GitHub page is here: + + * [Github project page](http://github.com/danielgtaylor/arista) + +You can grab a copy of the source code for Arista via: + + git clone git://github.com/danielgtaylor/arista.git + +Feel free to fork on GitHub and propose updates to the main branch. You can +keep your branch up to date via `git pull` + +The public website of this project is also open source, and can be found here: + + * [Website project page](http://github.com/danielgtaylor/arista-website) + +Feel free to fork it and contribute as well. + diff -Nru arista-0.9.3+repack/README.releases arista-0.9.5/README.releases --- arista-0.9.3+repack/README.releases 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/README.releases 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,30 @@ +Arista Release Guide +==================== +This file describes what steps should be taken to make a new release of Arista. + +Pre-Release +----------- + + * Download new translation files from launchpad and commit to git + * Version bump in arista/__init__.py and ui/about.ui + * Updated README + * Update setup.py to make sure it is up to date for the release + +Release +------- + + * Tag git revision with version, e.g. '0.9.1', and push with --tags + * Create the source distribution: setup.py sdist + * Upload the resulting dist/arista-*.tar.gz to Programmer-art.org + * Turn the next milestone into a release on launchpad and upload tarball + * Update python package index: setup.py register + +Post-Release +------------ + + * Setup new milestone for next release on launchpad if applicable + * Bug and blueprint triage on launchpad + * Update various sites: + * gnomefiles.org + * freshmeat.net + diff -Nru arista-0.9.3+repack/setup.py arista-0.9.5/setup.py --- arista-0.9.3+repack/setup.py 2009-06-28 21:07:12.000000000 +0100 +++ arista-0.9.5/setup.py 2010-06-13 11:38:18.000000000 +0100 @@ -15,21 +15,28 @@ data_files = [ (os.path.join("share", "applications"), ["arista.desktop"]), + (os.path.join("share", "doc", "arista"), [ + "README.md", "LICENSE", "AUTHORS" + ]), + (os.path.join("lib", "nautilus", "extensions-2.0", "python"), ["arista-nautilus.py"]), ] -for path in ["presets", "ui", "locale"]: +for (prefix, path) in [("arista", "presets"), + ("arista", "ui"), + ("", "locale")]: for root, dirs, files in os.walk(path): to_add = [] for filename in files: - to_add.append(os.path.join(root, filename)) + if filename != "README": + to_add.append(os.path.join(root, filename)) if to_add: - data_files.append((os.path.join("share", "arista", root), to_add)) + data_files.append((os.path.join("share", prefix, root), to_add)) setup( name = "arista", - version = "0.9.3", + version = "0.9.5", description = "An easy multimedia transcoder for GNOME", long_description = """Overview ======== @@ -39,33 +46,39 @@ input, pick your target device, choose a file to save to and go. Arista has been in development since early 2008 as a side project and was just -recently polished to make it release-worthy. The 0.8 release is the first release available to the public. Please see http://www.launchpad.net/arista for information on helping out. +recently polished to make it release-worthy. The 0.8 release is the first release available to the public. Please see http://github.com/danielgtaylor/arista for information on helping out. Features --------- -* Presets for iPod, computer, DVD player, PSP, and more +* Presets for Android, iPod, computer, DVD player, PSP, and more * Live preview to see encoded quality * Automatically discover available DVD drives and media -* Rip straight from DVD media easily (requires libdvdcss) -* Automatically discover and record from V4L devices +* Rip straight from DVD media easily +* Automatically discover and record from Video4Linux devices +* Support for H.264, WebM, FLV, Ogg, DivX and more +* Batch processing of entire directories easily * Simple terminal client for scripting +* Nautilus extension for right-click file conversion Requirements --------------- Arista is written in Python and requires the bindings for GTK+ 2.16 or newer, -GStreamer, GConf, GObject, Cairo, and DBus. If you are an Ubuntu user this means +GStreamer, GConf, GObject, Cairo, and udev. If you are an Ubuntu user this means you need to be using at least Ubuntu 9.04 (Jaunty). The GStreamer plugins required depend on the presets available, but at this time you should have gst-plugins-good, gst-plugins-bad, gst-plugins-ugly, and gst-ffmpeg. If you are on Ubuntu don't forget to install the multiverse packages. + +Note: WebM support requires at least GStreamer's gst-plugins-bad-0.10.19. """, author = "Daniel G. Taylor", author_email = "dan@programmer-art.org", - url = "http://programmer-art.org/projects/arista-transcoder", - download_url = "http://programmer-art.org/media/releases/arista-transcoder/arista-0.9.2.tar.gz", + url = "http://www.transcoder.org/", + download_url = "http://programmer-art.org/media/releases/arista-transcoder/arista-0.9.5.tar.gz", packages = [ "arista", + "arista.inputs", ], scripts = [ "arista-gtk", @@ -77,7 +90,7 @@ "gst(>=10.22)", "gconf", "cairo", - "dbus", + "udev", ], provides = [ "arista", @@ -87,7 +100,7 @@ "Platform Independent", ], classifiers = [ - "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", "Environment :: Console", "Environment :: X11 Applications :: GTK", "Environment :: X11 Applications :: Gnome", @@ -99,5 +112,6 @@ "Topic :: Multimedia :: Video :: Conversion", "Topic :: Utilities", ], + zip_safe = False, ) diff -Nru arista-0.9.3+repack/ui/about.ui arista-0.9.5/ui/about.ui --- arista-0.9.3+repack/ui/about.ui 2009-06-28 21:06:57.000000000 +0100 +++ arista-0.9.5/ui/about.ui 2010-06-13 11:38:18.000000000 +0100 @@ -8,10 +8,10 @@ normal False Arista Transcoder - 0.9.3 - Copyright 2008 - 2009 Daniel G. Taylor + 0.9.5 + Copyright 2008 - 2010 Daniel G. Taylor A multimedia transcoder for the GNOME desktop. - http://programmer-art.org/projects/arista-transcoder + http://www.transcoder.org/ Arista homepage Arista is released under the GNU LGPL 2.1. Please see: @@ -29,7 +29,6 @@ True - vertical 2 diff -Nru arista-0.9.3+repack/ui/error.svg arista-0.9.5/ui/error.svg --- arista-0.9.3+repack/ui/error.svg 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/ui/error.svg 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,272 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff -Nru arista-0.9.3+repack/ui/main.ui arista-0.9.5/ui/main.ui --- arista-0.9.3+repack/ui/main.ui 2009-06-16 23:01:29.000000000 +0100 +++ arista-0.9.5/ui/main.ui 2010-06-13 11:38:18.000000000 +0100 @@ -48,18 +48,29 @@ + + True + False + _Pause + True + + + + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - + + _Install device preset True - False - _Pause + True True - + image5 + False + @@ -231,7 +242,6 @@ True - vertical 320 @@ -300,7 +310,6 @@ True - vertical 5 @@ -460,4 +469,9 @@ True gtk-properties + + True + gtk-connect + 1 + diff -Nru arista-0.9.3+repack/utils/generate_docs.sh arista-0.9.5/utils/generate_docs.sh --- arista-0.9.3+repack/utils/generate_docs.sh 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/utils/generate_docs.sh 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,4 @@ +#!/bin/bash + +epydoc --html -o api arista arista-transcode arista-gtk && gnome-open api/index.html + diff -Nru arista-0.9.3+repack/utils/generate_tests.py arista-0.9.5/utils/generate_tests.py --- arista-0.9.3+repack/utils/generate_tests.py 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/utils/generate_tests.py 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,69 @@ +#!/usr/bin/env python + +""" + Arista Test Generator + ===================== + Generate a series of test files containing audio/video to run through the + transcoder for unit testing. + + License + ------- + Copyright 2008 Daniel G. Taylor + + This file is part of Arista. + + Arista 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. + + Foobar 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 Arista. If not, see . +""" + +import os + +if not os.path.exists("tests"): + os.mkdir("tests") + +os.chdir("tests") + +print "Generating test samples..." + +# Ogg (Theora/Vorbis) tests +os.system("gst-launch-0.10 audiotestsrc num-buffers=500 ! audiorate ! audioconvert ! audioresample ! vorbisenc ! oggmux ! filesink location='test-audio.ogg'") + +os.system("gst-launch-0.10 videotestsrc num-buffers=500 ! ffmpegcolorspace ! videoscale ! videorate ! theoraenc ! oggmux ! filesink location='test-video.ogg'") + +os.system("gst-launch-0.10 videotestsrc num-buffers=500 ! ffmpegcolorspace ! videoscale ! videorate ! theoraenc ! queue ! oggmux name=mux ! filesink location='test.ogg' audiotestsrc num-buffers=500 ! audiorate ! audioconvert ! audioresample ! vorbisenc ! queue ! mux.") + +# AVI (XVID, MP3), etc. +os.system("gst-launch-0.10 audiotestsrc num-buffers=500 ! audiorate ! audioconvert ! audioresample ! lame ! filesink location='test-audio.mp3'") + +os.system("gst-launch-0.10 videotestsrc num-buffers=500 ! ffmpegcolorspace ! videoscale ! videorate ! xvidenc ! avimux ! filesink location='test-video.avi'") + +os.system("gst-launch-0.10 videotestsrc num-buffers=500 ! ffmpegcolorspace ! videoscale ! videorate ! xvidenc ! queue ! avimux name=mux ! filesink location='test.avi' audiotestsrc num-buffers=500 ! audiorate ! audioconvert ! audioresample ! lame ! queue ! mux.") + +# MP4 (H.264, AAC), etc +os.system("gst-launch-0.10 audiotestsrc num-buffers=500 ! audiorate ! audioconvert ! audioresample ! faac ! qtmux ! filesink location='test-audio.m4a'") + +os.system("gst-launch-0.10 videotestsrc num-buffers=500 ! ffmpegcolorspace ! videoscale ! videorate ! x264enc ! qtmux ! filesink location='test-video.mp4'") + +os.system("gst-launch-0.10 videotestsrc num-buffers=500 ! ffmpegcolorspace ! videoscale ! videorate ! x264enc ! queue ! qtmux name=mux ! filesink location='test.mp4' audiotestsrc num-buffers=500 ! audiorate ! audioconvert ! audioresample ! faac ! queue ! mux.") + +os.system("gst-launch-0.10 videotestsrc num-buffers=500 ! ffmpegcolorspace ! videoscale ! videorate ! xvidenc ! queue ! qtmux name=mux ! filesink location='test2.mp4' audiotestsrc num-buffers=500 ! audiorate ! audioconvert ! audioresample ! lame ! queue ! mux.") + +# DV +# Why does this fail? +#os.system("gst-launch-0.10 videotestsrc num-buffers=500 ! ffmpegcolorspace ! videoscale ! videorate ! ffenc_dvvideo ! queue ! ffmux_dv name=mux ! filesink location='test.dv' audiotestsrc num-buffers=500 ! audiorate ! audioconvert ! audioresample ! queue ! mux.") + +# ASF (WMV/WMA) +os.system("gst-launch-0.10 videotestsrc num-buffers=500 ! ffmpegcolorspace ! videoscale ! videorate ! ffenc_wmv2 ! queue ! asfmux name=mux ! filesink location='test.wmv' audiotestsrc num-buffers=500 ! audiorate ! audioconvert ! audioresample ! ffenc_wmav2 ! queue ! mux.") + +print "Test samples can be found in the tests directory." + diff -Nru arista-0.9.3+repack/utils/run_tests.py arista-0.9.5/utils/run_tests.py --- arista-0.9.3+repack/utils/run_tests.py 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/utils/run_tests.py 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,48 @@ +#!/usr/bin/env python + +""" + Run Arista Transcode Tests + ========================== + Generate test files in various formats and transcode them to all available + output devices and qualities. +""" +import os +import subprocess +import sys +sys.path.append(os.path.dirname(os.path.dirname(__file__))) + +import arista; arista.init() + +if not os.path.exists("tests"): + os.system("./utils/generate_tests.py") + +files = os.listdir("tests") + +status = [] + +try: + for id, device in arista.presets.get().items(): + for file in files: + print device.make + " " + device.model + ": " + file + cmd = "./arista-transcode -q -d %s -o test_output tests/%s" % (id, file) + print cmd + ret = subprocess.call(cmd, shell=True) + if ret: + status.append([file, device, True]) + else: + status.append([file, device, False]) +except KeyboardInterrupt: + pass + +print "Report" +print "======" + +for file, device, failed in status: + if failed: + print device.make + " " + device.model + " (" + \ + file + "): Failed" + else: + print device.make + " " + device.model + " (" + \ + file + "): Succeeded" + +print "Tests completed." diff -Nru arista-0.9.3+repack/utils/update_translation.sh arista-0.9.5/utils/update_translation.sh --- arista-0.9.3+repack/utils/update_translation.sh 1970-01-01 01:00:00.000000000 +0100 +++ arista-0.9.5/utils/update_translation.sh 2010-06-13 11:38:18.000000000 +0100 @@ -0,0 +1,7 @@ +#!/bin/bash + +# Extract all translatable messages to update the Arista PO template + +xgettext -L glade -o - ui/*.ui | tail -n +6 >locale/templates/arista.pot +xgettext -L python -o - arista-gtk arista-transcode arista-nautilus.py arista/*.py arista/inputs/*.py | tail -n +18 >>locale/templates/arista.pot +