Commit 25d2a313 authored by Alexandru Băluț's avatar Alexandru Băluț

validate: Remove compatibility with GstValidate 1.12

As per check.py, we depend on 1.14.2 now.
parent e529a3e6
......@@ -45,12 +45,6 @@ monitor = None
has_validate = False
# FIXME Remove when we have a hard dep on Gst 1.14.
def get_pipeline(scenario):
return getattr(scenario, "pipeline",
scenario.get_pipeline())
def Event(event_type, **kwargs):
event_types_constructors = {
Gdk.EventType.BUTTON_PRESS: Gdk.EventButton,
......@@ -128,7 +122,7 @@ def stop(scenario, action):
GstValidate.execute_action(GstValidate.get_action_type(action.type).overriden_type,
action)
timeline = get_pipeline(scenario).props.timeline
timeline = scenario.get_pipeline().props.timeline
project = timeline.get_asset()
if project:
......@@ -168,8 +162,8 @@ def positionChangedCb(pipeline, position, scenario, action,
def seek(scenario, action):
res, wanted_position = GstValidate.utils_get_clocktime(action.structure,
"start")
get_pipeline(scenario).simple_seek(wanted_position)
get_pipeline(scenario).connect("position", positionChangedCb, scenario,
scenario.get_pipeline().simple_seek(wanted_position)
scenario.get_pipeline().connect("position", positionChangedCb, scenario,
action, wanted_position)
return GstValidate.ActionReturn.ASYNC
......@@ -284,7 +278,7 @@ def setEditingMode(timeline, scenario, action):
def editContainer(scenario, action):
timeline = get_pipeline(scenario).props.timeline
timeline = scenario.get_pipeline().props.timeline
container = timeline.get_element(action.structure["container-name"])
if container is None:
......@@ -378,14 +372,14 @@ def editContainer(scenario, action):
def split_clip(scenario, action):
timeline = get_pipeline(scenario).props.timeline.ui
timeline = scenario.get_pipeline().props.timeline.ui
timeline.get_parent()._splitCb(None, None)
return True
def zoom(scenario, action):
timeline = get_pipeline(scenario).props.timeline
timeline = scenario.get_pipeline().props.timeline
GstValidate.print_action(action, action.type.replace('-', ' ') + "\n")
......@@ -403,7 +397,7 @@ def setZoomLevel(scenario, action):
def add_layer(scenario, action):
timeline = get_pipeline(scenario).props.timeline
timeline = scenario.get_pipeline().props.timeline
if len(timeline.get_layers()) == 0:
GstValidate.print_action(action, "Adding first layer\n")
timeline.append_layer()
......@@ -434,7 +428,7 @@ def remove_clip(scenario, action):
def select_clips(scenario, action):
should_select = True
timeline = get_pipeline(scenario).props.timeline
timeline = scenario.get_pipeline().props.timeline
clip = timeline.get_element(action.structure["clip-name"])
if clip is None:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment