“Hello” from XBMC on Wayland

XBMC Media Center has always been a favorite application of mine, because of its extensive customizability and versatility, being ported to many different platforms. I am pushing some proof-of-concept code today for something I’ve been working on over the past few days to add one more to the mix – support for the wayland compositor infrastructure.Image

The code can be found here:

Build it as follows:

git clone git@github.com:smspillaz/SDL.git && cd SDL
git checkout wayland
./autogen.sh
./configure --enable-video-wayland --enable-video-opengles
make && make install

git clone git@github.com:smspillaz/xbmc.git && cd xbmc
git checkout wayland
autoreconf -isvf .
./configure --enable-wayland --enable-gles --disable-vdpau --disable-vaapi
make && make install

Once it is installed, you can run as follows inside of weston

SDL_VIDEODRIVER=wayland /prefix/lib/xbmc/xbmc.bin

Some caveats and notes, because this is a proof of concept:

  1. The wayland backend is built for SDL 2.0, so this port also gets xbmc running atop of SDL 2.0
  2. Keyboard handling was rewritten in SDL 2.0, and so was the API, so this is currently not functional in either the X or wayland backends
  3. There is a bug somewhere, I suspect this one, which is causing xbmc to hang and stop receiving any events from the server as soon as it starts a new thread going into, eg, the “Videos”, “Music” or “Settings” menu. Understandably, this makes xbmc less useful than it would otherwise be, but I am releasing the code now in case anybody is interested in digging into this one.
  4. The code is a bit of a mess

Thanks goes out to:

  1. Benjamin Frankze for the initial work on SDL for wayland
  2. Scott Moreau for bringing that backend up to the 1.0 API and figuring out why the event queue dispatch didn’t work, and also providing the inspiration to do this by creating a wayland backend for dolphin-gcemu.

Again, this is more or less proof of concept work. The code is a little messy, and I have some open questions about how the backend should be implemented, considering that there are only two or three lines of wayland specific code inside of xbmc (the rest is effectively an SDL “window system” backend)

About these ads

11 thoughts on ““Hello” from XBMC on Wayland

  1. Hi, and great work!

    This is an interesting POC, however it’s not really in fitting with how we had planned to handle wayland. I recently rewrote our egl handling so that we can dynamically support various windowsystems on the fly, so that we can have a single binary capable of running X11/wayland/framebuffer. It was explicitly written with wayland in mind. See https://github.com/xbmc/xbmc/commit/2b49c791eb236ae4fe2be90ac7e7b8ccf0aad72f for the pull, and https://github.com/xbmc/xbmc/blob/master/xbmc/windowing/egl/EGLNativeType.h for the interface.

    It’s very pluggable, and I suspect it’d be far less work than what you’ve done here. I was hoping to get to it ages ago, it just hasn’t been a priority yet.

    We’ll be dropping SDL soon, since we prefer our own abstractions. See here: https://github.com/xbmc/xbmc/pull/1175

    Feel free to ping me (theuni on github or freenode) to discuss if you’d like. I have a functional X11 POC backend around somewhere that you could use as a reference for porting.

    Keep up the good work!
    Cory

    1. Hey Cory, thanks for the reply.

      I agree with you completely, a native backend would be far nicer. The upside was that I was able to fix up SDL a little bit.

      I’ll ping you on GH (I can’t be on IRC at the moment).

  2. 60% dietary fat would be eliminated out of the body hence reducing fat absorption.

    So fit walking into your schedule wherever you can-
    during your lunch break, in the morning, or
    whenever it’s convenient for you. Having more healthy cells and tissues will definitely improve
    your metabolism since it is your cells and tissues
    that metabolize your calories to fuel your bodily functions, after all.

  3. Bartfield says to eat breakfast every day within an hour of getting out of bed.

    It’s not the animal that matters, it’s where the meat comes from on that animal.
    The more products that get called off the shelf because of suspect ingredients,
    the more it gives rise for research-backed supplements to succeed.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s