About my GSoC project (Totem chapters/markers support)

So, I've been accepted for GSoC 2010 and I'm glad to do some nice stuff for GNOME, as it's my favourite DE :) I'll be working on implementing chapter/markers support for Totem player. I'm translating Totem into Russian, and this summer I wanna to write some code for it. At first, let's talk about it more definitly.

Maybe you've heard about CMML[0][1]. It's a XML-based Continuous Media Markup Language. It's used by Annodex[2] as authoring language for annotations, indexing and hyperlinking. In other words, CMML file is essentially a textual representation of an Annodex file, as written in CMML draft. Basically it consists of XML preamble, "head" tag with some params like "title", "author" and others, "stream" tags for handling bitstreams of different types (audio, video, text, etc) in Annodex tracks, and "clip" tags for handling chapters in these streams. Annodex tracks are created on top of these all tags in CMML file. Annodex mapped into Ogg Skeleton container along with CMML bitstream. Let me show these relations on the figure below:

________ _________ _________ __________
| CMML | | Video | | Audio | | ... | |
________ _________ _________ __________ |
| skeleton | > Annodex
_____________________________________________ |
| Ogg | |
_____________________________________________ /

| _______________________|
| | RTP |

| TCP | UDP |

| IP |

As you see, the Annodex is a bit more complex thing than we need. We do not need to operate with media bitstreams - we just need some sort of annotations. And CMML is what we need. Also, Annodex was developed for Ogg Skeleton container (maybe it can be used with another container format, but I didn't find such implementations), and we can't use it for other video formats. So, I've talked with my mentor - Bastien Nocera (I'm really proud to work this summer with him :)) - and decided to use CMML for chapters. CMML was developed to use with Ogg, too (I can't find other implementations). We decided to use external .cmml file along with video file to read/write video chapters (as subtitles in separate file) - in such way we can use chapters with any video format Totem supports. Later maybe I'll implement embedded CMML support for Ogg container (as additional feature, I've already played around with Ogg container, just for future :)). It should looks like this:

|stream | CMML
---------- instance
| head | document
| clip_1 | ---------------------------------------------------
---------- | data bitstream in packets |
| ... | ---------------------------------------------------
---------- |
| clip_n | |
---------- |
| |
| Multiplexing
|stream|head|clip_1| data packets |clip_2| data packets ...

But it's not the main target for now. By the way, I couldn't get libannodex working for writing, I'll see it more closely a bit later. My first step will be to parse CMML files in Totem plugin using libcmml and extract chapters information from them. I'm not greatly familiar with GLib and GTK+ (tried to write simple examples and did some university stuff with pthreads), so it will be a good expirience to learning these tools for me. I've read GLib docs, GObject docs and they are looking great ;) I like to learn new things and have a pleasure to do it.

And let's see at the CMML example document from the draft[1]:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE cmml SYSTEM "cmml.dtd">

<cmml lang="en">

<stream basetime="0">
<import contenttype="video/x-theora" src="fish.ogg" start="0"/>

<title>Types of fish</title>
<meta name="Producer" content="Joe Ordinary"/>
<meta name="DC.Author" content="Joe's friend"/>

<clip id="intro" start="0" title="Introduction">
<a href="http://example.com/fish.html">Read more about fish</a>
<desc>This is the introduction to the film Joe made about fish.

<clip id="dolphin" start="npt:3.5" end="npt:0:05:05.9"
<img src="dolphin.png"/>
<desc>Here, Joe caught sight of a dolphin in the ocean.</desc>
<meta name="Subject" content="dolphin"/>

<clip id="goldfish" start="npt:0:05:05.9" title="Goldfish">
<a href="http://example.com/morefish.anx?id=goldfish">
More video clips on goldfish.
<img src="http://example.com/goldfish.png"/>
<desc>Joe has a fishtank at home with many colourful fish.
The common goldfish is one of them and Joe's favourite.
Here are some fabulous pictures he has taken of them.
<meta name="Location" content="Joe's fishtank"/>
<meta name="Subject" content="goldfish"/>


As you can see, there are a lot of tags that we don't need, like "stream", "a", "img" and so on. Chapter file will be very simple and clear to read. At least I hope :)

These were my first words via blog. I plan to post here my achievements and thoughts during GSoC (and maybe later, too). Also I will send weekly status reports on GNOME soc mailing list (and post them here, too) to be in touch with community :) Next time (I hope on weekends) I'll write about my plans, what I've already done and more info about my doings.

[0]Wikipedia page
[1]CMML draft preiffer
[2]Annodex draft preiffer

2 коммент.:

andre klapper комментирует...

Looking forward to the results!

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

I'll do my best :)

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