blob: 74ad5608dba586730f4e2f72290fef0593b605e9 [file] [log] [blame]
Yavor Goulishev3aa430d2011-05-23 11:54:45 -07001TODO file:
2----------
3
4COMPATIBILITY fixes:
5
61. COMPATIBILITY: dual-mode devices, i.e. devices exposing both an MTP
7 and a USB Mass Storage Device Class (flashdrive) interface are and
8 have always been problematic. We must find a way to get this to work,
9 eventually. The problem is that the in-kernel mass storage driver hogs
10 the device before the MTP mode gets a chance of being used, whereas
11 the Windows kernel driver apparently does it the other way around,
12 trying the MTP mode first and then not fall back on mass storage if
13 MTP is available. (For some more explanations se src/libusb-glue.h.)
14 This may involve kernel modifications. Perhaps it is only necessary
15 to tweak the udev config not to load USB mass storage support for
16 these devices. Dunno.
17
182. COMPATIBILITY: several devices tend to "hang" after disconnect,
19 needing to be unplugged and replugged before they can be used again.
20 We don't know why, it may be related to low-level USB behaviour that
21 is not exposed in the logs we read. On some devices it appear that
22 avoiding to release the USB interface after closing the PTP/MTP
23 session solves this, and might be a hint at how the Windows MTP stack
24 works: perhaps the Windows MTP daemon grabs the interface once the
25 device is plugged in, created a session and NEVER release it.
26 Thus only unplug or shutdown ends the session. This behaviour can be
27 emulated (sort of) by DEVICE_FLAG_NO_RELEASE_INTERFACE which will
28 make the device not release the USB low-level interface, though it'll
29 still close the session. But is it really desireable to have
30 as default? Not unless we run an MTP daemon as well, probably, and
31 the behaviour is questionable from an USB interoperability point
32 of view.
33
34
35SPEEDUP fixes:
36
37 None known. libmtp is fast :-)
38
39
40FEATURE fixes:
41
421. FEATURE: Support playback and volume setting on devices that have it.
43 (I don't have one that does - Linus.)
44
452. FEATURE: Support relevant events. MTP devices seen in existance provide
46 events for "object added" and "object deleted". These should result in
47 atleast a call to the cache update function.
48
493. FEATURE: Mechanism to retrieve the device icon device property, else if not
50 present, look for DevIcon.fil (Windows ICO format) and
51 DevLogo.fil (PNG Format) images from the device (if available).
52
534. FEATURE: Shared device access so that multiple client applications can have
54 an open connection to the device at the same time via a handle. For example,
55 it should be somehow possible to run mtp-detect at the same time as amarok or
56 mtpfs is connected to a device. This would require some form of resource
57 sharing.
58
595. FEATURE: Implement an OpenSync backend for devices which have
60 calendaring, contact etc support. http://opensync.org/
61
62
63THOSE ARE ALREADY DONE:
64
651. FEATURE: Make an API that can return several devices and let the user
66 choose which one to operate, not just connect to the first one...
67
682. SPEED: Cache the object info for all items on the device.
69 Right now, ptp_getobjectinfo() is called repeatedly on the same
70 objects during startup, track listing, file listing, playlist listing,
71 album listing and whatever we implement tomorrow. A lot of useless
72 communication can be saved by cacheing this info. Notice that this
73 needs to be updated whenever flush_handles() is called too.
74 (This came from libgphoto2 implementing it!)
75
763. SPEED: Cache track metadata, file metadata etc in params->proplist.
77
784. SPEED: Whenever we add an object (file, track, playlist...) we
79 should only need to update the cache with relevant data. Atleast for
80 speedup caches.
81
825. COMPATIBILITY: account for different step sizes and intervals on some
83 numeric properties we set, make the functions round off when possible.
84
856. SPEED: Cache the supported object properties at first read/startup.
86 then use the cache to check for supported props instead of calling
87 out to PTP with ptp_mtp_getobjectpropssupported() every time.
88 The cache would be an array of size params->deviceinfo.ImageFormats_len
89 with a list for each format of the properties it will support. Notice
90 that this needs to be updated whenever flush_handles() is called too.
91 THIS HAS BEEN DISCARDED, TERO IMPLEMENTED IT BUT IT DOESN'T SEEM TO
92 YIELD MUCH.
93
947. FEATURE: Make abstract playlists really become size -1 when created as
95 the ones created on the device instead of the current 1 byte size.
96 (Is this possible using enhanced commands? See TODO remarks in
97 the create_abstract_entity() function)
98
998. FEATURE: Integrate libmtp with HAL / D-Bus so applications can dynamically
100 know when a device has been plugged in or removed. Need a mechanism to
101 connect a specific hal UDI.
102
1039. SPEEDUP: The recursive function that builds the folder tree is
104 O(n^2)! Atleast remove all non-folders (PTP associations) from the
105 list before we start sorting and building that tree. We walk the
106 entire list for each group of siblings right now!