VizKit
3.3.7
|
Handles the events and messages passed in by iTunes. More...
#include <VisualMain.h>
Static Public Member Functions | |
static OSStatus | VisualPluginHandler (OSType aMessage, VisualPluginMessageInfo *aVisualPluginMessageInfo, void *aRefCon) |
Called by iTunes to send messages to visualizer plug-in. | |
static OSStatus | RegisterVisualPlugin (PluginMessageInfo *aPluginMessageInfo) |
Called by iTunes, dispatched from main function. | |
Private Member Functions | |
VisualMain () | |
The constructor. | |
~VisualMain () | |
The destructor. | |
Static Private Member Functions | |
static bool | storeAudioTrackMetadata (const ITTrackInfo *const someTrackMetadata, bool isAudioStream) |
Stores textual audio track information. | |
static void | storeAudioStreamMetadata (const ITStreamInfo *const someStreamMetadata) |
Stores textual audio stream information. | |
static void | convertVisualPluginMessageToString (const OSType aVisualPluginMessage, char *anOutString) |
Static helper function that converts a VisualPluginMessage to the string. |
Handles the events and messages passed in by iTunes.
In its public section VisualMain contains the functions called by iTunes. Private static functions access the various internal classes of the visualizer. Essential events are: audio play start, audio play stop, show start, show stop, and render message. When displaying graphics, the visualizer spends most of its time with executing the render message.
VizKit::VisualMain::VisualMain | ( | ) | [private] |
The constructor.
VisualMain is a collection of static methods. Class does not need any instances. Constructor is private and not implemented.
VizKit::VisualMain::~VisualMain | ( | ) | [private] |
The destructor.
VisualMain is a collection of static methods. Class does not need any instances. Destructor is private and not implemented.
void VisualMain::convertVisualPluginMessageToString | ( | const OSType | aVisualPluginMessage, |
char * | anOutString | ||
) | [static, private] |
Static helper function that converts a VisualPluginMessage to the string.
Possibly useful for debugging or tracing purposes.
aVisualPluginMessage | The visualPluginMessage. |
anOutString | The character string value of the VisualNotificationKey enum value. |
OSStatus VisualMain::RegisterVisualPlugin | ( | PluginMessageInfo * | aPluginMessageInfo | ) | [static] |
Called by iTunes, dispatched from main function.
Registers the visualizer plug-in to iTunes. The function calls PlayerRegisterVisualPlugin to be registered by iTunes.
aPluginMessageInfo | A pointer to a data structure passed in by iTunes and sent on to PlayerRegisterVisualPlugin. |
void VisualMain::storeAudioStreamMetadata | ( | const ITStreamInfo *const | someStreamMetadata | ) | [static, private] |
Stores textual audio stream information.
someStreamMetadata | Pointer to all accessible stream information. |
bool VisualMain::storeAudioTrackMetadata | ( | const ITTrackInfo *const | someTrackMetadata, |
bool | isAudioStream | ||
) | [static, private] |
Stores textual audio track information.
someTrackMetadata | Pointer to all accessible track information. |
isAudioStream | True if track meta data belongs to audio stream. False if meta data belongs to audio track. |
OSStatus VisualMain::VisualPluginHandler | ( | OSType | aMessage, |
VisualPluginMessageInfo * | aVisualPluginMessageInfo, | ||
void * | aRefCon | ||
) | [static] |
Called by iTunes to send messages to visualizer plug-in.
Known by iTunes via call to PlayerRegisterVisualPlugin. These types of messages can be received: kVisualPluginInitMessage kVisualPluginCleanupMessage kVisualPluginIdleMessage kVisualPluginConfigureMessage kVisualPluginEnableMessage kVisualPluginDisableMessage kVisualPluginActivateMessage kVisualPluginWindowChangedMessage kVisualPluginDeactivateMessage kVisualPluginPulseMessage kVisualPluginDrawMessage kVisualPluginFrameChangedMessage kVisualPluginPlayMessage kVisualPluginChangeTrackMessage kVisualPluginSetPositionMessage kVisualPluginStopMessage kVisualPluginCoverArtMessage kVisualPluginDisplayChangedMessage
aMessage | Type of message. |
aVisualPluginMessageInfo | Additional data. |
aRefCon | Pointer to untyped additional data. |