Add encoder and decoder support

This is rather complicated. You have the video output port conn-
ected to the splitter, which is connected to the encoder. From there,
the data from the encoder callbacks is then being decoded then
re-encoded again!

This is rather pointless. Wouldn't it make more sense to simply
encode once at the beginning?