-
Notifications
You must be signed in to change notification settings - Fork 1
Code
stitch edited this page Sep 14, 2010
·
2 revisions
Code does everything. The following list is a review of what part of the code serves what goal.
== Files ==
The project structure of the code looks like this.
- Code
- generateplaylist
- announcementCreator
- contentFinder
- contentIndexer
- dependancyInjector
- playListItem
- programmingCreator
- show
- showSchedule
- simpleTime
- xspfPlaylistMetadata
- xspfPlaylistRenderer
- xspfTrack
- generateplaylist
== Meaning ==
- generateplaylist contains configuration for the rest of the programming. At the end it contains the show schedule according to the schedule format. Calls programmingCreator with a valid showSchedule. The programmingCreator renders XSPF files. Configuring VLC is not yet done. Will be in V1.
- dependancyInjector looks for classes that are referenced/used, but not registered in global scope. This class is a lie, and does not actually do DI as it was meant to be (with interfaces etc).
- showSchedule hooks up a series of show objects. When requesting a list of shows from the showSchedule, it calculates the runtime between different show objects.
- programmingCreator creates the order and content of the programming. Its important method is to fillShowTime; fill a predetermined amount of time (see showSchedule) with meaningful content specified in the showSchedule. Since it knows thing about programming and time, this class invokes announcementCreator and contentFinder. The resulting playlist is todo stored in internal playListItems and can be exported to XSPF. (todo: something else should be responsible for exporting playListItem sequences to XSPF or other files).
- xspfPlaylistMetadata, xspfTrack, and xspfPlaylistRenderer are 1 to 1 wrappers based on the XSPF specification.
- contentIndexer scans the content directory for movie-files and stored information about these files in the content database.
- contentFinder is a frontend for the content database. This class is used to query commercials and shows. It makes sure different shows are returned at every request and hold random functions for all other content. A maximum time for other content was added to make sure there is no over-scheduling.