GSoC proposal draft: Audio СD collection refactoring.

Tatjana Gornak t.gornak at yandex.ru
Mon Apr 29 23:40:33 UTC 2013


Hi all,

I am looking forward to get some feedback on my proposal. Thanks in advance.

=Proposal draft=

==Contact info==
Name: Tatiana Gornak
Email Address: t.gornak at gmail.com
Freenode IRC Nick: melandory
IM Service and Username: xmpp, errizo at gmail.com
Location (City, Country and/or Time Zone): Kaiserslautern, Germany, GMT+2

==Proposal Title==
Audio СD collection refactoring.

==Motivation and Goals==
Current implementation of AudioCd collection suffers from following
drawbacks: it uses deprecated MediaDevice framework, does not support
CDs playback on Windows, uses not best code solutions (for example,
see comments in [3]).

Amarok has several bugs in AudioCd collection components [1]. Since
successful accomplishment of this project will lead to fully rewritten
AudioCd collection, these bugs should be taken into account and if
possible do not appear in new code.

==Implementation Details==
Following classes should be implemented or revised (in case they exist).

===AudioCdCollectionFactory===
This class should react on Solid device detection and Solid device
ejection. If new device is CD [10], then it should create
AudioCdCollection.
Thus, in initialization of AudioCdCollectionFactory following steps
should be implemented:
1) checked if some AudioCd devices were already inserted on startup;
2) solid device detection and solid device ejection events should be
connected to proper slots of AudioCdCollectionFactory: for this
purpose Solid::DeviceNotifier and its deviceAdded and deviceRemoved
signals should be used.

===AudioCdCollection===
AudioCdCollection should be inherited from Collection and should
implement its methods. Collection initialization:  fetches and stores
metadata as described below.

====Metadata fetching====
1. Amarok uses kioslave audiocd:/ to browse data on audio CDs (see
AudioCdCollection::audioCdEntries), that could be a reason why CD
playback does not work on Windows [4]. The problem which should be
solved: is there any Windows-compatible solution which can be used for
metadata fetching or is it possible to add this feature to kioslave
audiocd. As alternative to kioslave audiocd:/ libk3bdevice can be
considered. This part of K3B is cross-platform (this is achieved by
using WinAPI in some routines).
2. For each track CDDB information should be requested (BR279485
should be taken into account while working on CDDB information
fetching).
3. AudioCdCollection should use MemoryMeta framework to represent
tracks: MemoryCollection should be used to store tracks, MapChanger
should be used to add new tracks to MemoryCollection, code of AudioCd
meta classes should be polished.
4. Track enumeration, CDDB information fetching should work  asynchronously.
5. BR289294 should be taken into account while working on metadata fetching.

===AudioCdCollectionLocation===
AudioCdCollectionLocation copies tracks out of the CD and supports
transcoding capability.

===Miscellaneous===
Current AudioCd collection implementation suffers from a lack of
interaction with the user. For example, there is no any feedback in
following cases: if transcoding fails or if track playback fails.

==Tentative Timeline==
Week 1 (17.06 -- 23.06), Week 2 (24.06 -- 30.06)
New implementation of AudioCdCollectionFactory and AudioCdCollection.
After  this step is completed, amarok should support AudioCd in a same
way as before, since code which uses kio, solid and cddb will not have
been rewritten at this point, but just reorganized.

Week 3 (01.07 -- 07.07), Week 4 (08.07 -- 14.07)
Integration of MemoryMeta framework for track representation, BR289294.

Week 5 (15.07 -- 21.07)
Work on CBBD metadata fetching routine, BR279485.

Week 7 (22.07 -- 28.07), Week 6 (29.07 -- 04.08)
Decision about metadata fetching routine should be done and
implemented: leave kioslave or switch to another solution.

Week 8 (05.08 -- 11.08)
Fix Bug 279188
Implement correct behavior on launching amarok with --cdplay in a way
it was suggested in review request [10].

Week 9 (12.08 -- 18.08)
Work on AudioCdCollectionLocation.

Week 10 (19.08 -- 25.08)
CD support testing and bug fixing stage.
After this step is completed, amarok should support CD not worse than before.

Week 11 (26.08 -- 01.09)
AudioCd Collection performance evaluation.
BR311329 and BR319036 should be taken into account on this step

Week 12 (02.09 -- 08.09), Week 13 (09.09 -- 15.09)
Code polishing and documentation writing phase.

Week 14 (16.09 -- 22.09), Week 15 (23.09 -- 29.09)
Pencils-down stage. Code should be prepared to be merged in master.

==About me==
I’m 24 year old Phd student of TU Kaiserslautern. My research lies in
area of computational mathematics. Some additional information about
me can be found on my page [9]. I have some experience of working with
amarok source code [6-8].

I will be able to work 40 hours a week during GSoC period. But it is
possible that I'll have a week vacation (I haven't planned it yet), if
so I will compensate it by rearranging work for weeks before vacation
and after.

Why AudioCd refactoring? My opinion is that open source project code
should be clean and advanced, in order to attract new developers and
AudioCd refactoring will help improve quality of Amarok code base.

==External links==
[1] http://goo.gl/tVxW3 [List of bugs in Collection/CD amarok component]
[2] http://solid.kde.org/ [Solid library description and documentation]
[3] https://git.reviewboard.kde.org/r/110081/ [amarok --cdplay review request]
[4] http://goo.gl/vvmzw [Forum KDE: Why won't Amarok play audio CDs on Windows?]
[5] http://goo.gl/Z8xyV [MediaDeviceMonitor.h sources]
[6] https://git.reviewboard.kde.org/r/107473/ [Playlist refactoring]
[7] https://git.reviewboard.kde.org/r/109879/ [Small cleanups in playlist]
[8] https://git.reviewboard.kde.org/r/109758/ [Asx playlist implementation]
[9] http://tehhi.name [Personal web page]
[10] http://goo.gl/mTClw [Solid::OpticalDisc Class Reference]

--
Sincerely yours,
Tatiana Gornak


More information about the Amarok-devel mailing list