本文整理汇总了Python中pitivi.log.loggable.Loggable.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Loggable.__init__方法的具体用法?Python Loggable.__init__怎么用?Python Loggable.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pitivi.log.loggable.Loggable
的用法示例。
在下文中一共展示了Loggable.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pitivi.log.loggable import Loggable [as 别名]
# 或者: from pitivi.log.loggable.Loggable import __init__ [as 别名]
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()
示例2: __init__
# 需要导入模块: from pitivi.log.loggable import Loggable [as 别名]
# 或者: from pitivi.log.loggable.Loggable import __init__ [as 别名]
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)
示例3: __init__
# 需要导入模块: from pitivi.log.loggable import Loggable [as 别名]
# 或者: from pitivi.log.loggable.Loggable import __init__ [as 别名]
def __init__(self):
gtk.VBox.__init__(self)
Loggable.__init__(self)
self.element = None
self.ignore = None
self.properties = None
self.buttons = {}
示例4: __init__
# 需要导入模块: from pitivi.log.loggable import Loggable [as 别名]
# 或者: from pitivi.log.loggable.Loggable import __init__ [as 别名]
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)
示例5: __init__
# 需要导入模块: from pitivi.log.loggable import Loggable [as 别名]
# 或者: from pitivi.log.loggable.Loggable import __init__ [as 别名]
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()
示例6: __init__
# 需要导入模块: from pitivi.log.loggable import Loggable [as 别名]
# 或者: from pitivi.log.loggable.Loggable import __init__ [as 别名]
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()
示例7: __init__
# 需要导入模块: from pitivi.log.loggable import Loggable [as 别名]
# 或者: from pitivi.log.loggable.Loggable import __init__ [as 别名]
def __init__(self, avalaible_effects={}):
Signallable.__init__(self)
Loggable.__init__(self)
self.current = None
self.backup_lock = 0
self.avalaible_effects = avalaible_effects
示例8: __init__
# 需要导入模块: from pitivi.log.loggable import Loggable [as 别名]
# 或者: from pitivi.log.loggable.Loggable import __init__ [as 别名]
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
示例9: __init__
# 需要导入模块: from pitivi.log.loggable import Loggable [as 别名]
# 或者: from pitivi.log.loggable.Loggable import __init__ [as 别名]
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()
示例10: __init__
# 需要导入模块: from pitivi.log.loggable import Loggable [as 别名]
# 或者: from pitivi.log.loggable.Loggable import __init__ [as 别名]
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()
示例11: __init__
# 需要导入模块: from pitivi.log.loggable import Loggable [as 别名]
# 或者: from pitivi.log.loggable.Loggable import __init__ [as 别名]
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
示例12: __init__
# 需要导入模块: from pitivi.log.loggable import Loggable [as 别名]
# 或者: from pitivi.log.loggable.Loggable import __init__ [as 别名]
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)
示例13: __init__
# 需要导入模块: from pitivi.log.loggable import Loggable [as 别名]
# 或者: from pitivi.log.loggable.Loggable import __init__ [as 别名]
def __init__(self):
Loggable.__init__(self)
# mapping of directory changes
# key : old path
# value : new path
self.directorymapping = {}
self.project = None
示例14: __init__
# 需要导入模块: from pitivi.log.loggable import Loggable [as 别名]
# 或者: from pitivi.log.loggable.Loggable import __init__ [as 别名]
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)
示例15: __init__
# 需要导入模块: from pitivi.log.loggable import Loggable [as 别名]
# 或者: from pitivi.log.loggable.Loggable import __init__ [as 别名]
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())