VizKit
3.3.7
|
Dispatches the events and messages passed in by iTunes with no internal state. More...
#include <VisualMainAction.h>
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 () |
Dispatches the events and messages passed in by iTunes with no internal state.
VizKit::VisualMainAction::VisualMainAction | ( | ) | [private] |
The constructor.
VisualMainAction is a collection of static methods. Class does not need any instances. Constructor is private and not implemented.
VizKit::VisualMainAction::~VisualMainAction | ( | ) | [private] |
The destructor.
VisualMainAction is a collection of static methods. Class does not need any instances. Destructor is private and not implemented.
bool VisualMainAction::analyzeCurrentlySetMetadata | ( | void | ) | [static] |
Analyzes the currently set audio track meta data.
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.
void VisualMainAction::handleAudioPlayStoppedEvent | ( | void | ) | [static] |
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.
void VisualMainAction::handleHideWindowMessage | ( | void | ) | [static] |
Handles the hide window message.
void VisualMainAction::handleInitMessage | ( | int | maxDataChannels, |
int | numberOfWaveformEntries, | ||
int | numberOfSpectrumEntries | ||
) | [static] |
Handles initialization.
maxDataChannels | The number of data channels (2 for stereo). |
numberOfWaveformEntries | The number of waveform data entries. |
numberOfSpectrumEntries | The number of spectrum data entries. |
bool VisualMainAction::handleKeyPressEvent | ( | char | aKeyPressed | ) | [static] |
Handles a key press event.
aKeyPressed | Character value of the key pressed. |
void VisualMainAction::handlePulseMessage | ( | int | currentPositionInMS, |
int | timeStampID, | ||
int | numberOfWaveformChannels, | ||
int | numberOfWaveformEntries, | ||
char * | waveformData, | ||
int | numberOfSpectrumChannels, | ||
int | numberOfSpectrumEntries, | ||
char * | spectrumData | ||
) | [static] |
Handles the pulse message.
currentPositionInMS | The current position in the audio track. |
timeStampID | Numeric id. |
numberOfWaveformChannels | The number of waveform channels. |
numberOfWaveformEntries | The number of waveform data entries. |
waveformData | The waveform data. |
numberOfSpectrumChannels | The number of spectrum channels. |
numberOfSpectrumEntries | The number of spectrum data entries. |
spectrumData | The spectrum data. |
void VisualMainAction::handleSetWindowMessage | ( | bool | isFullScreen | ) | [static] |
Kicks off the worker thread for rendering on Mac.
Handles the set window message.
isFullScreen | True if fullscreen. |
void VisualMainAction::handleShowShouldStartMessage | ( | bool | isFullscreen | ) | [static] |
Called when iTunes starts showing the visualizer.
isFullscreen | Set to true if fullscreen. |
void VisualMainAction::handleShowWindowMessage | ( | bool | isFullScreen | ) | [static] |
Handles the show windows message.
isFullScreen | True if fullscreen. |
void VisualMainAction::monitorRenderMessageProcess | ( | ) | [static, private] |
void VisualMainAction::postAlbumCoverArtworkOfCurrentAudioData | ( | VISUAL_PLATFORM_DATA | coverArtImageData, |
uint32 | coverArtDataSizeInBytes, | ||
uint32 | coverArtImageFormat | ||
) | [static] |
Posts the album cover artwork of the current audio data.
coverArtImageData | A 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. |
coverArtDataSizeInBytes | The size of the image data in bytes. |
coverArtImageFormat | The format of the image data (kVisualCoverArtFormatJPEG = 13, kVisualCoverArtFormatPNG = 14, kVisualCoverArtFormatBMP = 27). |
bool VisualMainAction::postLyricsOfCurrentAudioData | ( | void | ) | [static] |
Posts the lyrics of the current audio data.
void VisualMainAction::postTrackInfoOfCurrentAudioData | ( | void | ) | [static] |
Posts the track info string of the current audio data.
bool VisualMainAction::prepareRenderAction | ( | void | ) | [static] |
Prepares rendering.
void VisualMainAction::renderAction | ( | void | ) | [static] |
The rendering action executed with each kVisualPluginRenderMessage/kVisualPluginIdleMessage.
void VisualMainAction::requestAlbumCoverArtworkOfCurrentAudioData | ( | void | ) | [static] |
Requests the album cover artwork of the currently playing audio.
void VisualMainAction::resetCurrAudioMetaData | ( | void | ) | [static] |
Resets the currently set audio meta data.
void VisualMainAction::resetVisualAudioLabDataIfNotPaused | ( | ) | [static] |
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.
majorRev | Major revision number. 1st part of version number in BCD. |
minorRev | Minor 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.
void VisualMainAction::setPlatformView | ( | VISUAL_PLATFORM_VIEW | aView | ) | [static] |
Passes the pointer of the platform specific view.
aView | A 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.
majorVersionNum | The major version number of the Visualizer API version implemented by the host application. |
minorVersionNum | The minor version number of the Visualizer API version implemented by the host application. |
void VisualMainAction::showConfigurationDialog | ( | void | ) | [static] |
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.
infoStr | The 8-bit string to write to log file. |