本文整理匯總了Python中gi.repository.GstValidate.init方法的典型用法代碼示例。如果您正苦於以下問題:Python GstValidate.init方法的具體用法?Python GstValidate.init怎麽用?Python GstValidate.init使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類gi.repository.GstValidate
的用法示例。
在下文中一共展示了GstValidate.init方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: init
# 需要導入模塊: from gi.repository import GstValidate [as 別名]
# 或者: from gi.repository.GstValidate import init [as 別名]
def init():
global has_validate
try:
from gi.repository import GstValidate
GstValidate.init()
has_validate = GES.validate_register_action_types()
GstValidate.register_action_type("stop", "pitivi",
stop, None,
"Pitivi override for the stop action",
GstValidate.ActionTypeFlags.NONE)
except ImportError:
has_validate = False
示例2: init
# 需要導入模塊: from gi.repository import GstValidate [as 別名]
# 或者: from gi.repository.GstValidate import init [as 別名]
def init():
global has_validate
try:
from gi.repository import GstValidate
GstValidate.init()
has_validate = GES.validate_register_action_types()
GstValidate.register_action_type("stop", "pitivi",
stop, None,
"Pitivi override for the stop action",
GstValidate.ActionTypeFlags.NONE)
GstValidate.register_action_type("seek", "pitivi",
seek, None,
"Pitivi override for the seek action",
GstValidate.ActionTypeFlags.NONE)
GstValidate.register_action_type("pause", "pitivi",
set_state, None,
"Pitivi override for the pause action",
GstValidate.ActionTypeFlags.NONE)
GstValidate.register_action_type("play", "pitivi",
set_state, None,
"Pitivi override for the pause action",
GstValidate.ActionTypeFlags.NONE)
GstValidate.register_action_type("set-state", "pitivi",
set_state, None,
"Pitivi override for the set-state action",
GstValidate.ActionTypeFlags.NONE)
GstValidate.register_action_type("edit-container", "pitivi",
editContainer, None,
"Start dragging a clip in the timeline",
GstValidate.ActionTypeFlags.NONE)
GstValidate.register_action_type("split-clip", "pitivi",
split_clip, None,
"Split a clip",
GstValidate.ActionTypeFlags.NONE)
GstValidate.register_action_type("add-layer", "pitivi",
add_layer, None,
"Add layer",
GstValidate.ActionTypeFlags.NONE)
GstValidate.register_action_type("remove-clip", "pitivi",
remove_clip, None,
"Remove clip",
GstValidate.ActionTypeFlags.NONE)
GstValidate.register_action_type("select-clips", "pitivi",
select_clips, [Parametter("clip-name",
"The name of the clip to select",
True, None, "str")],
"Select clips",
GstValidate.ActionTypeFlags.NONE)
for z in ["zoom-fit", "zoom-out", "zoom-in"]:
GstValidate.register_action_type(z, "pitivi", zoom, None, z,
GstValidate.ActionTypeFlags.NO_EXECUTION_NOT_FATAL)
GstValidate.register_action_type('set-zoom-level', "pitivi", setZoomLevel, None, z,
GstValidate.ActionTypeFlags.NO_EXECUTION_NOT_FATAL)
Gst.info("Adding pitivi::wrong-window-creation")
GstValidate.Issue.register(GstValidate.Issue.new(
GLib.quark_from_string("pitivi::wrong-window-creation"),
"A new window for the sink has wrongly been created",
"All sink should display their images in an embedded "
"widget and thus not create a new window",
GstValidate.ReportLevel.CRITICAL))
return True
except ImportError:
has_validate = False
return False