Exemplo n.º 1
0
    def __init__(self, app, project, pipeline=None):
        Loggable.__init__(self)
        GladeWindow.__init__(self)

        self.app = app
        self.project = project
        # clone the current project settings
        self.original_settings = self.project.getSettings()
        self.settings = self.original_settings.copy()
        self.project.setSettings(self.settings)

        # UI widgets
        self.window.set_icon_from_file(configure.get_pixmap_dir() + "/pitivi-render-16.png")

        Renderer.__init__(self, project, pipeline)

        ellipsize(self.muxercombobox)
        ellipsize(self.audio_encoder_combo)
        ellipsize(self.video_encoder_combo)

        self.timestarted = 0
        self._displaySettings()

        self.window.connect("delete-event", self._deleteEventCb)
        self.settings.connect("settings-changed", self._settingsChanged)
        self.settings.connect("encoders-changed", self._settingsChanged)
Exemplo n.º 2
0
 def __init__(self):
     gtk.Button.__init__(self, label="")
     Loggable.__init__(self)
     self.get_settings().props.gtk_button_images = True
     self.playing = True
     self.setPlay()
     self.connect('clicked', self._clickedCb)
Exemplo n.º 3
0
    def __init__(self, app, project, pipeline=None):
        Loggable.__init__(self)
        GladeWindow.__init__(self)

        self.app = app

        # UI widgets
        self.progressbar = self.widgets["progressbar"]
        self.filebutton = self.widgets["filebutton"]
        self.settingsbutton = self.widgets["settingsbutton"]
        self.cancelbutton = self.widgets["cancelbutton"]
        self.recordbutton = self.widgets["recordbutton"]
        self.recordbutton.set_sensitive(False)
        self.vinfo = self.widgets["videoinfolabel"]
        self.ainfo = self.widgets["audioinfolabel"]
        self.window.set_icon_from_file(configure.get_pixmap_dir() +
                                       "/pitivi-render-16.png")

        # grab the Pipeline and settings
        self.project = project
        if pipeline != None:
            self.pipeline = pipeline
        else:
            self.pipeline = self.project.pipeline
        self.detectStreamTypes()

        self.outfile = None
        self.rendering = False
        self.renderaction = None
        self.settings = project.getSettings()
        self.timestarted = 0
        self._displaySettings()

        self.window.connect("delete-event", self._deleteEventCb)
Exemplo n.º 4
0
    def __init__(self, app, project, pipeline=None):
        Loggable.__init__(self)
        GladeWindow.__init__(self)

        self.app = app

        # UI widgets
        self.progressbar = self.widgets["progressbar"]
        self.filebutton = self.widgets["filebutton"]
        self.settingsbutton = self.widgets["settingsbutton"]
        self.cancelbutton = self.widgets["cancelbutton"]
        self.recordbutton = self.widgets["recordbutton"]
        self.recordbutton.set_sensitive(False)
        self.vinfo = self.widgets["videoinfolabel"]
        self.ainfo = self.widgets["audioinfolabel"]
        self.window.set_icon_from_file(configure.get_pixmap_dir() + "/pitivi-render-16.png")

        # grab the Pipeline and settings
        self.project = project
        if pipeline != None:
            self.pipeline = pipeline
        else:
            self.pipeline = self.project.pipeline
        self.detectStreamTypes()

        self.outfile = None
        self.rendering = False
        self.renderaction = None
        self.settings = project.getSettings()
        self.timestarted = 0
        self._displaySettings()

        self.window.connect("delete-event", self._deleteEventCb)
Exemplo n.º 5
0
    def __init__(self, instance):
        """ initialize with the Pitivi object """
        gtk.Window.__init__(self)
        Loggable.__init__(self)
        self.log("Creating MainWindow")
        self.actions = None
        self.toggleactions = None
        self.actiongroup = None
        self.settings = instance.settings
        self.is_fullscreen = self.settings.mainWindowFullScreen
        self.timelinepos = 0
        self.prefsdialog = None
        create_stock_icons()
        self._setActions(instance)
        self._createUi(instance)

        self.app = instance
        self._launchWizard()
        self.manager = RecentManager()
        self._zoom_duration_changed = False
        self._missingUriOnLoading = False

        self.app.projectManager.connect("new-project-loading",
                self._projectManagerNewProjectLoadingCb)
        self.app.projectManager.connect("new-project-loaded",
                self._projectManagerNewProjectLoadedCb)
        self.app.projectManager.connect("new-project-loaded",
                self._quitWizardCb)
        self.app.projectManager.connect("new-project-failed",
                self._projectManagerNewProjectFailedCb)
        self.app.projectManager.connect("save-project-failed",
                self._projectManagerSaveProjectFailedCb)
        self.app.projectManager.connect("project-saved",
                self._projectManagerProjectSavedCb)
        self.app.projectManager.connect("closing-project",
                self._projectManagerClosingProjectCb)
        self.app.projectManager.connect("reverting-to-saved",
                self._projectManagerRevertingToSavedCb)
        self.app.projectManager.connect("project-closed",
                self._projectManagerProjectClosedCb)
        self.app.projectManager.connect("missing-uri",
                self._projectManagerMissingUriCb)

        self.app.action_log.connect("commit", self._actionLogCommit)
        self.app.action_log.connect("undo", self._actionLogUndo)
        self.app.action_log.connect("redo", self._actionLogRedo)
        self.app.action_log.connect("cleaned", self._actionLogCleaned)

        # if no webcams available, hide the webcam action
        if self.app.deviceprobe is not None:
            # On Windows disable device probe
            if platform.system() != 'Windows':
                self.app.deviceprobe.connect("device-added", self._deviceChangeCb)
                self.app.deviceprobe.connect("device-removed", self._deviceChangeCb)
                if len(self.app.deviceprobe.getVideoSourceDevices()) < 1:
                    self.webcam_button.set_sensitive(False)
        else:
            self.webcam_button.set_sensitive(False)

        self.show()
Exemplo n.º 6
0
    def __init__(self, avalaible_effects={}):
        Signallable.__init__(self)
        Loggable.__init__(self)

        self.current = None
        self.backup_lock = 0
        self.avalaible_effects = avalaible_effects
Exemplo n.º 7
0
    def __init__(self, trackobject, element, prop, minimum=None, maximum=None,
        format=None):
        Loggable.__init__(self)
        self.debug("track:%r, element:%r, property:%r", trackobject, element, prop)
        self._keyframes = []
        self.trackobject = trackobject

        if minimum is None:
            minimum = prop.minimum
        if maximum is None:
            maximum = prop.maximum
        assert not ((minimum is None) or (maximum is None))
        self.lower = minimum
        self.upper = maximum
        self.range = maximum - minimum

        # FIXME: don't necessarily want to create separate controllers for
        # each Interpolator. We should instead create a ControlSource for each
        # element. We can't do this until the new controller interface is
        # exposed in gst-python.
        self.attachToElementProperty(prop, element)
        self._default = self._element.get_property(prop.name)
        self.start = FixedKeyframe(self)
        self.end = FixedKeyframe(self)
        self.start.value = self._default
        self.start.setObjectTime(trackobject.in_point)
        self._keyframeTimeValueChanged(self.start, 0, self.start.value)
        self.end.value = self._default
        if trackobject.in_point == trackobject.out_point:
            self.end.setObjectTime(trackobject.in_point + 1)
        else:
            self.end.setObjectTime(trackobject.out_point)
        self._keyframeTimeValueChanged(self.end, self.end.time, self.end.value)
        self.format = format if format else str
Exemplo n.º 8
0
    def __init__(self, name="", uri=None, **kwargs):
        """
        @param name: the name of the project
        @param uri: the uri of the project
        """
        Loggable.__init__(self)
        self.log("name:%s, uri:%s", name, uri)
        self.name = name
        self.settings = None
        self.description = ""
        self.uri = uri
        self.urichanged = False
        self.format = None
        self.sources = SourceList()
        self.sources.connect("source-added", self._sourceAddedCb)
        self.sources.connect("source-removed", self._sourceRemovedCb)

        self._dirty = False

        self.timeline = Timeline()

        self.factory = TimelineSourceFactory(self.timeline)
        self.pipeline = Pipeline()
        self.view_action = ViewAction()
        self.view_action.addProducers(self.factory)
        self.seeker = Seeker(80)

        self.settings = ExportSettings()
        self._videocaps = self.settings.getVideoCaps()
Exemplo n.º 9
0
 def __init__(self, action):
     gtk.DrawingArea.__init__(self)
     Loggable.__init__(self)
     self.action = action  # FIXME : Check if it's a view action
     self.unset_flags(gtk.SENSITIVE)
     for state in range(gtk.STATE_INSENSITIVE + 1):
         self.modify_bg(state, self.style.black)
Exemplo n.º 10
0
    def __init__(self, avalaible_effects={}):
        Signallable.__init__(self)
        Loggable.__init__(self)

        self.current = None
        self.backup_lock = 0
        self.avalaible_effects = avalaible_effects
Exemplo n.º 11
0
    def __init__(self, name="", uri=None, **kwargs):
        """
        @param name: the name of the project
        @param uri: the uri of the project
        """
        Loggable.__init__(self)
        self.log("name:%s, uri:%s", name, uri)
        self.name = name
        self.settings = None
        self.description = ""
        self.uri = uri
        self.urichanged = False
        self.format = None
        self.sources = SourceList()
        self.sources.connect("source-added", self._sourceAddedCb)
        self.sources.connect("source-removed", self._sourceRemovedCb)

        self._dirty = False

        self.timeline = Timeline()

        self.factory = TimelineSourceFactory(self.timeline)
        self.pipeline = Pipeline()
        self.view_action = ViewAction()
        self.view_action.addProducers(self.factory)
        self.seeker = Seeker(80)

        self.settings = ExportSettings()
        self._videocaps = self.settings.getVideoCaps()
Exemplo n.º 12
0
 def __init__(self):
     gtk.HBox.__init__(self)
     Loggable.__init__(self)
     self.errors = []
     self._scroll_pos_ns = 0
     self._errorsmessage = _("One or more GStreamer errors occured!")
     self._makeUI()
Exemplo n.º 13
0
    def __init__(self, trackobject, element, prop, minimum=None, maximum=None,
        format=None):
        Loggable.__init__(self)
        self.debug("track:%r, element:%r, property:%r", trackobject, element, prop)
        self._keyframes = []
        self.trackobject = trackobject

        if minimum is None:
            minimum = prop.minimum
        if maximum is None:
            maximum = prop.maximum
        assert not ((minimum is None) or (maximum is None))
        self.lower = minimum
        self.upper = maximum
        self.range = maximum - minimum

        # FIXME: don't necessarily want to create separate controllers for
        # each Interpolator. We should instead create a ControlSource for each
        # element. We can't do this until the new controller interface is
        # exposed in gst-python.
        self.attachToElementProperty(prop, element)
        self._default = self._element.get_property(prop.name)
        self.start = FixedKeyframe(self)
        self.end = FixedKeyframe(self)
        self.start.value = self._default
        self.start.setObjectTime(trackobject.in_point)
        self._keyframeTimeValueChanged(self.start, 0, self.start.value)
        self.end.value = self._default
        if trackobject.in_point == trackobject.out_point:
            self.end.setObjectTime(trackobject.in_point + 1)
        else:
            self.end.setObjectTime(trackobject.out_point)
        self._keyframeTimeValueChanged(self.end, self.end.time, self.end.value)
        self.format = format if format else str
Exemplo n.º 14
0
 def __init__(self):
     gtk.Button.__init__(self, label="")
     Loggable.__init__(self)
     self.get_settings().props.gtk_button_images = True
     self.playing = True
     self.setPlay()
     self.connect('clicked', self._clickedCb)
Exemplo n.º 15
0
 def __init__(self):
     gtk.HBox.__init__(self)
     Loggable.__init__(self)
     self.errors = []
     self.showing = False
     self._errorsmessage = _("One or more GStreamer errors has occured!")
     self._makeUI()
Exemplo n.º 16
0
    def __init__(self, instance, hadj):
        gtk.DrawingArea.__init__(self)
        Zoomable.__init__(self)
        Loggable.__init__(self)
        self.log("Creating new ScaleRule")
        self.add_events(gtk.gdk.POINTER_MOTION_MASK |
            gtk.gdk.BUTTON_PRESS_MASK | gtk.gdk.BUTTON_RELEASE_MASK)
        self.hadj = hadj
        hadj.connect("value-changed", self._hadjValueChangedCb)

        # double-buffering properties
        self.pixmap = None
        # all values are in pixels
        self.pixmap_offset = 0
        self.pixmap_visible_width = 0
        self.pixmap_allocated_width = 0
        self.pixmap_old_allocated_width = -1
        # This is the number of visible_width we allocate for the pixmap
        self.pixmap_multiples = 2

        # position is in nanoseconds
        self.position = 0
        self.pressed = False
        self.shaded_duration = gst.CLOCK_TIME_NONE
        self.max_duration = gst.CLOCK_TIME_NONE
        self.min_frame_spacing = 5.0
        self.frame_height = 5.0
        self.frame_rate = gst.Fraction(1/1)
        self.app = instance
        self.need_update = True
Exemplo n.º 17
0
    def __init__(self, instance, hadj):
        gtk.Layout.__init__(self)
        Zoomable.__init__(self)
        Loggable.__init__(self)
        self.log("Creating new ScaleRule")
        self.add_events(gtk.gdk.POINTER_MOTION_MASK | gtk.gdk.BUTTON_PRESS_MASK
                        | gtk.gdk.BUTTON_RELEASE_MASK)
        self.set_hadjustment(hadj)
        self.hadj = hadj
        self.pixel_position_offset = 0
        hadj.connect("value-changed", self._hadjValueChangedCb)

        # double-buffering properties
        self.pixmap = None
        # all values are in pixels
        self.pixmap_offset = 0
        self.pixmap_visible_width = 0
        self.pixmap_allocated_width = 0
        self.pixmap_old_allocated_width = -1
        # This is the number of visible_width we allocate for the pixmap
        self.pixmap_multiples = 2

        # position is in nanoseconds
        self.position = 0
        self.pressed = False
        self.shaded_duration = gst.CLOCK_TIME_NONE
        self.max_duration = gst.CLOCK_TIME_NONE
        self.min_frame_spacing = 5.0
        self.frame_height = 5.0
        self.frame_rate = gst.Fraction(1 / 1)
        self.app = instance
Exemplo n.º 18
0
    def __init__(self, action=None, pipeline=None):
        """
        @param action: Specific action to use instead of auto-created one
        @type action: L{ViewAction}
        """
        gtk.VBox.__init__(self)
        self.set_border_width(SPACING)

        Loggable.__init__(self)
        self.log("New PitiviViewer")

        self.seeker = Seeker(80)
        self.seeker.connect('seek', self._seekerSeekCb)
        self.action = action
        self.pipeline = pipeline

        self.current_time = long(0)
        self._initial_seek = None
        self.current_frame = -1

        self.currentState = gst.STATE_PAUSED
        self._haveUI = False

        self._createUi()
        self.setAction(action)
        self.setPipeline(pipeline)
Exemplo n.º 19
0
 def __init__(self):
     gtk.VBox.__init__(self)
     Loggable.__init__(self)
     self.element = None
     self.ignore = None
     self.properties = None
     self.buttons = {}
Exemplo n.º 20
0
 def __init__(self, action):
     gtk.DrawingArea.__init__(self)
     Loggable.__init__(self)
     self.action = action # FIXME : Check if it's a view action
     self.unset_flags(gtk.SENSITIVE)
     for state in range(gtk.STATE_INSENSITIVE + 1):
         self.modify_bg(state, self.style.black)
Exemplo n.º 21
0
    def __init__(self, app, undock_action=None, action=None, pipeline=None):
        gtk.VBox.__init__(self)
        self.set_border_width(SPACING)
        self.settings = app.settings
        self.app = app

        Loggable.__init__(self)
        self.log("New PitiviViewer")

        self.seeker = Seeker(80)
        self.seeker.connect('seek', self._seekerSeekCb)
        self.action = action
        self.pipeline = pipeline
        self.sink = None
        self.docked = True

        self.current_time = long(0)
        self._initial_seek = None
        self.current_frame = -1

        self.currentState = gst.STATE_PAUSED
        self._haveUI = False

        self._createUi()
        self.target = self.internal
        self.setAction(action)
        self.setPipeline(pipeline)
        self.undock_action = undock_action
        if undock_action:
            self.undock_action.connect("activate", self._toggleDocked)

            if not self.settings.viewerDocked:
                self.undock()
Exemplo n.º 22
0
 def __init__(self):
     gtk.VBox.__init__(self)
     Loggable.__init__(self)
     self.element = None
     self.ignore = None
     self.properties = None
     self.buttons = {}
Exemplo n.º 23
0
    def __init__(self, name="", uri=None, **kwargs):
        """
        name : the name of the project
        uri : the uri of the project
        """
        Loggable.__init__(self)
        self.log("name:%s, uri:%s", name, uri)
        self.name = name
        self.settings = None
        self.description = ""
        self.uri = uri
        self.urichanged = False
        self.format = None
        self.sources = SourceList()
        self.sources.connect("source-removed", self._sourceRemovedCb)

        self.settingssigid = 0
        self._dirty = False

        self.timeline = Timeline()

        self.factory = TimelineSourceFactory(self.timeline)
        self.pipeline = Pipeline()
        self.view_action = ViewAction()
        self.view_action.addProducers(self.factory)
Exemplo n.º 24
0
    def __init__(self):
        Loggable.__init__(self)
        # mapping of directory changes
        # key : old path
        # value : new path
        self.directorymapping = {}

        self.project = None
Exemplo n.º 25
0
    def __init__(self):
        Loggable.__init__(self)
        # mapping of directory changes
        # key : old path
        # value : new path
        self.directorymapping = {}

        self.project = None
Exemplo n.º 26
0
 def __init__(self, title, headline):
     GladeWindow.__init__(self)
     Loggable.__init__(self)
     self.window.set_modal(False)
     self.widgets["headline"].set_text(headline)
     self.window.set_title(title)
     self.errorvbox = self.widgets["errorvbox"]
     self.window.set_geometry_hints(min_width=400, min_height=200)
Exemplo n.º 27
0
 def __init__(self, caps, pad_name=None):
     Loggable.__init__(self)
     self.caps = caps
     self.pad_name = pad_name
     self.fixed = caps.is_fixed()
     self.raw = None
     self._analyzeCaps()
     self.log("new with caps %s" % self.caps.to_string())
Exemplo n.º 28
0
 def __init__(self):
     gtk.Button.__init__(self)
     Loggable.__init__(self)
     self.image = gtk.Image()
     self.add(self.image)
     self.playing = True
     self.setPlay()
     self.connect('clicked', self._clickedCb)
Exemplo n.º 29
0
 def __init__(self, caps, pad_name=None):
     Loggable.__init__(self)
     self.caps = caps
     self.pad_name = pad_name
     self.fixed = caps.is_fixed()
     self.raw = None
     self._analyzeCaps()
     self.log("new with caps %s" % self.caps.to_string())
Exemplo n.º 30
0
 def __init__(self):
     gtk.HBox.__init__(self)
     Loggable.__init__(self)
     self.errors = []
     self.showing = False
     self._importingmessage = _("Importing clips...")
     self._errorsmessage = _("Error(s) occurred while importing")
     self._errormessage = _("An error occurred while importing")
     self._makeUI()
Exemplo n.º 31
0
 def __init__(self):
     gtk.HBox.__init__(self)
     Loggable.__init__(self)
     self.errors = []
     self.showing = False
     self._importingmessage = _("Importing clips...")
     self._errorsmessage = _("Error(s) occurred while importing")
     self._errormessage = _("An error occurred while importing")
     self._makeUI()
Exemplo n.º 32
0
    def __init__(self, avalaible_effects):
        Loggable.__init__(self)
        # mapping of directory changes
        # key : old path
        # value : new path
        self.directorymapping = {}

        self.avalaible_effects = avalaible_effects
        self.project = None
Exemplo n.º 33
0
    def __init__(self, avalaible_effects):
        Loggable.__init__(self)
        # mapping of directory changes
        # key : old path
        # value : new path
        self.directorymapping = {}

        self.avalaible_effects = avalaible_effects
        self.project = None
Exemplo n.º 34
0
 def __init__(self, elementfactory, properties={}):
     GladeWindow.__init__(self)
     Loggable.__init__(self)
     self.debug("factory:%s, properties:%s", elementfactory, properties)
     self.factory = elementfactory
     self.element = self.factory.create("elementsettings")
     if not self.element:
         self.warning("Couldn't create element from factory %s", self.factory)
     self.properties = properties
     self._fillWindow()
Exemplo n.º 35
0
    def __init__(self, instance):
        """ initialize with the Pitivi object """
        gtk.Window.__init__(self)
        Loggable.__init__(self)
        self.log("Creating MainWindow")
        self.actions = None
        self.toggleactions = None
        self.actiongroup = None
        self.settings = instance.settings
        self.is_fullscreen = self.settings.mainWindowFullScreen
        self.timelinepos = 0
        self.prefsdialog = None
        create_stock_icons()
        self._setActions(instance)
        self._createUi(instance)
        self.app = instance
        self._zoom_duration_changed = False

        self.app.projectManager.connect("new-project-loading",
                self._projectManagerNewProjectLoadingCb)
        self.app.projectManager.connect("new-project-loaded",
                self._projectManagerNewProjectLoadedCb)
        self.app.projectManager.connect("new-project-failed",
                self._projectManagerNewProjectFailedCb)
        self.app.projectManager.connect("save-project-failed",
                self._projectManagerSaveProjectFailedCb)
        self.app.projectManager.connect("project-saved",
                self._projectManagerProjectSavedCb)
        self.app.projectManager.connect("closing-project",
                self._projectManagerClosingProjectCb)
        self.app.projectManager.connect("reverting-to-saved",
                self._projectManagerRevertingToSavedCb)
        self.app.projectManager.connect("project-closed",
                self._projectManagerProjectClosedCb)
        self.app.projectManager.connect("missing-uri",
                self._projectManagerMissingUriCb)

        self.app.action_log.connect("commit", self._actionLogCommit)
        self.app.action_log.connect("undo", self._actionLogUndo)
        self.app.action_log.connect("redo", self._actionLogRedo)
        self.app.action_log.connect("cleaned", self._actionLogCleaned)

        # if no webcams available, hide the webcam action
        if self.app.deviceprobe is not None:
            # On Windows disable device probe
            if platform.system() != 'Windows':
                self.app.deviceprobe.connect("device-added", self._deviceChangeCb)
                self.app.deviceprobe.connect("device-removed", self._deviceChangeCb)
                if len(self.app.deviceprobe.getVideoSourceDevices()) < 1:
                    self.webcam_button.set_sensitive(False)
        else:
            self.webcam_button.set_sensitive(False)

        self.show()
Exemplo n.º 36
0
 def __init__(self, project, pipeline=None):
     Loggable.__init__(self)
     # grab the Pipeline and settings
     self.project = project
     if pipeline != None:
         self.pipeline = pipeline
     else:
         self.pipeline = self.project.pipeline
     self.acting = False
     self.action = None
     self.settings = project.getSettings()
Exemplo n.º 37
0
 def __init__(self):
     Loggable.__init__(self)
     self.state = STATE_NOT_ACTIVE
     self.producers = []
     self.consumers = []
     self.pipeline = None
     self._links = [] # list of (producer, consumer, prodstream, consstream)
     self._pending_links = [] # list of links that still need to be connected
     self._pending_links_elements = []
     self._dyn_links = [] # list of links added at RunTime, will be removed when deactivated
     self._dynconsumers = [] # consumers that we added at RunTime
Exemplo n.º 38
0
 def __init__(self, project, pipeline=None):
     Loggable.__init__(self)
     # grab the Pipeline and settings
     self.project = project
     if pipeline != None:
         self.pipeline = pipeline
     else:
         self.pipeline = self.project.pipeline
     self.acting = False
     self.action = None
     self.settings = project.getSettings()
Exemplo n.º 39
0
 def __init__(self):
     Loggable.__init__(self)
     self.state = STATE_NOT_ACTIVE
     self.producers = []
     self.consumers = []
     self.pipeline = None
     self._links = []  # list of (producer, consumer, prodstream, consstream)
     self._pending_links = []  # list of links that still need to be connected
     self._pending_links_elements = []
     self._dyn_links = []  # list of links added at RunTime, will be removed when deactivated
     self._dynconsumers = []  # consumers that we added at RunTime
Exemplo n.º 40
0
    def __init__(self, factory, stream_):
        """
        Create a new Extractor.

        @param factory: the factory with which to decode the stream
        @type factory: L{ObjectFactory}
        @param stream_: the stream to decode
        @type stream_: L{Stream}
        """
        Loggable.__init__(self)
        self.debug("Initialized with %s %s", factory, stream_)
Exemplo n.º 41
0
 def __init__(self, name=""):
     Loggable.__init__(self)
     self.info("name:%s", name)
     self.parent = None
     self.name = name
     self.input_streams = []
     self.output_streams = []
     self.duration = gst.CLOCK_TIME_NONE
     self._default_duration = gst.CLOCK_TIME_NONE
     self._icon = None
     self.bins = []
Exemplo n.º 42
0
 def __init__(self, name=""):
     Loggable.__init__(self)
     self.info("name:%s", name)
     self.parent = None
     self.name = name
     self.input_streams = []
     self.output_streams = []
     self.duration = gst.CLOCK_TIME_NONE
     self._default_duration = gst.CLOCK_TIME_NONE
     self._icon = None
     self.bins = []
Exemplo n.º 43
0
 def __init__(self, settings=None):
     gtk.DrawingArea.__init__(self)
     Loggable.__init__(self)
     self.settings = settings
     self.box = None
     self.stored = False
     self.area = None
     self.zoom = 1.0
     self.sink = None
     self.transformation_properties = None
     for state in range(gtk.STATE_INSENSITIVE + 1):
         self.modify_bg(state, self.style.black)
Exemplo n.º 44
0
 def __init__(self, elementfactory, properties={}):
     GladeWindow.__init__(self)
     Loggable.__init__(self)
     self.debug("factory:%s, properties:%s", elementfactory, properties)
     self.factory = elementfactory
     self.element = self.factory.create("elementsettings")
     if not self.element:
         self.warning("Couldn't create element from factory %s",
                      self.factory)
     self.desclabel = self.widgets["descriptionlabel"]
     self.authlabel = self.widgets["authorlabel"]
     self.properties = properties
     self._fillWindow()
Exemplo n.º 45
0
    def __init__(self):
        Loggable.__init__(self)
        Signallable.__init__(self)
        self._sources = {}
        self._ordered_sources = []

        self.discoverer = self.discovererClass()
        self.discoverer.connect("discovery-error", self._discoveryErrorCb)
        self.discoverer.connect("discovery-done", self._discoveryDoneCb)
        self.discoverer.connect("starting", self._discovererStartingCb)
        self.discoverer.connect("ready", self._discovererReadyCb)
        self.discoverer.connect("missing-plugins",
                self._discovererMissingPluginsCb)
Exemplo n.º 46
0
    def __init__(self, title, headline):
        Loggable.__init__(self)
        self.builder = gtk.Builder()
        self.builder.add_from_file(os.path.join(get_ui_dir(),
            "filelisterrordialog.ui"))
        self.builder.connect_signals(self)

        self.window = self.builder.get_object("filelisterrordialog")
        self.window.set_modal(False)
        self.window.set_title(title)

        self.builder.get_object("headline").set_text(headline)
        self.errorvbox = self.builder.get_object("errorvbox")
Exemplo n.º 47
0
    def __init__(self, title, headline):
        Loggable.__init__(self)
        self.builder = gtk.Builder()
        self.builder.add_from_file(
            os.path.join(get_ui_dir(), "filelisterrordialog.ui"))
        self.builder.connect_signals(self)

        self.window = self.builder.get_object("filelisterrordialog")
        self.window.set_modal(False)
        self.window.set_title(title)

        self.builder.get_object("headline").set_text(headline)
        self.errorvbox = self.builder.get_object("errorvbox")
Exemplo n.º 48
0
    def __init__(self):
        Loggable.__init__(self)
        Signallable.__init__(self)
        self._sources = {}
        self._ordered_sources = []

        self.discoverer = self.discovererClass()
        self.discoverer.connect("discovery-error", self._discoveryErrorCb)
        self.discoverer.connect("discovery-done", self._discoveryDoneCb)
        self.discoverer.connect("starting", self._discovererStartingCb)
        self.discoverer.connect("ready", self._discovererReadyCb)
        self.discoverer.connect("missing-plugins",
                                self._discovererMissingPluginsCb)
Exemplo n.º 49
0
 def __init__(self):
     Loggable.__init__(self)
     self._lock = Lock()
     self._pipeline = gst.Pipeline()
     self._bus = self._pipeline.get_bus()
     self._bus.add_signal_watch()
     self._bus.connect("message", self._busMessageCb)
     self._bus.set_sync_handler(self._busSyncMessageHandler)
     self.factories = {}
     self.actions = []
     self._listening = False  # for the position handler
     self._listeningInterval = 300  # default 300ms
     self._listeningSigId = 0
     self._stream_entry_from_pad = {}
Exemplo n.º 50
0
 def __init__(self):
     Loggable.__init__(self)
     self._lock = Lock()
     self._pipeline = gst.Pipeline()
     self._bus = self._pipeline.get_bus()
     self._bus.add_signal_watch()
     self._bus.connect("message", self._busMessageCb)
     self._bus.set_sync_handler(self._busSyncMessageHandler)
     self.factories = {}
     self.actions = []
     self._listening = False  # for the position handler
     self._listeningInterval = 300  # default 300ms
     self._listeningSigId = 0
     self._stream_entry_from_pad = {}
Exemplo n.º 51
0
 def __init__(self, app):
     GladeWidget.__init__(self)
     Loggable.__init__(self)
     self.settings = None
     self.validaencoders = []
     self.validvencoders = []
     # cached values
     self.containersettings = {}
     self.vcodecsettings = {}
     self.acodecsettings = {}
     self.muxer = None
     self.vencoder = None
     self.aencoder = None
     self.app = app
     self._loading = False
 def __init__(self, app):
     GladeWidget.__init__(self)
     Loggable.__init__(self)
     self.settings = None
     self.validaencoders = []
     self.validvencoders = []
     # cached values
     self.containersettings = {}
     self.vcodecsettings = {}
     self.acodecsettings = {}
     self.muxer = None
     self.vencoder = None
     self.aencoder = None
     self.app = app
     self._loading = False
Exemplo n.º 53
0
    def __init__(self, instance, timeline=None):
        goocanvas.Canvas.__init__(self)
        Zoomable.__init__(self)
        Loggable.__init__(self)
        self.app = instance
        self._selected_sources = []
        self._tracks = []
        self._height = 0
        self._position = 0

        self._block_size_request = False
        self.props.integer_layout = True
        self.props.automatic_bounds = False

        self._createUI()
        self.timeline = timeline
        self.settings = instance.settings
Exemplo n.º 54
0
    def __init__(self):
        Loggable.__init__(self)
        Signallable.__init__(self)
        # A (URI -> SourceFactory) map.
        self._sources = {}
        # A list of SourceFactory objects.
        self._ordered_sources = []
        self.nb_file_to_import = 1
        self.nb_imported_files = 0

        self.discoverer = self.discovererClass()
        self.discoverer.connect("discovery-error", self._discoveryErrorCb)
        self.discoverer.connect("discovery-done", self._discoveryDoneCb)
        self.discoverer.connect("starting", self._discovererStartingCb)
        self.discoverer.connect("ready", self._discovererReadyCb)
        self.discoverer.connect("missing-plugins",
                self._discovererMissingPluginsCb)
Exemplo n.º 55
0
    def __init__(self, instance, ui_manager):
        gtk.Table.__init__(self, rows=2, columns=1, homogeneous=False)
        Loggable.__init__(self)
        Zoomable.__init__(self)
        self.log("Creating Timeline")

        self._updateZoom = True
        self.project = None
        self.ui_manager = ui_manager
        self.app = instance
        self._temp_objects = None
        self._factories = None
        self._finish_drag = False
        self._position = 0
        self._state = gst.STATE_NULL
        self._createUI()
        self._prev_duration = 0
        self.rate = gst.Fraction(1, 1)
Exemplo n.º 56
0
    def __init__(self,
                 factory,
                 stream,
                 start=0,
                 duration=0,
                 in_point=0,
                 media_duration=0,
                 priority=0):
        Loggable.__init__(self)
        self.debug("factory:%r", factory)
        self.factory = factory
        self.stream = stream
        self.stream_type = type(stream)
        self.track = None
        self.timeline_object = None
        self.interpolators = {}
        self._rebuild_interpolators = False
        self._public_priority = priority
        self._position = 0
        self._stagger = 0
        self.gnl_object = obj = self._makeGnlObject()
        self.keyframes = []

        if start != 0:
            obj.props.start = start

        if duration == 0:
            if factory.duration != gst.CLOCK_TIME_NONE:
                duration = factory.duration
            elif factory.default_duration != gst.CLOCK_TIME_NONE:
                duration = factory.default_duration

        obj.props.duration = duration

        obj.props.media_start = in_point
        if media_duration != 0:
            obj.props.media_duration = media_duration
        else:
            obj.props.media_duration = duration

        obj.props.priority = priority

        self._connectToSignals(obj)
        self._updatePriority(self._public_priority)
Exemplo n.º 57
0
    def __init__(self, app, project, pipeline=None):
        Loggable.__init__(self)

        self.app = app

        self.builder = gtk.Builder()
        self.builder.add_from_file(os.path.join(configure.get_ui_dir(),
            "encodingdialog.ui"))
        self._setProperties()
        self.builder.connect_signals(self)

        # UI widgets
        icon = os.path.join(configure.get_pixmap_dir(), "pitivi-render-16.png")
        self.window.set_icon_from_file(icon)

        # FIXME: re-enable this widget when bug #637078 is implemented
        self.selected_only_button.destroy()

        # The Render dialog and the Project Settings dialog have some
        # common settings, for example the audio sample rate.
        # When these common settings are changed in the Render dialog,
        # we don't want them to be saved, so we create a copy of the project's
        # settings to be used by the Render dialog for rendering.
        render_settings = project.getSettings().copy()
        # Note: render_settings will end up as self.settings.
        Renderer.__init__(self, project,
                pipeline=pipeline, settings=render_settings)

        # Directory and Filename
        self.filebutton.set_current_folder(self.app.settings.lastExportFolder)
        self.updateFilename(self.project.name)

        # We store these so that when the user tries various container formats,
        # (AKA muxers) we select these a/v encoders, if they are compatible with
        # the current container format.
        self.preferred_vencoder = self.settings.vencoder
        self.preferred_aencoder = self.settings.aencoder

        self._initializeComboboxModels()
        self._displaySettings()
        self._displayRenderSettings()

        self.window.connect("delete-event", self._deleteEventCb)
        self.settings.connect("settings-changed", self._settingsChanged)