本文整理匯總了Python中gi.repository.GstValidate.execute_action方法的典型用法代碼示例。如果您正苦於以下問題:Python GstValidate.execute_action方法的具體用法?Python GstValidate.execute_action怎麽用?Python GstValidate.execute_action使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類gi.repository.GstValidate
的用法示例。
在下文中一共展示了GstValidate.execute_action方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: stop
# 需要導入模塊: from gi.repository import GstValidate [as 別名]
# 或者: from gi.repository.GstValidate import execute_action [as 別名]
def stop(scenario, action):
global monitor
if monitor:
monitor.checkWrongWindow()
if action.structure.get_boolean("force")[0]:
GstValidate.execute_action(GstValidate.get_action_type(action.type).overriden_type,
action)
timeline = get_pipeline(scenario).props.timeline
project = timeline.get_asset()
if project:
project.setModificationState(False)
GstValidate.print_action(action, "Force quiting, ignoring any"
" changes in the project\n")
timeline.ui.app.shutdown()
return 1
GstValidate.print_action(action, "STOP: not doing anything in pitivi\n")
return 1
示例2: set_state
# 需要導入模塊: from gi.repository import GstValidate [as 別名]
# 或者: from gi.repository.GstValidate import execute_action [as 別名]
def set_state(scenario, action):
wanted_state = action.structure["state"]
if wanted_state is None:
wanted_state = action.structure.get_name()
if wanted_state == "play":
wanted_state = "playing"
elif wanted_state == "pause":
wanted_state = "paused"
if wanted_state == "paused":
if scenario.__dict__.get("started", None) is None:
return 1
return GstValidate.execute_action(GstValidate.get_action_type(action.type).overriden_type,
action)
示例3: remove_clip
# 需要導入模塊: from gi.repository import GstValidate [as 別名]
# 或者: from gi.repository.GstValidate import execute_action [as 別名]
def remove_clip(scenario, action):
try:
next_action = scenario.get_actions()[1]
except KeyError:
next_action = None
if next_action and next_action.type == "add-clip":
if next_action.structure["element-name"] == action.structure["element-name"]:
scenario.no_next_add_element = True
GstValidate.print_action(action,
"Just moving %s between layers, not removing it\n"
% action.structure["element-name"])
return True
action_type = GstValidate.get_action_type(action.type)
return GstValidate.execute_action(action_type.overriden_type, action)