N9 media pushing

 

Ever since the announcement of the N9′s DLNA support people were looking for a feature called DLNA +PU+ which allows you to send media files to e.g. DLNA-capable TVs without enabling content sharing on your device, giving you a really fine-grained control about what and where to share to.

PushUp is a small utility that hooks into the N9′s sharing framework and allows to you push an image or a video to your TV just like you would with Bluetooth or NFC. Get it on this site (or later through the Nokia Store).

It is an offspring of my Korva project, a D-Bus specification and its implementation for media pushing. While still work-in-progress, it’s already fully functional.

Edit: I had to update the package because the icon was missing and cancelling the device selector was broken.
Edit2: Updated again since it was broken on PR < 1.2.

Modifying your GNOME keymap programmatically

For some reason I’ve a notebook with a Swedish keyboard but when docked I use my ergonomic keyboard with a German layout. To automatically switch the layout when the external keyboard is connected, I cooked up this script and added a .desktop file to $HOME/.config/autostart:

#!/usr/bin/env python
 
from gi.repository import Gtk, GLib, Gkbd
import usb
import sys
 
# Holtek Semiconductor, Inc. PS/2 keyboard + mouse controller
vendor=0x04d9
product=0x1400
 
c = Gkbd.Configuration.get();
 
try:
    # find index for german
    de = c.get_short_group_names().index('de')
    for bus in usb.busses():
        for dev in bus.devices:
            if dev.idVendor == vendor and dev.idProduct == product:
                c.lock_group (de)
                sys.exit(0)
except Exception, e:
    print e
    pass

This is using pyusb 0.4, it gets a bit easier with 1.0.

TweakUp your media sharing experience

ScreenshotAs I mentioned on several places already, due to the aim of getting the N9 DLNA-certified we had to introduce some restrictions. One of the most annoying limitation from an end user point of view is that you can’t share arbitrary videos or music which you may have put on your device. Another, though minor, issue is that it’s not possible to change the name shown in UPnP or DLNA clients on the network.

While it is possible to change all this by editing the configuration file, it is somewhat inconvenient to do this on the device. That’s why I’ve written a small application called TweakUp which allows all these settings (and a few more, see the screenshot) to be changed more comfortably. It is available in the Nokia Store and on this website. It has been signed with my public key 6BA1DF74.

Its source code is available at https://gitorious.org/helium/tweakup

DLNA certified

Today we have reached step two of what we aimed for when using Rygel on the N9. This morning I got notified that it has been certified by DLNA as a M-DMS device. After a very long struggle (more than two years) with the sometimes nearly insane requirements DLNA imposes on a project, the weird tooling and the testing process, after all the effort that multiple people have thrown into this goal, by the end of last month, it looked like we were not going to make it. The reasons were very, very stupid and didn’t have to do anything at all with Rygel. Getting the news today was a great relief, a huge reward and a very fitting finish for working on this project.

A big thank you to Zeeshan and all the other people involved in making this happen.

Introducing Helium

What’s Helium?

Helium is a UPnP control point that is supposed to accompany Rygel, but can of course work without it. It offers browsing of media servers, selecting a renderer from a list of devices available on the network and can (currently) play back a single media files from the current server listing to the currently selected renderer (by long-push). This is supposed to change in short-term, giving proper playlist and player controls. Also it needs to get aware of servers and renderers disappearing from the network and get some proper error reporting.

Where’s the code?

Current state is available at Gitorious

Screenshots

Rygel in the wild

It looks like the PR1.2 update for the N9 is starting to get rolled out now, so your favourite MediaServer implementation will reach your phone soon.

A short hint if you’re eager to try it and you don’t see any files shared: For complicated and mostly non-technical reasons the device needs to assign so-called DLNA media profiles to images and media files. To start this, the device needs to go into idle mode once, so just let it rest for a while and all media created on the device should be available after that. This is a one-shot thing after the update, any files added afterwards will be fine.

GStreamer 0.11 + JHbuild

If you try to test GStreamer 0.11 there’s this nice gst-uninstalled script; somehow that didn’t work for me as soon as I tried to use more non-gst interdependent libraries so I opted to use jhbuild. Luckily that’s quite easy with the stock gnome jhbuild moduleset.

To do that, I created a new .jhbuildrc-gst-0.11 with the following modifications. skip and modules can of course be adjusted to own needs.

moduleset = 'gnome-world-3.4'
modules = [ 'vala', 'libgee', 'gstreamer', 'gst-plugins-good', 'gst-plugins-bad', 'gst-plugins-ugly', 'gst-ffmpeg', 'gssdp', 'gupnp', 'gupnp-av' ]
skip = ['gtk+', 'atk', 'gcr', 'gtk+-2', 'rarian', 'NetworkManager', 'gnutls', 'polkit', 'p11-kit', 'gnutls', 'cantarell-fonts', 'gtk-engines', 'librsvg', 'gnome-themes-standard', 'libgnome-keyring', 'pango', 'expat', 'libgpg-error', 'libgcrypt', 'glib-networking']
os.environ['JHBUILDPS1'] = '[gst-0.11] '
branches = {
    'gstreamer' : '0.11',
    'gst-plugins-base' : '0.11',
    'gst-plugins-good' : '0.11',
    'gst-plugins-bad' : '0.11',
    'gst-plugins-ugly' : '0.11',
    'gst-ffmpeg' : '0.11'
}