Exemple #1
0

GlobalSettings.add_config_section("proxy")
GlobalSettings.add_config_option('proxying_strategy',
                                 section='proxy',
                                 key='proxying-strategy',
                                 default=ProxyingStrategy.AUTOMATIC)

GlobalSettings.add_config_option('num_transcoding_jobs',
                                 section='proxy',
                                 key='num-proxying-jobs',
                                 default=4,
                                 notify=True)
PreferencesDialog.add_numeric_preference(
    'num_transcoding_jobs',
    description="",
    section="_proxies",
    label=_("Max number of parallel transcoding jobs"),
    lower=1)

GlobalSettings.add_config_option("max_cpu_usage",
                                 section="proxy",
                                 key="max-cpu-usage",
                                 default=10,
                                 notify=True)
PreferencesDialog.add_numeric_preference(
    'max_cpu_usage',
    description="",
    section="_proxies",
    label=_("Max CPU usage dedicated to transcoding"),
    lower=1,
    upper=100)
Exemple #2
0
from pitivi.settings import GlobalSettings
from pitivi.utils.loggable import Loggable
from pitivi.utils.ui import argb_to_gdk_rgba
from pitivi.utils.ui import gdk_rgba_to_argb
from pitivi.utils.widgets import ColorPickerButton

GlobalSettings.add_config_option("titleClipLength",
                                 section="user-interface",
                                 key="title-clip-length",
                                 default=5000,
                                 notify=True)

PreferencesDialog.add_numeric_preference(
    "titleClipLength",
    section="timeline",
    label=_("Title clip duration"),
    description=
    _("Default clip length (in milliseconds) of titles when inserting on the timeline."
      ),
    lower=1)


class TitleProperties(Gtk.Expander, Loggable):
    """Widget for configuring a title.

    Attributes:
        app (Pitivi): The app.
    """
    def __init__(self, app):
        Loggable.__init__(self)
        Gtk.Expander.__init__(self)
        self.set_label(_("Title"))