1 |
abcd 09/12/25 15:31:47 |
2 |
|
3 |
Added: phonon-4.4-qt7.patch |
4 |
Log: |
5 |
Add prefix support, revbump due to otherwise unresolvable USE deps |
6 |
(Portage version: -svn/cvs/Linux i686) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 media-sound/phonon/files/phonon-4.4-qt7.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/phonon/files/phonon-4.4-qt7.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/phonon/files/phonon-4.4-qt7.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: phonon-4.4-qt7.patch |
15 |
=================================================================== |
16 |
Desc: Fix the QuickTime7 plugin for MacOS. Probably needs 10.6. |
17 |
Author: Heiko Przybyl <zuxez@××××××××××××.de> |
18 |
--- phonon-4.4_pre20090520/qt7/backendinfo.mm.orig 2009-10-10 17:54:22 +0200 |
19 |
+++ phonon-4.4_pre20090520/qt7/backendinfo.mm 2009-10-10 17:52:13 +0200 |
20 |
@@ -22,6 +22,7 @@ |
21 |
#include <AudioUnit/AudioUnit.h> |
22 |
#include <CoreServices/CoreServices.h> |
23 |
|
24 |
+#include <QtGui/qmacdefines_mac.h> |
25 |
#import <QTKit/QTMovie.h> |
26 |
|
27 |
#ifdef QUICKTIME_C_API_AVAILABLE |
28 |
--- phonon-4.4_pre20090520/qt7/quicktimevideoplayer.h.orig 2009-10-10 19:42:17 +0200 |
29 |
+++ phonon-4.4_pre20090520/qt7/quicktimevideoplayer.h 2009-10-10 20:25:49 +0200 |
30 |
@@ -20,6 +20,7 @@ |
31 |
|
32 |
#include "backendheader.h" |
33 |
|
34 |
+#include <QtGui/qmacdefines_mac.h> |
35 |
#import <QTKit/QTDataReference.h> |
36 |
#import <QTKit/QTMovie.h> |
37 |
|
38 |
--- phonon-4.4_pre20090520/qt7/CMakeLists.txt.orig 2009-10-10 22:09:10 +0200 |
39 |
+++ phonon-4.4_pre20090520/qt7/CMakeLists.txt 2009-10-10 22:09:19 +0200 |
40 |
@@ -43,6 +43,7 @@ if (BUILD_PHONON_QT7) |
41 |
) |
42 |
|
43 |
automoc4_add_library(phonon_qt7 MODULE ${phonon_qt7_SRCS}) |
44 |
+ set_target_properties(phonon_qt7 PROPERTIES PREFIX "") |
45 |
target_link_libraries(phonon_qt7 |
46 |
${QT_QTGUI_LIBRARY} ${QT_QTOPENGL_LIBRARY} |
47 |
${PHONON_LIBS} |
48 |
@@ -46,7 +46,6 @@ if (BUILD_PHONON_QT7) |
49 |
target_link_libraries(phonon_qt7 |
50 |
${QT_QTGUI_LIBRARY} ${QT_QTOPENGL_LIBRARY} |
51 |
${PHONON_LIBS} |
52 |
- "-framework QuickTime" |
53 |
"-framework AudioUnit" |
54 |
"-framework AudioToolbox" |
55 |
"-framework CoreAudio" |
56 |
@@ -53,6 +54,6 @@ if (BUILD_PHONON_QT7) |
57 |
"-framework QuartzCore" |
58 |
"-framework QTKit" |
59 |
) |
60 |
- install(TARGETS phonon_qt7 DESTINATION ${PLUGIN_INSTALL_DIR}) |
61 |
+ install(TARGETS phonon_qt7 DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/phonon_backend) |
62 |
|
63 |
endif (BUILD_PHONON_QT7) |
64 |
--- phonon-4.4_pre20090520/qt7/audioeffects.h.orig 2009-10-10 20:42:45 +0200 |
65 |
+++ phonon-4.4_pre20090520/qt7/audioeffects.h 2009-10-10 20:42:54 +0200 |
66 |
@@ -37,7 +37,7 @@ namespace QT7 |
67 |
AudioEffectAudioNode(int effectType); |
68 |
int m_effectType; |
69 |
|
70 |
- ComponentDescription getAudioNodeDescription() const; |
71 |
+ AudioComponentDescription getAudioNodeDescription() const; |
72 |
void initializeAudioUnit(); |
73 |
|
74 |
QVariant parameterValue(const Phonon::EffectParameter &value) const; |
75 |
--- phonon-4.4_pre20090520/qt7/audioeffects.mm.orig 2009-10-10 20:42:41 +0200 |
76 |
+++ phonon-4.4_pre20090520/qt7/audioeffects.mm 2009-10-10 21:52:44 +0200 |
77 |
@@ -29,9 +29,9 @@ AudioEffectAudioNode::AudioEffectAudioNo |
78 |
{ |
79 |
} |
80 |
|
81 |
-ComponentDescription AudioEffectAudioNode::getAudioNodeDescription() const |
82 |
+AudioComponentDescription AudioEffectAudioNode::getAudioNodeDescription() const |
83 |
{ |
84 |
- ComponentDescription d; |
85 |
+ AudioComponentDescription d; |
86 |
d.componentType = kAudioUnitType_Effect; |
87 |
d.componentSubType = m_effectType; |
88 |
d.componentManufacturer = kAudioUnitManufacturer_Apple; |
89 |
@@ -62,10 +62,10 @@ QVariant AudioEffectAudioNode::parameter |
90 |
} else { |
91 |
// Use default value: |
92 |
AudioUnit tmpAudioUnit; |
93 |
- ComponentDescription description = getAudioNodeDescription(); |
94 |
- Component component = FindNextComponent(0, &description); |
95 |
+ AudioComponentDescription description = getAudioNodeDescription(); |
96 |
+ AudioComponent component = AudioComponentFindNext(0, &description); |
97 |
BACKEND_ASSERT3(component, "Could not get parameters of audio effect.", NORMAL_ERROR, QVariant()) |
98 |
- OSErr err = OpenAComponent(component, &tmpAudioUnit); |
99 |
+ OSErr err = AudioComponentInstanceNew(component, &tmpAudioUnit); |
100 |
BACKEND_ASSERT3(err == noErr, "Could not get parameters of audio effect.", NORMAL_ERROR, QVariant()) |
101 |
AudioUnitParameterInfo info; |
102 |
UInt32 size = sizeof(info); |
103 |
@@ -87,10 +87,10 @@ void AudioEffectAudioNode::setParameterV |
104 |
m_alteredParameters.remove(parameter.id()); |
105 |
if (m_audioUnit){ |
106 |
AudioUnit tmpAudioUnit; |
107 |
- ComponentDescription description = getAudioNodeDescription(); |
108 |
- Component component = FindNextComponent(0, &description); |
109 |
+ AudioComponentDescription description = getAudioNodeDescription(); |
110 |
+ AudioComponent component = AudioComponentFindNext(0, &description); |
111 |
BACKEND_ASSERT2(component, "Could not get parameters of audio effect.", NORMAL_ERROR) |
112 |
- OSErr err = OpenAComponent(component, &tmpAudioUnit); |
113 |
+ OSErr err = AudioComponentInstanceNew(component, &tmpAudioUnit); |
114 |
BACKEND_ASSERT2(err == noErr, "Could not get parameters of audio effect.", NORMAL_ERROR) |
115 |
AudioUnitParameterInfo info; |
116 |
UInt32 size = sizeof(info); |
117 |
@@ -121,10 +121,10 @@ QList<Phonon::EffectParameter> AudioEffe |
118 |
QList<Phonon::EffectParameter> effectList; |
119 |
// Create a temporary audio unit: |
120 |
AudioUnit audioUnit; |
121 |
- ComponentDescription description = m_audioNode->getAudioNodeDescription(); |
122 |
- Component component = FindNextComponent(0, &description); |
123 |
+ AudioComponentDescription description = m_audioNode->getAudioNodeDescription(); |
124 |
+ AudioComponent component = AudioComponentFindNext(0, &description); |
125 |
BACKEND_ASSERT3(component, "Could not get parameters of audio effect.", NORMAL_ERROR, effectList) |
126 |
- OSErr err = OpenAComponent(component, &audioUnit); |
127 |
+ OSErr err = AudioComponentInstanceNew(component, &audioUnit); |
128 |
BACKEND_ASSERT3(err == noErr, "Could not get parameters of audio effect.", NORMAL_ERROR, effectList) |
129 |
|
130 |
UInt32 size = 0; |
131 |
@@ -149,29 +149,25 @@ QList<Phonon::EffectParameter> AudioEffe |
132 |
|
133 |
QString AudioEffect::name() |
134 |
{ |
135 |
- ComponentDescription description = m_audioNode->getAudioNodeDescription(); |
136 |
- Component component = FindNextComponent(0, &description); |
137 |
+ AudioComponentDescription description = m_audioNode->getAudioNodeDescription(); |
138 |
+ AudioComponent component = AudioComponentFindNext(0, &description); |
139 |
BACKEND_ASSERT3(component, "Could not get audio effect name.", NORMAL_ERROR, QLatin1String("<unknown effect>")) |
140 |
|
141 |
- ComponentDescription cDesc; |
142 |
- Handle nameH = NewHandle(0); |
143 |
- GetComponentInfo(component, &cDesc, nameH, 0, 0); |
144 |
- HLock(nameH); |
145 |
- char *namePtr = *nameH; |
146 |
- int len = *namePtr++; |
147 |
- namePtr[len] = 0; |
148 |
- QString qsName = QString::fromUtf8(namePtr); |
149 |
- DisposeHandle(nameH); |
150 |
+ CFStringRef n; |
151 |
+ AudioComponentCopyName(component, &n); |
152 |
+ // Or use CFStringGetCString? |
153 |
+ QString qsName = QString::fromUtf8(CFStringGetCStringPtr(n, kCFStringEncodingUTF8)); |
154 |
return qsName; |
155 |
} |
156 |
|
157 |
QString AudioEffect::description() |
158 |
{ |
159 |
- ComponentDescription description = m_audioNode->getAudioNodeDescription(); |
160 |
- Component component = FindNextComponent(0, &description); |
161 |
+ AudioComponentDescription description = m_audioNode->getAudioNodeDescription(); |
162 |
+#if 0 |
163 |
+ AudioComponent component = AudioComponentFindNext(0, &description); |
164 |
BACKEND_ASSERT3(component, "Could not get audio effect description.", NORMAL_ERROR, QLatin1String("<unknown effect>")) |
165 |
|
166 |
- ComponentDescription cDesc; |
167 |
+ AudioComponentDescription cDesc; |
168 |
Handle descH = NewHandle(0); |
169 |
GetComponentInfo(component, &cDesc, 0, descH, 0); |
170 |
HLock(descH); |
171 |
@@ -180,6 +176,9 @@ QString AudioEffect::description() |
172 |
descPtr[len] = 0; |
173 |
QString qsDesc = QString::fromUtf8(descPtr); |
174 |
DisposeHandle(descH); |
175 |
+#else |
176 |
+ QString qsDesc; |
177 |
+#endif |
178 |
return qsDesc; |
179 |
} |
180 |
|
181 |
@@ -187,19 +186,19 @@ QList<int> AudioEffect::effectList() |
182 |
{ |
183 |
QList<int> effects; |
184 |
|
185 |
- ComponentDescription d; |
186 |
+ AudioComponentDescription d; |
187 |
d.componentType = kAudioUnitType_Effect; |
188 |
d.componentSubType = 0; |
189 |
d.componentManufacturer = 0; |
190 |
d.componentFlags = 0; |
191 |
d.componentFlagsMask = 0; |
192 |
- Component component = FindNextComponent(0, &d); |
193 |
+ AudioComponent component = AudioComponentFindNext(0, &d); |
194 |
|
195 |
while (component) { |
196 |
- ComponentDescription cDesc; |
197 |
- GetComponentInfo(component, &cDesc, 0, 0, 0); |
198 |
+ AudioComponentDescription cDesc; |
199 |
+ AudioComponentGetDescription(component, &cDesc); |
200 |
effects << cDesc.componentSubType; |
201 |
- component = FindNextComponent(component, &d); |
202 |
+ component = AudioComponentFindNext(component, &d); |
203 |
} |
204 |
return effects; |
205 |
} |
206 |
--- phonon-4.4_pre20090520/qt7/audiomixer.h.orig 2009-10-10 21:55:44 +0200 |
207 |
+++ phonon-4.4_pre20090520/qt7/audiomixer.h 2009-10-10 21:56:01 +0200 |
208 |
@@ -41,7 +41,7 @@ namespace QT7 |
209 |
float volume(int bus = 0); |
210 |
|
211 |
protected: |
212 |
- ComponentDescription getAudioNodeDescription() const; |
213 |
+ AudioComponentDescription getAudioNodeDescription() const; |
214 |
void initializeAudioUnit(); |
215 |
|
216 |
private: |
217 |
--- phonon-4.4_pre20090520/qt7/audiomixer.mm.orig 2009-10-10 21:56:20 +0200 |
218 |
+++ phonon-4.4_pre20090520/qt7/audiomixer.mm 2009-10-10 21:56:33 +0200 |
219 |
@@ -30,9 +30,9 @@ AudioMixerAudioNode::AudioMixerAudioNode |
220 |
m_volume = 1.0f; |
221 |
} |
222 |
|
223 |
-ComponentDescription AudioMixerAudioNode::getAudioNodeDescription() const |
224 |
+AudioComponentDescription AudioMixerAudioNode::getAudioNodeDescription() const |
225 |
{ |
226 |
- ComponentDescription description; |
227 |
+ AudioComponentDescription description; |
228 |
description.componentType = kAudioUnitType_Mixer; |
229 |
description.componentSubType = kAudioUnitSubType_StereoMixer; |
230 |
description.componentManufacturer = kAudioUnitManufacturer_Apple; |
231 |
--- phonon-4.4_pre20090520/qt7/audionode.h.orig 2009-10-10 20:39:39 +0200 |
232 |
+++ phonon-4.4_pre20090520/qt7/audionode.h 2009-10-10 20:40:01 +0200 |
233 |
@@ -73,7 +73,7 @@ namespace QT7 |
234 |
|
235 |
// Only the following methods needs to |
236 |
// be overidden by only_one-audio-unit nodes: |
237 |
- virtual ComponentDescription getAudioNodeDescription() const; |
238 |
+ virtual AudioComponentDescription getAudioNodeDescription() const; |
239 |
virtual void initializeAudioUnit(); |
240 |
|
241 |
private: |
242 |
--- phonon-4.4_pre20090520/qt7/audionode.mm.orig 2009-10-10 20:35:51 +0200 |
243 |
+++ phonon-4.4_pre20090520/qt7/audionode.mm 2009-10-10 22:02:27 +0200 |
244 |
@@ -63,17 +63,20 @@ void AudioNode::createAndConnectAUNodes( |
245 |
if (m_auNode) |
246 |
return; |
247 |
|
248 |
- ComponentDescription description = getAudioNodeDescription(); |
249 |
+ AudioComponentDescription description = getAudioNodeDescription(); |
250 |
DEBUG_AUDIO_GRAPH("AudioNode" << int(this) << "creates AUNode" |
251 |
<< QString(!FindNextComponent(0, &description) ? "ERROR: COMPONENT NOT FOUND!" : "OK!")) |
252 |
|
253 |
OSStatus err = noErr; |
254 |
+#if 0 |
255 |
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 |
256 |
if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) |
257 |
err = AUGraphAddNode(m_audioGraph->audioGraphRef(), &description, &m_auNode); |
258 |
else |
259 |
#endif |
260 |
err = AUGraphNewNode(m_audioGraph->audioGraphRef(), &description, 0, 0, &m_auNode); |
261 |
+#endif |
262 |
+ err = AUGraphAddNode(m_audioGraph->audioGraphRef(), &description, &m_auNode); |
263 |
|
264 |
BACKEND_ASSERT2(err != kAUGraphErr_OutputNodeErr, "A MediaObject can only be connected to one audio output device.", FATAL_ERROR) |
265 |
BACKEND_ASSERT2(err == noErr, "Could not create new AUNode.", FATAL_ERROR) |
266 |
@@ -100,10 +103,10 @@ void AudioNode::createAudioUnits() |
267 |
initializeAudioUnit(); |
268 |
} |
269 |
|
270 |
-ComponentDescription AudioNode::getAudioNodeDescription() const |
271 |
+AudioComponentDescription AudioNode::getAudioNodeDescription() const |
272 |
{ |
273 |
// Override if needed. |
274 |
- ComponentDescription cd; |
275 |
+ AudioComponentDescription cd; |
276 |
Q_UNUSED(cd); |
277 |
return cd; |
278 |
} |
279 |
--- phonon-4.4_pre20090520/qt7/audiooutput.h.orig 2009-10-10 20:40:32 +0200 |
280 |
+++ phonon-4.4_pre20090520/qt7/audiooutput.h 2009-10-10 20:40:48 +0200 |
281 |
@@ -41,7 +41,7 @@ namespace QT7 |
282 |
float volume(); |
283 |
|
284 |
protected: |
285 |
- ComponentDescription getAudioNodeDescription() const; |
286 |
+ AudioComponentDescription getAudioNodeDescription() const; |
287 |
void initializeAudioUnit(); |
288 |
|
289 |
signals: |
290 |
--- phonon-4.4_pre20090520/qt7/audiooutput.mm.orig 2009-10-10 20:40:54 +0200 |
291 |
+++ phonon-4.4_pre20090520/qt7/audiooutput.mm 2009-10-10 20:41:11 +0200 |
292 |
@@ -16,6 +16,7 @@ |
293 |
*/ |
294 |
|
295 |
#include "audiooutput.h" |
296 |
+#include "audiooutput_p.h" |
297 |
#include "audiograph.h" |
298 |
#include "audiodevice.h" |
299 |
#include "mediaobject.h" |
300 |
@@ -34,9 +34,9 @@ AudioOutputAudioPart::AudioOutputAudioPa |
301 |
m_volume = 1; |
302 |
} |
303 |
|
304 |
-ComponentDescription AudioOutputAudioPart::getAudioNodeDescription() const |
305 |
+AudioComponentDescription AudioOutputAudioPart::getAudioNodeDescription() const |
306 |
{ |
307 |
- ComponentDescription description; |
308 |
+ AudioComponentDescription description; |
309 |
description.componentType = kAudioUnitType_Output; |
310 |
description.componentSubType = kAudioUnitSubType_DefaultOutput; |
311 |
description.componentManufacturer = kAudioUnitManufacturer_Apple; |
312 |
--- phonon-4.4_pre20090520/qt7/audiosplitter.h.orig 2009-10-10 20:41:44 +0200 |
313 |
+++ phonon-4.4_pre20090520/qt7/audiosplitter.h 2009-10-10 20:41:53 +0200 |
314 |
@@ -33,7 +33,7 @@ namespace QT7 |
315 |
{ |
316 |
public: |
317 |
AudioNodeSplitter(); |
318 |
- ComponentDescription getAudioNodeDescription() const; |
319 |
+ AudioComponentDescription getAudioNodeDescription() const; |
320 |
}; |
321 |
|
322 |
class AudioSplitter : public MediaNode |
323 |
--- phonon-4.4_pre20090520/qt7/audiosplitter.mm.orig 2009-10-10 20:42:02 +0200 |
324 |
+++ phonon-4.4_pre20090520/qt7/audiosplitter.mm 2009-10-10 20:42:10 +0200 |
325 |
@@ -28,9 +28,9 @@ AudioNodeSplitter::AudioNodeSplitter() : |
326 |
{ |
327 |
} |
328 |
|
329 |
-ComponentDescription AudioNodeSplitter::getAudioNodeDescription() const |
330 |
+AudioComponentDescription AudioNodeSplitter::getAudioNodeDescription() const |
331 |
{ |
332 |
- ComponentDescription description; |
333 |
+ AudioComponentDescription description; |
334 |
description.componentType = kAudioUnitType_FormatConverter; |
335 |
description.componentSubType = kAudioUnitSubType_Splitter; |
336 |
description.componentManufacturer = kAudioUnitManufacturer_Apple; |
337 |
--- phonon-4.4_pre20090520/qt7/quicktimeaudioplayer.h.orig 2009-10-10 21:53:20 +0200 |
338 |
+++ phonon-4.4_pre20090520/qt7/quicktimeaudioplayer.h 2009-10-10 21:53:30 +0200 |
339 |
@@ -66,7 +66,7 @@ namespace QT7 |
340 |
QString currentTimeString(); |
341 |
QuickTimeVideoPlayer *videoPlayer(); |
342 |
|
343 |
- ComponentDescription getAudioNodeDescription() const; |
344 |
+ AudioComponentDescription getAudioNodeDescription() const; |
345 |
void initializeAudioUnit(); |
346 |
bool fillInStreamSpecification(AudioConnection *connection, ConnectionSide side); |
347 |
void mediaNodeEvent(const MediaNodeEvent *event); |
348 |
--- phonon-4.4_pre20090520/qt7/quicktimeaudioplayer.mm.orig 2009-10-10 21:53:42 +0200 |
349 |
+++ phonon-4.4_pre20090520/qt7/quicktimeaudioplayer.mm 2009-10-10 21:55:18 +0200 |
350 |
@@ -266,13 +266,13 @@ bool QuickTimeAudioPlayer::hasAudio() |
351 |
bool QuickTimeAudioPlayer::soundPlayerIsAwailable() |
352 |
{ |
353 |
QuickTimeAudioPlayer player; |
354 |
- ComponentDescription d = player.getAudioNodeDescription(); |
355 |
- return FindNextComponent(0, &d); |
356 |
+ AudioComponentDescription d = player.getAudioNodeDescription(); |
357 |
+ return AudioComponentFindNext(0, &d); |
358 |
} |
359 |
|
360 |
-ComponentDescription QuickTimeAudioPlayer::getAudioNodeDescription() const |
361 |
+AudioComponentDescription QuickTimeAudioPlayer::getAudioNodeDescription() const |
362 |
{ |
363 |
- ComponentDescription description; |
364 |
+ AudioComponentDescription description; |
365 |
description.componentType = kAudioUnitType_Generator; |
366 |
description.componentSubType = kAudioUnitSubType_ScheduledSoundPlayer; |
367 |
description.componentManufacturer = kAudioUnitManufacturer_Apple; |