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 711456 - Unable to access on_message msg values in gst-1.2
Unable to access on_message msg values in gst-1.2
Status: RESOLVED NOTGNOME
Product: GStreamer
Classification: Platform
Component: dont know
1.2.0
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-11-05 07:13 UTC by Jan ONDREJ (SAL)
Modified: 2013-11-08 06:24 UTC
See Also:
GNOME target: ---
GNOME version: 3.7/3.8



Description Jan ONDREJ (SAL) 2013-11-05 07:13:57 UTC
After update to gstreamer-1.2, I am unable to access pmt, eit, tot and other message contents from python. I use this code:

    def on_message(self, bus, msg):
        msgs = msg.get_structure()
        msgn = msgs.get_name()
        if msgn=="pmt":
          print msgs.to_string()
          # process message

In gst-1.0 result is:
pmt, program-number=(uint)36, pcr-pid=(uint)561, version-number=(uint)11, streams=(structure){ "pid-511\,\ pid\=\(uint\)511\,\ stream-type\=\(uint\)3\,\ lang-code\=\(string\)CZE\,\ descriptors\=\(GValueArray\)NULL\;", "pid-521\,\ pid\=\(uint\)521\,\ stream-type\=\(uint\)6\,\ descriptors\=\(GValueArray\)NULL\;", "pid-561\,\ pid\=\(uint\)561\,\ stream-type\=\(uint\)2\,\ descriptors\=\(GValueArray\)NULL\;" };

In gst-1.2 result is:
pmt, section=(GstMpegTsSection)NULL;

In gst-1.0 I can parse this string and get required information (program number, description, time offsets, ...
In gst-1.2 this ability is broken. Even if I am trying to use msgs.get_value("section") I get only an GstMpegTsSection object, which is an gobject.GBoxed object and has only ability to copy or free it. :-(

I am not sure, if this is a gst-python problem but looks like this structure is NULL and there is nothing to get in any programming language.
Comment 1 Sebastian Dröge (slomo) 2013-11-07 18:15:35 UTC
You should be able to access the fields of that structure after importing the GstMpegts from gi.repository.
Comment 2 Tim-Philipp Müller 2013-11-07 18:16:21 UTC
The structure is not really NULL, that's a bug/feature in the string serialisation code.

I think you have to use the new mpegts library now to parse this info out.
Comment 3 Jan ONDREJ (SAL) 2013-11-07 19:05:10 UTC
Reopening due to missing typelib files after recompiling rpm from spec file. You should add this to buildrequires:

BuildRequires:  gobject-introspection-devel >= 1.31.1
Comment 4 Sebastian Dröge (slomo) 2013-11-07 20:35:04 UTC
We don't maintain the RPM files, that's something the distributions are doing.
Comment 5 Tim-Philipp Müller 2013-11-07 22:16:25 UTC
There is a .spec file in gst-plugins-bad, which Christian maintains (and he's the only user I knkow of)
Comment 6 Jan ONDREJ (SAL) 2013-11-08 06:24:11 UTC
(In reply to comment #5)
> There is a .spec file in gst-plugins-bad, which Christian maintains (and he's
> the only user I knkow of)

I tought this.

I reported this in Fedora too. Fedora package has been updated.