[pitivi/ges: 171/287] filechooserpreview: Change the way we create the playbin
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/ges: 171/287] filechooserpreview: Change the way we create the playbin
- Date: Thu, 15 Mar 2012 16:40:12 +0000 (UTC)
commit dd5a00cff2e6e0e7cf558a46e78dd860fb80de14
Author: Thibault Saunier <thibault saunier collabora com>
Date: Mon Jan 9 17:07:49 2012 -0300
filechooserpreview: Change the way we create the playbin
pitivi/ui/filechooserpreview.py | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/pitivi/ui/filechooserpreview.py b/pitivi/ui/filechooserpreview.py
index 0fb62db..91ecfe9 100644
--- a/pitivi/ui/filechooserpreview.py
+++ b/pitivi/ui/filechooserpreview.py
@@ -34,13 +34,6 @@ GlobalSettings.addConfigOption('FCpreviewHeight',
default=PREVIEW_HEIGHT)
-def get_playbin():
- try:
- return gst.element_factory_make("playbin2", "preview-player")
- except:
- return gst.element_factory_make("playbin", "preview-player")
-
-
class PreviewWidget(gtk.VBox, Loggable):
def __init__(self, instance):
@@ -57,7 +50,7 @@ class PreviewWidget(gtk.VBox, Loggable):
self.discoverer = gst.pbutils.Discoverer(gst.SECOND)
#playbin for play pics
- self.player = get_playbin()
+ self._unsurePlaybin()
bus = self.player.get_bus()
bus.add_signal_watch()
bus.connect('message', self._bus_message_cb)
@@ -134,6 +127,12 @@ class PreviewWidget(gtk.VBox, Loggable):
vbox.show()
self.pack_start(vbox, expand=False, fill=False)
+ def _unsurePlaybin(self):
+ try:
+ self.player = gst.element_factory_make("playbin2", "preview-player")
+ except:
+ self.player = gst.element_factory_make("playbin", "preview-player")
+
def setMinimal(self):
self.remove(self.l_tags)
self.b_zoom_in.hide()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]