After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 331616 - gst.version and gst.gst_version differ
gst.version and gst.gst_version differ
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-python
0.10.2
Other All
: Normal minor
: 0.10.3
Assigned To: Johan (not receiving bugmail) Dahlin
Johan (not receiving bugmail) Dahlin
Depends on:
Blocks:
 
 
Reported: 2006-02-17 22:07 UTC by Joe Wreschnig
Modified: 2006-02-22 10:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Set gst.gst_version with gst_version(...) (741 bytes, patch)
2006-02-18 20:40 UTC, Joe Wreschnig
committed Details | Review

Description Joe Wreschnig 2006-02-17 22:07:47 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.
Comment 1 Johan (not receiving bugmail) Dahlin 2006-02-17 22:26:06 UTC
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)
Comment 2 Joe Wreschnig 2006-02-17 22:43:03 UTC
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.
Comment 3 Joe Wreschnig 2006-02-17 23:13:35 UTC
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.
Comment 4 Joe Wreschnig 2006-02-18 20:40:38 UTC
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.
Comment 5 Edward Hervey 2006-02-22 10:17:29 UTC
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