Project

General

Profile

cmpcj - A java client for CMP

The java client is not a mediaplayer but a man in the middle, that offers the playlist and starts the mediaplayer.
Each mediatype can be played by a different player (configurable).

Additionally cmpcj serves to select the mediaserver to connect to and optionally (later) administrate the authorized users.

configuration

cmpcj is configured by a textfile ~/.cmp/srclient.conf
The config file follows vdr- and shell-syntax, which means any line that starts with '#' is treaten as comment and each non-comment line must follow the pattern: name = value.
Currently only 2 kinds of configuration lines are supported: server and player.

#
# configuration for CMP-client
#
server = vdr:12345
server = nas:23456

So a server definition starts with the word "server" followed by an equal-sign and the hostname extended with the port to use.
The information, whether a server requires authorization is a server configuration and for so not visible to the client.

Media-players to be used by cmpcj can be configured like this:

#
# currently supported media types (LegacyVdrRecording is the old PES format):
# Audio, Movie, DVDImage, LegacyVdrRecording, VdrRecording, Picture
# additionally - if deepscan has been enabled for movies - the dynamic mediatypes for interlace movies can be used too:
# IMovie, IDVDImage, ILegacyVdrRecording, IVdrRecording
#
player = * : /usr/local/bin/ffplay -ac 2
player = IDVDImage : /usr/local/bin/mplayer -vo vdpau -vf yadif
player = Picture : /usr/local/bin/mplayer -vo vdpau

A player definition starts with the word "player" followed by an equal-sign and the absolute path of the players executable. Any parameter that shall be used follows the path. cmpcj will add the url of the media to that commandline, as last parameter. So if the mediapath needs a prefix, it should be the last one in your player definition.

New

There's a new config option:

style = dark

If that line is found in config file, the cmpcj client will look like

start

cmpcj-2012-08-15.jar is the old client, which already contains the required libraries. Place that file anywhere you like and execute it like

java -jar cmpcj-2012-08-15.jar

cmpcj-2012-08-15t.jar is the new client, that needs the library pack cmpcj-2012-08-15_lib.zip extracted. So download the jar-file and put it where you like start your app. Move to that directory and extract the library pack.
If you i.e. used /opt/cmpcj as your application directory, start the app like this:

cd /opt/cmpcj
java -jar cmpcj-2012-08-15t.jar

Currently you should have a configuration file ~/.cmp/srclient.conf.
When you start the client, the application offers you a little dialog to select the media server to connect to.
You can abort the server selection and start editing your preferences.
Whenever you like to connect to a media-server choose from Main-menu "Server -> Connect".

The left most window contains the genre tree, which usually are the directories of the media.
You can already rearrange them using Drag&Drop - which means, pull a genre with your mouse and drop it to another genre.
Last not least, you can move media from medialist to a different genre.
Important: rearranging media or genre has no impact on reality yet. It is intended to work together with a server, that will do the job.
But that's my next job.

Filter

The medialist can be filtered by clicking on the mediatype icons at the right and/or by entering any text in the search field. The search is case-insensitive and although the path of the media is invisible, it can be used for text search too. If deepscan has been enabled for audio, the width will contain the bitrate, and the filename will be replaced by a combination of some tag values.
If deepscan has been enabled for movies, the interlaced mediatypes will appear in the mediatype-list, if interlaced movies are part of the list.

Server commands

Server commands like refresh and shutdown are implemented on both sides, so they should behave like expected.