[pitivi/1.0] validate: Remove compatibility with GstValidate 1.12



commit 0905aca212b0ca179b6687d407a1f1237245b9db
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Mon Nov 19 10:09:34 2018 +0100

    validate: Remove compatibility with GstValidate 1.12
    
    As per check.py, we depend on 1.14.2 now.

 pitivi/utils/validate.py | 22 ++++++++--------------
 1 file changed, 8 insertions(+), 14 deletions(-)
---
diff --git a/pitivi/utils/validate.py b/pitivi/utils/validate.py
index 346f630c..e4321ef1 100644
--- a/pitivi/utils/validate.py
+++ b/pitivi/utils/validate.py
@@ -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:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]