Commit 34bc8040 authored by Edward Hervey's avatar Edward Hervey
Browse files

* pitivi/check.py:

Added check to see if autodetect plugin can initialize themselves and
found at least one valid real sink.


git-svn-id: svn+ssh://svn.gnome.org/svn/pitivi/trunk@787 d3729300-e425-0410-8a4c-d956edccc248
parent e33a24c4
2006-05-23 Edward Hervey <edward@fluendo.com>
* pitivi/check.py:
Added check to see if autodetect plugin can initialize themselves and
found at least one valid real sink.
2006-05-23 Edward Hervey <edward@fluendo.com> 2006-05-23 Edward Hervey <edward@fluendo.com>
* pitivi/objectfactory.py: (FileSourceFactory.__gproperties__): * pitivi/objectfactory.py: (FileSourceFactory.__gproperties__):
......
...@@ -47,6 +47,20 @@ def initial_checks(): ...@@ -47,6 +47,20 @@ def initial_checks():
sys.exit() sys.exit()
def initiate_videosinks():
sink = gst.element_factory_make("autovideosink")
if not sink.set_state(gst.STATE_READY):
return False
sink.set_state(gst.STATE_NULL)
return True
def initiate_audiosinks():
sink = gst.element_factory_make("autoaudiosink")
if not sink.set_state(gst.STATE_READY):
return False
sink.set_state(gst.STATE_NULL)
return True
def _checks(): def _checks():
reg = gst.registry_get_default() reg = gst.registry_get_default()
if instance.PiTiVi: if instance.PiTiVi:
...@@ -61,4 +75,10 @@ def _checks(): ...@@ -61,4 +75,10 @@ def _checks():
if not hasattr(gtk.gdk.Window, 'cairo_create'): if not hasattr(gtk.gdk.Window, 'cairo_create'):
return ("PyGTK doesn't have cairo support!", return ("PyGTK doesn't have cairo support!",
"Please use a version of the Python bindings for GTK+ built with Cairo support.") "Please use a version of the Python bindings for GTK+ built with Cairo support.")
if not initiate_videosinks():
return ("Could not initiate the video output plugins",
"Make sure you have at least one valid video output sink available (xvimagesink or ximagesink)")
if not initiate_audiosinks():
return ("Could not initiate the audio output plugins",
"Make sure you have at least one valid audio output sink available (alsasink or osssink)")
return None return 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