[Patch] Phonon: add 2 methods to Path

Matthias Kretz kretz at kde.org
Thu Nov 20 14:57:56 CET 2008


Hi Tanguy,

thanks for your patch. Thierry thought of you again and your patch finally got 
committed to phonon trunk.

Sorry for letting you wait so long.

	Matthias

On Wednesday 17 September 2008 15:17:21 Tanguy Krotoff wrote:
> Hello again
>
> Here is a very small patch that adds 2 methods to Phonon::Path:
> MediaNode *Path::sourceNode() const
> MediaNode *Path::sinkNode() const
>
> This is useful when manipulating several MediaObject/AudioOutput/...,
> then you don't need to keep track of everything yourself, Path does it
> for you:
>
> 	Phonon::MediaObject * mediaObject = new Phonon::MediaObject(this);
>
> 	QList<Phonon::Path> outputPaths = mediaObject->outputPaths();
> 	foreach (Phonon::Path outputPath, outputPaths) {
> 		Phonon::AudioOutput * audioOutput = dynamic_cast<Phonon::AudioOutput
> *>(outputPath.sinkNode());
> 		if (audioOutput) {
> 			//blabla
> 		}
> 	}
>
> I don't really understand why this 2 methods where not already there.
>
> So if someone could simply tell me if it is OK or not...
>
> Thanks in advance

-- 
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/



More information about the Phonon-backends mailing list