From kde-panel-devel Sat Mar 26 12:15:52 2011 From: "Igor Poboiko" Date: Sat, 26 Mar 2011 12:15:52 +0000 To: kde-panel-devel Subject: Re: Review Request: Rework KMix DBus API and add KMix plasma Message-Id: <20110326121552.23050.86623 () vidsolbach ! de> X-MARC-Message: https://marc.info/?l=kde-panel-devel&m=130114178508741 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============2023358127==" --===============2023358127== Content-Type: multipart/alternative; boundary="===============0779420043960771889==" --===============0779420043960771889== 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://svn.reviewboard.kde.org/r/6587/ ----------------------------------------------------------- (Updated March 26, 2011, 12:15 p.m.) Review request for Plasma and Diego Casella. Changes ------- - Fixed crash when called removeSource() in dataengine destructor (thanks = to Diego for report :) - Added some data sources such as "Can Be Muted" (shows can this particula= r control be muted), "Icon" (QIcon - an icon for control), "Controls Icons = Names" (list of QStrings - names of controls icons in mixer) - Added DBus properties and methods: currentMasterMixer, currentMasterCont= rol, preferredMasterMixer, preferredMasterControl, setCurrentMaster(), setP= referredMaster() (does obvious things) and canMute() (for controls) I didn't add ability to change and work with preferred/current master in da= taengine because I didn't find any way to monitor its changes (in DBus part) Comments are welcome :) Summary ------- This patch reworks KMix DBus API and adds a plasma dataengine+service as a = frontend to information provided by DBus. New DBus structure is: - /Mixers used to get some global information, such as available mixers list and glob= al master mixer - /Mixers/MIXER_ID used to get information about mixer with id=3DMIXER_ID. It provides such in= formation as list of available controls, name of this mixer, id, etc - /Mixers/MIXER_ID/CONTROL_ID used to get and set information about control. Such information as volume l= evel, mute, name of control, etc. It also adds a DBus signals which are emitted when new mixer/control appear= s, or volume level changes. It also splits all dbus-related code to separate class, DBus{KMix,Mixer,Con= trol}Wrapper. The Plasma Dataengine: By default, the only available source is "KMix". It provides information gl= obal information about KMix: is KMix running, and list of available mixers.= (its IDs) Source for every mixer is called by it's ID (for example, "ALSA::HDA_Intel:= 1"). This source provides such information about current Mixer as: it's rea= dable name, is it opened, its balance and list of available controls. It al= so adds basic sources for every control, which provides only information ab= out its readable name Sources for controls are called by 'MIXER_ID/CONTROL_ID' (for example, "ALS= A::HDA_Intel:1/Master:0"). If you request this source, it will provide such= information as its readable name, is it muted and its volume level (which = are updates automatically, using DBus signals). There is a service available for controls sources. It provides such methods= as setVolume() and setMute(). It doesn't close bug 171287, but it becomes one step closer to its solving = :) And, I'm not very familiar with CMake, but it would be great idea to make p= lasma part optional. This addresses bug 171287. https://bugs.kde.org/show_bug.cgi?id=3D171287 Diffs (updated) ----- /trunk/KDE/kdemultimedia/kmix/CMakeLists.txt 1225808 = /trunk/KDE/kdemultimedia/kmix/apps/kmix.cpp 1225808 = /trunk/KDE/kdemultimedia/kmix/core/mixdevice.h 1225808 = /trunk/KDE/kdemultimedia/kmix/core/mixdevice.cpp 1225808 = /trunk/KDE/kdemultimedia/kmix/core/mixer.h 1225808 = /trunk/KDE/kdemultimedia/kmix/core/mixer.cpp 1225808 = /trunk/KDE/kdemultimedia/kmix/dbus/dbuscontrolwrapper.h PRE-CREATION = /trunk/KDE/kdemultimedia/kmix/dbus/dbuscontrolwrapper.cpp PRE-CREATION = /trunk/KDE/kdemultimedia/kmix/dbus/dbusmixerwrapper.h PRE-CREATION = /trunk/KDE/kdemultimedia/kmix/dbus/dbusmixerwrapper.cpp PRE-CREATION = /trunk/KDE/kdemultimedia/kmix/dbus/dbusmixsetwrapper.h PRE-CREATION = /trunk/KDE/kdemultimedia/kmix/dbus/dbusmixsetwrapper.cpp PRE-CREATION = /trunk/KDE/kdemultimedia/kmix/dbus/org.kde.kmix.control.xml PRE-CREATION = /trunk/KDE/kdemultimedia/kmix/dbus/org.kde.kmix.mixer.xml PRE-CREATION = /trunk/KDE/kdemultimedia/kmix/dbus/org.kde.kmix.mixset.xml PRE-CREATION = /trunk/KDE/kdemultimedia/kmix/gui/kmixdockwidget.cpp 1225808 = /trunk/KDE/kdemultimedia/kmix/plasma/CMakeLists.txt PRE-CREATION = /trunk/KDE/kdemultimedia/kmix/plasma/engine/CMakeLists.txt PRE-CREATION = /trunk/KDE/kdemultimedia/kmix/plasma/engine/mixer.operations PRE-CREATION = /trunk/KDE/kdemultimedia/kmix/plasma/engine/mixerengine.h PRE-CREATION = /trunk/KDE/kdemultimedia/kmix/plasma/engine/mixerengine.cpp PRE-CREATION = /trunk/KDE/kdemultimedia/kmix/plasma/engine/mixerservice.h PRE-CREATION = /trunk/KDE/kdemultimedia/kmix/plasma/engine/mixerservice.cpp PRE-CREATION = /trunk/KDE/kdemultimedia/kmix/plasma/engine/plasma-engine-mixer.desktop P= RE-CREATION = /trunk/KDE/kdemultimedia/kmix/tests/CMakeLists.txt 1225808 = Diff: http://svn.reviewboard.kde.org/r/6587/diff Testing ------- KMix from KDE SC 4.6.0 compiles ok with this patch, and patch applies to cu= rrent trunk. Tested on system with one card and with ALSA backend, so I don't know is pl= asma dataengine works correctly with plugging/unplugging mixers (but it sho= uld). All DBus methods/properties works fine, signals are emitted, volume can be = set using DBus methods. Plasma dataengine was tested using plasmaengineexplorer. = All works fine except the one thing. When I request an source for Mixer, it= also adds soucres for controls. And then when I request source for already= available Control, it doesn't react anyhow. But when I set "Update every %= ms", and click "Reqeust", it works fine. If I request a source for control= BEFORE requesting the source for mixer, all works fine too (without settin= g "Update every % ms"). I don't know is it a plasmaengineexplorer bug, or m= y. Thanks, Igor --===============0779420043960771889== 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://svn.reviewb= oard.kde.org/r/6587/

Review request for Plasma and Diego Casella.
By Igor Poboiko.

Updated March 26, 2011, 12:15 p.m.

Changes
 - Fixed crash when called removeSource() in dataengine dest=
ructor (thanks to Diego for report :)
 - Added some data sources such as "Can Be Muted" (shows can this=
 particular control be muted), "Icon" (QIcon - an icon for contro=
l), "Controls Icons Names" (list of QStrings - names of controls =
icons in mixer)
 - Added DBus properties and methods: currentMasterMixer, currentMasterCont=
rol, preferredMasterMixer, preferredMasterControl, setCurrentMaster(), setP=
referredMaster() (does obvious things) and canMute() (for controls)

I didn't add ability to change and work with preferred/current master i=
n dataengine because I didn't find any way to monitor its changes (in D=
Bus part)
Comments are welcome :)

Descripti= on

This patch reworks KMix DBus API and adds a plasma dataengin=
e+service as a frontend to information provided by DBus.
New DBus structure is:
 - /Mixers
used to get some global information, such as available mixers list and glob=
al master mixer
 - /Mixers/MIXER_ID
used to get information about mixer with id=3DMIXER_ID. It provides such in=
formation as list of available controls, name of this mixer, id, etc
 - /Mixers/MIXER_ID/CONTROL_ID
used to get and set information about control. Such information as volume l=
evel, mute, name of control, etc.
It also adds a DBus signals which are emitted when new mixer/control appear=
s, or volume level changes.
It also splits all dbus-related code to separate class, DBus{KMix,Mixer,Con=
trol}Wrapper.

The Plasma Dataengine:
By default, the only available source is "KMix". It provides info=
rmation global information about KMix: is KMix running, and list of availab=
le mixers. (its IDs)
Source for every mixer is called by it's ID (for example, "ALSA::H=
DA_Intel:1"). This source provides such information about current Mixe=
r as: it's readable name, is it opened, its balance and list of availab=
le controls. It also adds basic sources for every control, which provides o=
nly information about its readable name
Sources for controls are called by 'MIXER_ID/CONTROL_ID' (for examp=
le, "ALSA::HDA_Intel:1/Master:0"). If you request this source, it=
 will provide such information as its readable name, is it muted and its vo=
lume level (which are updates automatically, using DBus signals).
There is a service available for controls sources. It provides such methods=
 as setVolume() and setMute().

It doesn't close bug 171287, but it becomes one step closer to its solv=
ing :)

And, I'm not very familiar with CMake, but it would be great idea to ma=
ke plasma part optional.

Testing <= /h1>
KMix from KDE SC 4.6.0 compiles ok with this patch, and patc=
h applies to current trunk.
Tested on system with one card and with ALSA backend, so I don't know i=
s plasma dataengine works correctly with plugging/unplugging mixers (but it=
 should).
All DBus methods/properties works fine, signals are emitted, volume can be =
set using DBus methods.

Plasma dataengine was tested using plasmaengineexplorer. =

All works fine except the one thing. When I request an source for Mixer, it=
 also adds soucres for controls. And then when I request source for already=
 available Control, it doesn't react anyhow. But when I set "Updat=
e every % ms", and click "Reqeust", it works fine. If I requ=
est a source for control BEFORE requesting the source for mixer, all works =
fine too (without setting "Update every % ms"). I don't know =
is it a plasmaengineexplorer bug, or my.
Bugs: 171287

Diffs= (updated)

  • /trunk/KDE/kdemultimedia/kmix/CMakeLists.txt (1225808)
  • /trunk/KDE/kdemultimedia/kmix/apps/kmix.cpp (1225808)
  • /trunk/KDE/kdemultimedia/kmix/core/mixdevice.cpp (1225808)
  • /trunk/KDE/kdemultimedia/kmix/core/mixer.h (1225808)
  • /trunk/KDE/kdemultimedia/kmix/core/mixer.cpp (1225808)
  • /trunk/KDE/kdemultimedia/kmix/dbus/dbuscontrolwrapper.h (PRE-CREATION)
  • /trunk/KDE/kdemultimedia/kmix/dbus/dbuscontrolwrapper.cpp (PRE-CREATION)
  • /trunk/KDE/kdemultimedia/kmix/dbus/dbusmixerwrapper.h (PRE-CREATION)
  • /trunk/KDE/kdemultimedia/kmix/dbus/dbusmixerwrapper.cpp (PRE-CREATION)
  • /trunk/KDE/kdemultimedia/kmix/dbus/dbusmixsetwrapper.h (PRE-CREATION)
  • /trunk/KDE/kdemultimedia/kmix/dbus/dbusmixsetwrapper.cpp (PRE-CREATION)
  • /trunk/KDE/kdemultimedia/kmix/dbus/org.kde.kmix.control.xml (PRE-CREATION)
  • /trunk/KDE/kdemultimedia/kmix/dbus/org.kde.kmix.mixer.xml (PRE-CREATION)
  • /trunk/KDE/kdemultimedia/kmix/dbus/org.kde.kmix.mixset.xml (PRE-CREATION)
  • /trunk/KDE/kdemultimedia/kmix/gui/kmixdockwidget.cpp (1225808)
  • /trunk/KDE/kdemultimedia/kmix/plasma/CMakeLists.txt (PRE-CREATION)
  • /trunk/KDE/kdemultimedia/kmix/plasma/engine/CMakeLists.txt (PRE-CREATION)
  • /trunk/KDE/kdemultimedia/kmix/plasma/engine/mixer.operations (PRE-CREATION)
  • /trunk/KDE/kdemultimedia/kmix/plasma/engine/mixerengine.h (PRE-CREATION)
  • /trunk/KDE/kdemultimedia/kmix/plasma/engine/mixerengine.cpp (PRE-CREATION)
  • /trunk/KDE/kdemultimedia/kmix/plasma/engine/mixerservice.h (PRE-CREATION)
  • /trunk/KDE/kdemultimedia/kmix/plasma/engine/mixerservice.cpp (PRE-CREATION)
  • /trunk/KDE/kdemultimedia/kmix/plasma/engine/plasma-engine-mixer.deskto= p (PRE-CREATION)
  • /trunk/KDE/kdemultimedia/kmix/tests/CMakeLists.txt (1225808)

View Diff

--===============0779420043960771889==-- --===============2023358127== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel --===============2023358127==--