| 1 |
# |
| 2 |
# DANGER DANGER |
| 3 |
# |
| 4 |
# You must call Gst.init() before trying to use any GStreamer elements for |
| 5 |
# anything. For example, if you import a module that has an object that |
| 6 |
# inherits from Gst.Bin... that can potentially mess up any GStreamer object |
| 7 |
# creation from that point forward. |
| 8 |
# |
| 9 |
# This means that Gst.init needs to be called before any plugins are loaded |
| 10 |
# |
| 11 |
|
| 12 |
import gi |
| 13 |
|
| 14 |
gi.require_version('Gst', '1.0') |
| 15 |
from gi.repository import Gst |
| 16 |
|
| 17 |
Gst.init(None) |
| 18 |
|
| 19 |
__gst_version__ = '%s.%s.%s' % ( |
| 20 |
Gst.VERSION_MAJOR, |
| 21 |
Gst.VERSION_MINOR, |
| 22 |
Gst.VERSION_MICRO, |
| 23 |
) |
| 24 |
|
| 25 |
from xl.version import register |
| 26 |
|
| 27 |
register('GStreamer', __gst_version__) |
| 28 |
|
| 29 |
del register |