GNOME Bugzilla – Bug 331616
gst.version and gst.gst_version differ
Last modified: 2006-02-22 10:17:29 UTC
Please describe the problem: I'm running gst-python 0.10.2 with GStreamer core 0.10.3. The gst.version() function returns something different than gst.gst_version, which is unexpected. It also makes gathering bug report data difficult. Steps to reproduce: $ python >>> pygst.require("0.10") >>> import gst >>> gst.version() (0, 10, 3, 0) >>> gst.gst_version (0, 10, 2) Actual results: gst.gst_version is 0.10.2. Expected results: gst.gst_version should be 0.10.3. Does this happen every time? Yes. Other information: I'm not sure this is gst-python's problem, it could be an untweaked variable in the core somewhere. But I don't know where to look to check that.
They mean different things, and may not be identical. gst.version is the version of the python bindings while gst.gst_version is the version of the core (gstreamer libraries)
That is not true, because I'm using gst-python 0.10.2 (0.10.3 doesn't exist, afaik). You're thinking of gst.pygst_version, I think.
The problem is in gstmodule.c:init_gst, it uses the GST_VERSION_* macros to define the gst.gst_version tuple. These are the compile-term versions of GStreamer, not the run-time versions. These values are useless to Python applications, which can't do conditional compilation. Furthermore, it's unexpected, since in PyGTK gtk.gtk_version returns the proper run-time version numbers.
Created attachment 59668 [details] [review] Set gst.gst_version with gst_version(...) This patch sets the gst.gst_version constant using the results of the C gst_version function, rather than the GST_VERSION_* macros, which give incorrect version numbers.
2006-02-22 Joe Wreschnig <piman@sacredchao.net> reviewed by: Edward Hervey <edward@fluendo.com> * gst/gstmodule.c: (init_gst): gst.gst_version uses the result of gst_version() rather than use the GST_VERSION_* hardcoded values. Closes #331616