gst1: Check GStreamer version on start
If GStreamer is too old, it fails like this: $ mopidy ERROR: Mopidy requires GStreamer >= 1.2, but found GStreamer 1.0.0.
This commit is contained in:
parent
d9f53d5da3
commit
1daf582558
@ -1,5 +1,6 @@
|
|||||||
from __future__ import absolute_import, unicode_literals
|
from __future__ import absolute_import, unicode_literals
|
||||||
|
|
||||||
|
import sys
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
|
|
||||||
@ -24,6 +25,14 @@ else:
|
|||||||
Gst.is_initialized() or Gst.init()
|
Gst.is_initialized() or Gst.init()
|
||||||
|
|
||||||
|
|
||||||
|
REQUIRED_GST_VERSION = (1, 2)
|
||||||
|
|
||||||
|
if Gst.version() < REQUIRED_GST_VERSION:
|
||||||
|
sys.exit(
|
||||||
|
'ERROR: Mopidy requires GStreamer >= %s, but found %s.' % (
|
||||||
|
'.'.join(map(str, REQUIRED_GST_VERSION)), Gst.version_string()))
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
'GLib',
|
'GLib',
|
||||||
'GObject',
|
'GObject',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user