Bug 307343 - audiocd-kio 4.9.1 does not supply vorbis support
Summary: audiocd-kio 4.9.1 does not supply vorbis support
Status: RESOLVED FIXED
Alias: None
Product: kdemultimedia
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR major
Target Milestone: ---
Assignee: Multimedia Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-24 20:47 UTC by Felix Tiede
Modified: 2012-09-27 03:38 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.9.2


Attachments
Fix audiocd-kio plugins/vorbis/CMakeLists.txt to actually build vorbis encoder plugin (491 bytes, patch)
2012-09-24 21:02 UTC, Felix Tiede
Details
Fix plugins/vorbis/encodervorbis.* to not use HAVE_VORBIS anymore (2.97 KB, patch)
2012-09-25 07:45 UTC, Felix Tiede
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Tiede 2012-09-24 20:47:50 UTC
Though libvorbis-1.3.3 is provided and found by audiocd-kio's build system and libaudiocd_encoder_vorbis.so is built, there is no vorbis support for audio CDs.

There is no tab in systemsettings to allow setup and ogg/vorbis files are not provided if URL audiocd:/ is opened in dolphin, konqueror or amarok.

Reproducible: Always

Steps to Reproduce:
1. Open URL audiocd:/ in any kioslave-supporting application
Actual Results:  
No folder with Ogg/Vorbis files is provided.

Expected Results:  
Similar to wav there should be a folder providing the same files encoded as Ogg/Vorbis.

KDE-4.9.1, compiled from sources;
libvorbis-1.3.3, compiled from sources.

Digging through the code it seems the problem is caused by a number of #ifdef HAVE_VORBIS statements in source files in plugins/vorbis while HAVE_VORBIS is never defined, thus switching off the entire sourcecode of the plugin. 

I'll test if adding a line 'add_definitions( -DHAVE_VORBIS )' (similar to the matching line in plugins/flac/CMakeLists.txt) to plugins/vorbis/CMakeLists.txt solves the problem and provide a matching patch for it.
Comment 1 Felix Tiede 2012-09-24 21:02:18 UTC
Created attachment 74146 [details]
Fix audiocd-kio plugins/vorbis/CMakeLists.txt to actually build vorbis encoder plugin
Comment 2 Felix Tiede 2012-09-25 07:45:57 UTC
Created attachment 74156 [details]
Fix plugins/vorbis/encodervorbis.* to not use HAVE_VORBIS anymore

This is my other - IMHO cleaner - approach to the bug. It ditches conditional compiling completely but requires libvorbis version 2 (package version >RC2) at compiletime. As far as I understand this version of libvorbis is fairly old itself (according to xiph.org's source control: more than 10 years) so it should not pose any problems with reasonable recent installations.

This patch also makes use of the newer features of libvorbis, whih the other patch did not.
Comment 3 Michael Pyne 2012-09-27 03:23:20 UTC
Git commit c2baf636be4cb17400669b989d0215307c4ce1ec by Michael Pyne.
Committed on 27/09/2012 at 05:16.
Pushed by mpyne into branch 'KDE/4.9'.

audiocd-kio: Compile vorbis support when detected.

Apply a patch from Felix Tiede to re-enable vorbis plugin support for
the audio CD KIOSlave. (It can be verified that support was not
previously compiled by running kcmshell4 audiocd).

Felix has ideas for further improvement but I wanted to ensure that KDE
SC 4.9.2 contained the fix. Thanks for the bug report, issue
investigation, and fix(es)!

FIXED-IN:4.9.2

M  +2    -0    plugins/vorbis/CMakeLists.txt

http://commits.kde.org/audiocd-kio/c2baf636be4cb17400669b989d0215307c4ce1ec
Comment 4 Michael Pyne 2012-09-27 03:38:22 UTC
Felix:

I like the idea of your second patch to remove HAVE_VORBIS entirely. It would require the CMake check to be modified so that we don't try to compile if the correct version of the library isn't present (my version of CMake appears to already export data about which version of libvorbis was found, so this should hopefully be easy). In any event there's no emergency here so we can hold off until 4.10 before we change the required version of libvorbis.

If you could please send the code change patch along to the kde-multimedia mailing list for discussion/development I would appreciate it, Bugzilla isn't really the best place for code review. ;-)