From kde-core-devel Sat Dec 03 23:59:57 2011 From: =?utf-8?q?Mat=C4=9Bj_Laitl?= Date: Sat, 03 Dec 2011 23:59:57 +0000 To: kde-core-devel Subject: Re: Review Request: udev PortableMediaPlayer: read protocols from Message-Id: <20111203235957.1214.63461 () vidsolbach ! de> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=132298756604762 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============4364783362389388031==" --===============4364783362389388031== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/103028/ ----------------------------------------------------------- (Updated Dec. 3, 2011, 11:59 p.m.) Review request for kdelibs. Changes ------- Added media-player-info check to CMakeLists; cleaned up xgdbasers; packager= info in commit msg and CCMAIL to kde-packager@kde.org (hope it can be sent= there from commit hook) This patch is still based on KDE/4.7 branch (I test it in KDE 4.7), should = I port it to frameworks branch? (solid seems moved around in this branch). Summary (updated) ----------------- udev PortableMediaPlayer: read protocols from media-player-info Description (updated) ------- udev PortableMediaPlayer: read protocols from media-player-info This is a second attempt at implementing PortableMediaPlayer for udev back-end using media-player-info [3], the first attempt was [2] by Alex Merry and this patch is heavily based on it. This patch relates to a discussion at [1] and is just a first step, the second would be to forward PMP interface from udev backed to udisks backed somehow (udisks...Device interface provides NativePath attribute that links to sysfs path that can help - on Linux) [1] http://mail.kde.org/pipermail/kde-hardware-devel/2011-October/001481.ht= ml [2] https://svn.reviewboard.kde.org/r/5853/ [3] http://www.freedesktop.org/wiki/Software/media-player-info Care is taken not to change existing behaviour - e.g. when udev env ID_MEDIA_PLAYER equals 1, behaviour is unchanged. PACKAGERS, solid udev backend now has following optional runtime-only dependency that provides udev rules and other info for identification of the portable media players: * media-player-info: for identifying USB storage devices and iPods Following packages also provide relevant udev rules, but we suggest not depending on them as they should by pulled by packages that actually use them (such as Amarok, transitively): * usbmuxd: for identifying iOS-based iPods * libmtp >=3D 1.0.4: for identifying MTP players CCBUG: 253671 # does not solve it yet, but is a first step CCBUG: 269447 CCBUG: 269451 REVIEW: 103028 DIGEST: groundwork for better media device player detection CCMAIL: amarok-devel@kde.org CCMAIL: kde-packager@kde.org Diffs (updated) ----- solid/solid/CMakeLists.txt 1a4adfad3b0aef700176e236f7587d3f26c76362 = solid/solid/backends/udev/udevdevice.cpp d6c7fb43427e7db4cb7cfa7d67a02c53= 68a7811e = solid/solid/backends/udev/udevmanager.cpp 55e655b9f49875923d82b7f2bf10b0e= 23c3bdfe1 = solid/solid/backends/udev/udevportablemediaplayer.h e0348aafea7ec41e0df57= 8dc661fbbb521531adf = solid/solid/backends/udev/udevportablemediaplayer.cpp 32a189315bbc3bd323e= f39f9e2743cbfe1063e68 = solid/solid/ifaces/portablemediaplayer.h b03a995223f03fa15c724427f05afdff= 6c3e7379 = solid/solid/xdgbasedirs.cpp PRE-CREATION = solid/solid/xdgbasedirs_p.h PRE-CREATION = Diff: http://git.reviewboard.kde.org/r/103028/diff/diff Testing ------- 1. connect iPod 2. works: $ solid-hardware details /org/kde/solid/udev/sys/devices/pci0000:00/0000:00= :1d.0/usb2/2-1/2-1.2/2-1.2:1.0/host6/target6:0:0/6:0:0:0/block/sdc udi =3D '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2= -1.2/2-1.2:1.0/host6/target6:0:0/6:0:0:0/block/sdc' parent =3D '/org/kde/solid/udev' (string) vendor =3D 'Apple' (string) product =3D 'iPod' (string) description =3D 'Portable Media Player' (string) Block.major =3D 8 (0x8) (int) Block.minor =3D 32 (0x20) (int) Block.device =3D '/dev/sdc' (string) PortableMediaPlayer.supportedProtocols =3D {'storage', 'ipod'} (string l= ist) PortableMediaPlayer.supportedDrivers =3D {'usb'} (string list) 3. not yet: $ solid-hardware details /org/freedesktop/UDisks/devices/sdc1 udi =3D '/org/freedesktop/UDisks/devices/sdc1' parent =3D '/org/freedesktop/UDisks/devices/sdc' (string) vendor =3D 'Apple' (string) product =3D 'MATOUSUV IP' (string) description =3D 'MATOUSUV IP' (string) Block.major =3D 8 (0x8) (int) Block.minor =3D 33 (0x21) (int) Block.device =3D '/dev/sdc1' (string) StorageAccess.accessible =3D true (bool) StorageAccess.filePath =3D '/media/MATOUSUV IP' (string) StorageAccess.ignored =3D false (bool) StorageVolume.ignored =3D false (bool) StorageVolume.usage =3D 'FileSystem' (0x2) (enum) StorageVolume.fsType =3D 'vfat' (string) StorageVolume.label =3D 'MATOUSUV IP' (string) StorageVolume.uuid =3D '3141-5926' (string) StorageVolume.size =3D 7888957440 (0x1d637f000) (qulonglong) Thanks, Mat=C4=9Bj Laitl --===============4364783362389388031== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable
This is an automatically generated e-mail. To reply, visit: http://git.revie= wboard.kde.org/r/103028/

Review request for kdelibs.
By Mat=C4=9Bj Laitl.

Updated Dec. 3, 2011, 11:59 p.m.

Changes
Added media-player-info check to CMakeLists; cleaned up xgdb=
asers; packager info in commit msg and CCMAIL to kde-packager@kde.org (hope=
 it can be sent there from commit hook)

This patch is still based on KDE/4.7 branch (I test it in KDE 4.7), should =
I port it to frameworks branch? (solid seems moved around in this branch).<=
/pre>
  

Summary (= updated)

udev PortableMediaPlayer: read protocols from media-player-i=
nfo

Descripti= on (updated)

udev PortableMediaPlayer: read protocols from media-player-i=
nfo

This is a second attempt at implementing PortableMediaPlayer for udev
back-end using media-player-info [3], the first attempt was [2] by
Alex Merry and this patch is heavily based on it. This patch relates to
a discussion at [1] and is just a first step, the second would
be to forward PMP interface from udev backed to udisks backed somehow
(udisks...Device interface provides NativePath attribute that links to
sysfs path that can help - on Linux)

[1] http://mail.kde.org/pipermail/kde-hardware-devel/2011-October/001481.ht=
ml
[2] https://svn.reviewboard.kde.org/r/5853/
[3] http://www.freedesktop.org/wiki/Software/media-player-info

Care is taken not to change existing behaviour - e.g. when udev env
ID_MEDIA_PLAYER equals 1, behaviour is unchanged.

PACKAGERS, solid udev backend now has following optional runtime-only
dependency that provides udev rules and other info for identification
of the portable media players:
 * media-player-info: for identifying USB storage devices and iPods

Following packages also provide relevant udev rules, but we suggest not
depending on them as they should by pulled by packages that actually
use them (such as Amarok, transitively):
 * usbmuxd: for identifying iOS-based iPods
 * libmtp >=3D 1.0.4: for identifying MTP players

CCBUG: 253671  # does not solve it yet, but is a first step
CCBUG: 269447
CCBUG: 269451
REVIEW: 103028
DIGEST: groundwork for better media device player detection
CCMAIL: amarok-devel@kde.org
CCMAIL: kde-packager@kde.org

Testing <= /h1>
1. connect iPod
2. works:
$ solid-hardware details /org/kde/solid/udev/sys/devices/pci0000:00/0000:00=
:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/host6/target6:0:0/6:0:0:0/block/sdc
udi =3D '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1d.0/usb2/2=
-1/2-1.2/2-1.2:1.0/host6/target6:0:0/6:0:0:0/block/sdc'
  parent =3D '/org/kde/solid/udev'  (string)
  vendor =3D 'Apple'  (string)
  product =3D 'iPod'  (string)
  description =3D 'Portable Media Player'  (string)
  Block.major =3D 8  (0x8)  (int)
  Block.minor =3D 32  (0x20)  (int)
  Block.device =3D '/dev/sdc'  (string)
  PortableMediaPlayer.supportedProtocols =3D {'storage', 'ipod&=
#39;}  (string list)
  PortableMediaPlayer.supportedDrivers =3D {'usb'}  (string list)

3. not yet:
$ solid-hardware details /org/freedesktop/UDisks/devices/sdc1
udi =3D '/org/freedesktop/UDisks/devices/sdc1'
  parent =3D '/org/freedesktop/UDisks/devices/sdc'  (string)
  vendor =3D 'Apple'  (string)
  product =3D 'MATOUSUV IP'  (string)
  description =3D 'MATOUSUV IP'  (string)
  Block.major =3D 8  (0x8)  (int)
  Block.minor =3D 33  (0x21)  (int)
  Block.device =3D '/dev/sdc1'  (string)
  StorageAccess.accessible =3D true  (bool)
  StorageAccess.filePath =3D '/media/MATOUSUV IP'  (string)
  StorageAccess.ignored =3D false  (bool)
  StorageVolume.ignored =3D false  (bool)
  StorageVolume.usage =3D 'FileSystem'  (0x2)  (enum)
  StorageVolume.fsType =3D 'vfat'  (string)
  StorageVolume.label =3D 'MATOUSUV IP'  (string)
  StorageVolume.uuid =3D '3141-5926'  (string)
  StorageVolume.size =3D 7888957440  (0x1d637f000)  (qulonglong)

Diffs= (updated)

  • solid/solid/CMakeLists.txt (1a4adfad3b0aef= 700176e236f7587d3f26c76362)
  • solid/solid/backends/udev/udevdevice.cpp (= d6c7fb43427e7db4cb7cfa7d67a02c5368a7811e)
  • solid/solid/backends/udev/udevmanager.cpp = (55e655b9f49875923d82b7f2bf10b0e23c3bdfe1)
  • solid/solid/backends/udev/udevportablemediaplayer.h (e0348aafea7ec41e0df578dc661fbbb521531adf)
  • solid/solid/backends/udev/udevportablemediaplayer.cpp (32a189315bbc3bd323ef39f9e2743cbfe1063e68)
  • solid/solid/ifaces/portablemediaplayer.h (= b03a995223f03fa15c724427f05afdff6c3e7379)
  • solid/solid/xdgbasedirs.cpp (PRE-CREATION)=
  • solid/solid/xdgbasedirs_p.h (PRE-CREATION)=

View Diff

--===============4364783362389388031==--