~ubuntu-branches/ubuntu/trusty/serpentine/trusty

« back to all changes in this revision

Viewing changes to scripts/serpentine

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2006-03-03 11:12:42 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060303111242-01ogkka2273vre4x
Tags: 0.6.91-0ubuntu1
New upstream version (UVF exception approved by mdz)

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
(options, args) = parser.parse_args()
79
79
sys.argv = sys.argv[:1]
80
80
 
 
81
# Depend on GStreamer 0.10 when available
 
82
try:
 
83
    import pygst
 
84
    pygst.require("0.10")
 
85
except ImportError:
 
86
    pass
 
87
    
 
88
import gst
 
89
try:
 
90
    src = gst.element_factory_make("gnomevfssrc")
 
91
    SUPPORTS_GNOMEVFS = src is not None
 
92
    del src
 
93
 
 
94
# gst 0.10 raises an exception
 
95
except Exception:
 
96
    SUPPORTS_GNOMEVFS = False
 
97
 
81
98
# Add our default lib dir to the path
82
99
assert path.isdir(locations.lib)
83
100
if locations.lib not in sys.path:
103
120
app.listeners.append (listener)
104
121
app.preferences.simulate = options.simulate
105
122
app.preferences.debug = options.debug
106
 
app.preferences.useGnomeVfs = not options.no_gvfs
 
123
app.preferences.useGnomeVfs = SUPPORTS_GNOMEVFS and not options.no_gvfs
 
124
 
 
125
if not SUPPORTS_GNOMEVFS and not options.no_gvfs:
 
126
    print >> sys.stderr, ("GnomeVfs backend disabled. Install GnomeVfs plugin "
 
127
                          "for GStreamer %d.%d.%d" % gst.gst_version)
107
128
 
108
129
gnome_app = gnome.init ('serpentine', app.preferences.version)
109
130