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)
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()
def __init__(self, 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) # 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.seeker = Seeker(80) self.seeker.connect('seek', self._seekerSeekCb) self.min_frame_spacing = 5.0 self.frame_height = 5.0 self.frame_rate = gst.Fraction(1 / 1)
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.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.shrink = True self.rate = gst.Fraction(1, 1) self._seeker = Seeker(80) self._seeker.connect('seek', self._seekerSeekCb)
def __init__(self, app, undock_action=None, 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) 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()