libkcompactdisc test (testkcd) finds no tracks - wrong initialiser sent to the Phonon backend?

René J.V. Bertin rjvbertin at gmail.com
Fri Aug 18 10:22:56 UTC 2017


On Friday August 18 2017 09:24:56 René J.V. Bertin wrote:

>It looks to me like that could well be because it hands off a Solid UDI to Phonon and from there to the VLC Phonon backend. I've lost track of the control flow somewhere in there but I don't think Phonon knows how to handle such UDIs. Annoyingly there appears to be no way to get useful debugging done via the audiocd kio so I cannot corroborate this intuition.

One thing that seems off is this:

```
		Solid::Device opticalDevice(m_udi);
		Solid::OpticalDrive *opticalDrive = opticalDevice.as<Solid::OpticalDrive>();
		qCDebug(KCD) << "producer called, opticalDrive is " << opticalDrive;

		if(opticalDrive) {
			Solid::OpticalDisc *opticalDisc = opticalDevice.as<Solid::OpticalDisc>();
```

This gives opticalDisc==0 (on Linux) which is not illogical; the OpticalDisc property/whatever is the child of the OpticalDrive instance (presumably the only child for an optical drive).

FWIW, this cast might actually work on Mac since in IOKit there is apparently no distinction between OpticalDisc and OpticalDrive (for audio CDs at least that have no partitions).

R.


More information about the Kde-frameworks-devel mailing list