Open huynhsontung opened 1 year ago
Reading the CDs might require some manual work, since libvlc doesn't seem to support reading CDs in UWP properly (opens an empty now playing screen).
I don't know about raw video DVDs yet, but we could use CustomDevice (same API used in the inbox Media Player app), or use the Win32 APIs.
For CustomDevice specifically we'd need the optical
DeviceCapability to be able to use it for CDs/DVDs.
https://learn.microsoft.com/en-us/uwp/api/windows.devices.custom.customdevice?view=winrt-22621
https://learn.microsoft.com/en-us/windows/uwp/packaging/app-capability-declarations#device-capabilities (Optical device capability specifically)
For a list of IOCTLs for reading a CD: https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntddcdrm/
If you have the Windows Driver Kit installed you can try looking up that file locally and search these, should give you sufficient parameters for CustomDevice.SendIOControlAsync
.
Here's as well the Win32 APIs to do it (haven't played around much with it but for completeness):
https://learn.microsoft.com/en-us/windows/win32/devio/device-input-and-output-control-ioctl-
https://learn.microsoft.com/en-us/windows/win32/fileio/creating-and-opening-files
Here's also two tutorials regarding reading audio CDs:
https://www.codeproject.com/Articles/15725/Tutorial-on-reading-Audio-CDs
I also haven't explored CD-TEXT support yet (some audio CDs provide metadata through that), but that's something to investigate after the final implementation. For CD ripping we can also add a feature to look up metadata online, something like freedb or musicbrainz.
(just the device detection)