Pitivi GSoC: Final Report
3 min read | Sun Sep 11 2022
This project was aimed at porting Pitivi to GTK4, Pitivi used the GTK3+ library and required the change.
The whole project is confined to a single MR: gitlab.gnome.org/GNOME/pitivi/-/merge_requests/442
The port required extensive changes and brainstorming. There were namely three categories of changes -
Some code needed refactoring, with varying complexity and length, some were small but some were very extensive, for example, GtkDialog run() removal, some parts were easy to refactor to the callback-based system but some places still remain to be ported over due to the extent of their reliance on the return process.
After getting suggestions, I have also listed basic things I've done in the MR for easy reference and tracking.
The last commit I did during the GSoC period is: "Fix effectslibrary.ui search" "gitlab.gnome.org/GNOME/pitivi/-/commit/0ad9503df5f49e3a3dbbf1f71bc3b87b706ad213?merge_request_iid=442"
Till now I have been able to port a lot of the stuff to GTK4, most files are ported over and with some local changes I can open the application, this has given me a chance to understand what I should focus on. Pitivi is hard to port due to its massive size, but I'm really happy that I was able to port it to the extent I did.
During the first update -
Work - Ported stuff over to GTK4 which was backported to GTK3+, allowing for an easier porting experience, as you can run the application in this stage.
During the second update -
Work - Started the breaking phase, and enjoyed compile errors, ported quite a lot of stuff to GTK4
Hardships - Event controllers were a mess to understand
During the third update -
Work - Still in breaking phase, fixed most big errors and made significant progress.
Hardships - All the errors? :P Mostly event controller, GtkContainer, GtkLayout, etc...
During the fourth update -
Work - Finally able to run the application (with some caveats) and able to solve big issues, the moment where things start to fall in place. Was also able to port most of the event controller.
Hardships - Drag and Drop, GtkDraw, UI nightmare, GtkLayout, GdkScreen. Fell ill and had to change university, causing less productivity.
No, there is still work remaining, but it is not much, most things are done, and the things which are remaining, are so because of the amount of refactoring they would require and some cosmetic fixes.
Most of the application is ported over, but if you open it, you won't be able to do much, the reason for which is that if some places fail to run, then it will prevent the rest of the file from loading further, making a lot more things useless. Currently, you can open the application, open, import, or create a new project, access the effects and medialibrary (some work is required), and other miscellaneous things.
The timeline still remains to be properly ported due to the removal of GtkLayout and drag & drop event controller.
You cannot hope to do extensive refactoring work during GSoC because that will limit how much work you can do. In the start I was pushing commits with great quality, i.e. no change required later on, but that results in less time remaining thus it is better to get a working version and push that. If you still have remaining time before the deadline and other work is done then make those commits better and better, else just continue and after the work is done, focus on how you can improve it further to get the best result.
At least that's what I've come to believe.
But it depends on the project's length, complexity and expectations.
GSoC never made me join Open Source, it is something I believe in and love to be a part of. GSoC gave me an opportunity to work on such a big project along with the support of mentors and I appreciate all the love I've got. Thus, to conclude, this was just the beginning, you will keep hearing from me, in a good way :D
I also had an amazing experience presenting my work during GUADEC, it gave me great confidence and was an awesome experience. Thanks, GNOME for providing me the opportunity.
You can watch me present at - GUADEC Youtube
That will be it for this one, have a nice time everyone :)