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 701725 - unserialization problem with GrlMediaBox & url
unserialization problem with GrlMediaBox & url
Status: RESOLVED OBSOLETE
Product: grilo
Classification: Other
Component: core
git master
Other All
: High normal
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2013-06-06 12:45 UTC by Roland Peffer
Modified: 2016-02-08 12:32 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Roland Peffer 2013-06-06 12:45:43 UTC
I have a problem with serialize & unserialize regarding GrlMediaBox

I have a situation where I store GrlMedia subclasses like Box, Audio, or Video as serialized strings.
All may have also an url attached.
When I unserialize the stored information, I do not get the url back for type GrlMediaBox.
For Audio and Video it works.
As far I understod the code in grl-media.c it finds the url key and value (line 563 and after) .
But then it seems not to be appended to the GrlMediaBox box instance.

This is the serialization string:

grlbox://grl-dvb/sid%3A2?title=arte&description=ARD%0AService%20ID%3A%202%0AFrequency%3A%20690000%20kHz%0ABandwidth%3A%208k&url=dvbt%3A%2F%2F%20frequency%3D690000000%20bandwidth%3D8k%20program%3D2%20pcr_pid%3D0x1121%20audio_pids%3D0x1123%3A0x1122%20video_pids%3D0x1121%20ttx_pids%3D0x1124%20other_pids%3D0x87c%3A0x1d6

Juan A. Suarez Romero comment on this:

Seems there's a bug with the unserialization.

Could you file a bug, and add the serialized string as example?

Meanwhile, I've found this workaround works for this case.

If media is the unserialized GrlMedia, this returns the URL value

gchar *url =
grl_related_keys_get_string(grl_data_get_related_keys(GRL_DATA(media),
GRL_METADATA_KEY_URL, 1), GRL_METADATA_KEY_URL);