MCF logo

MCF specification, API/libmcf

This is a subpage of MCF-specification.

Check out the CVS in SourceForge.

We are trying to provide a multi-platform library that would do practically any MCF-operation you can imagine. The library is in C++, but the API of it is in C for compatibility.

Codec API

We need an API for MCF-codecs too.

When encoding, user selects the codec (probably via libmcf), which then inits Track Entry fields. Then user can start throwing raw data (in a format (rgb/yuv, etc) negotiated somehow) at the libmcf, which then forwards it for the codec. Codec gives the data for MCF in compressed Frames. MCF transparently puts those Frames to Blocks based on various settings coming from the codec and from the application (user). Library also automatically handles Clusters.

When playing, codec can be automatically selected based on information from Track Entry and from CodecIdentifiers available on the system. If there are several codecs capable of playing the file, players should allow users to select which one to use.

CodecIdentifier is a data structure that contains name of the codec, features of it and other more or less useful info. Library would request that info from the codec. We would also need some system for managing codecs installed on the system. This will probably have to be platform-dependant (oh, didn't I mention it yet? our codec API is platform-independant).

Wrapper

Wrapper looks like a codec on the MCF-side, but actually attaches itself to a non-MCF-codec (to a Video for Windows codec, for example) and transforms the data as required. Also, just like a real codec, when encoding, fills most fields in the Track Entry.

Native MCF-codecs will be a better choice, of course, but the transition period requires us these hacks.