Skip to content
This repository
Browse code

Merge pull request #1841 from ronie/itunes-visualization

remove broken Itunes visualization
  • Loading branch information...
commit c58514ea575e633acff5cd19b7c8f1be85c68179 2 parents a8e9c49 + 2fa6e74
ronie authored November 24, 2012
4  Makefile.in
@@ -200,10 +200,6 @@ ifneq (@DISABLE_PROJECTM@,1)
200 200
   VIS_DIRS+= xbmc/visualizations/XBMCProjectM
201 201
 endif
202 202
 
203  
-ifeq (($(findstring osx,@ARCH@), osx),(@USE_OPENGL@,1))
204  
-  VIS_DIRS+=xbmc/visualizations/iTunes
205  
-endif
206  
-
207 203
 ifneq (@DISABLE_GOOM@,1)
208 204
   VIS_DIRS+=xbmc/visualizations/Goom
209 205
 endif
88  addons/visualization.itunes/addon.xml
... ...
@@ -1,88 +0,0 @@
1  
-<?xml version="1.0" encoding="UTF-8"?>
2  
-<addon
3  
-  id="visualization.itunes"
4  
-  version="1.0.0"
5  
-  name="iTunes Visualizations"
6  
-  provider-name="Team XBMC">
7  
-  <extension
8  
-    point="xbmc.player.musicviz"
9  
-    library_osx="iTunes.mvis"/>
10  
-  <extension point="xbmc.addon.metadata">
11  
-    <summary lang="af">iTunes Visualisering Omhulsel</summary>
12  
-    <summary lang="ar">مفتاح  تصوير اي تونز</summary>
13  
-    <summary lang="be">iTunes Visualization Wrapper</summary>
14  
-    <summary lang="bg">Обвивка за визуализации от iTunes</summary>
15  
-    <summary lang="ca">Visualitzador d'efectes de l'iTunes</summary>
16  
-    <summary lang="cs">Obal vizualizace iTunes</summary>
17  
-    <summary lang="da">iTunes Visualization Wrapper</summary>
18  
-    <summary lang="de">iTunes Visualisierung</summary>
19  
-    <summary lang="el">Συλλογή Οπτικοποιήσεων iTunes</summary>
20  
-    <summary lang="en">iTunes Visualization Wrapper</summary>
21  
-    <summary lang="es">Wrapper de visualizaciones de iTunes</summary>
22  
-    <summary lang="es_MX">Envoltura de Visualización de iTunes</summary>
23  
-    <summary lang="et">iTunes-i visuaali pakend</summary>
24  
-    <summary lang="fi">iTunes-visualisoinnit</summary>
25  
-    <summary lang="fr">Adaptateur de visualisation iTunes</summary>
26  
-    <summary lang="gl">Envoltorio da Visualización de iTunes</summary>
27  
-    <summary lang="he">חיזוי iTunes</summary>
28  
-    <summary lang="hr">iTunes Vizualizacija Omota</summary>
29  
-    <summary lang="hu">iTunes Vizualizáció</summary>
30  
-    <summary lang="is">iTunes myndskreytingar </summary>
31  
-    <summary lang="it">Raccoglitore visualizzazioni di iTunes</summary>
32  
-    <summary lang="ja">iTunes ビジュアライザラッパー</summary>
33  
-    <summary lang="ko">iTunes 음악 시각화 랩퍼</summary>
34  
-    <summary lang="lt">iTunes Vizualizacijos Wrapper (įpakavimas)</summary>
35  
-    <summary lang="nl">iTunes-visualisaties</summary>
36  
-    <summary lang="no">iTunes visualisering wrapper</summary>
37  
-    <summary lang="pl">Wrapper wizualizacji iTunes</summary>
38  
-    <summary lang="pt">Visualização iTunes Wrapper</summary>
39  
-    <summary lang="pt_BR">iTunes Visualização Wrapper</summary>
40  
-    <summary lang="ro">Anvelopa vizualizare iTunes</summary>
41  
-    <summary lang="ru">Оболочка для визуализаций iTunes</summary>
42  
-    <summary lang="se">iTunes visualiseringsomslag</summary>
43  
-    <summary lang="sk">Obal (wrapper) pre iTunes vizualizácie</summary>
44  
-    <summary lang="sl">Vizualizacije preko iTunes</summary>
45  
-    <summary lang="sv">iTunes Visualization Wrapper</summary>
46  
-    <summary lang="uk">Обгортка для візуалізацій iTunes</summary>
47  
-    <summary lang="zh">iTunes可视化效果包</summary>
48  
-    <description lang="af">iTunes Visualisering Omhulsel laat jou toe om visualiserings vanaf jou OSX iTunes installasie in XBMC te gebruik</description>
49  
-    <description lang="ar">مفتاح تصوير اي تونز يسمح لك باستخدام الهيئات من تثبيت OSx اي تونز الخاص بك في XBMC </description>
50  
-    <description lang="be">iTunes Visualization Wrapper allows you to use visualizations from your OSX iTunes install in XBMC</description>
51  
-    <description lang="bg">iTunes Visualization Wrapper Ви позволява да използвате визуализациите от локалната инсталация на OSX iTunes в XBMC</description>
52  
-    <description lang="ca">El visualitzador d'efectes de l'iTunes utilitza les visualitzacions de l'iTunes instal·lat al seu OSX a l'XBMC.</description>
53  
-    <description lang="cs">Obal vizualizace iTunes umožňuje použití vizualizací z Vaší instalace OSX iTunes v XBMC</description>
54  
-    <description lang="da">iTunes Visualization Wrapper tillader dig at bruge visualiseringer fra din OSX iTunes installation i XBMC</description>
55  
-    <description lang="de">iTunes Visualisierung ermöglicht es von der OSX iTunes Installation die Visualisierung in XBMC nutzen zu können</description>
56  
-    <description lang="el">Η Συλλογή Οπτικοποιήσεων iTunes σας επιτρέπει να χρησιμοποιήσετε οπτικοποιήσεις από την OSX εγκατάσταση του iTunes στο XBMC</description>
57  
-    <description lang="en">iTunes Visualization Wrapper allows you to use visualizations from your OSX iTunes install in XBMC</description>
58  
-    <description lang="es">El Wrapper de visualizaciones de iTunes le permite usar las visualizaciones de su OSX iTunes en XBMC</description>
59  
-    <description lang="es_MX">La Envoltura de visualización de iTunes te permite utilizar visualizaciones de tu instalación de iTunes OSX en XBMC</description>
60  
-    <description lang="et">iTunes-i visuaali pakend võimaldab kasutada sinu OSX iTunes-i installiga kaasa tulnud visuaale XBMC-s.</description>
61  
-    <description lang="fi">Mahdollistaa OSX iTunes -asennuksen visualisointien käytön XBMC:ssä.</description>
62  
-    <description lang="fr">L'adaptateur de visualisation iTunes vous permet d'utiliser dans XBMC les visualisations de votre version d'iTunes installée sous OS X</description>
63  
-    <description lang="gl">O Envoltorio de Visualización de iTunes permítelle empregar as visualizacións da súa instalación de iTunes de OSX en XBMC</description>
64  
-    <description lang="he">חיזוי iTunes מאפשר לך להשתמש בחיזוי iTunes אשר מותקן בתוך OSX שלך</description>
65  
-    <description lang="hr">iTunes Vizualizacija Omota uvijek koristi vizualizacije iz svog OSX iTunes instalirano iz XBMC</description>
66  
-    <description lang="hu">Az iTunes Vizualizáció lehetővé teszi, hogy használd az OSX iTunes telepítésedben meglévő vizualizációkat az XBMC-ben</description>
67  
-    <description lang="is">iTunes myndskreytingin leyfir þér að nota myndskreytingar frá OSX iTunes uppsetningunni þinni í XBMC</description>
68  
-    <description lang="it">Il 'Raccoglitore visualizzazioni di iTunes' ti permette di usare le visualizzazioni di iTunes su OSX direttamente in XBMC</description>
69  
-    <description lang="ja">iTunes ビジュアライザラッパーは、XBMC 内で OSX の iTunes ビジュアライザを使用可能にするものです</description>
70  
-    <description lang="ko">iTunes 음악시각화 랩퍼는 OSX iTunes 음악 시각화를 XBMC에서 사용할 수 있게 해줍니다.</description>
71  
-    <description lang="lt">iTunes Vizualizacijos Wrapper (įpakavimas) leidžia jums naudoti vizualizacijas iš jūsų OSX iTunes instaliuoti į XBMC</description>
72  
-    <description lang="nl">Dankzij iTunes-visualisaties kan XBMC gebruik maken van de visualisaties van uw iTunesinstallatie in OS X</description>
73  
-    <description lang="no">iTunes visualisering wrapper lar deg bruke visualiseringer fra din OSX iTunes installasjon i XBMC</description>
74  
-    <description lang="pl">Wrapper pozwala XBMC na użycie wizualizacji z iTunes (tylko system OSX)</description>
75  
-    <description lang="pt">O iTunes Visualization Wrapper permite usar visualizações do seu OSX iTunes no XBMC</description>
76  
-    <description lang="pt_BR">O iTunes Visualization Wrapper permite usar visualizações do seu OSX iTunes no XBMC</description>
77  
-    <description lang="ro">Anvelopa vizualizare iTunes vă permite să folosiți vizualizări din instalarea iTunes de pe OSX în XBMC</description>
78  
-    <description lang="ru">Оболочка для визуализаций iTunes позволяет использовать визуализации OSX для iTunes в XBMC</description>
79  
-    <description lang="se">iTunes visualiseringsomslag tillåter dig att använda visualiseringar från din OSX iTunes installation i XBMC</description>
80  
-    <description lang="sk">Obal (wrapper) pre iTunes vizualizácie ti dovolí použiť vizualizácie z OSX iTunes v XBMC </description>
81  
-    <description lang="sl">Vizualizacije preko iTunes vam omogočajo uporabo vizualizacij iz vaše namestitve OSX iTunes v XBMC</description>
82  
-    <description lang="sv">iTunes Visualization Wrapper gör det möjligt för dig att använda visualiseringar från din OSX iTunes-installation i XBMC.</description>
83  
-    <description lang="uk">Обгортка для візуалізацій iTunes дозволяє вам використовувати встановлені візуалізації з вашим OSX iTunes у XBMC.</description>
84  
-    <description lang="zh">iTunes可视化效果包允许你使用安装到XBMC的来自于OSX iTunes的可视化效果</description>
85  
-    <platform>osx</platform>
86  
-  </extension>
87  
-</addon>
88  
-
383  xbmc/visualizations/iTunes/Main.cpp
... ...
@@ -1,383 +0,0 @@
1  
-/*
2  
- *      Copyright (C) 2005-2012 Team XBMC
3  
- *      http://www.xbmc.org
4  
- *
5  
- *  This Program is free software; you can redistribute it and/or modify
6  
- *  it under the terms of the GNU General Public License as published by
7  
- *  the Free Software Foundation; either version 2, or (at your option)
8  
- *  any later version.
9  
- *
10  
- *  This Program is distributed in the hope that it will be useful,
11  
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  
- *  GNU General Public License for more details.
14  
- *
15  
- *  You should have received a copy of the GNU General Public License
16  
- *  along with XBMC; see the file COPYING.  If not, see
17  
- *  <http://www.gnu.org/licenses/>.
18  
- *
19  
- */
20  
-
21  
-/*
22  
-  iTunes Visualization Wrapper for XBMC
23  
-*/
24  
-
25  
-
26  
-#include <GL/glew.h>
27  
-#include <string>
28  
-
29  
-#include "itunes_vis.h"
30  
-#include "../../addons/include/xbmc_vis_dll.h"
31  
-
32  
-int g_tex_width     = 512;
33  
-int g_tex_height    = 512;
34  
-int g_window_width  = 512;
35  
-int g_window_height = 512;
36  
-int g_window_xpos   = 0;
37  
-int g_window_ypos   = 0;
38  
-
39  
-short       g_audio_data[2][512];
40  
-float       g_freq_data[2][512];
41  
-bool        g_new_audio;
42  
-std::string g_sub_module;
43  
-std::string g_vis_name;
44  
-GLuint      g_tex_id          = 0;
45  
-GLbyte*     g_tex_buffer      = NULL;
46  
-long        g_tex_buffer_size = 0;
47  
-ITunesVis*  g_plugin          = NULL;
48  
-
49  
-//-- Create -------------------------------------------------------------------
50  
-// Called on load. Addon should fully initalize or return error status
51  
-//-----------------------------------------------------------------------------
52  
-ADDON_STATUS ADDON_Create(void* hdl, void* visProps)
53  
-{
54  
-  if (!visProps)
55  
-    return ADDON_STATUS_UNKNOWN;
56  
-
57  
-  VIS_PROPS* props = (VIS_PROPS*) visProps;
58  
-
59  
-  if (!props->submodule)
60  
-    return ADDON_STATUS_UNKNOWN;
61  
-  
62  
-  g_vis_name = props->name;
63  
-  g_sub_module = props->submodule;
64  
-
65  
-  /* copy window dimensions */
66  
-  g_window_width  = g_tex_width  = props->width;
67  
-  g_window_height = g_tex_height = props->height;
68  
-  g_window_xpos   = props->x;
69  
-  g_window_ypos   = props->y;
70  
-
71  
-  /* create texture buffer */
72  
-  g_tex_buffer_size = g_tex_width * g_tex_height * 4;
73  
-  g_tex_buffer      = (GLbyte*)malloc( g_tex_buffer_size );
74  
-
75  
-  if ( !g_tex_buffer )
76  
-    return ADDON_STATUS_UNKNOWN;
77  
-
78  
-  if ( g_plugin )
79  
-  {
80  
-    ivis_close( g_plugin );
81  
-    g_plugin = NULL;
82  
-  }
83  
-
84  
-  /* load the plugin */
85  
-  g_plugin = ivis_open( g_sub_module.c_str() );
86  
-
87  
-  if ( g_plugin == NULL )
88  
-  {
89  
-    printf( "Error loading %s\n", g_vis_name.c_str() );
90  
-    return ADDON_STATUS_UNKNOWN;
91  
-  }
92  
-
93  
-  /* initialize and start the plugin */
94  
-  if ( ivis_init( g_plugin, g_tex_width, g_tex_height ) == false )
95  
-  {
96  
-    printf( "Error initializing %s\n", g_vis_name.c_str() );
97  
-    ivis_close( g_plugin );
98  
-    g_plugin = NULL;
99  
-  }
100  
-  else
101  
-  {
102  
-    ivis_start( g_plugin );
103  
-  }
104  
-
105  
-  return ADDON_STATUS_OK;
106  
-}
107  
-
108  
-//-- Start --------------------------------------------------------------------
109  
-// Called when a new soundtrack is played
110  
-//-----------------------------------------------------------------------------
111  
-extern "C" void Start(int iChannels, int iSamplesPerSec, int iBitsPerSample,
112  
-                      const char* szSongName)
113  
-{
114  
-
115  
-}
116  
-
117  
-//-- Stop ---------------------------------------------------------------------
118  
-// Called when the visualisation is closed by XBMC
119  
-//-----------------------------------------------------------------------------
120  
-extern "C" void ADDON_Stop()
121  
-{
122  
-  if ( g_tex_id )
123  
-  {
124  
-    glDeleteTextures( 1, &g_tex_id );
125  
-  }
126  
-  ivis_close( g_plugin );
127  
-  free( g_tex_buffer );
128  
-  g_tex_buffer = NULL;
129  
-  g_tex_buffer_size = 0;
130  
-  g_plugin = NULL;
131  
-  g_new_audio = false;
132  
-}
133  
-
134  
-//-- Audiodata ----------------------------------------------------------------
135  
-// Called by XBMC to pass new audio data to the vis
136  
-//-----------------------------------------------------------------------------
137  
-extern "C" void AudioData(const short* pAudioData, int iAudioDataLength,
138  
-                          float *pFreqData, int iFreqDataLength)
139  
-{
140  
-  int copysize = iAudioDataLength  < (int)sizeof( g_audio_data ) ? iAudioDataLength  : (int)sizeof( g_audio_data );
141  
-  for (int i = 0 ; i < copysize*2 ; i+=2 )
142  
-  {
143  
-    g_audio_data[0][i/2] = *(pAudioData + i);
144  
-    g_audio_data[1][i/2] = *(pAudioData + i + 1);
145  
-  }
146  
-  if ( pFreqData )
147  
-  {
148  
-    copysize = iFreqDataLength  < (int)sizeof( g_freq_data ) ? iFreqDataLength  : (int)sizeof( g_freq_data );
149  
-    memcpy( g_freq_data[0], pFreqData, copysize );
150  
-    memcpy( g_freq_data[1], pFreqData, copysize );
151  
-  }
152  
-  g_new_audio = true;
153  
-}
154  
-
155  
-
156  
-//-- Render -------------------------------------------------------------------
157  
-// Called once per frame. Do all rendering here.
158  
-//-----------------------------------------------------------------------------
159  
-extern "C" void Render()
160  
-{
161  
-  static ITunesPixelFormat format;
162  
-  static float yflip = 0.0;
163  
-  if ( ! g_tex_id )
164  
-  {
165  
-    // initialize the texture we'll be using
166  
-    glGenTextures( 1, &g_tex_id );
167  
-    if ( ! g_tex_id )
168  
-      return;
169  
-
170  
-    /* render the vislualization */
171  
-    format = ivis_render( g_plugin, g_audio_data, g_freq_data, (void*)g_tex_buffer,
172  
-                          g_tex_buffer_size, !g_new_audio );
173  
-    glActiveTextureARB( GL_TEXTURE3_ARB );
174  
-    glDisable( GL_TEXTURE_2D );
175  
-    glActiveTextureARB( GL_TEXTURE2_ARB );
176  
-    glDisable( GL_TEXTURE_2D );
177  
-    glActiveTextureARB( GL_TEXTURE1_ARB );
178  
-    glDisable( GL_TEXTURE_2D );
179  
-
180  
-    /* update texture */
181  
-    glActiveTextureARB( GL_TEXTURE0_ARB );
182  
-    glEnable(GL_TEXTURE_2D);
183  
-    glBindTexture( GL_TEXTURE_2D, g_tex_id );
184  
-    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
185  
-    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
186  
-    if ( format == ITunesPixelFormatRGBA32 )
187  
-    {
188  
-      glTexImage2D( GL_TEXTURE_2D, 0, 4, g_tex_width, g_tex_height, 0,
189  
-                    GL_BGRA, GL_UNSIGNED_BYTE, g_tex_buffer );
190  
-    }
191  
-    else if ( format == ITunesPixelFormatRGB24 )
192  
-    {
193  
-      glTexImage2D( GL_TEXTURE_2D, 0, 4, g_tex_width, g_tex_height, 0,
194  
-                    GL_RGB, GL_UNSIGNED_BYTE, g_tex_buffer );
195  
-      yflip = 1.0;
196  
-    }
197  
-    glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
198  
-  }
199  
-  else
200  
-  {
201  
-    /* render the vislualization */
202  
-    format = ivis_render( g_plugin, g_audio_data, g_freq_data, (void*)g_tex_buffer,
203  
-                          g_tex_buffer_size, !g_new_audio );
204  
-    glActiveTextureARB( GL_TEXTURE3_ARB );
205  
-    glDisable( GL_TEXTURE_2D );
206  
-    glActiveTextureARB( GL_TEXTURE2_ARB );
207  
-    glDisable( GL_TEXTURE_2D );
208  
-    glActiveTextureARB( GL_TEXTURE1_ARB );
209  
-    glDisable( GL_TEXTURE_2D );
210  
-
211  
-    /* update texture */
212  
-    glActiveTextureARB( GL_TEXTURE0_ARB );
213  
-    glEnable(GL_TEXTURE_2D);
214  
-    glBindTexture( GL_TEXTURE_2D, g_tex_id );
215  
-    if ( format == ITunesPixelFormatRGBA32 )
216  
-      glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, g_tex_width, g_tex_height,
217  
-                       GL_BGRA, GL_UNSIGNED_BYTE, g_tex_buffer );
218  
-    else if ( format == ITunesPixelFormatRGB24 )
219  
-      glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, g_tex_width, g_tex_height,
220  
-                       GL_RGB, GL_UNSIGNED_BYTE, g_tex_buffer );
221  
-    glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
222  
-  }
223  
-  g_new_audio = false;
224  
-
225  
-  /* draw a quad with the updated texture */
226  
-  glDisable(GL_BLEND);
227  
-  glBegin( GL_QUADS );
228  
-  {
229  
-    glColor3f( 1.0, 1.0, 1.0 );
230  
-    glTexCoord2f( 0.0, 1.0 - yflip );
231  
-    glVertex2f( g_window_xpos, g_window_ypos );
232  
-
233  
-    glTexCoord2f( 0.0, yflip - 0.0 );
234  
-    glVertex2f( g_window_xpos, g_window_ypos + g_window_height );
235  
-
236  
-    glTexCoord2f( 1.0, yflip - 0.0 );
237  
-    glVertex2f( g_window_xpos + g_window_width, g_window_ypos + g_window_height );
238  
-
239  
-    glTexCoord2f( 1.0, 1.0 - yflip );
240  
-    glVertex2f( g_window_xpos + g_window_width, g_window_ypos );
241  
-  }
242  
-  glEnd();
243  
-  glDisable( GL_TEXTURE_2D );
244  
-  glEnable(GL_BLEND);
245  
-}
246  
-
247  
-//-- GetInfo ------------------------------------------------------------------
248  
-// Tell XBMC our requirements
249  
-//-----------------------------------------------------------------------------
250  
-extern "C" void GetInfo(VIS_INFO* pInfo)
251  
-{
252  
-  pInfo->bWantsFreq = false;
253  
-  pInfo->iSyncDelay = 0;
254  
-}
255  
-
256  
-//-- OnAction -----------------------------------------------------------------
257  
-// Handle XBMC actions such as next preset, lock preset, album art changed etc
258  
-//-----------------------------------------------------------------------------
259  
-extern "C" bool OnAction(long flags, const void *param)
260  
-{
261  
-  bool ret = false;
262  
-
263  
-  switch( flags )
264  
-  {
265  
-  case VIS_ACTION_UPDATE_ALBUMART:
266  
-    if ( param )
267  
-      ivis_set_album_art( g_plugin, (const char*)param );
268  
-    break;
269  
-
270  
-  case VIS_ACTION_UPDATE_TRACK:
271  
-    if ( param )
272  
-    {
273  
-      VisTrack* info_param = (VisTrack*)param;
274  
-      ITunesTrack track_info;
275  
-      memset( &track_info, 0, sizeof(track_info) );
276  
-
277  
-      track_info.title        = info_param->title;
278  
-      track_info.artist       = info_param->artist;
279  
-      track_info.album        = info_param->album;
280  
-      track_info.album_artist = info_param->albumArtist;
281  
-      track_info.track_number = info_param->trackNumber;
282  
-      track_info.disc_number  = info_param->discNumber;
283  
-      track_info.duration     = info_param->duration;
284  
-      track_info.year         = info_param->year;
285  
-      track_info.genre        = info_param->genre;
286  
-      track_info.rating       = info_param->rating * 20;
287  
-
288  
-      ivis_set_track_info( g_plugin, &track_info );
289  
-    }
290  
-  }
291  
-  return ret;
292  
-}
293  
-
294  
-//-- GetPresets ---------------------------------------------------------------
295  
-// Return a list of presets to XBMC for display
296  
-//-----------------------------------------------------------------------------
297  
-extern "C" unsigned int GetPresets(char ***pPresets)
298  
-{
299  
-  return 0;
300  
-}
301  
-
302  
-//-- GetPreset ----------------------------------------------------------------
303  
-// Return the index of the current playing preset
304  
-//-----------------------------------------------------------------------------
305  
-extern "C" unsigned GetPreset()
306  
-{
307  
-  return 0;
308  
-}
309  
-
310  
-//-- IsLocked -----------------------------------------------------------------
311  
-// Returns true if this add-on use settings
312  
-//-----------------------------------------------------------------------------
313  
-extern "C" bool IsLocked()
314  
-{
315  
-  return false;
316  
-}
317  
-
318  
-//-- GetSubModules ------------------------------------------------------------
319  
-// Return a list of names and paths for submodules
320  
-//-----------------------------------------------------------------------------
321  
-extern "C" unsigned int GetSubModules(char ***modules)
322  
-{
323  
-  char **path;
324  
-  unsigned int num_plugins;
325  
-  
326  
-  num_plugins = ivis_get_visualisations(modules, &path);
327  
-  free(path);
328  
-  return num_plugins;
329  
-}
330  
-
331  
-//-- Destroy-------------------------------------------------------------------
332  
-// Do everything before unload of this add-on
333  
-// !!! Add-on master function !!!
334  
-//-----------------------------------------------------------------------------
335  
-extern "C" void ADDON_Destroy()
336  
-{
337  
-}
338  
-
339  
-//-- HasSettings --------------------------------------------------------------
340  
-// Returns true if this add-on use settings
341  
-// !!! Add-on master function !!!
342  
-//-----------------------------------------------------------------------------
343  
-extern "C" bool ADDON_HasSettings()
344  
-{
345  
-  return false;
346  
-}
347  
-
348  
-//-- GetStatus ---------------------------------------------------------------
349  
-// Returns the current Status of this visualisation
350  
-// !!! Add-on master function !!!
351  
-//-----------------------------------------------------------------------------
352  
-extern "C" ADDON_STATUS ADDON_GetStatus()
353  
-{
354  
-  return ADDON_STATUS_OK;
355  
-}
356  
-
357  
-//-- GetSettings --------------------------------------------------------------
358  
-// Return the settings for XBMC to display
359  
-// !!! Add-on master function !!!
360  
-//-----------------------------------------------------------------------------
361  
-extern "C" unsigned int ADDON_GetSettings(ADDON_StructSetting ***sSet)
362  
-{
363  
-  return 0;
364  
-}
365  
-
366  
-//-- FreeSettings --------------------------------------------------------------
367  
-// Free the settings struct passed from XBMC
368  
-// !!! Add-on master function !!!
369  
-//-----------------------------------------------------------------------------
370  
-
371  
-extern "C" void ADDON_FreeSettings()
372  
-{
373  
-}
374  
-
375  
-//-- SetSetting ---------------------------------------------------------------
376  
-// Set a specific Setting value (called from XBMC)
377  
-// !!! Add-on master function !!!
378  
-//-----------------------------------------------------------------------------
379  
-extern "C" ADDON_STATUS ADDON_SetSetting(const char *strSetting, const void* value)
380  
-{
381  
-  return ADDON_STATUS_OK;
382  
-}
383  
-
15  xbmc/visualizations/iTunes/Makefile.in
... ...
@@ -1,15 +0,0 @@
1  
-ARCH=@ARCH@
2  
-INCLUDES=-I. -I@abs_top_srcdir@/addons/include
3  
-OBJS=Main.o itunes_vis.o qview.o common_osx.o
4  
-CXXFLAGS=-Wall -g -fPIC
5  
-SLIB=../../../addons/visualization.itunes/iTunes.mvis
6  
-
7  
-$(SLIB): $(OBJS)
8  
-ifeq ($(findstring osx,$(ARCH)), osx)
9  
-	$(CXX) $(CXXFLAGS) $(LDFLAGS) -Wl,-alias_list,@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias \
10  
-		-framework Carbon -bundle -undefined dynamic_lookup -read_only_relocs suppress -o $@ \
11  
-		@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o $(OBJS) 
12  
-endif
13  
-
14  
-include ../../../Makefile.include
15  
-
36  xbmc/visualizations/iTunes/common.h
... ...
@@ -1,36 +0,0 @@
1  
-/*
2  
- *      Copyright (C) 2005-2012 Team XBMC
3  
- *      http://www.xbmc.org
4  
- *
5  
- *  This Program is free software; you can redistribute it and/or modify
6  
- *  it under the terms of the GNU General Public License as published by
7  
- *  the Free Software Foundation; either version 2, or (at your option)
8  
- *  any later version.
9  
- *
10  
- *  This Program is distributed in the hope that it will be useful,
11  
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  
- *  GNU General Public License for more details.
14  
- *
15  
- *  You should have received a copy of the GNU General Public License
16  
- *  along with XBMC; see the file COPYING.  If not, see
17  
- *  <http://www.gnu.org/licenses/>.
18  
- *
19  
- */
20  
-
21  
-#ifndef __ITUNES_VIS_COMMON_H__
22  
-#define __ITUNES_VIS_COMMON_H__
23  
-
24  
-/***********************************************************************/
25  
-/* Common functions that have platform specific implementation         */
26  
-/***********************************************************************/
27  
-
28  
-int   _get_visualisations(char*** names, char*** paths);
29  
-char* _get_visualisation_path(const char* name);
30  
-char* _get_executable_path(const char* plugin_path);
31  
-void  _get_album_art_from_file( const char *filename, Handle* handle, OSType* format );
32  
-
33  
-void  _copy_to_pascal_string( unsigned char dest[], const char* src, int dest_length );
34  
-void  _copy_to_unicode_string( unsigned short dest[], const char* src, int dest_length );
35  
-
36  
-#endif // __ITUNES_VIS_COMMON_H__
263  xbmc/visualizations/iTunes/common_osx.m
... ...
@@ -1,263 +0,0 @@
1  
-/*
2  
- *      Copyright (C) 2005-2012 Team XBMC
3  
- *      http://www.xbmc.org
4  
- *
5  
- *  This Program is free software; you can redistribute it and/or modify
6  
- *  it under the terms of the GNU General Public License as published by
7  
- *  the Free Software Foundation; either version 2, or (at your option)
8  
- *  any later version.
9  
- *
10  
- *  This Program is distributed in the hope that it will be useful,
11  
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  
- *  GNU General Public License for more details.
14  
- *
15  
- *  You should have received a copy of the GNU General Public License
16  
- *  along with XBMC; see the file COPYING.  If not, see
17  
- *  <http://www.gnu.org/licenses/>.
18  
- *
19  
- */
20  
-
21  
-/*********************************************************************/
22  
-/* OS X implementation of common platform specific functions         */
23  
-/*********************************************************************/
24  
-
25  
-#import <Cocoa/Cocoa.h>
26  
-#import <Quartz/Quartz.h>
27  
-
28  
-#include "common.h"
29  
-
30  
-void     find_normal_plugins     ( NSArray* searchPaths, NSMutableDictionary* pluginMap );
31  
-void     find_composition_plugins( NSMutableDictionary* pluginMap );
32  
-
33  
-NSArray* get_search_paths()
34  
-{
35  
-  return [ [ NSArray alloc ] initWithObjects:
36  
-                               @"/Library/iTunes/iTunes Plug-ins",
37  
-                               @"~/Library/iTunes/iTunes Plug-ins",
38  
-                               @"~/Library/Application Support/XBMC/visualisations/iTunes",
39  
-                               nil ];
40  
-}
41  
-
42  
-/*********************************************************************/
43  
-/* _get_visualisations                                              */
44  
-/*********************************************************************/
45  
-int _get_visualisations(char*** names, char*** paths)
46  
-{
47  
-  /* search for iTunes visualisers in the following directories */
48  
-  NSArray *searchPaths = get_search_paths();
49  
-
50  
-  NSMutableDictionary *pluginMap = [ [ NSMutableDictionary alloc ] init ];
51  
-  NSEnumerator        *pluginEnumerator;
52  
-
53  
-  /* search the searchPaths for iTunes plugins */
54  
-  find_normal_plugins     ( searchPaths, pluginMap );
55  
-  //find_composition_plugins( pluginMap );
56  
-
57  
-  /* allocate enough memory for the names and paths of the plugins */
58  
-  int pluginCount = [ [ pluginMap allKeys ] count ];
59  
-  *names = (char**)calloc( pluginCount, sizeof(char *) );
60  
-  *paths = (char**)calloc( pluginCount, sizeof(char *) );
61  
-
62  
-  /* populate 'names' and 'paths' */
63  
-  int current = 0;
64  
-  if ( names && paths )
65  
-  {
66  
-    NSString *pluginName;
67  
-
68  
-    pluginEnumerator = [ pluginMap keyEnumerator ];
69  
-    while ( ( pluginName = [ pluginEnumerator nextObject ] ) )
70  
-    {
71  
-      const char *cStringName = [ pluginName cStringUsingEncoding: NSASCIIStringEncoding ];
72  
-      const char *cStringPath = [ [ pluginMap objectForKey: pluginName ] cStringUsingEncoding: NSASCIIStringEncoding ];
73  
-
74  
-      if ( cStringName && cStringPath )
75  
-      {
76  
-        char *name = *( *names + current ) = (char*)malloc( strlen(cStringName) * sizeof(char) + 1 );
77  
-        char *path = *( *paths + current ) = (char*)malloc( strlen(cStringPath) * sizeof(char) + 1 );
78  
-
79  
-        if ( name && path )
80  
-        {
81  
-          strcpy( name, cStringName );
82  
-          strcpy( path, cStringPath );
83  
-          current++;
84  
-        }
85  
-      }
86  
-    }
87  
-  }
88  
-
89  
-  /* free the plugin map */
90  
-  [ pluginMap removeAllObjects ];
91  
-  [ pluginMap release ];
92  
-  [ searchPaths release ];
93  
-
94  
-  /* return the number of plugins that were loaded */
95  
-  return current;
96  
-}
97  
-
98  
-/*********************************************************************/
99  
-/* _get_visualisation_path                                           */
100  
-/*********************************************************************/
101  
-char* _get_visualisation_path( const char* name )
102  
-{
103  
-  /* search for iTunes visualisers in the following directories */
104  
-  NSArray *searchPaths = get_search_paths();
105  
-  NSMutableDictionary *pluginMap = [ [ NSMutableDictionary alloc ] init ];
106  
-  NSString *pluginName = [ NSString stringWithCString: name
107  
-                                    encoding: NSASCIIStringEncoding ];
108  
-
109  
-  /* search the searchPaths for iTunes plugins */
110  
-  find_normal_plugins     ( searchPaths, pluginMap );
111  
-  find_composition_plugins( pluginMap );
112  
-
113  
-  NSString* pluginPath = [ pluginMap objectForKey: pluginName ];
114  
-  if ( pluginPath )
115  
-  {
116  
-    int strLength = [ pluginPath lengthOfBytesUsingEncoding: NSASCIIStringEncoding ] + 1;
117  
-    char *path = (char*)malloc( strLength );
118  
-    if ( path )
119  
-    {
120  
-      strncpy( path, [ pluginPath cStringUsingEncoding: NSASCIIStringEncoding ], strLength );
121  
-      return path;
122  
-    }
123  
-  }
124  
-  return NULL;
125  
-}
126  
-
127  
-/*********************************************************************/
128  
-/* _get_executable_path                                              */
129  
-/*********************************************************************/
130  
-char* _get_executable_path( const char* plugin_path )
131  
-{
132  
-  char *exe_path = NULL;
133  
-  NSString *pluginPath = [ NSString stringWithCString: plugin_path encoding: NSASCIIStringEncoding ];
134  
-  NSBundle *pluginBundle = [ NSBundle bundleWithPath: pluginPath ];
135  
-
136  
-  if ( pluginBundle )
137  
-  {
138  
-    NSString *ns_exe_path = [ pluginBundle executablePath ];
139  
-    if ( ns_exe_path )
140  
-    {
141  
-      int strLength = [ ns_exe_path lengthOfBytesUsingEncoding: NSASCIIStringEncoding ] + 1;
142  
-      exe_path = (char*)malloc( strLength );
143  
-      if ( exe_path )
144  
-      {
145  
-        strncpy( exe_path, [ ns_exe_path cStringUsingEncoding: NSASCIIStringEncoding ], strLength );
146  
-      }
147  
-    }
148  
-  }
149  
-  return exe_path;
150  
-}
151  
-
152  
-/*********************************************************************/
153  
-/* _copy_to_pascal_string                                            */
154  
-/*********************************************************************/
155  
-void  _copy_to_pascal_string( unsigned char dest[], const char* src, int dest_length )
156  
-{
157  
-  CFStringGetPascalString( (CFStringRef)[NSString stringWithCString: src encoding: NSUTF8StringEncoding ],
158  
-                           (StringPtr)dest, dest_length, kCFStringEncodingASCII );
159  
-}
160  
-
161  
-/*********************************************************************/
162  
-/* _copy_to_unicode_string                                           */
163  
-/*********************************************************************/
164  
-void  _copy_to_unicode_string( unsigned short dest[], const char* src, int dest_length )
165  
-{
166  
-  NSString *srcString = [NSString stringWithCString: src encoding: NSUTF8StringEncoding ];
167  
-  [ srcString getCString: (char*)dest maxLength: dest_length encoding: NSUnicodeStringEncoding ];
168  
-}
169  
-
170  
-/*********************************************************************/
171  
-/* _get_album_art_from_file                                          */
172  
-/*********************************************************************/
173  
-void  _get_album_art_from_file( const char *filename, Handle* handle, OSType* format )
174  
-{
175  
-  NSString *album_art_file = [ NSString stringWithUTF8String: filename ];
176  
-  NSData *album_art_data   = [ [ NSData alloc ] initWithContentsOfFile: album_art_file ];
177  
-  if ( album_art_data != nil )
178  
-  {
179  
-    PtrToHand( [ album_art_data bytes ], handle, [ album_art_data length ] );
180  
-    NSString *type = NSHFSTypeOfFile( album_art_file );
181  
-    NSLog( @"Type: %@ (length=%d)", type, [type length] );
182  
-
183  
-    /* since XBMC thumbs usually have .tbn extension, we'll likely not
184  
-       get a match. For now, default to OSType 'JPEG' until we have a
185  
-       proper image type detection mechanism. */
186  
-    if ( [ type isEqualToString:@"''" ] )
187  
-      *format = 'JPEG';
188  
-    else
189  
-      *format = NSHFSTypeCodeFromFileType(type);
190  
-  }
191  
-}
192  
-
193  
-/*********************************************************************/
194  
-/* find_composition_plugins                                          */
195  
-/*********************************************************************/
196  
-void find_composition_plugins( NSMutableDictionary* pluginMap )
197  
-#if (MAC_OS_X_VERSION_MAX_ALLOWED <= 1040)
198  
-{
199  
-  /* QCComposition and QCCompositionRepository are 10.5 only */
200  
-  return;
201  
-}
202  
-#else
203  
-{
204  
-  QCCompositionRepository *repo = [ QCCompositionRepository sharedCompositionRepository ];
205  
-  if ( repo )
206  
-  {
207  
-    NSArray *visualisers = [ repo compositionsWithProtocols:
208  
-                    [ NSArray arrayWithObjects:
209  
-                        @"com.apple.QuartzComposer.protocol.visualizer-music",
210  
-                            nil ]
211  
-                  andAttributes: nil ];
212  
-    if ( visualisers )
213  
-    {
214  
-      QCComposition *vis;
215  
-      NSString      *pluginName;
216  
-
217  
-      for ( vis in visualisers )
218  
-      {
219  
-        /* get plugin name */
220  
-        pluginName = [ [ vis attributes ] objectForKey: QCCompositionAttributeNameKey ];
221  
-
222  
-        /* add plugin to plugin map using an empty string as path */
223  
-        [ pluginMap setObject: @"" forKey: [ pluginName retain ] ];
224  
-      }
225  
-    }
226  
-  }
227  
-}
228  
-#endif
229  
-
230  
-/*********************************************************************/
231  
-/* find_normal_plugins                                               */
232  
-/*********************************************************************/
233  
-void find_normal_plugins( NSArray* searchPaths, NSMutableDictionary* pluginMap )
234  
-{
235  
-  NSString *path;
236  
-  NSEnumerator *pluginEnumerator;
237  
-  NSEnumerator *pathEnumerator = [ searchPaths objectEnumerator ];
238  
-
239  
-  while ( ( path = [ pathEnumerator nextObject ] ) )
240  
-  {
241  
-    path = [ path stringByExpandingTildeInPath ];
242  
-    NSString  *pluginPath;
243  
-    NSArray   *plugins = [ NSBundle pathsForResourcesOfType:@"bundle" inDirectory:path ];
244  
-
245  
-    pluginEnumerator = [ plugins objectEnumerator ];
246  
-    while( ( pluginPath = [ pluginEnumerator nextObject ] ) )
247  
-    {
248  
-      NSBundle *pluginBundle = nil;
249  
-      NSString *pluginName   = nil;
250  
-
251  
-      pluginName   = [ pluginPath lastPathComponent ];
252  
-      pluginBundle = [ NSBundle bundleWithPath: pluginPath ];
253  
-
254  
-      if ( pluginBundle && pluginName
255  
-           && ( pluginName = [ pluginName stringByDeletingPathExtension ] )
256  
-           && ( [ pluginName compare: @"Quartz Composer Visualizer" ] != 0 ) )
257  
-      {
258  
-        /* save the path and name to the plugin map */
259  
-        [ pluginMap setValue: pluginPath forKey: pluginName ];
260  
-      }
261  
-    }
262  
-  }
263  
-}
424  xbmc/visualizations/iTunes/iTunesAPI.c
... ...
@@ -1,424 +0,0 @@
1  
-//
2  
-// File:       iTunesAPI.c
3  
-//
4  
-// Abstract:   part of iTunes Visual SDK
5  
-//
6  
-// Version:    1.2
7  
-//
8  
-// Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple Inc. ( "Apple" )
9  
-//             in consideration of your agreement to the following terms, and your use,
10  
-//             installation, modification or redistribution of this Apple software
11  
-//             constitutes acceptance of these terms.  If you do not agree with these
12  
-//             terms, please do not use, install, modify or redistribute this Apple
13  
-//             software.
14  
-//
15  
-//             In consideration of your agreement to abide by the following terms, and
16  
-//             subject to these terms, Apple grants you a personal, non - exclusive
17  
-//             license, under Apple's copyrights in this original Apple software ( the
18  
-//             "Apple Software" ), to use, reproduce, modify and redistribute the Apple
19  
-//             Software, with or without modifications, in source and / or binary forms;
20  
-//             provided that if you redistribute the Apple Software in its entirety and
21  
-//             without modifications, you must retain this notice and the following text
22  
-//             and disclaimers in all such redistributions of the Apple Software. Neither
23  
-//             the name, trademarks, service marks or logos of Apple Inc. may be used to
24  
-//             endorse or promote products derived from the Apple Software without specific
25  
-//             prior written permission from Apple.  Except as expressly stated in this
26  
-//             notice, no other rights or licenses, express or implied, are granted by
27  
-//             Apple herein, including but not limited to any patent rights that may be
28  
-//             infringed by your derivative works or by other works in which the Apple
29  
-//             Software may be incorporated.
30  
-//
31  
-//             The Apple Software is provided by Apple on an "AS IS" basis.  APPLE MAKES NO
32  
-//             WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
33  
-//             WARRANTIES OF NON - INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
34  
-//             PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION
35  
-//             ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
36  
-//
37  
-//             IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
38  
-//             CONSEQUENTIAL DAMAGES ( INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
39  
-//             SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
40  
-//             INTERRUPTION ) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION
41  
-//             AND / OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
42  
-//             UNDER THEORY OF CONTRACT, TORT ( INCLUDING NEGLIGENCE ), STRICT LIABILITY OR
43  
-//             OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44  
-//
45  
-// Copyright ( C ) 2000-2007 Apple Inc. All Rights Reserved.
46  
-//
47  
-
48  
-#include "iTunesAPI.h"
49  
-#include "iTunesVisualAPI.h"
50  
-
51  
-// MyMemClear
52  
-//
53  
-static void MyMemClear (LogicalAddress dest, SInt32 length)
54  
-{
55  
-	register unsigned char	*ptr;
56  
-
57  
-	ptr = (unsigned char *) dest;
58  
-	
59  
-	if( length > 16 )
60  
-	{
61  
-		register unsigned long	*longPtr;
62  
-		
63  
-		while( ((unsigned long) ptr & 3) != 0 )
64  
-		{
65  
-			*ptr++ = 0;
66  
-			--length;
67  
-		}
68  
-		
69  
-		longPtr = (unsigned long *) ptr;
70  
-		
71  
-		while( length >= 4 )
72  
-		{
73  
-			*longPtr++ 	= 0;
74  
-			length		-= 4;
75  
-		}
76  
-		
77  
-		ptr = (unsigned char *) longPtr;
78  
-	}
79  
-	
80  
-	while( --length >= 0 )
81  
-	{
82  
-		*ptr++ = 0;
83  
-	}
84  
-}
85  
-
86  
-
87  
-// SetNumVersion
88  
-//
89  
-void SetNumVersion (NumVersion *numVersion, UInt8 majorRev, UInt8 minorAndBugRev, UInt8 stage, UInt8 nonRelRev)
90  
-{
91  
-	numVersion->majorRev		= majorRev;
92  
-	numVersion->minorAndBugRev	= minorAndBugRev;
93  
-	numVersion->stage			= stage;
94  
-	numVersion->nonRelRev		= nonRelRev;
95  
-}
96  
-
97  
-
98  
-// ITCallApplication
99  
-//
100  
-static OSStatus ITCallApplicationInternal (void *appCookie, ITAppProcPtr handler, OSType message, UInt32 messageMajorVersion, UInt32 messageMinorVersion, PlayerMessageInfo *messageInfo)
101  
-{
102  
-	PlayerMessageInfo	localMessageInfo;
103  
-	
104  
-	if (messageInfo == nil)
105  
-	{
106  
-		MyMemClear(&localMessageInfo, sizeof(localMessageInfo));
107  
-		
108  
-		messageInfo = &localMessageInfo;
109  
-	}
110  
-	
111  
-	messageInfo->messageMajorVersion = messageMajorVersion;
112  
-	messageInfo->messageMinorVersion = messageMinorVersion;
113  
-	messageInfo->messageInfoSize	 = sizeof(PlayerMessageInfo);
114  
-	
115  
-	return handler(appCookie, message, messageInfo);
116  
-}
117  
-
118  
-// ITCallApplication
119  
-//
120  
-OSStatus ITCallApplication (void *appCookie, ITAppProcPtr handler, OSType message, PlayerMessageInfo *messageInfo)
121  
-{
122  
-	return ITCallApplicationInternal(appCookie, handler, message, kITPluginMajorMessageVersion, kITPluginMinorMessageVersion, messageInfo);
123  
-}
124  
-
125  
-
126  
-// PlayerSetFullScreen
127  
-//
128  
-OSStatus PlayerSetFullScreen (void *appCookie, ITAppProcPtr appProc, Boolean fullScreen)
129  
-{
130  
-	PlayerMessageInfo	messageInfo;
131  
-	
132  
-	MyMemClear(&messageInfo, sizeof(messageInfo));
133  
-	
134  
-	messageInfo.u.setFullScreenMessage.fullScreen = fullScreen;
135  
-
136  
-	return ITCallApplication(appCookie, appProc, kPlayerSetFullScreenMessage, &messageInfo);
137  
-}
138  
-
139  
-
140  
-// PlayerSetFullScreenOptions
141  
-//
142  
-OSStatus PlayerSetFullScreenOptions (void *appCookie, ITAppProcPtr appProc, SInt16 minBitDepth, SInt16 maxBitDepth, SInt16 preferredBitDepth, SInt16 desiredWidth, SInt16 desiredHeight)
143  
-{
144  
-	PlayerMessageInfo	messageInfo;
145  
-	
146  
-	MyMemClear(&messageInfo, sizeof(messageInfo));
147  
-	
148  
-	messageInfo.u.setFullScreenOptionsMessage.minBitDepth		= minBitDepth;
149  
-	messageInfo.u.setFullScreenOptionsMessage.maxBitDepth		= maxBitDepth;
150  
-	messageInfo.u.setFullScreenOptionsMessage.preferredBitDepth = preferredBitDepth;
151  
-	messageInfo.u.setFullScreenOptionsMessage.desiredWidth		= desiredWidth;
152  
-	messageInfo.u.setFullScreenOptionsMessage.desiredHeight		= desiredHeight;
153  
-
154  
-	return ITCallApplication(appCookie, appProc, kPlayerSetFullScreenOptionsMessage, &messageInfo);
155  
-}
156  
-
157  
-// PlayerGetCurrentTrackCoverArt
158  
-//
159  
-OSStatus PlayerGetCurrentTrackCoverArt (void *appCookie, ITAppProcPtr appProc, Handle *coverArt, OSType *coverArtFormat)
160  
-{
161  
-	OSStatus			status;
162  
-	PlayerMessageInfo	messageInfo;
163  
-	
164  
-	MyMemClear(&messageInfo, sizeof(messageInfo));
165  
-	
166  
-	messageInfo.u.getCurrentTrackCoverArtMessage.coverArt = nil;
167  
-
168  
-	status = ITCallApplication(appCookie, appProc, kPlayerGetCurrentTrackCoverArtMessage, &messageInfo);
169  
-
170  
-	*coverArt = messageInfo.u.getCurrentTrackCoverArtMessage.coverArt;
171  
-	if (coverArtFormat)
172  
-		*coverArtFormat = messageInfo.u.getCurrentTrackCoverArtMessage.coverArtFormat;
173  
-	return status;
174  
-}
175  
-
176  
-// PlayerGetPluginData
177  
-//
178  
-OSStatus PlayerGetPluginData (void *appCookie, ITAppProcPtr appProc, void *dataPtr, UInt32 dataBufferSize, UInt32 *dataSize)
179  
-{
180  
-	OSStatus			status;
181  
-	PlayerMessageInfo	messageInfo;
182  
-	
183  
-	MyMemClear(&messageInfo, sizeof(messageInfo));
184  
-	
185  
-	messageInfo.u.getPluginDataMessage.dataPtr			= dataPtr;
186  
-	messageInfo.u.getPluginDataMessage.dataBufferSize	= dataBufferSize;
187  
-	
188  
-	status = ITCallApplication(appCookie, appProc, kPlayerGetPluginDataMessage, &messageInfo);
189  
-	
190  
-	if (dataSize != nil)
191  
-		*dataSize = messageInfo.u.getPluginDataMessage.dataSize;
192  
-	
193  
-	return status;
194  
-}
195  
-
196  
-
197  
-// PlayerSetPluginData
198  
-//
199  
-OSStatus PlayerSetPluginData (void *appCookie, ITAppProcPtr appProc, void *dataPtr, UInt32 dataSize)
200  
-{
201  
-	PlayerMessageInfo	messageInfo;
202  
-	
203  
-	MyMemClear(&messageInfo, sizeof(messageInfo));
204  
-	
205  
-	messageInfo.u.setPluginDataMessage.dataPtr	= dataPtr;
206  
-	messageInfo.u.setPluginDataMessage.dataSize	= dataSize;
207  
-	
208  
-	return ITCallApplication(appCookie, appProc, kPlayerSetPluginDataMessage, &messageInfo);
209  
-}
210  
-
211  
-
212  
-// PlayerGetPluginNamedData
213  
-//
214  
-OSStatus PlayerGetPluginNamedData (void *appCookie, ITAppProcPtr appProc, ConstStringPtr dataName, void *dataPtr, UInt32 dataBufferSize, UInt32 *dataSize)
215  
-{
216  
-	OSStatus			status;
217  
-	PlayerMessageInfo	messageInfo;
218  
-	
219  
-	MyMemClear(&messageInfo, sizeof(messageInfo));
220  
-	
221  
-	messageInfo.u.getPluginNamedDataMessage.dataName		= dataName;
222  
-	messageInfo.u.getPluginNamedDataMessage.dataPtr			= dataPtr;
223  
-	messageInfo.u.getPluginNamedDataMessage.dataBufferSize	= dataBufferSize;
224  
-	
225  
-	status = ITCallApplication(appCookie, appProc, kPlayerGetPluginNamedDataMessage, &messageInfo);
226  
-	
227  
-	if (dataSize != nil)
228  
-		*dataSize = messageInfo.u.getPluginNamedDataMessage.dataSize;
229  
-	
230  
-	return status;
231  
-}
232  
-
233  
-
234  
-// PlayerSetPluginNamedData
235  
-//
236  
-OSStatus PlayerSetPluginNamedData (void *appCookie, ITAppProcPtr appProc, ConstStringPtr dataName, void *dataPtr, UInt32 dataSize)
237  
-{
238  
-	PlayerMessageInfo	messageInfo;
239  
-	
240  
-	MyMemClear(&messageInfo, sizeof(messageInfo));
241  
-	
242  
-	messageInfo.u.setPluginNamedDataMessage.dataName	= dataName;
243  
-	messageInfo.u.setPluginNamedDataMessage.dataPtr		= dataPtr;
244  
-	messageInfo.u.setPluginNamedDataMessage.dataSize	= dataSize;
245  
-	
246  
-	return ITCallApplication(appCookie, appProc, kPlayerSetPluginNamedDataMessage, &messageInfo);
247  
-}
248  
-
249  
-
250  
-// PlayerIdle
251  
-//
252  
-OSStatus PlayerIdle (void *appCookie, ITAppProcPtr appProc)
253  
-{
254  
-	return ITCallApplication(appCookie, appProc, kPlayerIdleMessage, nil);
255  
-}
256  
-
257  
-
258  
-// PlayerShowAbout
259  
-//
260  
-void PlayerShowAbout (void *appCookie, ITAppProcPtr appProc)
261  
-{
262  
-	ITCallApplication(appCookie, appProc, kPlayerShowAboutMessage, nil);
263  
-}
264  
-
265  
-
266  
-// PlayerOpenURL
267  
-//
268  
-void PlayerOpenURL (void *appCookie, ITAppProcPtr appProc, SInt8 *string, UInt32 length)
269  
-{
270  
-	PlayerMessageInfo	messageInfo;
271  
-	
272  
-	MyMemClear(&messageInfo, sizeof(messageInfo));
273  
-	
274  
-	messageInfo.u.openURLMessage.url	= string;
275  
-	messageInfo.u.openURLMessage.length	= length;
276  
-
277  
-	ITCallApplication(appCookie, appProc, kPlayerOpenURLMessage, &messageInfo);
278  
-}
279  
-
280  
-// PlayerUnregisterPlugin
281  
-//
282  
-OSStatus PlayerUnregisterPlugin (void *appCookie, ITAppProcPtr appProc, PlayerMessageInfo *messageInfo)
283  
-{
284  
-	return ITCallApplication(appCookie, appProc, kPlayerUnregisterPluginMessage, messageInfo);
285  
-}
286  
-
287  
-
288  
-// PlayerRegisterVisualPlugin
289  
-//
290  
-OSStatus PlayerRegisterVisualPlugin (void *appCookie, ITAppProcPtr appProc, PlayerMessageInfo *messageInfo)
291  
-{
292  
-	return ITCallApplicationInternal(appCookie, appProc, kPlayerRegisterVisualPluginMessage, kITVisualPluginMajorMessageVersion, kITVisualPluginMinorMessageVersion, messageInfo);
293  
-}
294  
-
295  
-
296  
-// PlayerHandleMacOSEvent
297  
-//
298  
-OSStatus PlayerHandleMacOSEvent (void *appCookie, ITAppProcPtr appProc, const EventRecord *theEvent, Boolean *eventHandled)
299  
-{
300  
-	PlayerMessageInfo	messageInfo;
301  
-	OSStatus			status;
302  
-	
303  
-	MyMemClear(&messageInfo, sizeof(messageInfo));
304  
-	
305  
-	messageInfo.u.handleMacOSEventMessage.theEvent = theEvent;
306  
-		
307  
-	status = ITCallApplication(appCookie, appProc, kPlayerHandleMacOSEventMessage, &messageInfo);
308  
-	
309  
-	if( eventHandled != nil )
310  
-		*eventHandled = messageInfo.u.handleMacOSEventMessage.handled;
311  
-	
312  
-	return status;
313  
-}
314  
-
315  
-// PlayerGetPluginFileSpec
316  
-//
317  
-#if TARGET_OS_MAC
318