<-- Back to schedule

Ogg Chopping: techniques for programming correctness and efficiency

Chopping Ogg files is a core operation of a free video server,
required for both the clip addressing of MediaWiki's video
extension MetaVid, and the fast video seeking of Firefox 3.1.
It has to be fast and it has to be correct, but the problem is
poorly defined.

We choose to define the problem and then solve it, in three separate
implementations. In this presentation I'll introduce these: the
Apache module mod_annodex, and the CGI installable tools hogg-chop
and oggz-chop. Only two of these are written in C.

In order to explain the differences in approach, I'll give a C
programmer's introduction to the jargon of functional programming.
This is not a dry discussion of functional programming; it's fast-paced, mechanical, and uses strace to prove its point.

We'll sort the useful concepts from the obtuse crack and learn practical techniques that you can apply in any language.

We'll discuss:

* Pure functions and memoization
* GCC type annotations for compiler optimization
* Constructing C programs as algebras
* Lazy evaluation and continuations in C
* The complementary roles of proof and testing

Understanding these concepts can make you a better programmer.

In this case study, hogg-chop is a prototype that I made to
understand the problem better, before developing oggz-chop.
Along the way I'll show you how to install these tools in
order to set up your own personal video server :-)

Conrad Parker

Conrad works with Renesas in Tokyo, designing the Linux multimedia architecture for a new line of mobile processors.

He previously developed the Sweep sound editor and components of Annodex, an open standard for hyperlinked media. He regularly contributes to various free audio and video software projects.