Here's my proposal to fix the https://bugs.kde.org/show_bug.cgi?id=386105
See my comments there to get the idea of what's wrong with the plugin.
These formats I've enabled (APE and WavPack) were the actual formats I was testing against.
Details
- Reviewers
lesliezhai - Commits
- R467:059d0da2e2c6: [plugins] K3b FFMpeg Decoder Plugin Fix
Diff Detail
- Repository
- R467 K3b
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Hi Mikołaj,
Thanks for your contribution!
Could you please rebase your patch, because:
$ patch -Np1 -i D11634.diff patching file plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp Hunk #4 FAILED at 318. Hunk #5 succeeded at 356 (offset 3 lines). Hunk #6 succeeded at 408 (offset 3 lines). Hunk #7 succeeded at 491 (offset 3 lines). 1 out of 7 hunks FAILED -- saving rejects to file plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp.rej
Please git pull from upstream remote:
$ git remote -v origin git@git.kde.org:k3b (fetch) origin git@git.kde.org:k3b (push) $ git log commit 74f8b65981342a1240e7ac6610107e906dc0b884 Author: Albert Astals Cid <aacid@kde.org> Date: Mon Mar 19 23:53:26 2018 +0100 GIT_SILENT Upgrade KDE Applications version to 18.07.70.
Regarads,
Leslie Zhai
Hello. I decided to rework the patch since some important changes happened:
- I realized that k3b only supports 16bit audio (which is reasonable, because it was created to work mainly with CD audio), therefore removed some excess code;
- disabled WMA and AAC because they're floating point formats and need to be converted to 16 bit, which I'm planning to add eventually in the future.
Leslie, please review these changes again and then commit on my behalf as I have no write access atm.
Hi Mikołaj,
LGTM! Do you have commit access or should I commit it on your behalf?
PS: you can implement that in the next patch to use libswresample for covering all possible cases for the input audio.
Regards,
Leslie Zhai
After my research on libswresample topic I started to think that it's not a good solution for this situation, quite the opposite even. It still requires format conversions which renders the code to a much more complex state. So no advantages here really.
So I updated the code with my previous solution for the floating point format audio.
It's time to sum up the work: this patch fixes 16 bit audio decoding, adds planar formats support (WavPack and APE in particular), introduces floating point audio support (WMA, AAC).
Leslie, please review this change and commit on my behalf
Leslie, please make sure to commit using the right authorship information for the author of the patch, not yours.