How do I get started running a player and seeing some output?

Created by Andrew Neale
Keywords:
manual build player

Out of the box, and without custom extensions to connect to a CMS, the OpenSplash player has no configuration or playlist in its database, and will not appear to do anything. The following steps allow the internal database to be modified, so you can see the player output something useful to the screen, and experiment with its internal structure. This can be done before the task of connecting to a particular CMS is undertaken, and will help to establish that you can build an instance of the player software, and make it run successfully.

When the player application is run for the first time, sub-folders are automatically created in its program folder. This includes the internal database, a local SQLite database which holds media asset and playlist information normally retrieved from a content management server. Other player configuration parameters are also stored in it.

Setting up a playlist in a new database manually
-----------------------------------------------------

To do this, we are going to modify a newly created database by adding records scheduling the alternate playout of the two ‘Powered by OpenSplash’ bitmap logos provided with the source code. When done, and the player started, the desktop screen will be taken over by the player, and the two logos will be displayed in a simple playlist loop for 5 seconds each. Once you see how this is achived, you will be able to add your own content items manually to the database and schedule them into the playlist. This will help you understand the playlist structure in the database, and how to go about crafting extensions to read data into this structure.

- Build and run an OpenSplash player from the source code. When the player runs for the first time, it will create any necessary files and sub-folders in its program folder, which includes the playlist database itself ‘cache.db’ in the sub-folder ‘cache’.

- Connect to the database with an SQLite database editing tool. One easy option would be to use a plugin for the Firefox browser: https://addons.mozilla.org/addon/sqlite-manager

Tools for manual database testing: this is a list of useful tools which can be used when manually modifying the OpenSplash playlist in the local database:-

MD5 generator
http://drnaylor.co.uk/software/md5/
Each content item file record in the CoreDesigns table has a checksum field, which must be an MD5 hash of the file. This tool can be downloaded and installed in Windows, and will generate the MD5 hash of a file, which can then be copied and inserted into the database table.

UUID generator
http://www.famkruithof.net/uuid/uuidgen
This online UUID generator can be used to generate a GUID value for records in the database that need GUIDs. The GUID from a primary record like a Design, Face, Zone, etc, is used as a reference in the one to many relationships in the database.

Epoch converter
http://www.epochconverter.com/
The date/time values in the database are stored as seconds since the UNIX epoch. This online converter allows the values to be easily switched to human readable dates and times, and back again.

- Add two records in the CoreDesigns table for the ‘Powered by OpenSplash’ bitmaps. Use the UUID generator for the guid fields, and the filenames (in this case 'PoweredByOpenSplashTechnologyBlack1000px.png' and 'PoweredByOpenSplashTechnologyWhite1000px.png') for the URN field. Duration should be set to 0. Generate a checksum for each file using the MD5 generator, and add the result to the Checksum field.
- Add a record in the CoreFaceLayout table. Use the UUID generator for the FaceID field. Copy the PlayerID guid reference from the CorePlayer table, and insert into the PlayerID in the CoreFaceLayout table. The Height and Width should be the resolution of the player output. You can make this smaller than your desktop, so the player window doesn't hide the whole desktop.
- Add a record in the CoreZoneLayout table that references the record in CoreFaceLayout, so use the FaceID from the CoreFaceLayout table, generate a ZoneID guid, and use the same Height and Width values to make the zone full screen on the player output.
- Add a record in the CoreZoneLoops table that references the ZoneID field in CoreZoneLayout, generate a guid for ZoneLoopID, set Start to 0, and End to 2122284111 (a future date in 2037). Set LengthS to 10 for a 10 second playlist.
- Add two records in the CoreZoneLoopSpots table that reference the two records in CoreDesigns for the BundleID field, and the ZoneLoopID should reference the value in CoreZoneLoops. Generate guids for ZoneLoopSpotID and BookingID. Set LengthS to 5 (to play each logo for 5 seconds), Start to 0, End to 2122284111, StartTimeS to 0, EndTimeS to 86400 (ie valid over the whole day), and WeekDays to 127 (a bit field value meaning valid for all weekdays).

Once the database has been updated, copy the content files referenced in the CoreDesigns table (ie PoweredByOpenSplashTechnologyBlack1000px.png and PoweredByOpenSplashTechnologyWhite1000px.png) the to the sub-folder ‘local’

Run OpenSplash.exe to start the player. If the database entries have been added successfully, you should see the player output displaying the two logo files in rotation in the playlist. To stop the player, make sure the application is in focus (you may need to click on the player output canvas with the mouse) and press CTRL+SHIFT+S to shutdown the player.

Tips:
- during testing, make the Face and Zone canvas areas smaller than your desktop so you can see the desktop underneath the player output
- Look at the log files in the ‘log’ sub-folder to determine any problems. You will already see exception errors occurring when the player tries to check in with a server - as this is not configured at this stage, it will show failures occuring.
- Restart the player after making changes to the database to ensure that any changes you have made will be used by the player
- If you copy this working OpenSplash application folder to another machine, you will need to delete the record from the CorePlayer table, as the automatically generated HardwareKey field will not match the new machine. When the player starts, it checks that this field matches, and will create a new one if empty.