VizKit  3.3.7
Static Public Member Functions | Private Member Functions | Static Private Member Functions
VizKit::VisualMainAction Class Reference

Dispatches the events and messages passed in by iTunes with no internal state. More...

#include <VisualMainAction.h>

List of all members.

Static Public Member Functions

static void updateTiming (void)
 Updates the current timestamp of the timing engine.
static void setAppVersion (int majorRev, int minorAndBugRev)
 Handles initialization.
static void setVisualizerAPIVersion (int majorVersionNum, int minorVersionNum)
 Stores the major and minor version of the Visualizer API version implemented by the host application.
static void handleInitMessage (int maxDataChannels, int numberOfWaveformEntries, int numberOfSpectrumEntries)
 Handles initialization.
static void setPlatformView (VISUAL_PLATFORM_VIEW aView)
 Passes the pointer of the platform specific view.
static void handleShowWindowMessage (bool isFullScreen)
 Handles the show windows message.
static void handleSetWindowMessage (bool isFullScreen)
 Kicks off the worker thread for rendering on Mac.
static void handlePulseMessage (int currentPositionInMS, int timeStampID, int numberOfWaveformChannels, int numberOfWaveformEntries, char *waveformData, int numberOfSpectrumChannels, int numberOfSpectrumEntries, char *spectrumData)
 Handles the pulse message.
static void resetVisualAudioLabDataIfNotPaused ()
 Resets the audio lab data for the play message (in case the audio track does not unpause).
static bool prepareRenderAction (void)
 Prepares rendering.
static void renderAction (void)
 The rendering action executed with each kVisualPluginRenderMessage/kVisualPluginIdleMessage.
static void finishRenderAction (void)
 Finishes rendering.
static void handleHideWindowMessage (void)
 Handles the hide window message.
static void handleAudioPlayStoppedEvent (void)
 Called when iTunes stops playing audio.
static void handleAudioPlayStartedEvent (bool trackDidChange)
 Called when iTunes starts playing audio.
static void setTrackPlayPositionInMS (int trackPlayPosition)
 Updates the tracked play position.
static void handleShowShouldStartMessage (bool isFullscreen)
 Called when iTunes starts showing the visualizer.
static void closeThreads (void)
 Called when rendering of visualizer plug-in is closed.
static void closePersistentStore (void)
 Called when visualizer plug-in is unloaded.
static void handleCanvasReshape (void)
 Called when canvas is resized.
static bool handleKeyPressEvent (char aKeyPressed)
 Handles a key press event.
static void showConfigurationDialog (void)
 Opens the dialog UI for configuration options.
static void resetCurrAudioMetaData (void)
 Resets the currently set audio meta data.
static void setAudioTrackName (const void *const audioTrackName, int audioTrackNameLength)
 Sets the name of the audio track.
static void setAudioTrackArtistName (const void *const audioTrackArtistName, int audioTrackArtistNameLength)
 Sets the artist name of the audio track.
static void setAudioTrackAlbumName (const void *const audioTrackAlbumName, int audioTrackAlbumNameLength)
 Sets the album name of the audio track.
static void setAudioTrackComposer (const void *const audioTrackComposer, int audioTrackComposerLength)
 Sets the name of the composer of the audio track.
static void setAudioStreamTitle (const void *const audioStreamTitle, int audioStreamTitleLength)
 Sets the title of an audio stream.
static void setAudioStreamMessage (const void *const audioStreamMessage, int audioStreamMessageLength)
 Sets the message of an audio stream.
static void setAudioStreamURL (const void *const audioStreamURL, int audioStreamURLLength)
 Sets the URL of an audio stream.
static void setAudioStreamName (const void *const audioStreamName, int audioStreamNameLength)
 Sets the name of an audio stream.
static void setAudioTrackSizeInBytes (int audioTrackSizeInBytes)
 Sets the size in bytes of the audio track.
static void setAudioTrackYear (int aYear)
 Sets the year of the audio track.
static void setAudioDataIsStream (bool isStream)
 Sets whether the current audio data is a stream.
static bool analyzeCurrentlySetMetadata (void)
 Analyzes the currently set audio track meta data.
static void setTotalTimeOfCurrentTrack (int totalTimeInMS)
 Sets the total time of the current audio track.
static void setStartTimeOfCurrentTrack (int startTimeInMS)
 Sets the start time of the current audio track.
static void setStopTimeOfCurrentTrack (int stopTimeInMS)
 Sets the stop time of the current audio track.
static void postTrackInfoOfCurrentAudioData (void)
 Posts the track info string of the current audio data.
static bool postLyricsOfCurrentAudioData (void)
 Posts the lyrics of the current audio data.
static void requestAlbumCoverArtworkOfCurrentAudioData (void)
 Requests the album cover artwork of the currently playing audio.
static void postAlbumCoverArtworkOfCurrentAudioData (VISUAL_PLATFORM_DATA coverArtImageData, uint32 coverArtDataSizeInBytes, uint32 coverArtImageFormat)
 Posts the album cover artwork of the current audio data.
static void writeLogEntry (const char *const infoStr)
 Writes a 8-bit string to the system log file.

Private Member Functions

 VisualMainAction ()
 The constructor.
 ~VisualMainAction ()
 The destructor.

Static Private Member Functions

static void monitorRenderMessageProcess ()

Detailed Description

Dispatches the events and messages passed in by iTunes with no internal state.


Constructor & Destructor Documentation

The constructor.

VisualMainAction is a collection of static methods. Class does not need any instances. Constructor is private and not implemented.

The destructor.

VisualMainAction is a collection of static methods. Class does not need any instances. Destructor is private and not implemented.


Member Function Documentation

Analyzes the currently set audio track meta data.

Returns:
True if the track information changed (meaning: a new audio track started).
void VisualMainAction::closePersistentStore ( void  ) [static]

Called when visualizer plug-in is unloaded.

void VisualMainAction::closeThreads ( void  ) [static]

Called when rendering of visualizer plug-in is closed.

void VisualMainAction::finishRenderAction ( void  ) [static]

Finishes rendering.

void VisualMainAction::handleAudioPlayStartedEvent ( bool  trackDidChange) [static]

Called when iTunes starts playing audio.

Called when iTunes stops playing audio.

Gathered audio data is cleared when the audio stops playing.

void VisualMainAction::handleCanvasReshape ( void  ) [static]

Called when canvas is resized.

Handles the hide window message.

void VisualMainAction::handleInitMessage ( int  maxDataChannels,
int  numberOfWaveformEntries,
int  numberOfSpectrumEntries 
) [static]

Handles initialization.

Parameters:
maxDataChannelsThe number of data channels (2 for stereo).
numberOfWaveformEntriesThe number of waveform data entries.
numberOfSpectrumEntriesThe number of spectrum data entries.
bool VisualMainAction::handleKeyPressEvent ( char  aKeyPressed) [static]

Handles a key press event.

Parameters:
aKeyPressedCharacter value of the key pressed.
Returns:
True if key press event was handled by visualizer, false if key press event was not handled by visualizer.
void VisualMainAction::handlePulseMessage ( int  currentPositionInMS,
int  timeStampID,
int  numberOfWaveformChannels,
int  numberOfWaveformEntries,
char *  waveformData,
int  numberOfSpectrumChannels,
int  numberOfSpectrumEntries,
char *  spectrumData 
) [static]

Handles the pulse message.

Parameters:
currentPositionInMSThe current position in the audio track.
timeStampIDNumeric id.
numberOfWaveformChannelsThe number of waveform channels.
numberOfWaveformEntriesThe number of waveform data entries.
waveformDataThe waveform data.
numberOfSpectrumChannelsThe number of spectrum channels.
numberOfSpectrumEntriesThe number of spectrum data entries.
spectrumDataThe spectrum data.
void VisualMainAction::handleSetWindowMessage ( bool  isFullScreen) [static]

Kicks off the worker thread for rendering on Mac.

Handles the set window message.

Parameters:
isFullScreenTrue if fullscreen.
void VisualMainAction::handleShowShouldStartMessage ( bool  isFullscreen) [static]

Called when iTunes starts showing the visualizer.

Parameters:
isFullscreenSet to true if fullscreen.
void VisualMainAction::handleShowWindowMessage ( bool  isFullScreen) [static]

Handles the show windows message.

Parameters:
isFullScreenTrue if fullscreen.
void VisualMainAction::postAlbumCoverArtworkOfCurrentAudioData ( VISUAL_PLATFORM_DATA  coverArtImageData,
uint32  coverArtDataSizeInBytes,
uint32  coverArtImageFormat 
) [static]

Posts the album cover artwork of the current audio data.

Parameters:
coverArtImageDataA platform-specific pointer to the cover art data. On the Mac, this is a CFDataRef. On Windows, it is a LPCVOID pointer. The data is disposed after this call returns so the plugin must not save off the pointer and expect it to be valid later. If the plugin wants to keep the data around for later, it needs to retain it (Mac) or copy it (Windows). If the currently playing track has no artwork, this pointer will be nil.
coverArtDataSizeInBytesThe size of the image data in bytes.
coverArtImageFormatThe format of the image data (kVisualCoverArtFormatJPEG = 13, kVisualCoverArtFormatPNG = 14, kVisualCoverArtFormatBMP = 27).

Posts the lyrics of the current audio data.

Returns:
True on success, false on failure.

Posts the track info string of the current audio data.

bool VisualMainAction::prepareRenderAction ( void  ) [static]

Prepares rendering.

Returns:
False on any failure.
void VisualMainAction::renderAction ( void  ) [static]

The rendering action executed with each kVisualPluginRenderMessage/kVisualPluginIdleMessage.

Remarks:
Probably the most often called function.

Requests the album cover artwork of the currently playing audio.

void VisualMainAction::resetCurrAudioMetaData ( void  ) [static]

Resets the currently set audio meta data.

Resets the audio lab data for the play message (in case the audio track does not unpause).

void VisualMainAction::setAppVersion ( int  majorRev,
int  minorAndBugRev 
) [static]

Handles initialization.

Parameters:
majorRevMajor revision number. 1st part of version number in BCD.
minorRevMinor and bug revision number. 2nd and 3rd part of version number share a byte.
void VisualMainAction::setAudioDataIsStream ( bool  isStream) [static]

Sets whether the current audio data is a stream.

void VisualMainAction::setAudioStreamMessage ( const void *const  audioStreamMessage,
int  audioStreamMessageLength 
) [static]

Sets the message of an audio stream.

void VisualMainAction::setAudioStreamName ( const void *const  audioStreamName,
int  audioStreamNameLength 
) [static]

Sets the name of an audio stream.

void VisualMainAction::setAudioStreamTitle ( const void *const  audioStreamTitle,
int  audioStreamTitleLength 
) [static]

Sets the title of an audio stream.

void VisualMainAction::setAudioStreamURL ( const void *const  audioStreamURL,
int  audioStreamURLLength 
) [static]

Sets the URL of an audio stream.

void VisualMainAction::setAudioTrackAlbumName ( const void *const  audioTrackAlbumName,
int  audioTrackAlbumNameLength 
) [static]

Sets the album name of the audio track.

void VisualMainAction::setAudioTrackArtistName ( const void *const  audioTrackArtistName,
int  audioTrackArtistNameLength 
) [static]

Sets the artist name of the audio track.

void VisualMainAction::setAudioTrackComposer ( const void *const  audioTrackComposer,
int  audioTrackComposerLength 
) [static]

Sets the name of the composer of the audio track.

void VisualMainAction::setAudioTrackName ( const void *const  audioTrackName,
int  audioTrackNameLength 
) [static]

Sets the name of the audio track.

void VisualMainAction::setAudioTrackSizeInBytes ( int  audioTrackSizeInBytes) [static]

Sets the size in bytes of the audio track.

void VisualMainAction::setAudioTrackYear ( int  aYear) [static]

Sets the year of the audio track.

Passes the pointer of the platform specific view.

Parameters:
aViewA platform specific view.
void VisualMainAction::setStartTimeOfCurrentTrack ( int  startTimeInMS) [static]

Sets the start time of the current audio track.

void VisualMainAction::setStopTimeOfCurrentTrack ( int  stopTimeInMS) [static]

Sets the stop time of the current audio track.

void VisualMainAction::setTotalTimeOfCurrentTrack ( int  totalTimeInMS) [static]

Sets the total time of the current audio track.

void VisualMainAction::setTrackPlayPositionInMS ( int  trackPlayPosition) [static]

Updates the tracked play position.

void VisualMainAction::setVisualizerAPIVersion ( int  majorVersionNum,
int  minorVersionNum 
) [static]

Stores the major and minor version of the Visualizer API version implemented by the host application.

Parameters:
majorVersionNumThe major version number of the Visualizer API version implemented by the host application.
minorVersionNumThe minor version number of the Visualizer API version implemented by the host application.

Opens the dialog UI for configuration options.

void VisualMainAction::updateTiming ( void  ) [static]

Updates the current timestamp of the timing engine.

void VisualMainAction::writeLogEntry ( const char *const  infoStr) [static]

Writes a 8-bit string to the system log file.

Parameters:
infoStrThe 8-bit string to write to log file.

The documentation for this class was generated from the following files:

Generated on Sun May 3 2015 20:26:32 for VizKit by doxygen 1.8.0