GSoC Weekly Code Report 3

This week was very busy for me: I had been prepared to yet another exam and tried to do my best with my GSoC project (Totem chapters plugin):
  • I wanted to write my own tiny parser for CMML files based on libxml2 to drop libcmml dependency. Wow, I've done it :) That wasn't so easy as I thought due to lack of good documentation for libxml2. Well, there are some docs at, but it's not enough for a newbie in libxml2. There are only some simple examples, there are no descriptions for some enums, functions' descriptions are very poor... I'm not saying that libxml2 docs are bad, but it is really hard to use it without any knowledge. So I spent a lot of time reading docs, experimenting with it's features and possibilities before I got what I want. It parses files via xmlreader module.
    Now chapters plugin supports CMML parsing (and writing) without libcmml and you can build it without any troubles;

  • I've also added clip sorting by time before displaying them and updated build system, fixed some bugs of course;

  • moving to new CMML parser gives a bit more benefits - now I can implement GIO support to read non-local files. So I started to read GIO documentation.
That's what I was doing this week. And as I've promised, here is a demo video how chapters plugin works:

Comparing with my last week plans I've done all that plans. I'll try to do the same every week :) Next week I want to implement all read/write operations via GIO (in async way) and maybe something else (a bit code clean up is needed). See you soon!

2 коммент.:

Анонимный комментирует...

I thought I posted a comment about this last week, but apparently it didn't work.

Nice work on the plugin so far, but I'm really not sure about dropping the libcmml dependency. You're simply replacing it with a libxml2 dependency which, although it's more commonly available, is still another dependency. Furthermore, you're duplicating code which already exists in libcmml. A better solution would be to improve libcmml so that it has all the features/API you need, make sure it's properly maintained, and then depend on it directly in Totem.

asaprykin комментирует...


the main problem with libcmml is that it is orphaned in some distributions, for example Debian. So not all distributions will have chapters plugin with Totem, which is not cool. And I can't guarantee that libcmml will appear in all mainline distributions after reworking. Also libcmml was not updated for a years and it is not widely used now. And why do we need to rewrite some parts of library if almost nobody (or really nobody) uses it? About code duplicating.. We need only a few tags to parse (is about 4-5) and we do not need all those tags and features from libcmml. Furthermore, libcmml depends on libexpat. So, in total sum, libcmml need a bit more dependencies for Totem instead of just libxml2. And I think making libcmml depends on glib is not right way for a lightweight C library as it is supposed to be..

Отправить комментарий