#include <fragment-creator.h>


Public Member Functions | |
| elementResult | createOneFor (Song *song) |
| elementResult | terminate () |
Protected Member Functions | |
| void | queue_createOneFor (Song *song) |
| void | queue_terminate () |
| bool | handle () |
| ActiveFragmentCreator (FragmentCreator *s, string name) | |
Friends | |
| class | FragmentCreator |
| ActiveFragmentCreator::ActiveFragmentCreator | ( | FragmentCreator * | s, | |
| string | name | |||
| ) | [inline, protected] |
| elementResult ActiveFragmentCreator::createOneFor | ( | Song * | song | ) |
this relies heavily on mplayer its excellent capabilities to seek to the right position.
to avoid that we create the same fragment multiple times and thereby needlessly remove the file we keep track of all the fragments we created already
References app, description, Done, escape(), execute(), exists(), FragmentsDir, MusicDir, OneSpace, selector, slash, and Synchronized.
Referenced by ActiveFragmentCreator_msg_createOneFor::run().
| bool ActiveFragmentCreator::handle | ( | ) | [protected, virtual] |
This method will be called in its own (virtual) thread, to handle a collection of messages. The messages to be handled are listed in the protected handle field. That queue can be accessed and manipulated as necessary. This method should return true when it can perform more work or false when it has nothing more to do (handling empty for instance, or no useful message left in handling). The standard implementation will take the front of the handling queue and present it to the more specific handle(T) member. Based on the return of that function a decision is made for the specif handling element.
Reimplemented from ActiveObject< ActiveFragmentCreator_msg_ * >.
References ActiveObject< ActiveFragmentCreator_msg_ * >::handling.
| void ActiveFragmentCreator::queue_createOneFor | ( | Song * | song | ) | [inline, protected] |
| void ActiveFragmentCreator::queue_terminate | ( | ) | [inline, protected] |
| elementResult ActiveFragmentCreator::terminate | ( | ) |
References ActiveObject< ActiveFragmentCreator_msg_ * >::deactivate().
Referenced by ActiveFragmentCreator_msg_terminate::run().
friend class FragmentCreator [friend] |
1.6.2