How to include GStreamer 1.0 in Gtk2 project which already exist

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to include GStreamer 1.0 in Gtk2 project which already exist

anespa
Dear Friends,

I am working in a pygtk project with Gtk2. As part of modification I need to include Gstreamer 1.0 instead of 0.1. In my old system can use

import sys, os, os.path, time
import pygst
pygst.require("0.1")
import gst

But I don't know how to add new version of GStreamer ... I try above one with change in version as

import gi
gi.require_version('Gst', '1.0')
from gi.repository import GObject, Gst, Gtk

got error as :
    import gi
  File "/usr/lib/python2.7/dist-packages/gi/__init__.py", line 39, in <module>
    raise ImportError(_static_binding_error)
ImportError: When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject". See: https://bugzilla.gnome.org/show_bug.cgi?id=709183

Please advise the right way..

thanks
Anes
Reply | Threaded
Open this post in threaded view
|

Re: How to include GStreamer 1.0 in Gtk2 project which already exist

Sebastian Dröge-3
On Mi, 2016-03-02 at 03:10 -0800, anespa wrote:
> Dear Friends,
>
> I am working in a pygtk project with Gtk2. As part of modification I
> need to include Gstreamer 1.0 instead of 0.1.
> [...]

Unfortunately you can't really use GTK2 and GStreamer 1.x together in a
Python application. That's because of the new GObject-Introspection
based bindings that are used for GStreamer 1.x (and GTK3 and many other
libraries), which are incompatible with the old bindings used by GTK2.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to include GStreamer 1.0 in Gtk2 project which already exist

Sebastian Dröge-3
On Mi, 2016-03-02 at 14:09 +0200, Sebastian Dröge wrote:

> On Mi, 2016-03-02 at 03:10 -0800, anespa wrote:
> >
> > Dear Friends,
> >
> > I am working in a pygtk project with Gtk2. As part of modification I
> > need to include Gstreamer 1.0 instead of 0.1.
> > [...]
> Unfortunately you can't really use GTK2 and GStreamer 1.x together in a
> Python application. That's because of the new GObject-Introspection
> based bindings that are used for GStreamer 1.x (and GTK3 and many other
> libraries), which are incompatible with the old bindings used by GTK2.
In general you'll have to port to GStreamer 1.x and GTK3 at the same
time because of this.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment