VideoDecoderFactory
The send and receive shape below mirrors what libavcodec actually does, including the cases a simpler interface cannot express: one packet producing zero frames, one packet producing several, and a decoder that must be drained before it will accept more input.
A decoder with a different natural shape, for example the browser's VideoDecoder, adapts to this one easily. The reverse is not true, which is why this shape was chosen.
Epochs are the other half of the contract. A decoder holds frames from packets it has already accepted, so the epoch a frame belongs to is decided when the packet was offered and not when the frame comes out. That is why send carries no generation: the only legal way to move a decoder to a new epoch is VideoDecoder.flush, which drops what is buffered and takes the new generation as its argument. Stamping the new epoch on a send would relabel frames decoded before it.
Properties
Functions
Null when this factory cannot handle the stream. The engine then tries the next candidate.
create with the player's deinterlacing policy, which is what the engine calls. The default ignores deinterlace; a factory that can deinterlace overrides this.