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 337411 - parsing issue due to gnome_vfs_mime_type_from_name (), gnome_vfs_get_mime_type () works fine
parsing issue due to gnome_vfs_mime_type_from_name (), gnome_vfs_get_mime_typ...
Status: RESOLVED FIXED
Product: totem-pl-parser
Classification: Core
Component: General
Old
Other Linux
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2006-04-05 17:31 UTC by Sebastien Bacher
Modified: 2008-06-03 17:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastien Bacher 2006-04-05 17:31:08 UTC
As figured on IRC while working on https://launchpad.net/distros/ubuntu/+source/totem/+bug/38169 libtotem-plparser has some issue with http://repubblicaradio.repubblica.it/asx/search.php?player_id=2454

totem_pl_parser_parse_internal() returns TOTEM_PL_PARSER_RESULT_UNHANDLE because mimetype == application/octet-stream from gnome_vfs_mime_type_from_name ()

gnome_vfs_get_mime_type () works correctly and mimetype == 'video/x-ms-asf' when using it

totem 1.4.0
gnome-vfs 2.14.0
shared-mime-info 0.17 with some fixes from the CVS but it does the same with a non patched version
Comment 1 Sebastien Bacher 2006-04-05 20:25:28 UTC
gnome_vfs_get_mime_type_for_name() seems to be the non outdated API function for that and it has the same issue (mimetype == application/octet-stream) (it's not documented from the html API...)
Comment 2 Sebastien Bacher 2006-04-05 21:01:48 UTC
that function is not the issue (but still it would be nice to replace the deprecated one), since gnome-vfs defines "application/octet-stream" GNOME_VFS_MIME_TYPE_UNKNOWN the plparser goes to the _type_with_data() function which should return the correct type but doesn't
Comment 3 Bastien Nocera 2006-04-12 14:00:38 UTC
gnome_vfs_get_mime_type_for_name() doesn't exist in older versions of gnome-vfs, so I'm a bit wary to update it.

As for my_gnome_vfs_get_mime_type_with_data() not working, which mime-type does it send back?
Comment 4 Sebastien Bacher 2006-04-30 21:26:55 UTC
"$ gnomevfs-info http://repubblicaradio.repubblica.it/asx/search.php?player_id=2454
Name              : search.php?player_id=2454
Type              : Regular
MIME type         : video/x-ms-asf
Default app       : totem.desktop
Access time       : Sun Apr 30 22:23:38 2006
Modification time : Sun Apr 30 22:23:38 2006"

"$ ./test-parser http://repubblicaradio.repubblica.it/asx/search.php?player_id=2454

###################### parsing ################

mimetype: application/octet-stream
mimetype from data: application/octet-stream
url 'http://repubblicaradio.repubblica.it/asx/search.php?player_id=2454' unhandled"

where the prints are "mimetype = gnome_vfs_mime_type_from_name (url)" and "mimetype = my_gnome_vfs_get_mime_type_with_data (url, &data);"  from totem-pl-parser.c totem_pl_parser_parse_internal() function 
Comment 5 Bastien Nocera 2006-04-30 22:01:16 UTC
$ ./test-parser -d "http://repubblicaradio.repubblica.it/asx/search.php?player_id=2454"
Enabling debug

###################### parsing ################

_mime_type_from_name for 'http://repubblicaradio.repubblica.it/asx/search.php?player_id=2454' returned 'application/octet-stream'
_get_mime_type_with_data for 'http://repubblicaradio.repubblica.it/asx/search.php?player_id=2454' returned 'audio/x-ms-asx'
URL 'http://repubblicaradio.repubblica.it/asx/search.php?player_id=2454' is special type 'audio/x-ms-asx'
Entity: line 3: parser error : Input is not proper UTF-8, indicate encoding !
Bytes: 0xEC 0x20 0x74 0x61
oppa stima dell'intelligenza degli italiani per pensare che ci siano in giro cos                                                                               ^Entity: line 3: parser error : Input is not proper UTF-8, indicate encoding !
Bytes: 0xEC 0x20 0x74 0x61
oppa stima dell'intelligenza degli italiani per pensare che ci siano in giro cos                                                                               ^URL 'mms://mediaserver.kataweb.it/repradio/video/file/berlusconi040406.wmv' is MMS or RTSP, ignoring
added URI 'mms://mediaserver.kataweb.it/repradio/video/file/berlusconi040406.wmv' with title 'empty' genre '(null)'

Please update your version of shared-mime-info (or raise the priority of the 'audio/x-ms-asx' magic to 51).
Comment 6 Sebastien Bacher 2007-03-04 13:07:06 UTC
works fine now
Comment 7 Philip Withnall 2008-06-03 17:40:00 UTC
Mass-move from totem to totem-pl-parser. You can remove all messages by searching for this comment.