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 679433 - Port to GStreamer 1.0
Port to GStreamer 1.0
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: GStreamer
git master
Other Linux
: Normal normal
: ---
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-07-05 07:19 UTC by Sebastian Dröge (slomo)
Modified: 2013-10-27 19:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Initial port to GStreamer 1.0 (40.83 KB, patch)
2012-09-19 10:57 UTC, Sebastian Dröge (slomo)
none Details | Review
Remove --enable-gapless-playback configure option (8.29 KB, patch)
2012-11-25 16:16 UTC, Chow Loong Jin
none Details | Review

Description Sebastian Dröge (slomo) 2012-07-05 07:19:08 UTC
Hi,

would be great if banshee could be ported to GStreamer 1.0. Porting the small C glue library shouldn't take more than 1-2 days ideally.

Also see https://live.gnome.org/GnomeGoals/PortToGstreamer1
Comment 1 Sebastian Dröge (slomo) 2012-09-19 10:57:56 UTC
Created attachment 224729 [details] [review]
Initial port to GStreamer 1.0
Comment 2 Chow Loong Jin 2012-11-25 16:16:12 UTC
Created attachment 229823 [details] [review]
Remove --enable-gapless-playback configure option

Here's an additional patch which should be applied on top of slomo's patch that drops the --enable-gapless-playback build-time option, since we're now on Gstreamer 1.0 and definitely have a new enough playbin for gapless playback.
Comment 3 Kevin Anthony 2013-05-16 13:42:36 UTC
Review of attachment 224729 [details] [review]:

This Patch adds trailing whitespace, but other then that it seems to work.  Still can't get gstreamer to detect BPM, however now banshee does not crash.
Comment 4 Kevin Anthony 2013-05-16 13:50:29 UTC
https://www.dropbox.com/s/godn6jky452vpnw/08.%20Macklemore%20-%20Letterhead%20Remix.mp3

This file, when running BPM detection get this following error
[12 Debug 09:39:46.946] GStreamer running beat detection on /Macklemore/The Unplanned Mixtape/08. Macklemore - Letterhead Remix.mp3

(Banshee:23159): GLib-GObject-WARNING **: /build/buildd/glib2.0-2.36.0/./gobject/gsignal.c:2475: signal `new-decoded-pad' is invalid for instance `0x7f6b9404a7d0' of type `GstDecodeBin'
bpm_detect got error: GStreamer encountered a general stream error. gstbaseparse.c(3038): gst_base_parse_loop (): /GstPipeline:pipeline/GstDecodeBin:decodebin/GstMpegAudioParse:mpegaudioparse1:
streaming stopped, reason not-linked

If it's gstreamer itself, i'll pass this error along to them.
Comment 5 Andrés G. Aragoneses (IRC: knocte) 2013-05-16 13:51:58 UTC
(In reply to comment #3)
> Review of attachment 224729 [details] [review]:
> 
> This Patch adds trailing whitespace, but other then that it seems to work. 
> Still can't get gstreamer to detect BPM, however now banshee does not crash.

Thanks for the review Kevin.

I wanted to note also that I have the impression that this downstream patch is causing issues in Ubuntu 13.04, like bug 700068.
Comment 6 Andrés G. Aragoneses (IRC: knocte) 2013-05-21 10:58:10 UTC
Bug 700770 seems to happen either because of this patch or because of a bug in GStreamer 1.0. I'll paste the relevant parts of the log that the user posted there:

(Banshee:2434): GLib-GObject-WARNING **:
/build/buildd/glib2.0-2.36.0/./gobject/gsignal.c:2475: signal `new-decoded-pad'
is invalid for instance `0xb2657120' of type `GstDecodeBin'
(Banshee:2434): GLib-GObject-WARNING **: invalid cast from `(null)' to
`GObject'
(Banshee:2434): GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT
(object)' failed
(Banshee:2434): GLib-GObject-WARNING **: invalid unclassed pointer in cast to
`GObject'
(Banshee:2434): GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT
(object)' failed
bpm_detect got error: No data in file gsttagdemux.c(1206):
gst_tag_demux_element_find ():
/GstPipeline:pipeline/GstDecodeBin:decodebin/GstID3Demux:id3demux0
bpm_detect got error: GStreamer found a general flow error.
gsttagdemux.c(1303): gst_tag_demux_element_loop ():
/GstPipeline:pipeline/GstDecodeBin:decodebin/GstID3Demux:id3demux0:
Stream stopped, reason error
bpm_detect got error: GStreamer found a general flow error.
gstdecodebin2.c(3711): gst_decode_bin_expose ():
/GstPipeline:pipeline/GstDecodeBin:decodebin:
all streams without buffers
Comment 7 Sebastian Dröge (slomo) 2013-05-28 09:30:27 UTC
I'm currently working on porting the community extensions and also have a fix for that new-decoded-pad problem. New patches will follow.
Comment 8 Sebastian Dröge (slomo) 2013-05-28 09:51:44 UTC
New patches are at

http://cgit.freedesktop.org/~slomo/banshee/
http://cgit.freedesktop.org/~slomo/banshee-community-extensions/

Is comment 6 still a problem with that? If so, how to reproduce? And could you get a backtrace of those warnings with G_DEBUG=fatal_warnings ?
Comment 9 Sebastian Dröge (slomo) 2013-06-11 20:24:40 UTC
Any progress or interest here?
Comment 10 Andrés G. Aragoneses (IRC: knocte) 2013-06-11 20:38:41 UTC
(In reply to comment #9)
> Any progress or interest here?

Interest, of course, your patches are appreciated.

But progress, not much yet. Not sure you have read about our plan some weeks/months ago in the mailing list: our ideal plan would be to switch first to GStreamerSharp by default, then upgrade GStreamerSharp to bind 1.0 of GStreamer (otherwise our cross-platform support will target different versions of GStreamer depending on the platform).

If we end up finally dropping this plan, then we will commit your patches upstream first.
Comment 11 Bertrand Lorentz 2013-10-10 20:35:43 UTC
Andrés is sitting a few meters away from me right now and working on porting our GStreamerSharp backend to the new gstreamer-sharp 1.0.

So I've merged http://cgit.freedesktop.org/~slomo/banshee/ into git master.
I've just changed the required version to 1.0.0, because it looks nicer. ;)

I've also merger the changes into banshee-community-extensions.

Sorry it took so long. Thanks for your work on this, and for your patience !
Comment 12 Andrés G. Aragoneses (IRC: knocte) 2013-10-23 14:46:58 UTC
Hey Seb,

I've found 2 problems with your port.

1) First, I think you have a leftover that you forgot to port here: https://github.com/GNOME/banshee/blob/master/src/Backends/Banshee.GStreamer/libbanshee/banshee-player-pipeline.c#L213 . You see the "playbin2-stream-changed" there? I thought "playbin2" seemed suspicious, as that got replaced by "playbin" simply in 1.0, right? But I don't find any mention about anything similar to this in the porting guide. Also, GST_MESSAGE_STREAM_START exists, but not GST_MESSAGE_STREAM_CHANGED doesn't, so not sure what to do here.

2) I've found a small OGV [1] on the web that manages to expose an interesting situation:

- If I try to play this OGV with Banshee 2.9.0 (GStreamer 0.10) and master (GStreamer 1.0+) in Ubuntu 13.04 (GStreamer 1.0), it works.

- If I try to play this OGV with Banshee 2.9.0 (GStreamer 0.10) in Ubuntu 13.10, it works. But if I try to play it with Banshee master (GStreamer 1.0+) with this same distro (which I guess it has GStreamer 1.2), it doesn't play.

This, I think, consists of two bugs.

a) The first is the playback itself, which doesn't work, and I hope you help me fix it.
b) The second is an assertion that is raised, which tells me that something is very wrong, because it happens in banshee-player-dvd.c (and this OGV is not a DVD obviously). It is because player->navigation is NULL, but that function shouldn't be called in the first place. Full gdb backtrace is here: https://gist.github.com/knocte/7119161. Do you know what is going on?

[1] http://cloud.sunder-mann.eu/public.php?service=files&t=91b2d09833de546b180367863c5ad83b
Comment 13 Andrés G. Aragoneses (IRC: knocte) 2013-10-24 07:53:47 UTC
(In reply to comment #12)
> [1] http://...

Take this other link instead:

http://www.sintel.org/download -> trailer 480p OGV -> http://ftp.nluug.nl/ftp/graphics/blender/apricot/trailer/sintel_trailer-480p.ogv
Comment 14 Andrés G. Aragoneses (IRC: knocte) 2013-10-24 09:23:46 UTC
(In reply to comment #12)
> Hey Seb,
> 
> I've found 2 problems with your port.
> 
> 1) First, I think you have a leftover that you forgot to port here:
> https://github.com/GNOME/banshee/blob/master/src/Backends/Banshee.GStreamer/libbanshee/banshee-player-pipeline.c#L213
> . You see the "playbin2-stream-changed" there? I thought "playbin2" seemed
> suspicious, as that got replaced by "playbin" simply in 1.0, right? But I don't
> find any mention about anything similar to this in the porting guide. Also,
> GST_MESSAGE_STREAM_START exists, but not GST_MESSAGE_STREAM_CHANGED doesn't, so
> not sure what to do here.

I've fixed this in https://git.gnome.org/browse/banshee/commit/?id=ea128c28c2fc167039cfbe1a8ae489c55fa55c0e

Still looking how to solve 2)-a) and 2)-b).
Comment 15 Sebastian Dröge (slomo) 2013-10-27 19:34:18 UTC
(In reply to comment #14)
> (In reply to comment #12)
> > Hey Seb,
> > 
> > I've found 2 problems with your port.
> > 
> > 1) First, I think you have a leftover that you forgot to port here:
> > https://github.com/GNOME/banshee/blob/master/src/Backends/Banshee.GStreamer/libbanshee/banshee-player-pipeline.c#L213
> > . You see the "playbin2-stream-changed" there? I thought "playbin2" seemed
> > suspicious, as that got replaced by "playbin" simply in 1.0, right? But I don't
> > find any mention about anything similar to this in the porting guide. Also,
> > GST_MESSAGE_STREAM_START exists, but not GST_MESSAGE_STREAM_CHANGED doesn't, so
> > not sure what to do here.
> 
> I've fixed this in
> https://git.gnome.org/browse/banshee/commit/?id=ea128c28c2fc167039cfbe1a8ae489c55fa55c0e

I think this is wrong. The replacement of that old message is stream-start. You'll get a stream-start message from playbin whenever the stream really changed.

> Still looking how to solve 2)-a) and 2)-b).

Does it work with another GStreamer application using the same versions? totem, gst123 or others? If it does, could you file another bug with details about the assertions and a debug log against GStreamer?
Comment 16 Andrés G. Aragoneses (IRC: knocte) 2013-10-27 19:49:55 UTC
(In reply to comment #15)
> > I've fixed this in
> > https://git.gnome.org/browse/banshee/commit/?id=ea128c28c2fc167039cfbe1a8ae489c55fa55c0e
> 
> I think this is wrong. 

If it was wrong, my commit would have broken playback of the next track, no?

> The replacement of that old message is stream-start.
> You'll get a stream-start message from playbin whenever the stream really
> changed.

Exactly, this: https://github.com/GNOME/banshee/blob/master/src/Backends/Banshee.GStreamer/libbanshee/banshee-player-pipeline.c#L216 (it was added by you when porting to 1.0, but you didn't remove the "playbin2-stream-changed" hook. That's what my commit does.

If you're confusing it with the custom stream-changed event ( https://github.com/GNOME/banshee/blob/master/src/Backends/Banshee.GStreamer/libbanshee/banshee-player-pipeline.c#L79 ) sent by the backend to itself, that is already handled in this other place I believe: https://github.com/GNOME/banshee/blob/master/src/Backends/Banshee.GStreamer/libbanshee/banshee-player-pipeline.c#L221


> 
> > Still looking how to solve 2)-a) and 2)-b).
> 
> Does it work with another GStreamer application using the same versions? totem,
> gst123 or others?

Yes, totem works. But totem is a special case because it uses its own videosink called "cluttersink", so not sure if the culprit is really in banshee.

> If it does, could you file another bug with details about the
> assertions and a debug log against GStreamer?

I actually created a thread in the mailing list, and the last message references a GST_ERROR which I believe it is the culprit (http://lists.freedesktop.org/archives/gstreamer-devel/2013-October/043810.html). Anyway it seems to be because I'm running it inside a VM. This week I'll upgrade my non-VM OS to Ubuntu 13.10 and test again.