Barry Wardell

Personal Website

 
  • Increase font size
  • Default font size
  • Decrease font size
Home GSoC
Google Summer of Code Blog

Specifying where to find Qt when compiling VLC

I'm doing most of my VLC development with Ubuntu Linux. Unfortunately, the latest Ubuntu version (9.04, aka Jaunty Jackalope) comes with Qt version 4.5.0. This version contains some bugs which make it undesirable for use with VLC. Many bugs have been subsequently fixed in 4.5.1, so I decided to use that instead.

I downloaded and installed the latest Qt SDK, a fairly straightforward process. It defaults to installing in /opt/qtsdk-2009.02 which was fine with me. Next, I had to try to get VLC to use this version of Qt instead of the standard Ubuntu version. This took a bit of figuring out, but eventually I found the QT4_CFLAGS and QT4_LIBS environment variables. After some trial and error, I found that the following commands did what I wanted:

export QT4_CFLAGS="-I/opt/qtsdk-2009.02/qt/include/ -I/opt/qtsdk-2009.02/qt/include/QtCore/ -I/opt/qtsdk-2009.02/qt/include/QtGui/"
export QT4_LIBS="-L/opt/qtsdk-2009.02/qt/lib/ -lQtCore -lQtGui"

I was then able to use ./configure && ./compile as normal to get VLC built against the newly installed Qt 4.5.1.

Update: xtophe pointed out in IRC that pkg-config files are distributed Qt. So a better solution is just to make sure pkg-config is able to find Qt's .pc files. I did this by setting the PKG_CONFIG_PATH environment variable:

export PKG_CONFIG_PATH=/opt/qtsdk-2009.02/qt/lib/pkgconfig/

 

Module vs. libVLC

GSoC officially started two weeks ago and unfortunately my project got off to a bit of a slow start. My PhD thesis took a bit longer to finish than expected and I only finally submitted it this week (after many a late night!), so up to then it consumed a lot of my time. The good news is that from now on I'm totally free to work on VLC for the rest of the summer.

The first thing I have been thinking about is whether I should implement the GUI as a module or using libVLC.  I had some discussions on IRC and played around with both options. The results are in the qtmc and qtmc-libvlc branches of my git repository. The libVLC way was much easier to get going, especially given the nice tutorial in the wiki. Despite this, I have decided to take the harder route and create the interface as a module. I think it's the better option in the long run as it will allow for more flexibility and will mean that it will be possible to use multiple interfaces simultaneously.

Another decision I had to make was what to use for actually implementing the interface. Qt seems like the best option for the main interface - it's a very nice GUI toolkit and is already used for the current default VLC interface. Since it sounds like fun, I also want to try to incorporate OpenGL in some aspects of the interface. I did a bit of research and it sounds like Qt and OpenGL seem to work quite well together, so I don't think it will be a problem using both. This might also mean that I could reuse some of the stuff from the PVR GUI.

With all decisions made, I'm now starting to actually write code and create the interface module. Using the existing qt4 module (which is used for the default interface) as a reference,  I created a new qtmc module. It took quite a lot of frustration and patience fiddling around with the build system, but eventually I managed to get it working. I now have a module which compiles and loads successfully in VLC. That's about all it does, though. Next, I will start to actually create the interface.

All my code is in 'modules/gui/qtmc' in the qtmc branch of my git repository. There's not much to see there yet, but that will change soon.

 

First Steps

I don't officially start my Summer of Code project until May 23, but that doesn't mean I can't start working on it before then. To give myself a break from thesis writing, I spent some time recently working on GSoC.

For last year's GSoC, Dylan Yudaken worked on a project to enhance the PVR capabilities in VLC. As part of the project, he began developing a PVR-style interface for VLC. Although he never finished the interface, he made some good progress and published some working code in his git repository.

I decided that the first goal for my own project would be to try out this code and see any of it can be re-used. After a bit of work, I managed to get his code to compile. Unfortunately, trying to actually run it resulted in VLC crashing. His code is based on some 0.9 version of VLC and uses OpenGL - a combination which I discovered doesn't work with my computer.

Since OpenGL is working for me with newer (1.0-based) versions of VLC, I decided to try and sync Dylan's code to a newer version of the VLC code. With help on IRC from Dylan and working in a branch of my own, brand new git repository, I updated his code to work with the latest VLC version. Thankfully, this time it worked (mostly) and I was able to play around with the GUI:

 

I've committed my changes and pushed the code to the VLC git server so it's available there in the dylanza-pvr branch for anyone to try out.

Now that I have the code up and running, I'm planning on playing around with it a bit and deciding what parts would be useful for the media centre interface.

 

Summer of Code, here we go...

Google Summer of Code I have been accepted as a student for Google Summer of Code 2009! I'll be working with the VideoLAN project on developing a media centre style interface for VLC. Check out my project proposal for an idea of what I aim to achieve with the project.

Officially, my project will start on May 23, but I will spend the time up until then getting to know the VLC people and familiarising myself with the code. I'll try to post updates here as I make progress.

 


About Me

I am a PhD student at University College Dublin, studying general relativity. My research is focused on the study of radiation reaction and the self-force problem.