[mythtv] Ticket #6822: win32 patch to display drive letter instead of the devicePath when having multiple optical drives

Jonathan Martens jonathan at snetram.nl
Thu Aug 13 07:23:08 UTC 2009


On 13-8-2009 7:04, Nigel Pearson wrote:
>> Comment(by Jonathan Martens <jonathan at snetram.nl>):
>>
>> Replying to [comment:1 nigel]:
>>> I think it would be better to patch the code in the Windows subclass of
>>> the media monitor that is incorrectly filling in the volumeID from
>>> GetVolumeNameForVolumeMountPoint().
>>
>> Is it really as the drivedetection algorithm seems to spit out the proper
>> labels in the MythFrontend logfile:
>>
>> {{{
>> 2009-08-08 17:50:26.328 Creating inactive MediaMonitor and static device
>> list
>> 2009-08-08 17:50:26.328 IgnoreDevices=
>> 2009-08-08 17:50:26.328 Found CD Drive : E:\
>> 2009-08-08 17:50:26.359 Found CD Drive : F:\
>> 2009-08-08 17:50:26.359 Initial device list: E:\ (E:\), F:\ (F:\)
>
> The standard code outputs m_RealDevice (m_DeviceModel).

Which in my case on Windows is like above: E:\ (E:\), F:\ (F:\) even 
without anything patched IIRC.

> m_VolumeID is only used later, when we know what media is mounted in
> that device.
> I suspect the strings like '\\.\{8213csad-3422dda-etc}' could be used
> for m_KeyID.
> m_VolumeID would be something like "Audio CD" or "THEITALIANJOB2006".

I will have another look at it if time permits as I need to prepare for 
my holiday trip as well. :)

> P.S. I assume you have patches for other media monitor parts?
> At the moment for me, the standard code does:

Yes, I do but I am still strugling with some parts of the 
MediaMonitor/MythCDROMWindows classes as it seems ioctl works a little 
bit different as compared to DeviceIoControl so I am not able to mount 
the device as I still need to figure out how to determine the status of 
the drive as well as the type of the object loaded into the device. To 
cut things short I seem to be stuck with rewriting the deviceStatus() 
function ATM as it seems Windows does not have a simple function to 
return the status of a drive.

> 2009-08-13 14:48:24.703 Creating MediaMonitor, SendEvents=false
> 2009-08-13 14:48:24.703 IgnoreDevices=
> 2009-08-13 14:48:24.734 Error. Couldn't create MythMediaDevice.
> 2009-08-13 14:48:24.734 Starting MediaMonitor
> 2009-08-13 14:48:24.750 Executing '/bin/mount A:\'
> 2009-08-13 14:48:24.750 performMountCmd() attempted to find mounted
> media, but failed?

Is this on Windows? I never came to the mount part, perhaps because I 
implemented a new class to define Windows only code defining 
MythCDROMWindows as well as as, like I said, Windows does not handle the 
optical drives the same as *nix flavored OS-es do.

If there is some interest I can submit my in some places hacky code as a 
patch either to this list or to trac, just let me know.

Kind regards,

Jonathan


More information about the mythtv-dev mailing list