MediaServer: AudioCD

This backend is highly experimental and is only available so far in the developpement version.

  1. AudioCD Media Server
    1. Additional dependencies
    2. UPnP ContentDirectory structure
    3. Configuration
    4. Examples
    5. Open Tickets for this backend …



AudioCD Media Server

this backend exposes the content of an audio CD, as inserted in a local drive. The server and track names correspond to the actual CD/tracks titles, as retrieved from the CDDB/FreeDB database service.
To be actually usable, Ths backend SHOULD be enabled only after the disc is inserted, and disabled when the disc is ejected.
Integration with a CD insertion/ejection detection software (e.g. HAL) would allow to automatize this process.

Additional dependencies

  • CDDB.py and DiscID.py (ex: debian package python-cddb)
  • gstreamer (with base and ugly plugins) and python-gst

UPnP ContentDirectory structure

The exposed data is represented in this structure:

  • title for track 1
  • title for track 2
  • ...
  • title for track N

Configuration

The backend accepts these options:

version:
version of the UPnP spec (1 or 2) (defaults to 2)
device_name
device name for audio CD (defaults to /dev/cdrom)

Examples

Python code:

coherence.add_plugin('AudioCDStore', device_name='/dev/cdrom1')

DBus:

coherence_service = dbus.SessionBus().get_object('org.Coherence','/org/Coherence')
coherence_service.add_plugin('AudioCDStore', {'device_name':'/dev/cdrom1'},
                             dbus_interface='org.Coherence',
                             reply_handler=add_plugin_callback,
                             error_handler=error_callback)

Commandline:

coherence --plugin=backend:AudioCDStore,device_name:/dev/cdrom1

Integration with cdde (CD Detect & Execute utility):

#command
cdde -r

# config file: ~/.cdde.xml
<?xml version="1.0"?>
<cdde delay="5000000">
  <drive path="/dev/cdrom1">
    <audio command="coherence --plugin=backend:AudioCDStore,device_name:%dev%"/>
  </drive>
</cdde>

Open Tickets for this backend (new...)