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 331690 - playbin won't play my last.fm stream
playbin won't play my last.fm stream
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal normal
: 0.10.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 332611
Blocks:
 
 
Reported: 2006-02-18 17:31 UTC by Iain
Modified: 2006-03-06 20:08 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14



Description Iain 2006-02-18 17:31:50 UTC
Please describe the problem:
When I tell playbin to play my last.fm stream it goes into Prerolling and never
plays anything.

Steps to reproduce:
Run gst-launch-0.10 playbin
uri=http://streamer1.last.fm/last.mp3?Session=529700dd093a74eb7dae196f1502a9f0



Actual results:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...

And no sound is heard

Expected results:
I would expect to hear music

Does this happen every time?
Yes.

Other information:
Running with debugging gives

GST_DEBUG=gnomevfssrc:5 gst-launch-0.10 playbin
uri=http://streamer1.last.fm/last.mp3?Session=529700dd093a74eb7dae196f1502a9f0
Setting pipeline to PAUSED ...
DEBUG (0x80509a0 - 0:00:00.203913000)          gnomevfssrc( 1486)
gstgnomevfssrc.c(829):gst_gnome_vfs_src_push_callbacks:<source> pushing callbacks
LOG   (0x80509a0 - 0:00:00.374673000)          gnomevfssrc( 1486)
gstgnomevfssrc.c(1121):gst_gnome_vfs_src_start:<source> filesize not known
DEBUG (0x80509a0 - 0:00:00.374762000)          gnomevfssrc( 1486)
gstgnomevfssrc.c(1058):gst_gnome_vfs_src_get_size:<source> size 18446744073709551615
DEBUG (0x80509a0 - 0:00:00.374839000)          gnomevfssrc( 1486)
gstgnomevfssrc.c(846):gst_gnome_vfs_src_pop_callbacks:<source> popping callbacks
LOG   (0x80509a0 - 0:00:00.452051000)          gnomevfssrc( 1486)
gstgnomevfssrc.c(1121):gst_gnome_vfs_src_start:<source> filesize not known
DEBUG (0x80509a0 - 0:00:00.452135000)          gnomevfssrc( 1486)
gstgnomevfssrc.c(1058):gst_gnome_vfs_src_get_size:<source> size 18446744073709551615
Pipeline is PREROLLING ...
DEBUG (0x80dbb58 - 0:00:00.453948000)          gnomevfssrc( 1486)
gstgnomevfssrc.c(942):gst_gnome_vfs_src_create: now at 0, reading 0, size 4096
Caught interrupt -- Pausing pipeline.
Pipeline paused.
WARNING: Element "playbin0" warns: pipeline interrupted

iain@glosoli:~/Projects/Personal/last-exit$ gst-launch-0.10 playbin
uri=http://streamer1.last.fm/last.mp3?Session=529700dd093a74eb7dae196f1502a9f0
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Caught interrupt -- Pausing pipeline.
Pipeline paused.
WARNING: Element "playbin0" warns: pipeline interrupted

Possibly related to 325847 ?
Comment 1 Luca Ognibene 2006-02-19 17:40:35 UTC
It seems to be a typefind issue:

luogni@bucefalo:~/Sorgenti/devel$  ./gstreamer/tools/gst-launch-0.10 gnomevfssrc location=http://streamer1.last.fm/last.mp3?Session=529700dd093a74eb7dae196f1502a9f0  ! typefind ! fakesink -v
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...

This pipeline works "fine":
luogni@bucefalo:~/Sorgenti/devel$ ./gstreamer/tools/gst-launch-0.10 gnomevfssrc location=http://streamer1.last.fm/last.mp3?Session=529700dd093a74eb7dae196f1502a9f0  ! mad ! audioconvert ! audioresample ! alsasink
Comment 2 Iain 2006-02-21 14:48:51 UTC
If it is indeed a typefinding issue, could it be that the stream starts with the four chars "SYNC". Would this confuse the typefinder?
Comment 3 Jan Schmidt 2006-02-21 15:04:43 UTC
the mp3 typefinder should recognise it anyway because it is designed to look for mp3 sync markers even if there's some 'garbage' at the start, but if there's any id3 info it won't be read correctly.
Comment 4 Luca Ognibene 2006-02-21 23:36:53 UTC
After more debugging:
 - typefinding a local file works fine so this is not the issue

this debug output seems quite strange (i've added a try to read g_print before gnome_vfs_read and a g_print after, the second g_print is never printed, also no buffers is received from identity):

luogni@snow:~/Sorgenti/010$ GST_DEBUG=gnomevfssrc:5 ./gstreamer/tools/gst-launch-0.10 gnomevfssrc location=http://streamer1.last.fm/last.mp3?Session=529700dd093a74eb7dae196f1502a9f0 ! identity ! typefind ! fakesink -v
Setting pipeline to PAUSED ...
DEBUG (0x1001ae10 - 0:00:00.781067000)          gnomevfssrc( 2708) gstgnomevfssrc.c(829):gst_gnome_vfs_src_push_callbacks:<gnomevfssrc0> pushing callbacks
open ok!
LOG   (0x1001ae10 - 0:00:00.977842000)          gnomevfssrc( 2708) gstgnomevfssrc.c(1128):gst_gnome_vfs_src_start:<gnomevfssrc0> filesize not known
DEBUG (0x1001ae10 - 0:00:00.977928000)          gnomevfssrc( 2708) gstgnomevfssrc.c(1064):gst_gnome_vfs_src_get_size:<gnomevfssrc0> size 18446744073709551615
DEBUG (0x1001ae10 - 0:00:00.978038000)          gnomevfssrc( 2708) gstgnomevfssrc.c(846):gst_gnome_vfs_src_pop_callbacks:<gnomevfssrc0> popping callbacks
DEBUG (0x1001ae10 - 0:00:00.978837000)          gnomevfssrc( 2708) gstgnomevfssrc.c(829):gst_gnome_vfs_src_push_callbacks:<gnomevfssrc0> pushing callbacks
open ok!
LOG   (0x1001ae10 - 0:00:01.167656000)          gnomevfssrc( 2708) gstgnomevfssrc.c(1128):gst_gnome_vfs_src_start:<gnomevfssrc0> filesize not known
DEBUG (0x1001ae10 - 0:00:01.167734000)          gnomevfssrc( 2708) gstgnomevfssrc.c(1064):gst_gnome_vfs_src_get_size:<gnomevfssrc0> size 18446744073709551615
/pipeline0/identity0: last-message = "event   ******* (identity0:sink) E (type: 102, GstEventNewsegment, update=(boolean)false, rate=(double)1, format=(GstFormat)GST_FORMAT_BYTES, start=(gint64)0, stop=(gint64)-1, position=(gint64)0) 0x100cda90"
Pipeline is PREROLLING ...
DEBUG (0x10100fa8 - 0:00:01.171848000)          gnomevfssrc( 2708) gstgnomevfssrc.c(944):gst_gnome_vfs_src_create: now at 0, reading 0, size 4096
try to read 4096

I wanted to try ethereal to look at the network tgraffic but it doesn't want to work on my ibook.. 

This pipeline instead works fine:
luogni@snow:~/Sorgenti/010$ GST_DEBUG=gnomevfssrc:5 ./gstreamer/tools/gst-launch-0.10 gnomevfssrc location=http://streamer1.last.fm/last.mp3?Session=529700dd093a74eb7dae196f1502a9f0 ! queue ! identity ! typefind ! fakesink -v
Setting pipeline to PAUSED ...
DEBUG (0x1001ae10 - 0:00:00.797921000)          gnomevfssrc( 2782) gstgnomevfssrc.c(829):gst_gnome_vfs_src_push_callbacks:<gnomevfssrc0> pushing callbacks
open ok!
LOG   (0x1001ae10 - 0:00:01.676690000)          gnomevfssrc( 2782) gstgnomevfssrc.c(1128):gst_gnome_vfs_src_start:<gnomevfssrc0> filesize not known
DEBUG (0x1001ae10 - 0:00:01.676778000)          gnomevfssrc( 2782) gstgnomevfssrc.c(1064):gst_gnome_vfs_src_get_size:<gnomevfssrc0> size 18446744073709551615
Pipeline is PREROLLING ...
/pipeline0/identity0: last-message = "event   ******* (identity0:sink) E (type: 102, GstEventNewsegment, update=(boolean)false, rate=(double)1, format=(GstFormat)GST_FORMAT_BYTES, start=(gint64)0, stop=(gint64)-1, position=(gint64)0) 0x100cda90"
DEBUG (0x101006a0 - 0:00:01.680605000)          gnomevfssrc( 2782) gstgnomevfssrc.c(944):gst_gnome_vfs_src_create: now at 0,
reading 0, size 4096
try to read 4096
read 4
DEBUG (0x101006a0 - 0:00:04.256237000)          gnomevfssrc( 2782) gstgnomevfssrc.c(944):gst_gnome_vfs_src_create: now at 4,
reading 4, size 4096
try to read 4096
/pipeline0/identity0: last-message = "chain   ******* (identity0:sink)i (4 bytes, timestamp: 0:00:00.000000000, duration: 5124095:34:33.709551615, offset: 0, offset_end: -1, flags: 0) 0x100fc678"

Comment 5 Luca Ognibene 2006-02-25 19:06:59 UTC
more news..:
 - gst tries to activate gnomevfssrc in pull_mode
 - last.fm's stream doesn't have a size and seeking fails (random_access is false)
 - gst _stops gnomevfssrc
 - gst activates gnomevfssrc in push_mode
 - it seems that last.fm server doesn't like two very fast reconnection (or maybe there's a subtle bug in gnomevfssrc..)
but my question is:
 - isn't better if gnomevfssrc creates the connection in the change_state function when going to READY? So we can avoid creating two connection.
Comment 6 Tim-Philipp Müller 2006-02-26 11:41:04 UTC
I think this is a GstBaseSrc bug (or at least undesirable behaviour on GstBaseSrc's side), filed as bug #332611.
Comment 7 Tim-Philipp Müller 2006-02-26 14:35:24 UTC
And it would probably be helpful if typefind did gst_pad_check_getrange() as well before trying to do activate_pull() ...
Comment 8 Tim-Philipp Müller 2006-03-06 20:08:38 UTC
Should be fixed in CVS:

2006-03-06  Tim-Philipp Müller  <tim at centricular dot net>

       * ext/gnomevfs/gstgnomevfssrc.c: (gst_gnome_vfs_src_class_init),
       (gst_gnome_vfs_src_check_get_range):
         Override GstBaseSrc::check_get_range() in order to avoid opening
         the resource just to check whether we can operate in pull-mode or
         not - we can predict that pretty well from the URI alone. Should
         fix problems with last.fm (#331690). (Requires latest core CVS).