Author: Saifelden Mohamed Ismail
saifeldenmi@gmail.com
This project's initial aim was to add CPPM decryption support into VLC. However, more was required to support the DVD-Audio format, so the initial aims were expanded upon. The final deliverables were updates to libdvdread to support the DVD-Audio format, libdvdcss for the decryption support, as well as a submodule for simple playback in VLC. All of this is well commented for documentation.
libdvdcsslibdvdread's behavior to read DVD-Audio discsVLC now supports simple audio title-based playback on encrypted DVD-Audio discs without the need to extract the audio data. This makes VLC one of the only ways to play this type of disc as-is. Both libdvdread and libdvdcss have been extended to support DVD-Audio features (IFO files, decryption, path structures, etc.) in an OS-agnostic way.
This work builds the foundation for full DVD-Audio disc capabilities, making it by far the most thoroughly implemented DVD-Audio code so far. While many DVD-Audio discs are also DVD-Video, not all are, and DVD-Audio contains far higher audio quality as well as features built specifically for music albums that don't exist in DVD-Video, such as song lyrics that will now be easier to implement in the future. Due to how uncommon these discs are, they are considered collectors' items and require special DVD players to use fully. Making the software to play these discs more widely available will help preserve this media long term, which aligns with VLC's goals.
This took up a significant portion of this project. Familiarizing myself with the specifications for both CPPM and DVD-Audio discs as well as understanding the already existing libdvdread and libdvdcss code was not only quite challenging but I would say it was probably the main hurdle I needed to cross before this project could materialize. I would say this phase was around a month or more.
Once I had built an understanding of everything, the changes I needed to make became very clear. After I had made the modifications to both libraries, fixing up and understanding how to create a VLC module that fit into the current DVD module took a substantial amount of time as well. This phase was a little less than a month.
It was in this phase that I was able to get my first encrypted disc to play, and I started to make merge requests for my changes in the DVD libraries. I would say this was the phase with the most work, considering that code refactoring was a very labor-intensive process, though it was very rewarding seeing my work become ready to be a part of the VLC codebase. This phase lasted less than a month, though I had to do more work than I usually had to.
It was in these weeks that I was cleaning up and validating the changes I had made to my libraries. libdvdread required a lot of changes and adjustments to ensure that its use was seamless and logical, with regards to DVD-Audio behavior. It was around this phase that I also began drafting my final report and notes that I had in my own little documentation page (link available in the header). This was when my changes to VLC had also been thoroughly reviewed and deemed acceptable.
This topic is heavily undocumented, and the available resources are often poorly explained or contain errors. Much of the effort was spent manually analyzing the format to replicate the desired behaviors.
There was initial trouble acquiring material to work on, though discs were generously provided by the foundation.
The DVD libraries are not as well documented as other pieces of software in VLC, causing initial friction in understanding how to extend them without breaking the API.
Reorganizing commits to fit VLC code standards was very time-consuming, though the remainder of the project ran more smoothly after the initial research phase.
The VLC demuxer had some issues working with MLP DVD-Audio streams that were difficult to resolve; this issue was dealt with by my mentor, Steve Lhomme, in a separate merge request.
Since I had never worked on a project of this size before, let alone a project that wasn't my own, this was a novel experience for me. I can now say for sure that after some initial friction, I've become much quicker at reading code and understanding how large codebases work.
I, of course, was already familiar with Git, using it to coordinate with teammates on code projects before this. Though I had never used many of its more advanced features like rebase, reflog, and I had never really had to organize and keep my commits easily workable. I've also become very familiar with working on merge requests, issues, etc.
In group projects before GSoC, I had never been put under a formal code review process or made to reform code/commits to adhere to a project's code practices. Because I am now more familiar with this process, I would say contributing to open source has become far less intimidating. It is likely that I will contribute to projects in the future because of this.
Before I started this project, I had no idea how code was written to run on multiple platforms or with multiple versions of dependencies. Now, I can say I’ve gained valuable experience using version-guard and feature test macros.
I would like to thank both of my mentors, Jean-Baptiste Kempf and Steve Lhomme, for their patience and time. I would also like to thank the foundation for providing me with difficult-to-access material for my work. This wouldn't have been possible without their guidance and support.