[pitivi] check: no need to change state to check plugin
- From: Luis de Bethencourt <luisbg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] check: no need to change state to check plugin
- Date: Thu, 25 Apr 2013 21:32:34 +0000 (UTC)
commit dc99472e4215a240bd3deb772f83167638fd3154
Author: Luis de Bethencourt <luis debethencourt com>
Date: Thu Apr 25 17:30:46 2013 -0400
check: no need to change state to check plugin
No need to change the state of the plugin to READY to confirm it
exists. Element factory make will return None when the element isn't
in the registry.
pitivi/check.py | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/check.py b/pitivi/check.py
index 074ef77..bc4d7bb 100644
--- a/pitivi/check.py
+++ b/pitivi/check.py
@@ -60,18 +60,16 @@ missing_soft_deps = {}
def _initiate_videosinks(Gst):
# TODO: eventually switch to a clutter sink
sink = Gst.ElementFactory.make("autovideosink", None)
- if not sink.set_state(Gst.State.READY):
+ if not sink:
return False
- sink.set_state(Gst.State.NULL)
return True
def _initiate_audiosinks(Gst):
# Yes, this can still fail, if PulseAudio is non-responsive for example.
sink = Gst.ElementFactory.make("autoaudiosink", None)
- if not sink.set_state(Gst.State.READY):
+ if not sink:
return False
- sink.set_state(Gst.State.NULL)
return True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]