[vlc-devel] How to write a encoder/decoder plugin for VLC?

Rémi Denis-Courmont rem at videolan.org
Thu Mar 12 15:32:58 CET 2009


Le jeudi 12 mars 2009 16:13:28 Alex Lee, vous avez écrit :
> I want to add encoding and decoding capability for a new video coding std
> to VLC, such as h.264, theora. So that I can transcode some
> Thoera/Vorbis/Ogg stream to <the new video coding std>/Vorbis/Ogg stream.

Probably the best example is the existing Theora plugin at  
modules/codec/theora.c (you can ignore the packetizer part). There is also 
modules/codec/rawvideo.c, but it maybe a bit too simplistic.

A codec plugin simply checks the input format. Then it sets the output format, 
typically some form of YCrCb and a decoding callback. Everytime there is a 
coded payload, the callbacks gets called, and fills the decoder picture 
buffers.

Note that you'll need to at least one data input that can "contain" the codec, 
typically a file format.

-- 
Rémi Denis-Courmont
http://git.remlab.net/cgi-bin/gitweb.cgi?p=vlc-courmisch.git;a=summary



More information about the vlc-devel mailing list