OpenMediaLib User and Development Guide

Purpose:

This document provides details on the openmedialib (OML) design and implementation.

Overview:

OML is designed to provide a standardised wrapper mechanism for multimedia libraries (such as ffmpeg's avformat, quicktime, directshow and others).

Each library is typically wrapped by two interfaces – an input and a store.

An input implementation typically generates frame objects on request, where a frame provides an image and/or a collection of audio samples. An input typically reports a duration and allows seeking. This type of object encapsulate video and audio file decoders and frame generators.

A further type, known as a filter, is essentially a frame modifier which is connected to 1 or more inputs and behaves as an input itself. It can be used to provide image and/or audio effects.

A filter graph consists of a fully connected mix of filters and inputs.

A store implementation receives frame objects and does something with them – for example, it might encode them, or analyse them, or provide playout functionality.

Additionally, OML provides utility functionality for general image, audio and time manipulations.

Dependencies:

OML is dependent on boost, openimagelib (OIL) and openpluginlib (OPL).

All input, store and filter objects are introduced as plugins – some core, open source (typically, LGPL compliant) plugins are provided in the core OLIB distribution, but subsequent plugins can be developed independently and are not license restricted (though, obviously, distribution of those components is restricted by the licensing involved).

Usage:

OML provides a C++ interface which can be used directly. There is also a higher level python binding provided which allows simplified/rapid development of applications and test cases.

For the purposes of this document, most sample code relating to usage will be in python.

Sample code relating to development of additional plugins will be expressed in C++.