DLNA Media Server Virtual Appliance

From Yocto Project
Revision as of 14:01, 6 September 2012 by Emma.ciobanu (talk | contribs)
Jump to navigationJump to search
A practical example of how the Media Server using Rygel package is seen by a renderer Media Player.

A DLNA Media Server is a device that stores media content that can be accessed by media players and rederers found in the same local network. It is developed using the Universal Plug and Play protocol which permits devices to see each other in a local network and enables different data sharing services between them.
The goal of the project was creating a minimal solution to meet theese requirements. This was achieved using the tools provided by the yocto project through the creation of the meta-dlna layer.


Introduction

Poky is a platform-independant layer that provides useful features and functionalities for embedded solutions. A Quick Start Guide and further information can be found on the main page of the Poky Project. The functionality of the Media Server was implemented as a new layer, the meta-dlna layer, which can easily be integrated over any poky distribution. Stability and reliability was achieved by using the denzil branch of the yocto project.
[TODO] - KVM

Arhitecture design

Media Server with Rygel

A basic requirement for the application is giving a minimal solution that meets all the tehnical specifications. That is why the Media Server application was designed to be a headless image. This means that after the system boots a console will automatically pop up.
The operating system image has no WiFi configuration. However, if possible, wired network connections are automatically set up by the init script of the os.


Package dependencies

Rygel

The solution was build around rygel, an application used for media content sharing on a home network. Rygel can act both as a Media Renderer, e.g. an application that plays media content received from the local network and as an Universal Plug and Play Media Server, e.g. and application that makes the media available throughout the network. The project implemented the second solution, that of a UPnP Media Server.

Tracker plugin for Rygel

Tracker reprezents a data storage for devices that keeps semantic metadata about files and folders and enables data sharing throughout a local network.

MediaExport plugin for Rygel

The MediaExport plugin exports files and folders over the network. This solution was preferred to Tracker because it represents a more lightweight alternative and meets to all project requirements.
[TODO] - KVM

How to integrate DLNA to a poky distribution

The tutorial assumes that a poky distribution already exists on the local machine. If this is not the case, follow the steps described in the poky manual.
The meta-dlna layer was created using the combo-layer tool. To enable it, follow the next steps:

  • Copy the meta-dlna folder into the root directory of a poky distribution. Cd into the poky folder.
  • Add the layer to build/conf/bblayers.conf:
[...]
BBLAYERS="
         $POKY_HOME/meta-dlna/meta-guacamayo
[...]
  • Add some extra features to build/local.conf:
[...]
DISTRO_FEATURES = "ext2 largefile usbhost xattr nfs zeroconf pci ${DISTRO_FEATURES_LIBC} x11" 
[...]
  • source the oe-init-env script
  • build the image using the guacamayo-image-mediaserver target
bitbake guacamayo-image-mediaserver [TODO] 

For testing purposes, demo content can be added by inserting the following line into build/conf/local.conf:

[...]
IMAGE_FEATURES_append = " guacamayo-demos"
[...]

The demo media will be automatically added into the /usr/share/demos. You can now start a media player on a renderer device and be able to navigate trough the demo content from the Media Server.
At boot the system configures /home/rygel/ as the default home for rygel. Any additional media files that is added in this folder will automatically be shared throughout the local network. If demo content is added, the /usr/home/share will also be appended in the rygel configuration file as one of the media sources.