Async import and SoundMenu integration

2 views
Skip to first unread message

shuerhaaken

unread,
Sep 27, 2010, 4:42:37 AM9/27/10
to xnoise
Hello
After some frustratingly slow development on the SoundMenu integration
of xnoise (vala still lacks language support for dbus notifications), I
did something else.
I made a experimental branch for a asynchronous update of the media
browser while import. I think this will be a good thing for people with
large collections doing full imports of their media. They will not be
blocked for minutes but can immediately use some already imported
tracks.
The media browser slowly fills with the tracks as they are imported (for
now, there is an update for every 10 tracks).
The full import is handled in a seperate way as searches now. I put all
database writing into one thread so there are no collisions. The GUI
update is done by the default thread. There are some remaining overlaps,
but it's working quite well.
This is still experimental and I might change some design details. I
didn't put this in the default branch.


The soundmenu integration is working (on my computer at home) to some
degree. There is a little drawback as the mpris dbus interface cannot be
setup with dbus-glib-1 but only with GDBus. Problem is that GDBus is not
available in Lucid. I'm not even sure if it is officially released. But
it will be available with the current gnome release.

By now dbus-glib-1 is used by mediakeys plugin and mpris. mpris does not
have another use case but soundmenu for now. dbus-glib-1 and GDBus code
cannot be mixed (I was told that by a libindicate guy, who was very
helpful). That means that we maybe will have to move to Maverick (or
another recent distribution, if you have one) and leave older
distributions behind.

But maybe there is a possibility to get this working with some
conditional compilations.

Regards
Jörn

Conor Curran

unread,
Sep 27, 2010, 2:00:50 PM9/27/10
to xno...@googlegroups.com
Thanks for all the sound menu work. Has this been packaged for Maverick yet ?

Conor

> --
> You received this message because you are subscribed to the Google Groups "xnoise" group.
> To post to this group, send email to xno...@googlegroups.com.
> To unsubscribe from this group, send email to xnoise+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/xnoise?hl=en.
>
>

shuerhaaken

unread,
Sep 27, 2010, 2:44:00 PM9/27/10
to xno...@googlegroups.com

Hello Conor
No. This is not published yet. I will push it later on this evening.
The support is still basic play/stop + next/previous. I spend alot of
time in chats trying to get forward with the change notifications for
the properties (most important the PlaybackStatus of
org.MediaPlayer2.Player). I got some promising input from somebody a few
hours ago and will try to get this working now.
As soon as it is in, I will give you a ping.
Problem is that vala's language integration of dbus properties is still
lacking notifications support (it took me some days to find that out).
This is a planned feature but nobody is currently working on it.
Therefore, I have to set this up manually.
Packaging of a new release of xnoise is pending, also. Hopefully I can
do that very soon.
Regards
Jörn

andi

unread,
Sep 27, 2010, 6:04:10 PM9/27/10
to xno...@googlegroups.com
I think it's great to have the database handled in an extra thread. The
more responsive the GUI gets the better and on the level of code it's a
big gain to have things more modularized.
As to the dbus properties, have you tried checking for changes in a time
interval? You may have already thought about that, but it's an
acceptable workaround.

regards
andi

shuerhaaken

unread,
Sep 27, 2010, 6:23:48 PM9/27/10
to xno...@googlegroups.com
Hello Andi
I also made some experiments with a dedicated thread that stays alive
and is used for all the database stuff (using a threadpool). You can
push database related jobs that are handled in that thread with the gui
changes sent back via Idles into the main thread. Not sure yet how the
handling will be in practice. If it works like expected it will probably
result in a even more relaxed handling of xnoise.
Concerning the dbus properties notifications: It's not xnoise receiving
these notifications, but the soundmenu. So checking in intervals won't
help as this is not happening on xnoise side. For example, the soundmenu
is switching the play icon to a pause icon as soon as the player is
playing a song.
Conor is the soundmenu guy and he was helpful finding issues concerning
the mpris stuff.
Regards
Jörn
Reply all
Reply to author
Forward
0 new messages