Coder Social home page Coder Social logo

cadre's Introduction

Cadre

A DLNA/UPnP-PictureFrame application and MediaRenderer based on Coherence

Author: Frank Scholz
Copyright: 2009 by Frank Scholz
Licence:MIT licence
Homepage:http://coherence-project.org/wiki/Cadre

Cadre is a PictureFrame application and MediaRenderer based on Coherence. It grew out the wish to continue the work done on Compère. It is using the Clutter toolkit or the pyglet toolkit for display.

Cadre exposes an UPnP MediaRenderer device which can be controlled by the Coherence UPnP Inspector.

At the moment the only ways to make Cadre display an image are using an UPnP ControlPoint or providing the necessary content information in a config file.

There are two transition modes supported so far - NONE for just replacing one image with the other and FADE for cross-fading the new image other the old one.

The MediaRenderer inside Cadre has an interesting feature, it exposes methods to change display time and transition as UPnP actions. It is a demonstration and test-bed on how easily vendor-defined Actions and StateVariables can be implemented by a Coherence backend.

The Configuration file

Cadre can use an XML configuration file to set options, and store its UPnP device UUID (will be created automatically) over restarts.

The configuration file will be looked for at $HOME/.cadre or its location can be passed via the --config commandline parameter. A sample config (sample-config.xml) is included:

<config>
  <logging level="warning"/>
  <name>Cadre - Coherence Picture-Frame</name>
  <content>/path/to/images/here</content>
  <content>/optional/path/to/more/images/here</content>
  <grafics>clutter</grafics>  <!-- backend to use: clutter or pyglet -->
  <autostart>yes</autostart>
  <shuffle>yes</shuffle>
  <fullscreen>no</fullscreen>
  <display-time>20</display-time>  <!-- the time the image shall be displayed before switching to the next one -->
  <transition>NONE</transition>    <!-- the Clutter backend does support NONE (plain switching) and FADE (cross-fading) so far -->
  <repeat>yes</repeat>             <!-- not configurable yet -->
</config>

Requirements and Installation

Cadre requires

Hints for installing on Windows:

Please use the pyglet toolkit. Following the links above you will find .msi and .exe-installers. Simply install them and continue with installing Cadre.

Hints for installing on GNU/Linux:

Most current GNU/Linux distributions provide packages for the requirements. Look for packages names like python-setuptools and python-pyglet. Simply install them and continue with installing Cadre.

NB: Changes are good your distribution provides pyglet, but not Clutter. But don't mind: you only need one of it.

Hint for installing on other platforms:

Many vendors provide Python. Please check your vendors software repository. Otherwise please download Python 2.6 (or any higer version from the 2.x series) from http://www.python.org/download/ and follow the installation instructions there.

After installing Python, install setuptools. You may want to read More Hints on Installing setuptools first.

Using setuptools, compiling and installing the remaining requirements is a piece of cake:

# if the system has network access
easy_install pyglet

# without network access download pyglet
# from http://www.pyglet.org/download.html and run
easy_install pyglet-*.zip

Installing Cadre

When you are reading this you most probably already downloaded and unpacked Cadre. Thus installing is as easy as running:

python ./setup.py install

Otherwise you may install directly using setuptools/easy_install. If your system has network access installing Cadre is a breeze:

easy_install Cadre

Without network access download Cadre from http://pypi.python.org/pypi/Cadre and run:

easy_install Cadre-*.tar.gz

More Hints on Installing setuptools

Cadre uses setuptools for installation. Thus you need either

  • network access, so the install script will automatically download and install setuptools if they are not already installed

or

  • the correct version of setuptools preinstalled using the EasyInstall installation instructions. Those instructions also have tips for dealing with firewalls as well as how to manually download and install setuptools.

Custom Installation Locations

Cadre is just a single script (aka Python program). So you can copy it where ever you want (maybe fixing the first line). But it's easier to just use:

# install to /usr/local/bin
python ./setup.py install --prefix /usr/local

# install to your Home directory (~/bin)
python ./setup.py install --home ~

Please mind: This effects also the installation of pyglet (and setuptools) if they are not already installed.

For more information about Custom Installation Locations please refer to the Custom Installation Locations Instructions before installing Cadre.

Credits

The code is based on great advice from Zaheer, showing how easy actually the Twisted integration is, and on the reflection.py example from pyclutter.

cadre's People

Contributors

htgoebel avatar

Watchers

André Fiedler avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.